diff --git a/assets/BasicTextarea.vue_vue_type_script_setup_true_lang-CfG2YTbd.js b/assets/BasicTextarea.vue_vue_type_script_setup_true_lang-DTJgscnz.js similarity index 75% rename from assets/BasicTextarea.vue_vue_type_script_setup_true_lang-CfG2YTbd.js rename to assets/BasicTextarea.vue_vue_type_script_setup_true_lang-DTJgscnz.js index 852a0ff58e6024912bf916e93767d0ea8add5957..76dda710a9e4403f5b435c2fd46f34e18cc715a8 100644 --- a/assets/BasicTextarea.vue_vue_type_script_setup_true_lang-CfG2YTbd.js +++ b/assets/BasicTextarea.vue_vue_type_script_setup_true_lang-DTJgscnz.js @@ -1,2 +1,2 @@ -import{d as g,cg as h,ch as m,g as s,p,z as x,I as y,o as E,c as M,n as T,W as _}from"./index-SpDrDth7.js";const $=g({__name:"BasicTextarea",props:{modelValue:{default:""},modelModifiers:{}},emits:h(["submit"],["update:modelValue"]),setup(u,{emit:i}){const c=i,a=m(u,"modelValue"),t=s(),l=s({height:"auto",overflowY:"hidden"});function f(e){e.target instanceof HTMLTextAreaElement&&(e.target.style.height="auto",e.target.style.height=`${e.target.scrollHeight}px`)}function d(e){var n,o;if(e.target instanceof HTMLTextAreaElement)if(e.code==="Enter"&&e.shiftKey){e.preventDefault();const r=(n=e.target)==null?void 0:n.selectionStart,v=(o=e.target)==null?void 0:o.selectionEnd;a.value=`${a.value.substring(0,r)} -${a.value.substring(v)}`,l.value.height="0",_().then(()=>{t.value&&(t.value.selectionStart=t.value.selectionEnd=r+1,l.value.height=`${t.value.scrollHeight}px`)})}else e.code==="Enter"&&(e.preventDefault(),c("submit",a.value))}return p(()=>{t.value&&(l.value.height=`${t.value.scrollHeight}px`)}),(e,n)=>x((E(),M("textarea",{ref_key:"textareaRef",ref:t,"onUpdate:modelValue":n[0]||(n[0]=o=>a.value=o),style:T(l.value),onInput:f,onKeydown:d},null,36)),[[y,a.value]])}});export{$ as _}; +import{d as g,ce as m,cf as h,g as s,p,z as x,E as y,o as E,c as M,n as T,V as _}from"./index-lQIQ1Nea.js";const V=g({__name:"BasicTextarea",props:{modelValue:{default:""},modelModifiers:{}},emits:m(["submit"],["update:modelValue"]),setup(u,{emit:i}){const c=i,a=h(u,"modelValue"),t=s(),l=s({height:"auto",overflowY:"hidden"});function f(e){e.target instanceof HTMLTextAreaElement&&(e.target.style.height="auto",e.target.style.height=`${e.target.scrollHeight}px`)}function d(e){var n,o;if(e.target instanceof HTMLTextAreaElement)if(e.code==="Enter"&&e.shiftKey){e.preventDefault();const r=(n=e.target)==null?void 0:n.selectionStart,v=(o=e.target)==null?void 0:o.selectionEnd;a.value=`${a.value.substring(0,r)} +${a.value.substring(v)}`,l.value.height="0",_().then(()=>{t.value&&(t.value.selectionStart=t.value.selectionEnd=r+1,l.value.height=`${t.value.scrollHeight}px`)})}else e.code==="Enter"&&(e.preventDefault(),c("submit",a.value))}return p(()=>{t.value&&(l.value.height=`${t.value.scrollHeight}px`)}),(e,n)=>x((E(),M("textarea",{ref_key:"textareaRef",ref:t,"onUpdate:modelValue":n[0]||(n[0]=o=>a.value=o),style:T(l.value),onInput:f,onKeydown:d},null,36)),[[y,a.value]])}});export{V as _}; diff --git a/assets/Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js b/assets/Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js new file mode 100644 index 0000000000000000000000000000000000000000..49ed24a72d5f20b30a959ef5c902c04ec49f25b4 --- /dev/null +++ b/assets/Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js @@ -0,0 +1 @@ +import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";import{d as p,ce as f,cf as m,af as c,c as b,o as v,f as r,b as V,an as u,ao as k,k as y,m as g,$ as x,a as s,J as C,t as i}from"./index-lQIQ1Nea.js";const B={op50:""},w=p({__name:"Collapsable",props:f({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,e=m(o,"modelValue");c(()=>{t.default!=null&&(e.value=!!t.default)});function n(a){return e.value=a,a}return(a,l)=>(v(),b("div",null,[r(a.$slots,"trigger",u(k({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:l[0]||(l[0]=_=>e.value=!e.value)},[s("span",null,i(t.label??"Collapsable"),1),l[1]||(l[1]=C()),s("span",B,i(e.value?"▲":"▼"),1)])]),V(d,null,{default:y(()=>[e.value?r(a.$slots,"default",u(x({key:0},{visible:e.value,setVisible:n}))):g("",!0)]),_:3})]))}});export{w as _}; diff --git a/assets/Collapsable.vue_vue_type_script_setup_true_lang-BcCSAMoU.js b/assets/Collapsable.vue_vue_type_script_setup_true_lang-BcCSAMoU.js deleted file mode 100644 index 656a241a700b8fec783e79ed906ada5876a3e649..0000000000000000000000000000000000000000 --- a/assets/Collapsable.vue_vue_type_script_setup_true_lang-BcCSAMoU.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js";import{d as p,cg as m,ch as f,ag as c,c as b,o as v,f as r,b as g,ao as u,ap as V,k,m as y,a0 as x,a as s,K as C,t as i}from"./index-SpDrDth7.js";const B={op50:""},w=p({__name:"Collapsable",props:m({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,e=f(o,"modelValue");c(()=>{t.default!=null&&(e.value=!!t.default)});function n(a){return e.value=a,a}return(a,l)=>(v(),b("div",null,[r(a.$slots,"trigger",u(V({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:l[0]||(l[0]=_=>e.value=!e.value)},[s("span",null,i(t.label??"Collapsable"),1),l[1]||(l[1]=C()),s("span",B,i(e.value?"▲":"▼"),1)])]),g(d,null,{default:k(()=>[e.value?r(a.$slots,"default",u(x({key:0},{visible:e.value,setVisible:n}))):y("",!0)]),_:3})]))}});export{w as _}; diff --git a/assets/HeaderLink-BKyhECz0.js b/assets/HeaderLink-Cxo-rQt1.js similarity index 81% rename from assets/HeaderLink-BKyhECz0.js rename to assets/HeaderLink-Cxo-rQt1.js index c845c6ae01abc79374c5e02f0002d1bf77701bb5..2b4edf84378cbfedc46fba21d1df73d512c8e906 100644 --- a/assets/HeaderLink-BKyhECz0.js +++ b/assets/HeaderLink-Cxo-rQt1.js @@ -1 +1 @@ -import{d as r,i as c,j as l,e,H as d,o as s,k as _,c as t,a,_ as i}from"./index-SpDrDth7.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],g=r({__name:"HeaderLink",setup(x){const n=c();return(f,o)=>(s(),l(e(d),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:_(()=>[e(n)?(s(),t("img",{key:0,src:e(k),"h-8":"","w-8":"",class:"theme-colored"},null,8,u)):(s(),t("img",{key:1,src:e(p),"h-8":"","w-8":"",class:"theme-colored"},null,8,m)),o[0]||(o[0]=a("div",{"font-cute":""},[a("span",null,"アイリ")],-1))]),_:1}))}}),L=i(g,[["__scopeId","data-v-496b6cde"]]);export{L as H,k as L,p as a}; +import{d as r,i as c,j as l,e,G as d,o as s,k as _,c as t,a,_ as i}from"./index-lQIQ1Nea.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],g=r({__name:"HeaderLink",setup(x){const n=c();return(f,o)=>(s(),l(e(d),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:_(()=>[e(n)?(s(),t("img",{key:0,src:e(k),"h-8":"","w-8":"",class:"theme-colored"},null,8,u)):(s(),t("img",{key:1,src:e(p),"h-8":"","w-8":"",class:"theme-colored"},null,8,m)),o[0]||(o[0]=a("div",{"font-cute":""},[a("span",null,"アイリ")],-1))]),_:1}))}}),L=i(g,[["__scopeId","data-v-496b6cde"]]);export{L as H,k as L,p as a}; diff --git a/assets/IconStatusItem-DizX_200.js b/assets/IconStatusItem-C5d32Rl8.js similarity index 97% rename from assets/IconStatusItem-DizX_200.js rename to assets/IconStatusItem-C5d32Rl8.js index dfe3490c25182cf8885f25d4983ec6c0a26bbcaa..ea040fcb4f2ac156aaa94b02c54629930e4cbb4c 100644 --- a/assets/IconStatusItem-DizX_200.js +++ b/assets/IconStatusItem-C5d32Rl8.js @@ -1 +1 @@ -import{d as u,r as c,c as e,o as n,b as d,a as o,k as m,m as a,t as s,q as i,_}from"./index-SpDrDth7.js";const p={flex:"~ col",bg:"neutral-200/50 dark:neutral-700",border:"neutral-100 dark:neutral-700 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-200","w-full":"","of-hidden":"","rounded-xl":""},g={"z-1":"","flex-1":""},h={"text-lg":"","font-bold":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-200"},k={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-200"},f=["src"],x={"p-2":""},v={key:0,"size-3":"",bg:"green-500 dark:green-600","rounded-full":""},y={key:1,"size-3":"",bg:"neutral-400 dark:neutral-500","rounded-full":""},b=u({__name:"IconStatusItem",props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(r){const t=r;return(I,C)=>{const l=c("RouterLink");return n(),e("div",p,[d(l,{flex:"~ row",class:"menu-icon-status-item-link",bg:"neutral-50 dark:neutral-800",transition:"all ease-in-out duration-200",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,s(t.title),1),o("div",k,[o("span",null,s(t.description),1)])]),t.icon?(n(),e("div",{key:0,class:i(["menu-icon-status-item-icon",[t.icon]]),transition:"all ease-in-out duration-500",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:i(["menu-icon-status-item-icon-color",[t.iconColor]]),transition:"all ease-in-out duration-500",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-500",absolute:"","right-0":"","size-16":"","translate-y-2":"","grayscale-100":""},null,8,f)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),w=_(b,[["__scopeId","data-v-6ad094b6"]]);export{w as I}; +import{d as u,r as c,c as e,o as n,b as d,a as o,k as m,m as a,t as s,q as i,_}from"./index-lQIQ1Nea.js";const p={flex:"~ col",bg:"neutral-200/50 dark:neutral-700",border:"neutral-100 dark:neutral-700 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-200","w-full":"","of-hidden":"","rounded-xl":""},g={"z-1":"","flex-1":""},h={"text-lg":"","font-bold":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-200"},k={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-200"},f=["src"],x={"p-2":""},v={key:0,"size-3":"",bg:"green-500 dark:green-600","rounded-full":""},y={key:1,"size-3":"",bg:"neutral-400 dark:neutral-500","rounded-full":""},b=u({__name:"IconStatusItem",props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(r){const t=r;return(I,C)=>{const l=c("RouterLink");return n(),e("div",p,[d(l,{flex:"~ row",class:"menu-icon-status-item-link",bg:"neutral-50 dark:neutral-800",transition:"all ease-in-out duration-200",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,s(t.title),1),o("div",k,[o("span",null,s(t.description),1)])]),t.icon?(n(),e("div",{key:0,class:i(["menu-icon-status-item-icon",[t.icon]]),transition:"all ease-in-out duration-500",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:i(["menu-icon-status-item-icon-color",[t.iconColor]]),transition:"all ease-in-out duration-500",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-500",absolute:"","right-0":"","size-16":"","translate-y-2":"","grayscale-100":""},null,8,f)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),w=_(b,[["__scopeId","data-v-6ad094b6"]]);export{w as I}; diff --git a/assets/Live2DSettings.vue_vue_type_script_setup_true_lang-kg4G8Afm.js b/assets/Live2DSettings.vue_vue_type_script_setup_true_lang-BZ13gadG.js similarity index 61% rename from assets/Live2DSettings.vue_vue_type_script_setup_true_lang-kg4G8Afm.js rename to assets/Live2DSettings.vue_vue_type_script_setup_true_lang-BZ13gadG.js index 02b1204ab8c732c44ae63cfa33a881d1fa761760..1a0d8cc2b123981d885b1e3ba36ad47803cde13b 100644 --- a/assets/Live2DSettings.vue_vue_type_script_setup_true_lang-kg4G8Afm.js +++ b/assets/Live2DSettings.vue_vue_type_script_setup_true_lang-BZ13gadG.js @@ -1,8 +1,8 @@ -var _a=Object.defineProperty;var Sa=(e,t,n)=>t in e?_a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ki=(e,t,n)=>Sa(e,typeof t!="symbol"?t+"":t,n);import{e as Rr,T as Xo,A as Ia,L as Cr,a as Zo,c as Ra,r as Qo,D as Ca,I as Na,l as Nr,M as La,b as Ei,V as Oa,d as Pa,f as Da,g as Lr,h as za,i as Fa,s as Ba,J as Ua}from"./Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js";import{r as Jo,a as es,b as ts,c as ns,l as ja,u as Va,d as Ha}from"./providers-CpyZMi_V.js";import{d as Je,g as Q,w as Pe,p as qt,Q as Nt,c as Ce,o as Me,f as pn,E as Gn,h as Be,v as ei,x as Ut,as as Ga,O as Mi,i as $a,at as rs,au as ti,y as ln,av as qa,aw as Ya,F as Or,a as j,ax as is,ay as Ka,U as Wa,j as un,k as $e,b as Ne,q as cn,z as On,A as os,m as Yt,t as Ae,az as ht,aA as wt,aa as ni,aB as $n,aC as Pn,e as Z,aD as Xa,aE as re,aF as _i,aG as Dn,aH as jt,aI as Oe,aJ as Tt,aK as Za,aL as ss,aM as fn,aN as ri,aO as Fe,aP as as,aQ as ls,aR as ii,aS as hn,aT as Qa,aU as oi,aV as Ja,aW as us,aX as mt,aY as si,aZ as At,a_ as el,a$ as cs,b0 as Ct,b1 as fs,aq as tl,b2 as nl,B as rl,b3 as il,ag as ds,b4 as qn,b5 as ol,b6 as sl,b7 as al,b8 as Rt,b9 as ll,ba as ul,bb as cl,bc as fl,bd as Qn,be as zn,bf as Pr,bg as St,bh as ps,bi as Dr,bj as Ft,bk as Si,bl as It,bm as Bt,bn as Jn,bo as dl,bp as pl,bq as hl,br as ml,bs as hs,bt as ms,bu as Fn,bv as gs,bw as ai,bx as Bn,by as ys,bz as gl,n as Ii,bA as yl,bB as zr,bC as bs,bD as bl,bE as on,bF as xs,bG as lt,bH as gt,bI as dn,bJ as xl,bK as vl,bL as wl,bM as Tl,bN as Al,bO as li,bP as kl,bQ as El,bR as Ml,bS as er,bT as _l,bU as vs,bV as Sl,bW as Il,bX as Rl,bY as Cl,bZ as Nl,b_ as tr,b$ as Ll,c0 as Ol,c1 as Pl,c2 as Ri,c3 as Ci,c4 as Ni,c5 as Li,c6 as Dl,c7 as zl,c8 as Fl,c9 as Bl,ca as Ul,cb as jl,cc as Vl,_ as Hl,cd as Gl,ce as $l,I as ql,C as Oi,cf as Yl}from"./index-SpDrDth7.js";import{u as nr}from"./queue-DqQ_HXOh.js";import{b as Kl,a as Wl,u as Xl,l as Zl}from"./queues-wwQOO-CJ.js";import{E as Ql,a as Pi,b as Jl,c as eu,d as tu,e as nu,f as Di,g as ru}from"./emotions-D2WM87AE.js";import{_ as ws}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js";import{_ as Un}from"./Collapsable.vue_vue_type_script_setup_true_lang-BcCSAMoU.js";const iu=Je({__name:"Canvas",props:{width:null,height:null},setup(e){const t=e,n=Q(),r=Q(),i=Q();async function o(a){Cr.registerTicker(Zo),Rr.add(Xo),r.value=new Ia({width:t.width,height:t.height,backgroundAlpha:0}),i.value=r.value.view,i.value.style.objectFit="contain",a.appendChild(r.value.view)}function s(){var a;r.value&&r.value.renderer.resize(t.width,t.height),(a=r.value)!=null&&a.view&&(r.value.view.width=t.width,r.value.view.height=t.height)}return Pe([()=>t.width,()=>t.height],()=>s()),qt(async()=>n.value&&await o(n.value)),Nt(()=>{var a;return(a=r.value)==null?void 0:a.destroy()}),(a,l)=>(Me(),Ce("div",{ref_key:"containerRef",ref:n,"h-full":"","w-full":""},[pn(a.$slots,"default",{app:r.value})],512))}}),ou=e=>Math.max(0,Math.min(1,e||0)),rr=e=>Math.round(ou(e)*255),su=Ra("rgb"),au=e=>{if(e===void 0)return;let t=rr(e.r),n=rr(e.g),r=rr(e.b);return"#"+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},lu=e=>au(su(e));function zi(e,t,n){return(1-n)*e+n*t}function _t(e,t){return e+Math.random()*(t-e)}async function*uu(e,t){const n=e.getReader();try{for(;;){const{done:r,value:i}=await n.read();if(r)return;yield t(i)}}finally{n.releaseLock()}}function cu(){let e=-1,t,n=-1;function r(i,o){(o>=e||oi**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/t.length/100}function du(e){const t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);const n=[];for(let u=0;u<700;u+=80)n.push(t[u]);const r=t.map(u=>u**1.5),i=Math.min(...r),s=Math.max(...r)-i;let a;return s===0?a=r.map(()=>0):a=r.map(u=>(u-i)/s),a.reduce((u,c)=>u+c,0)/t.length}function pu(e,t="linear"){switch(t){case"linear":return fu(e);case"minmax":return du(e)}}const hu=Gn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:pu})),mu=Gn("SpeakingStore",()=>{const n=Q(0),r=Q(!1),i=Be(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function wn(e,t,n){return t+n<0||t+n>=e.length-1?"":e[t+n]}function gu(e){let t="literal",n="";return{async consume(r){var i,o,s;for(let a=0;a"?(l+=wn(r,a,1),u="literal",a++):l==="<"?u="special":l===">"&&(u="literal"),t==="literal"&&u==="special"?n!==""&&(await((i=e.onLiteral)==null?void 0:i.call(e,n)),n=""):t==="special"&&u==="literal"&&n!==""&&(n+=l,await((o=e.onSpecial)==null?void 0:o.call(e,n)),n=""),t==="literal"&&u==="literal"?(await((s=e.onLiteral)==null?void 0:s.call(e,l)),n=""):t==="special"&&u==="literal"?n="":n+=l,t=u}},async end(){var r,i;n!==""&&(t==="literal"?await((r=e.onLiteral)==null?void 0:r.call(e,n)):n.endsWith("|>")&&await((i=e.onSpecial)==null?void 0:i.call(e,n)))}}}function yu(e,t){return{role:"system",content:[e,Ql.map(n=>`- ${n}`).join(` +var _a=Object.defineProperty;var Sa=(e,t,n)=>t in e?_a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ai=(e,t,n)=>Sa(e,typeof t!="symbol"?t+"":t,n);import{e as Rr,T as Wo,A as Ia,L as Cr,a as Xo,c as Ra,r as Zo,D as Ca,I as Na,l as Nr,M as La,b as ki,V as Oa,d as Pa,f as Da,g as Lr,h as za,i as Fa,s as Ba,J as Ua}from"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import{r as Qo,a as Jo,b as es,c as ts,l as ja,u as Va}from"./providers-B5WAuhMk.js";import{d as Je,g as Q,w as Pe,p as $t,P as Nt,c as Ce,o as Me,f as pn,ar as Gn,h as Be,v as ns,as as Ha,N as Ei,i as Ga,at as rs,au as ei,x as rn,y as ln,av as $a,aw as qa,F as Or,a as U,ax as is,ay as Ya,S as Ka,j as un,k as $e,b as Ne,q as cn,z as On,A as os,m as qt,t as Ae,az as ht,aA as wt,a9 as ti,aB as $n,aC as Pn,e as Z,aD as Wa,aE as re,aF as Mi,aG as Dn,aH as Ut,aI as Oe,aJ as Tt,aK as Xa,aL as ss,aM as fn,aN as ni,aO as Fe,aP as as,aQ as ls,aR as ri,aS as hn,aT as Za,aU as ii,aV as Qa,aW as us,aX as mt,aY as oi,aZ as At,a_ as Ja,a$ as cs,b0 as Ct,b1 as fs,ap as el,b2 as tl,B as nl,b3 as rl,af as ds,b4 as qn,b5 as il,b6 as ol,b7 as sl,b8 as Rt,b9 as al,ba as ll,bb as ul,bc as cl,bd as Qn,be as zn,bf as Pr,bg as St,bh as ps,bi as Dr,bj as Ft,bk as _i,bl as It,bm as Bt,bn as Jn,bo as fl,bp as dl,bq as pl,br as hl,bs as hs,bt as ms,bu as Fn,bv as gs,bw as si,bx as Bn,by as ys,bz as ml,n as Si,bA as gl,bB as zr,bC as xs,bD as yl,bE as on,bF as bs,bG as lt,bH as gt,bI as dn,bJ as xl,bK as bl,bL as vl,bM as wl,bN as Tl,bO as ai,bP as Al,bQ as kl,bR as El,bS as er,bT as Ml,bU as vs,bV as _l,bW as Sl,bX as Il,bY as Rl,bZ as Cl,b_ as tr,b$ as Nl,c0 as Ll,c1 as Ol,c2 as Ii,c3 as Ri,c4 as Ci,c5 as Ni,c6 as Pl,c7 as Dl,c8 as zl,c9 as Fl,ca as Bl,_ as Ul,cb as jl,cc as Vl,E as Hl,C as Li,H as Gl}from"./index-lQIQ1Nea.js";import{u as nr}from"./queue-BJ5EFzA4.js";import{b as $l,a as ql,u as Yl,l as Kl}from"./queues-Bj3v4TZ0.js";import{E as Wl,a as Oi,b as Xl,c as Zl,d as Ql,e as Jl,f as Pi,g as eu}from"./emotions-D2WM87AE.js";import{u as tu}from"./speech-Dj8k8vbX.js";import{_ as ws}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";import{_ as Un}from"./Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js";const nu=Je({__name:"Canvas",props:{width:null,height:null},setup(e){const t=e,n=Q(),r=Q(),i=Q();async function o(a){Cr.registerTicker(Xo),Rr.add(Wo),r.value=new Ia({width:t.width,height:t.height,backgroundAlpha:0}),i.value=r.value.view,i.value.style.objectFit="contain",a.appendChild(r.value.view)}function s(){var a;r.value&&r.value.renderer.resize(t.width,t.height),(a=r.value)!=null&&a.view&&(r.value.view.width=t.width,r.value.view.height=t.height)}return Pe([()=>t.width,()=>t.height],()=>s()),$t(async()=>n.value&&await o(n.value)),Nt(()=>{var a;return(a=r.value)==null?void 0:a.destroy()}),(a,l)=>(Me(),Ce("div",{ref_key:"containerRef",ref:n,"h-full":"","w-full":""},[pn(a.$slots,"default",{app:r.value})],512))}}),ru=e=>Math.max(0,Math.min(1,e||0)),rr=e=>Math.round(ru(e)*255),iu=Ra("rgb"),ou=e=>{if(e===void 0)return;let t=rr(e.r),n=rr(e.g),r=rr(e.b);return"#"+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},su=e=>ou(iu(e));function Di(e,t,n){return(1-n)*e+n*t}function _t(e,t){return e+Math.random()*(t-e)}async function*au(e,t){const n=e.getReader();try{for(;;){const{done:r,value:i}=await n.read();if(r)return;yield t(i)}}finally{n.releaseLock()}}function lu(){let e=-1,t,n=-1;function r(i,o){(o>=e||oi**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/t.length/100}function cu(e){const t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);const n=[];for(let u=0;u<700;u+=80)n.push(t[u]);const r=t.map(u=>u**1.5),i=Math.min(...r),s=Math.max(...r)-i;let a;return s===0?a=r.map(()=>0):a=r.map(u=>(u-i)/s),a.reduce((u,c)=>u+c,0)/t.length}function fu(e,t="linear"){switch(t){case"linear":return uu(e);case"minmax":return cu(e)}}const du=Gn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:fu})),pu=Gn("SpeakingStore",()=>{const n=Q(0),r=Q(!1),i=Be(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function wn(e,t,n){return t+n<0||t+n>=e.length-1?"":e[t+n]}function hu(e){let t="literal",n="";return{async consume(r){var i,o,s;for(let a=0;a"?(l+=wn(r,a,1),u="literal",a++):l==="<"?u="special":l===">"&&(u="literal"),t==="literal"&&u==="special"?n!==""&&(await((i=e.onLiteral)==null?void 0:i.call(e,n)),n=""):t==="special"&&u==="literal"&&n!==""&&(n+=l,await((o=e.onSpecial)==null?void 0:o.call(e,n)),n=""),t==="literal"&&u==="literal"?(await((s=e.onLiteral)==null?void 0:s.call(e,l)),n=""):t==="special"&&u==="literal"?n="":n+=l,t=u}},async end(){var r,i;n!==""&&(t==="literal"?await((r=e.onLiteral)==null?void 0:r.call(e,n)):n.endsWith("|>")&&await((i=e.onSpecial)==null?void 0:i.call(e,n)))}}}function mu(e,t){return{role:"system",content:[e,Wl.map(n=>`- ${n}`).join(` `),t].join(` -`)}}var bu=async e=>{var t;return(e.fetch??globalThis.fetch)(Jo("chat/completions",e.baseURL),{body:ts({...e,tools:(t=e.tools)==null?void 0:t.map(n=>({function:n.function,type:"function"}))}),headers:es({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(ns)},xu=e=>typeof e=="string"||Array.isArray(e)&&e.every(t=>!!(typeof t=="object"&&"type"in t&&["audio","image","text"].includes(t.type)))?e:JSON.stringify(e),Tn=class extends Error{constructor(t,n){super(t);ki(this,"response");this.name="XSAIError",this.response=n}},Fi="data:",vu=e=>{if(!e||!e.startsWith(Fi))return[void 0,!1];const t=e.slice(Fi.length),n=t.startsWith(" ")?t.slice(1):t;if(n==="[DONE]")return[void 0,!0];if(n.startsWith("{")&&n.includes('"error":'))throw new Error(`Error from server: ${n}`);return[JSON.parse(n),!1]},wu=async e=>{let t,n,r;const i=new ReadableStream({start(p){t=p}}),o=new ReadableStream({start(p){n=p}}),s=new ReadableStream({start(p){r=p}}),a=e.maxSteps??1,l=new TextDecoder,u=[],c=async p=>{var R,M,C;const d={choices:[],messages:structuredClone(p.messages),toolCalls:[],toolResults:[]},g={};let A="",v=!0;const w=(O,h)=>{if(O.endedToolCallIDs.has(h))return;const k=d.choices[O.index].message.tool_calls[h];try{k.function.parsed_arguments=JSON.parse(k.function.arguments)}catch(b){O.toolCallErrors[h]=b}O.endedToolCallIDs.add(h),O.currentToolID=null};if(await bu({...p,stream:!0}).then(async O=>O.body.pipeThrough(new TransformStream({transform:async(h,k)=>{const b=l.decode(h,{stream:!0});A+=b;const y=A.split(` -`);A=y.pop()??"";for(const m of y)try{const[T,S]=vu(m);if(S)break;T&&k.enqueue(T)}catch(T){k.error(T)}}})).pipeTo(new WritableStream({abort:h=>{t.error(h),n.error(h),r.error(h)},write:async h=>{var H,E,ae;(H=p.onChunk)==null||H.call(p,h),t.enqueue(h);const k=h.choices[0];if(!k)throw new Tn("no choice found");k.delta.tool_calls&&(v=!1);const{delta:b,finish_reason:y,index:m,...T}=k,S=(E=d.choices)[m]??(E[m]={finish_reason:y,index:m,message:{role:"assistant"}});if(y!==void 0){if(S.finish_reason=y,y==="length")throw new Tn("length exceeded");if(y==="content_filter")throw new Tn("content filter")}Object.assign(S,T);const{content:B,refusal:U,tool_calls:F,...P}=b,G=S.message;Object.assign(G,P),U!==void 0&&(G.refusal=(G.refusal||"")+U),B!==void 0&&(G.content=(G.content||"")+B,v&&(r==null||r.enqueue(B)));for(const{function:ce,id:I,type:fe}of F||[]){G.tool_calls??(G.tool_calls={});const he=(ae=G.tool_calls)[I]??(ae[I]={function:{arguments:"",name:ce.name,parsed_arguments:{}},id:I,type:fe});he.function.arguments+=ce.arguments}const X=g[m]??(g[m]={calledToolCallIDs:new Set,currentToolID:null,endedToolCallIDs:new Set,index:m,toolCallErrors:{},toolCallResults:{}});y&&X.currentToolID!==null&&w(X,X.currentToolID);for(const ce of b.tool_calls||[])X.currentToolID!==null&&X.currentToolID!==ce.id&&w(X,X.currentToolID),X.calledToolCallIDs.add(ce.id),X.currentToolID=ce.id}}))),d.messages.push({content:((R=d.choices[0])==null?void 0:R.message.content)??"",refusal:(M=d.choices[0])==null?void 0:M.message.refusal,role:"assistant"}),await Promise.allSettled(d.choices.map(async O=>{const h=g[O.index];return Promise.allSettled([...h.endedToolCallIDs].map(async k=>{var m;const b=O.message.tool_calls[k];if(d.toolCalls.push({args:b.function.arguments,toolCallId:k,toolCallType:"function",toolName:b.function.name}),h.toolCallResults[k])return;const y=(m=p.tools)==null?void 0:m.find(T=>T.function.name===b.function.name);if(y)try{const T=xu(await y.execute(b.function.parsed_arguments,{abortSignal:p.abortSignal,messages:p.messages,toolCallId:k}));h.toolCallResults[k]=T,d.messages.push({content:T,role:"tool",tool_call_id:k}),d.toolResults.push({args:b.function.parsed_arguments,result:T,toolCallId:k,toolName:b.function.name})}catch(T){h.toolCallErrors[k]=T}else h.toolCallErrors[k]=new Tn(`tool ${b.function.name} not found`)}))})),u.push(d),n.enqueue(d),(C=p.onStepFinish)==null||C.call(p,d),!v)return async()=>c({...p,messages:d.messages})};return(async()=>{var p;for(let d=1,g=await c(e);typeof g=="function"&&d{t.error(p),n.error(p),r.error(p)}),Promise.resolve({chunkStream:i,stepStream:o,textStream:s})};const Tu=Gn("llm",()=>{async function e(n,r,i,o){return await wu({baseURL:n.endsWith("/")?n:`${n}/`,apiKey:r,model:i,messages:o,streamOptions:{usage:!0}})}async function t(n,r){if(n==="")return[];try{return await ja({baseURL:n.endsWith("/")?n:`${n}/`,apiKey:r})}catch(i){if(String(i).includes("Failed to construct 'URL': Invalid URL"))return[];throw i}}return{models:t,stream:e}}),Au=Gn("chat",()=>{const{stream:e}=Tu(),{t}=ei(),{providers:n}=Ut(Va()),r=Q(!1),i=Q([]),o=Q([]),s=Q([]),a=Q([]),l=Q([]),u=Q([]),c=Q([]),f=Q([]);function p(k){i.value.push(k)}function d(k){o.value.push(k)}function g(k){s.value.push(k)}function A(k){a.value.push(k)}function v(k){l.value.push(k)}function w(k){u.value.push(k)}function R(k){c.value.push(k)}function M(k){f.value.push(k)}const C=Q([yu(t("prompt.prefix"),t("prompt.suffix"))]),O=Q({role:"assistant",content:""});async function h(k,b){var y,m,T;try{if(r.value=!0,!k)return;for(const H of i.value)await H(k);const{baseUrl:S=((y=n.value["openrouter-ai"])==null?void 0:y.baseUrl)||"",apiKey:B=((m=n.value["openrouter-ai"])==null?void 0:m.apiKey)||"",model:U=((T=n.value["openrouter-ai"])==null?void 0:T.model)||{id:"openai/gpt-4o-mini"}}=b??{};O.value={role:"assistant",content:""},C.value.push({role:"user",content:k}),C.value.push(O.value);const F=C.value.slice(0,C.value.length-1).map(H=>Ga(H));for(const H of o.value)await H(k);for(const H of s.value)await H(k);const P=await e(S,B,U.id,F);for(const H of a.value)await H(k);let G="";const X=gu({onLiteral:async H=>{for(const E of l.value)await E(H);O.value.content+=H},onSpecial:async H=>{for(const E of u.value)await E(H)}});for await(const H of uu(P.textStream,async E=>E))G+=H,await X.consume(H);await X.end();for(const H of c.value)await H();for(const H of f.value)await H(G);console.debug("LLM output:",G)}finally{r.value=!1}}return{sending:r,messages:C,streamingMessage:O,send:h,onBeforeMessageComposed:p,onAfterMessageComposed:d,onBeforeSend:g,onAfterSend:A,onTokenLiteral:v,onTokenSpecial:w,onStreamEnd:R,onAssistantResponseEnd:M}}),ku=Je({__name:"Model",props:{app:null,mouthOpenSize:{default:0},width:null,height:null,paused:{type:Boolean}},setup(e){const t=e,n=Mi(()=>t.app),r=Mi(()=>t.paused),i=Q(),o=Q(0),s=Q(0),a=Be(()=>Math.max(0,Math.min(100,t.mouthOpenSize))),l=$a(),u=rs(is),c=Be(()=>u.between("sm","md").value||u.smaller("sm").value),f=cu(),p=ti(new Ca({alpha:.2,blur:0,distance:20,rotation:45}));function d(){return i.value.internalModel.coreModel}function g(P){if(!P.value)return;let G=2.2;c.value&&(G=2.2);const X=t.height*.95/s.value*G,H=t.width*.95/o.value*G,E=Math.min(X,H);P.value.scale.set(E,E)}const{live2dModelFile:A,loadingLive2dModel:v,live2dCurrentMotion:w,availableLive2dMotions:R,live2dLoadSource:M,live2dModelUrl:C,themeColorsHue:O,themeColorsHueDynamic:h}=Ut(ln()),k=Q({group:"Idle",index:0});async function b(){var ae;if(!n.value)return;i.value&&(n.value.stage.removeChild(i.value),i.value.destroy(),i.value=void 0);const P=new Cr;M.value==="file"?await Ei.setupLive2DModel(P,[A.value]):M.value==="url"&&await Ei.setupLive2DModel(P,C.value),i.value=P,n.value.stage.addChild(i.value),o.value=i.value.width,s.value=i.value.height,i.value.x=t.width/2,i.value.y=t.height,i.value.rotation=Math.PI,i.value.skew.x=Math.PI,i.value.anchor.set(.5,.5),g(i),i.value.on("hit",ce=>{i.value&&ce.includes("body")&&i.value.motion("tap_body")});const G=i.value.internalModel,X=G.coreModel,H=G.motionManager;X.setParameterValueById("ParamMouthOpenY",a.value),R.value=Object.entries(H.definitions).flatMap(([ce,I])=>I?I.map((fe,he)=>({motionName:ce,motionIndex:he,fileName:fe.File})):[]).filter(Boolean),H.groups.idle&&((ae=H.motionGroups[H.groups.idle])==null||ae.forEach(ce=>{ce._motionData.curves.forEach(I=>{(I.id==="ParamEyeBallX"||I.id==="ParamEyeBallY")&&(I.id=`_${I.id}`)})}));const E=H.update;H.update=function(ce,I){return E==null||E.call(this,ce,I),H.state.currentGroup===H.groups.idle&&f.update(G,I),!0},H.on("motionStart",(ce,I)=>{k.value={group:ce,index:I}}),A.value&&await Nr.setItem("live2dModel",A.value),v.value=!1}async function y(){if(!n.value)return;Cr.registerTicker(Zo),Rr.add(Xo),Rr.add(Na);const P=await Nr.getItem("live2dModel");if(P){A.value=P,M.value="file",v.value=!0;return}if(C.value){M.value="url",v.value=!0;return}v.value=!1}async function m(P,G){await i.value.motion(P,G,La.FORCE)}const T=qa(()=>{i.value&&(i.value.x=t.width/2,i.value.y=t.height,g(i))},100),S=Q(),B=Q(0);function U(){if(i.value){const P=getComputedStyle(S.value).backgroundColor;p.value.color=Number(lu(P).replace("#","0x")),i.value.filters=[p.value]}}Pe([()=>t.width,()=>t.height],()=>T()),Pe(l,U,{immediate:!0}),Pe([i,O],U);function F(){U(),B.value=requestAnimationFrame(F)}return Pe(h,()=>{h.value?B.value=requestAnimationFrame(F):(cancelAnimationFrame(B.value),B.value=0)},{immediate:!0}),Pe(a,P=>d().setParameterValueById("ParamMouthOpenY",P)),Pe(n,y),Pe(w,P=>m(P.group,P.index)),Pe(r,P=>{var G,X;P?(G=n.value)==null||G.stop():(X=n.value)==null||X.start()}),Ya(v,P=>{P&&b()},{debounce:1e3}),qt(U),Nt(()=>{var P;cancelAnimationFrame(B.value),i.value&&((P=n.value)==null||P.stage.removeChild(i.value))}),(P,G)=>(Me(),Ce(Or,null,[j("div",{ref_key:"dropShadowColorComputer",ref:S,hidden:"",bg:"primary-400 dark:primary-500"},null,512),pn(P.$slots,"default")],64))}}),Ts=Je({__name:"Screen",setup(e){const t=Q(),n=rs(is),{width:r,height:i}=Ka(),o=Wa(t,{immediate:!0,windowResize:!0,reset:!0}),s=Be(()=>n.between("sm","md").value||n.smaller("sm").value),a=Be(()=>n.between("md","lg").value),l=Be(()=>n.greaterOrEqual("lg").value),u=Be(()=>l.value?o.width.value:s.value||a.value?r.value-16:o.width.value),c=Q(0);return Pe([r,i,t],()=>{var p,d;const f=(d=(p=t.value)==null?void 0:p.parentElement)==null?void 0:d.getBoundingClientRect();l.value||s.value||a.value?c.value=(f==null?void 0:f.height)||0:c.value=600}),Pe([o.width,o.height],()=>{l.value||s.value||a.value?c.value=o.height.value:c.value=600}),qt(async()=>{t.value&&o.update()}),(f,p)=>(Me(),Ce("div",{ref_key:"containerRef",ref:t,"h-full":"","w-full":""},[pn(f.$slots,"default",{width:u.value,height:c.value})],512))}}),Eu={absolute:"",bottom:"3",right:"3"},Mu={flex:"~ row","cursor-pointer":""},_u=["checked","aria-checked"],Su={key:0,"min-w":"50vw",z:"(Me(),un(Ts,{relative:""},{default:$e(({width:o,height:s})=>[Ne(iu,{width:o,height:s},{default:$e(({app:a})=>[Ne(ku,{app:a,"mouth-open-size":e.mouthOpenSize,width:o,height:s,paused:e.paused},null,8,["app","mouth-open-size","width","height","paused"])]),_:2},1032,["width","height"]),j("div",Eu,[j("div",Mu,[j("label",{class:cn([t.value?"bg-zinc-300 dark:bg-zinc-200":"bg-zinc-100 dark:bg-zinc-700"]),transition:"all ease-in-out duration-500",text:"lg zinc-500 dark:zinc-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[On(j("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),checked:t.value,"aria-checked":t.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,_u),[[os,t.value]]),i[8]||(i[8]=j("div",{"select-none":""},[j("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Ne(ws,null,{default:$e(()=>[t.value?(Me(),Ce("div",Su,[j("div",Iu,[j("div",Ru,[j("span",null,Ae(r.$t("stage.viewers.debug-menu.emotions")),1)]),j("div",Cu,[j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[1]||(i[1]=a=>n.value={group:"Surprise",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.surprised")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[2]||(i[2]=a=>n.value={group:"Sad",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.sad")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[3]||(i[3]=a=>n.value={group:"Angry",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.angry")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[4]||(i[4]=a=>n.value={group:"Happy",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.happy")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[5]||(i[5]=a=>n.value={group:"Awkward",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.awkward")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[6]||(i[6]=a=>n.value={group:"Question",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.question")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[7]||(i[7]=a=>n.value={group:"Think",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):Yt("",!0)]),_:1})])]),_:1}))}});var Lu=Object.defineProperty,Ou=(e,t,n)=>t in e?Lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pu=(e,t,n)=>Ou(e,t+"",n);function Du(e){return ol()?(sl(e),!0):!1}function As(e){return typeof e=="function"?e():Z(e)}const zu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fu=Object.prototype.toString,Bu=e=>Fu.call(e)==="[object Object]",Uu=()=>{},ju=zu?window:void 0;function Vu(e){var t;const n=As(e);return(t=n==null?void 0:n.$el)!=null?t:n}function ir(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=ju):[t,n,r,i]=e,!t)return Uu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(c=>c()),o.length=0},a=(c,f,p,d)=>(c.addEventListener(f,p,d),()=>c.removeEventListener(f,p,d)),l=Pe(()=>[Vu(t),As(i)],([c,f])=>{if(s(),!c)return;const p=Bu(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(g=>a(c,d,g,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return Du(u),u}function ks(e,t,n,r){const i=class extends hn{constructor(o={}){const s=Object.entries(e);super({uniforms:s.reduce((a,[l,u])=>{const c=oi.clone({[l]:{value:u}});return{...a,...c}},{}),vertexShader:t,fragmentShader:n}),Pu(this,"key",""),s.forEach(([a])=>Object.defineProperty(this,a,{get:()=>this.uniforms[a].value,set:l=>this.uniforms[a].value=l})),Object.assign(this,o)}};return i.key=Ct.generateUUID(),i}ks({color:new Fe("white"),scale:new Oe(1,1),imageBounds:new Oe(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` +`)}}var gu=async e=>{var t;return(e.fetch??globalThis.fetch)(Qo("chat/completions",e.baseURL),{body:es({...e,tools:(t=e.tools)==null?void 0:t.map(n=>({function:n.function,type:"function"}))}),headers:Jo({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(ts)},yu=e=>typeof e=="string"||Array.isArray(e)&&e.every(t=>!!(typeof t=="object"&&"type"in t&&["audio","image","text"].includes(t.type)))?e:JSON.stringify(e),Tn=class extends Error{constructor(t,n){super(t);Ai(this,"response");this.name="XSAIError",this.response=n}},zi="data:",xu=e=>{if(!e||!e.startsWith(zi))return[void 0,!1];const t=e.slice(zi.length),n=t.startsWith(" ")?t.slice(1):t;if(n==="[DONE]")return[void 0,!0];if(n.startsWith("{")&&n.includes('"error":'))throw new Error(`Error from server: ${n}`);return[JSON.parse(n),!1]},bu=async e=>{let t,n,r;const i=new ReadableStream({start(p){t=p}}),o=new ReadableStream({start(p){n=p}}),s=new ReadableStream({start(p){r=p}}),a=e.maxSteps??1,l=new TextDecoder,u=[],c=async p=>{var R,M,C;const d={choices:[],messages:structuredClone(p.messages),toolCalls:[],toolResults:[]},g={};let A="",v=!0;const w=(O,h)=>{if(O.endedToolCallIDs.has(h))return;const S=d.choices[O.index].message.tool_calls[h];try{S.function.parsed_arguments=JSON.parse(S.function.arguments)}catch(x){O.toolCallErrors[h]=x}O.endedToolCallIDs.add(h),O.currentToolID=null};if(await gu({...p,stream:!0}).then(async O=>O.body.pipeThrough(new TransformStream({transform:async(h,S)=>{const x=l.decode(h,{stream:!0});A+=x;const y=A.split(` +`);A=y.pop()??"";for(const m of y)try{const[T,k]=xu(m);if(k)break;T&&S.enqueue(T)}catch(T){S.error(T)}}})).pipeTo(new WritableStream({abort:h=>{t.error(h),n.error(h),r.error(h)},write:async h=>{var X,E,ae;(X=p.onChunk)==null||X.call(p,h),t.enqueue(h);const S=h.choices[0];if(!S)throw new Tn("no choice found");S.delta.tool_calls&&(v=!1);const{delta:x,finish_reason:y,index:m,...T}=S,k=(E=d.choices)[m]??(E[m]={finish_reason:y,index:m,message:{role:"assistant"}});if(y!==void 0){if(k.finish_reason=y,y==="length")throw new Tn("length exceeded");if(y==="content_filter")throw new Tn("content filter")}Object.assign(k,T);const{content:B,refusal:j,tool_calls:D,...P}=x,$=k.message;Object.assign($,P),j!==void 0&&($.refusal=($.refusal||"")+j),B!==void 0&&($.content=($.content||"")+B,v&&(r==null||r.enqueue(B)));for(const{function:ce,id:I,type:fe}of D||[]){$.tool_calls??($.tool_calls={});const he=(ae=$.tool_calls)[I]??(ae[I]={function:{arguments:"",name:ce.name,parsed_arguments:{}},id:I,type:fe});he.function.arguments+=ce.arguments}const W=g[m]??(g[m]={calledToolCallIDs:new Set,currentToolID:null,endedToolCallIDs:new Set,index:m,toolCallErrors:{},toolCallResults:{}});y&&W.currentToolID!==null&&w(W,W.currentToolID);for(const ce of x.tool_calls||[])W.currentToolID!==null&&W.currentToolID!==ce.id&&w(W,W.currentToolID),W.calledToolCallIDs.add(ce.id),W.currentToolID=ce.id}}))),d.messages.push({content:((R=d.choices[0])==null?void 0:R.message.content)??"",refusal:(M=d.choices[0])==null?void 0:M.message.refusal,role:"assistant"}),await Promise.allSettled(d.choices.map(async O=>{const h=g[O.index];return Promise.allSettled([...h.endedToolCallIDs].map(async S=>{var m;const x=O.message.tool_calls[S];if(d.toolCalls.push({args:x.function.arguments,toolCallId:S,toolCallType:"function",toolName:x.function.name}),h.toolCallResults[S])return;const y=(m=p.tools)==null?void 0:m.find(T=>T.function.name===x.function.name);if(y)try{const T=yu(await y.execute(x.function.parsed_arguments,{abortSignal:p.abortSignal,messages:p.messages,toolCallId:S}));h.toolCallResults[S]=T,d.messages.push({content:T,role:"tool",tool_call_id:S}),d.toolResults.push({args:x.function.parsed_arguments,result:T,toolCallId:S,toolName:x.function.name})}catch(T){h.toolCallErrors[S]=T}else h.toolCallErrors[S]=new Tn(`tool ${x.function.name} not found`)}))})),u.push(d),n.enqueue(d),(C=p.onStepFinish)==null||C.call(p,d),!v)return async()=>c({...p,messages:d.messages})};return(async()=>{var p;for(let d=1,g=await c(e);typeof g=="function"&&d{t.error(p),n.error(p),r.error(p)}),Promise.resolve({chunkStream:i,stepStream:o,textStream:s})};const vu=Gn("llm",()=>{async function e(n,r,i){return await bu({...r.chat(n),messages:i,streamOptions:{usage:!0}})}async function t(n,r){if(n==="")return[];try{return await ja({baseURL:n.endsWith("/")?n:`${n}/`,apiKey:r})}catch(i){if(String(i).includes("Failed to construct 'URL': Invalid URL"))return[];throw i}}return{models:t,stream:e}}),wu=Gn("chat",()=>{const{stream:e}=vu(),{t}=ns(),n=Q(!1),r=Q([]),i=Q([]),o=Q([]),s=Q([]),a=Q([]),l=Q([]),u=Q([]),c=Q([]);function f(h){r.value.push(h)}function p(h){i.value.push(h)}function d(h){o.value.push(h)}function g(h){s.value.push(h)}function A(h){a.value.push(h)}function v(h){l.value.push(h)}function w(h){u.value.push(h)}function R(h){c.value.push(h)}const M=Q([mu(t("prompt.prefix"),t("prompt.suffix"))]),C=Q({role:"assistant",content:""});async function O(h,S){try{if(n.value=!0,!h)return;for(const k of r.value)await k(h);C.value={role:"assistant",content:""},M.value.push({role:"user",content:h}),M.value.push(C.value);const x=M.value.slice(0,M.value.length-1).map(k=>Ha(k));for(const k of i.value)await k(h);for(const k of o.value)await k(h);const y=await e(S.model,S.chatProvider,x);for(const k of s.value)await k(h);let m="";const T=hu({onLiteral:async k=>{for(const B of a.value)await B(k);C.value.content+=k},onSpecial:async k=>{for(const B of l.value)await B(k)}});for await(const k of au(y.textStream,async B=>B))m+=k,await T.consume(k);await T.end();for(const k of u.value)await k();for(const k of c.value)await k(m);console.debug("LLM output:",m)}finally{n.value=!1}}return{sending:n,messages:M,streamingMessage:C,send:O,onBeforeMessageComposed:f,onAfterMessageComposed:p,onBeforeSend:d,onAfterSend:g,onTokenLiteral:A,onTokenSpecial:v,onStreamEnd:w,onAssistantResponseEnd:R}}),Tu=Je({__name:"Model",props:{app:null,mouthOpenSize:{default:0},width:null,height:null,paused:{type:Boolean}},setup(e){const t=e,n=Ei(()=>t.app),r=Ei(()=>t.paused),i=Q(),o=Q(0),s=Q(0),a=Be(()=>Math.max(0,Math.min(100,t.mouthOpenSize))),l=Ga(),u=rs(is),c=Be(()=>u.between("sm","md").value||u.smaller("sm").value),f=lu(),p=ei(new Ca({alpha:.2,blur:0,distance:20,rotation:45}));function d(){return i.value.internalModel.coreModel}function g(P){if(!P.value)return;let $=2.2;c.value&&($=2.2);const W=t.height*.95/s.value*$,X=t.width*.95/o.value*$,E=Math.min(W,X);P.value.scale.set(E,E)}const{live2dModelFile:A,loadingLive2dModel:v,live2dCurrentMotion:w,availableLive2dMotions:R,live2dLoadSource:M,live2dModelUrl:C,themeColorsHue:O,themeColorsHueDynamic:h}=rn(ln()),S=Q({group:"Idle",index:0});async function x(){var ae;if(!n.value)return;i.value&&(n.value.stage.removeChild(i.value),i.value.destroy(),i.value=void 0);const P=new Cr;M.value==="file"?await ki.setupLive2DModel(P,[A.value]):M.value==="url"&&await ki.setupLive2DModel(P,C.value),i.value=P,n.value.stage.addChild(i.value),o.value=i.value.width,s.value=i.value.height,i.value.x=t.width/2,i.value.y=t.height,i.value.rotation=Math.PI,i.value.skew.x=Math.PI,i.value.anchor.set(.5,.5),g(i),i.value.on("hit",ce=>{i.value&&ce.includes("body")&&i.value.motion("tap_body")});const $=i.value.internalModel,W=$.coreModel,X=$.motionManager;W.setParameterValueById("ParamMouthOpenY",a.value),R.value=Object.entries(X.definitions).flatMap(([ce,I])=>I?I.map((fe,he)=>({motionName:ce,motionIndex:he,fileName:fe.File})):[]).filter(Boolean),X.groups.idle&&((ae=X.motionGroups[X.groups.idle])==null||ae.forEach(ce=>{ce._motionData.curves.forEach(I=>{(I.id==="ParamEyeBallX"||I.id==="ParamEyeBallY")&&(I.id=`_${I.id}`)})}));const E=X.update;X.update=function(ce,I){return E==null||E.call(this,ce,I),X.state.currentGroup===X.groups.idle&&f.update($,I),!0},X.on("motionStart",(ce,I)=>{S.value={group:ce,index:I}}),A.value&&await Nr.setItem("live2dModel",A.value),v.value=!1}async function y(){if(!n.value)return;Cr.registerTicker(Xo),Rr.add(Wo),Rr.add(Na);const P=await Nr.getItem("live2dModel");if(P){A.value=P,M.value="file",v.value=!0;return}if(C.value){M.value="url",v.value=!0;return}v.value=!1}async function m(P,$){await i.value.motion(P,$,La.FORCE)}const T=$a(()=>{i.value&&(i.value.x=t.width/2,i.value.y=t.height,g(i))},100),k=Q(),B=Q(0);function j(){if(i.value){const P=getComputedStyle(k.value).backgroundColor;p.value.color=Number(su(P).replace("#","0x")),i.value.filters=[p.value]}}Pe([()=>t.width,()=>t.height],()=>T()),Pe(l,j,{immediate:!0}),Pe([i,O],j);function D(){j(),B.value=requestAnimationFrame(D)}return Pe(h,()=>{h.value?B.value=requestAnimationFrame(D):(cancelAnimationFrame(B.value),B.value=0)},{immediate:!0}),Pe(a,P=>d().setParameterValueById("ParamMouthOpenY",P)),Pe(n,y),Pe(w,P=>m(P.group,P.index)),Pe(r,P=>{var $,W;P?($=n.value)==null||$.stop():(W=n.value)==null||W.start()}),qa(v,P=>{P&&x()},{debounce:1e3}),$t(j),Nt(()=>{var P;cancelAnimationFrame(B.value),i.value&&((P=n.value)==null||P.stage.removeChild(i.value))}),(P,$)=>(Me(),Ce(Or,null,[U("div",{ref_key:"dropShadowColorComputer",ref:k,hidden:"",bg:"primary-400 dark:primary-500"},null,512),pn(P.$slots,"default")],64))}}),Ts=Je({__name:"Screen",setup(e){const t=Q(),n=rs(is),{width:r,height:i}=Ya(),o=Ka(t,{immediate:!0,windowResize:!0,reset:!0}),s=Be(()=>n.between("sm","md").value||n.smaller("sm").value),a=Be(()=>n.between("md","lg").value),l=Be(()=>n.greaterOrEqual("lg").value),u=Be(()=>l.value?o.width.value:s.value||a.value?r.value-16:o.width.value),c=Q(0);return Pe([r,i,t],()=>{var p,d;const f=(d=(p=t.value)==null?void 0:p.parentElement)==null?void 0:d.getBoundingClientRect();l.value||s.value||a.value?c.value=(f==null?void 0:f.height)||0:c.value=600}),Pe([o.width,o.height],()=>{l.value||s.value||a.value?c.value=o.height.value:c.value=600}),$t(async()=>{t.value&&o.update()}),(f,p)=>(Me(),Ce("div",{ref_key:"containerRef",ref:t,"h-full":"","w-full":""},[pn(f.$slots,"default",{width:u.value,height:c.value})],512))}}),Au={absolute:"",bottom:"3",right:"3"},ku={flex:"~ row","cursor-pointer":""},Eu=["checked","aria-checked"],Mu={key:0,"min-w":"50vw",z:"(Me(),un(Ts,{relative:""},{default:$e(({width:o,height:s})=>[Ne(nu,{width:o,height:s},{default:$e(({app:a})=>[Ne(Tu,{app:a,"mouth-open-size":e.mouthOpenSize,width:o,height:s,paused:e.paused},null,8,["app","mouth-open-size","width","height","paused"])]),_:2},1032,["width","height"]),U("div",Au,[U("div",ku,[U("label",{class:cn([t.value?"bg-zinc-300 dark:bg-zinc-200":"bg-zinc-100 dark:bg-zinc-700"]),transition:"all ease-in-out duration-500",text:"lg zinc-500 dark:zinc-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[On(U("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),checked:t.value,"aria-checked":t.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,Eu),[[os,t.value]]),i[8]||(i[8]=U("div",{"select-none":""},[U("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Ne(ws,null,{default:$e(()=>[t.value?(Me(),Ce("div",Mu,[U("div",_u,[U("div",Su,[U("span",null,Ae(r.$t("stage.viewers.debug-menu.emotions")),1)]),U("div",Iu,[U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[1]||(i[1]=a=>n.value={group:"Surprise",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.surprised")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[2]||(i[2]=a=>n.value={group:"Sad",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.sad")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[3]||(i[3]=a=>n.value={group:"Angry",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.angry")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[4]||(i[4]=a=>n.value={group:"Happy",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.happy")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[5]||(i[5]=a=>n.value={group:"Awkward",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.awkward")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[6]||(i[6]=a=>n.value={group:"Question",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.question")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:i[7]||(i[7]=a=>n.value={group:"Think",index:0})},Ae(r.$t("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):qt("",!0)]),_:1})])]),_:1}))}});var Cu=Object.defineProperty,Nu=(e,t,n)=>t in e?Cu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lu=(e,t,n)=>Nu(e,t+"",n);function Ou(e){return il()?(ol(e),!0):!1}function As(e){return typeof e=="function"?e():Z(e)}const Pu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Du=Object.prototype.toString,zu=e=>Du.call(e)==="[object Object]",Fu=()=>{},Bu=Pu?window:void 0;function Uu(e){var t;const n=As(e);return(t=n==null?void 0:n.$el)!=null?t:n}function ir(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=Bu):[t,n,r,i]=e,!t)return Fu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(c=>c()),o.length=0},a=(c,f,p,d)=>(c.addEventListener(f,p,d),()=>c.removeEventListener(f,p,d)),l=Pe(()=>[Uu(t),As(i)],([c,f])=>{if(s(),!c)return;const p=zu(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(g=>a(c,d,g,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return Ou(u),u}function ks(e,t,n,r){const i=class extends hn{constructor(o={}){const s=Object.entries(e);super({uniforms:s.reduce((a,[l,u])=>{const c=ii.clone({[l]:{value:u}});return{...a,...c}},{}),vertexShader:t,fragmentShader:n}),Lu(this,"key",""),s.forEach(([a])=>Object.defineProperty(this,a,{get:()=>this.uniforms[a].value,set:l=>this.uniforms[a].value=l})),Object.assign(this,o)}};return i.key=Ct.generateUUID(),i}ks({color:new Fe("white"),scale:new Oe(1,1),imageBounds:new Oe(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` varying vec2 vUv; varying vec2 vPos; void main() { @@ -57,7 +57,7 @@ var _a=Object.defineProperty;var Sa=(e,t,n)=>t in e?_a(e,t,{enumerable:!0,config #include #include } - `);const ui=parseInt(al.replace(/\D+/g,""));var Hu=Object.defineProperty,Gu=(e,t,n)=>t in e?Hu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$u=(e,t,n)=>(Gu(e,t+"",n),n);async function Bi(e){const t=await e.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(t)));return`data:${e.type||""};base64,${n}`}let An,or,Ot,kn;function sr(e,t=1/0,n=null){or||(or=new fs(2,2,1,1)),Ot||(Ot=new hn({uniforms:{blitTexture:new hl(e)},vertexShader:` + `);const li=parseInt(sl.replace(/\D+/g,""));var ju=Object.defineProperty,Vu=(e,t,n)=>t in e?ju(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hu=(e,t,n)=>(Vu(e,t+"",n),n);async function Fi(e){const t=await e.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(t)));return`data:${e.type||""};base64,${n}`}let An,or,Ot,kn;function sr(e,t=1/0,n=null){or||(or=new fs(2,2,1,1)),Ot||(Ot=new hn({uniforms:{blitTexture:new pl(e)},vertexShader:` varying vec2 vUv; void main(){ vUv = uv; @@ -76,7 +76,7 @@ var _a=Object.defineProperty;var Sa=(e,t,n)=>t in e?_a(e,t,{enumerable:!0,config gl_FragColor = texture2D( blitTexture, vUv); #endif } - `})),Ot.uniforms.blitTexture.value=e,Ot.defines.IS_SRGB="colorSpace"in e?e.colorSpace==="srgb":e.encoding===3001,Ot.needsUpdate=!0,kn||(kn=new Rt(or,Ot),kn.frustrumCulled=!1);const r=new Tt,i=new Dr;i.add(kn),n||(n=An=new ml({antialias:!1})),n.setSize(Math.min(e.image.width,t),Math.min(e.image.height,t)),n.clear(),n.render(i,r);const o=new zn(n.domElement);return o.minFilter=e.minFilter,o.magFilter=e.magFilter,o.wrapS=e.wrapS,o.wrapT=e.wrapT,o.name=e.name,An&&(An.dispose(),An=null),o}const Ui={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]};class Es{constructor(){this.pluginCallbacks=[],this.register(function(t){return new tc(t)}),this.register(function(t){return new nc(t)}),this.register(function(t){return new oc(t)}),this.register(function(t){return new sc(t)}),this.register(function(t){return new ac(t)}),this.register(function(t){return new lc(t)}),this.register(function(t){return new rc(t)}),this.register(function(t){return new ic(t)}),this.register(function(t){return new uc(t)}),this.register(function(t){return new cc(t)}),this.register(function(t){return new fc(t)})}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,n,r,i){const o=new ec,s=[];for(let a=0,l=this.pluginCallbacks.length;ae.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)<.001)return e.times.length-1;r[r.length-1]=t,r.set(e.times,0),i.set(e.values,0),i.set(o.evaluate(t),e.values.length),s=r.length-1}else for(let a=0;at){r.set(e.times.slice(0,a+1),0),r[a+1]=t,r.set(e.times.slice(a+1),a+2),i.set(e.values.slice(0,(a+1)*n),0),i.set(o.evaluate(t),(a+1)*n),i.set(e.values.slice((a+1)*n),(a+2)*n),s=a+1;break}}return e.times=r,e.values=i,s},mergeMorphTargetTracks:function(e,t){const n=[],r={},i=e.tracks;for(let o=0;o4?s=e.array[i*e.itemSize+o]:(o===0?s=e.getX(i):o===1?s=e.getY(i):o===2?s=e.getZ(i):o===3&&(s=e.getW(i)),e.normalized===!0&&(s=Ct.normalize(s,e.array))),r.min[o]=Math.min(r.min[o],s),r.max[o]=Math.max(r.max[o],s)}return r}function Ms(e){return Math.ceil(e/4)*4}function lr(e,t=0){const n=Ms(e.byteLength);if(n!==e.byteLength){const r=new Uint8Array(n);if(r.set(new Uint8Array(e)),t!==0)for(let i=e.byteLength;i"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function $i(e,t){if(e.toBlob!==void 0)return new Promise(r=>e.toBlob(r,t));let n;return t==="image/jpeg"?n=.92:t==="image/webp"&&(n=.8),e.convertToBlob({type:t,quality:n})}class ec{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(t){this.plugins=t}async write(t,n,r={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},r),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(t),await Promise.all(this.pending);const i=this,o=i.buffers,s=i.json;r=i.options;const a=i.extensionsUsed,l=i.extensionsRequired,u=new Blob(o,{type:"application/octet-stream"}),c=Object.keys(a),f=Object.keys(l);c.length>0&&(s.extensionsUsed=c),f.length>0&&(s.extensionsRequired=f),s.buffers&&s.buffers.length>0&&(s.buffers[0].byteLength=u.size),r.binary===!0?u.arrayBuffer().then(p=>{const d=lr(p),g=new DataView(new ArrayBuffer(Hi));g.setUint32(0,d.byteLength,!0),g.setUint32(4,Xu,!0);const A=lr(Zu(JSON.stringify(s)),32),v=new DataView(new ArrayBuffer(Hi));v.setUint32(0,A.byteLength,!0),v.setUint32(4,Wu,!0);const w=new ArrayBuffer(Vi),R=new DataView(w);R.setUint32(0,Yu,!0),R.setUint32(4,Ku,!0);const M=Vi+v.byteLength+A.byteLength+g.byteLength+d.byteLength;R.setUint32(8,M,!0),new Blob([w,v,A,g,d],{type:"application/octet-stream"}).arrayBuffer().then(n)}):s.buffers&&s.buffers.length>0?Bi(u).then(p=>{s.buffers[0].uri=p,n(s)}):n(s)}serializeUserData(t,n){if(Object.keys(t.userData).length===0)return;const r=this.options,i=this.extensionsUsed;try{const o=JSON.parse(JSON.stringify(t.userData));if(r.includeCustomExtensions&&o.gltfExtensions){n.extensions===void 0&&(n.extensions={});for(const s in o.gltfExtensions)n.extensions[s]=o.gltfExtensions[s],i[s]=!0;delete o.gltfExtensions}Object.keys(o).length>0&&(n.extras=o)}catch(o){console.warn("THREE.GLTFExporter: userData of '"+t.name+"' won't be serialized because of JSON.stringify error - "+o.message)}}getUID(t,n=!1){if(this.uids.has(t)===!1){const r=new Map;r.set(!0,this.uid++),r.set(!1,this.uid++),this.uids.set(t,r)}return this.uids.get(t).get(n)}isNormalizedNormalAttribute(t){if(this.cache.attributesNormalized.has(t))return!1;const n=new re;for(let r=0,i=t.count;r5e-4)return!1;return!0}createNormalizedNormalAttribute(t){const n=this.cache;if(n.attributesNormalized.has(t))return n.attributesNormalized.get(t);const r=t.clone(),i=new re;for(let o=0,s=r.count;o4?g=t.array[p*t.itemSize+d]:(d===0?g=t.getX(p):d===1?g=t.getY(p):d===2?g=t.getZ(p):d===3&&(g=t.getW(p)),t.normalized===!0&&(g=Ct.normalize(g,t.array))),n===pe.FLOAT?u.setFloat32(c,g,!0):n===pe.INT?u.setInt32(c,g,!0):n===pe.UNSIGNED_INT?u.setUint32(c,g,!0):n===pe.SHORT?u.setInt16(c,g,!0):n===pe.UNSIGNED_SHORT?u.setUint16(c,g,!0):n===pe.BYTE?u.setInt8(c,g):n===pe.UNSIGNED_BYTE&&u.setUint8(c,g),c+=a}const f={buffer:this.processBuffer(u.buffer),byteOffset:this.byteOffset,byteLength:l};return o!==void 0&&(f.target=o),o===pe.ARRAY_BUFFER&&(f.byteStride=t.itemSize*a),this.byteOffset+=l,s.bufferViews.push(f),{id:s.bufferViews.length-1,byteLength:0}}processBufferViewImage(t){const n=this,r=n.json;return r.bufferViews||(r.bufferViews=[]),t.arrayBuffer().then(i=>{const o=lr(i),s={buffer:n.processBuffer(o),byteOffset:n.byteOffset,byteLength:o.byteLength};return n.byteOffset+=o.byteLength,r.bufferViews.push(s)-1})}processAccessor(t,n,r,i){const o=this.json,s={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"};let a;if(t.array.constructor===Float32Array)a=pe.FLOAT;else if(t.array.constructor===Int32Array)a=pe.INT;else if(t.array.constructor===Uint32Array)a=pe.UNSIGNED_INT;else if(t.array.constructor===Int16Array)a=pe.SHORT;else if(t.array.constructor===Uint16Array)a=pe.UNSIGNED_SHORT;else if(t.array.constructor===Int8Array)a=pe.BYTE;else if(t.array.constructor===Uint8Array)a=pe.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+t.array.constructor.name);if(r===void 0&&(r=0),i===void 0&&(i=t.count),i===0)return null;const l=Ju(t,r,i);let u;n!==void 0&&(u=t===n.index?pe.ELEMENT_ARRAY_BUFFER:pe.ARRAY_BUFFER);const c=this.processBufferView(t,a,r,i,u),f={bufferView:c.id,byteOffset:c.byteOffset,componentType:a,count:i,max:l.max,min:l.min,type:s[t.itemSize]};return t.normalized===!0&&(f.normalized=!0),o.accessors||(o.accessors=[]),o.accessors.push(f)-1}processImage(t,n,r,i="image/png"){if(t!==null){const o=this,s=o.cache,a=o.json,l=o.options,u=o.pending;s.images.has(t)||s.images.set(t,{});const c=s.images.get(t),f=i+":flipY/"+r.toString();if(c[f]!==void 0)return c[f];a.images||(a.images=[]);const p={mimeType:i},d=Gi();d.width=Math.min(t.width,l.maxTextureSize),d.height=Math.min(t.height,l.maxTextureSize);const g=d.getContext("2d");if(r===!0&&(g.translate(0,d.height),g.scale(1,-1)),t.data!==void 0){n!==Pr&&console.error("GLTFExporter: Only RGBAFormat is supported.",n),(t.width>l.maxTextureSize||t.height>l.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",t);const v=new Uint8ClampedArray(t.height*t.width*4);for(let w=0;wo.processBufferViewImage(v)).then(v=>{p.bufferView=v})):d.toDataURL!==void 0?p.uri=d.toDataURL(i):u.push($i(d,i).then(Bi).then(v=>{p.uri=v}));const A=a.images.push(p)-1;return c[f]=A,A}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(t){const n=this.json;n.samplers||(n.samplers=[]);const r={magFilter:Ze[t.magFilter],minFilter:Ze[t.minFilter],wrapS:Ze[t.wrapS],wrapT:Ze[t.wrapT]};return n.samplers.push(r)-1}processTexture(t){const n=this.options,r=this.cache,i=this.json;if(r.textures.has(t))return r.textures.get(t);i.textures||(i.textures=[]),t instanceof Qn&&(t=sr(t,n.maxTextureSize));let o=t.userData.mimeType;o==="image/webp"&&(o="image/png");const s={sampler:this.processSampler(t),source:this.processImage(t.image,t.format,t.flipY,o)};t.name&&(s.name=t.name),this._invokeAll(function(l){l.writeTexture&&l.writeTexture(t,s)});const a=i.textures.push(s)-1;return r.textures.set(t,a),a}processMaterial(t){const n=this.cache,r=this.json;if(n.materials.has(t))return n.materials.get(t);if(t.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;r.materials||(r.materials=[]);const i={pbrMetallicRoughness:{}};t.isMeshStandardMaterial!==!0&&t.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const o=t.color.toArray().concat([t.opacity]);if(rn(o,[1,1,1,1])||(i.pbrMetallicRoughness.baseColorFactor=o),t.isMeshStandardMaterial?(i.pbrMetallicRoughness.metallicFactor=t.metalness,i.pbrMetallicRoughness.roughnessFactor=t.roughness):(i.pbrMetallicRoughness.metallicFactor=.5,i.pbrMetallicRoughness.roughnessFactor=.5),t.metalnessMap||t.roughnessMap){const a=this.buildMetalRoughTexture(t.metalnessMap,t.roughnessMap),l={index:this.processTexture(a),channel:a.channel};this.applyTextureTransform(l,a),i.pbrMetallicRoughness.metallicRoughnessTexture=l}if(t.map){const a={index:this.processTexture(t.map),texCoord:t.map.channel};this.applyTextureTransform(a,t.map),i.pbrMetallicRoughness.baseColorTexture=a}if(t.emissive){const a=t.emissive;if(Math.max(a.r,a.g,a.b)>0&&(i.emissiveFactor=t.emissive.toArray()),t.emissiveMap){const l={index:this.processTexture(t.emissiveMap),texCoord:t.emissiveMap.channel};this.applyTextureTransform(l,t.emissiveMap),i.emissiveTexture=l}}if(t.normalMap){const a={index:this.processTexture(t.normalMap),texCoord:t.normalMap.channel};t.normalScale&&t.normalScale.x!==1&&(a.scale=t.normalScale.x),this.applyTextureTransform(a,t.normalMap),i.normalTexture=a}if(t.aoMap){const a={index:this.processTexture(t.aoMap),texCoord:t.aoMap.channel};t.aoMapIntensity!==1&&(a.strength=t.aoMapIntensity),this.applyTextureTransform(a,t.aoMap),i.occlusionTexture=a}t.transparent?i.alphaMode="BLEND":t.alphaTest>0&&(i.alphaMode="MASK",i.alphaCutoff=t.alphaTest),t.side===qn&&(i.doubleSided=!0),t.name!==""&&(i.name=t.name),this.serializeUserData(t,i),this._invokeAll(function(a){a.writeMaterial&&a.writeMaterial(t,i)});const s=r.materials.push(i)-1;return n.materials.set(t,s),s}processMesh(t){const n=this.cache,r=this.json,i=[t.geometry.uuid];if(Array.isArray(t.material))for(let M=0,C=t.material.length;M=152?{uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3"}:{uv:"TEXCOORD_0",uv2:"TEXCOORD_1"},color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},d=s.getAttribute("normal");d!==void 0&&!this.isNormalizedNormalAttribute(d)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),s.setAttribute("normal",this.createNormalizedNormalAttribute(d)));let g=null;for(let M in s.attributes){if(M.slice(0,5)==="morph")continue;const C=s.attributes[M];if(M=p[M]||M.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(M)||(M="_"+M),n.attributes.has(this.getUID(C))){u[M]=n.attributes.get(this.getUID(C));continue}g=null;const O=C.array;M==="JOINTS_0"&&!(O instanceof Uint16Array)&&!(O instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),g=new St(new Uint16Array(O),C.itemSize,C.normalized));const h=this.processAccessor(g||C,s);h!==null&&(M.startsWith("_")||this.detectMeshQuantization(M,C),u[M]=h,n.attributes.set(this.getUID(C),h))}if(d!==void 0&&s.setAttribute("normal",d),Object.keys(u).length===0)return null;if(t.morphTargetInfluences!==void 0&&t.morphTargetInfluences.length>0){const M=[],C=[],O={};if(t.morphTargetDictionary!==void 0)for(const h in t.morphTargetDictionary)O[t.morphTargetDictionary[h]]=h;for(let h=0;h0&&(l.extras={},l.extras.targetNames=C)}const A=Array.isArray(t.material);if(A&&s.groups.length===0)return null;const v=A?t.material:[t.material],w=A?s.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let M=0,C=w.length;M0&&(O.targets=f),s.index!==null){let k=this.getUID(s.index);(w[M].start!==void 0||w[M].count!==void 0)&&(k+=":"+w[M].start+":"+w[M].count),n.attributes.has(k)?O.indices=n.attributes.get(k):(O.indices=this.processAccessor(s.index,s,w[M].start,w[M].count),n.attributes.set(k,O.indices)),O.indices===null&&delete O.indices}const h=this.processMaterial(v[w[M].materialIndex]);h!==null&&(O.material=h),c.push(O)}l.primitives=c,r.meshes||(r.meshes=[]),this._invokeAll(function(M){M.writeMesh&&M.writeMesh(t,l)});const R=r.meshes.push(l)-1;return n.meshes.set(o,R),R}detectMeshQuantization(t,n){if(this.extensionsUsed[ar])return;let r;switch(n.array.constructor){case Int8Array:r="byte";break;case Uint8Array:r="unsigned byte";break;case Int16Array:r="short";break;case Uint16Array:r="unsigned short";break;default:return}n.normalized&&(r+=" normalized");const i=t.split("_",1)[0];Ui[i]&&Ui[i].includes(r)&&(this.extensionsUsed[ar]=!0,this.extensionsRequired[ar]=!0)}processCamera(t){const n=this.json;n.cameras||(n.cameras=[]);const r=t.isOrthographicCamera,i={type:r?"orthographic":"perspective"};return r?i.orthographic={xmag:t.right*2,ymag:t.top*2,zfar:t.far<=0?.001:t.far,znear:t.near<0?0:t.near}:i.perspective={aspectRatio:t.aspect,yfov:Ct.degToRad(t.fov),zfar:t.far<=0?.001:t.far,znear:t.near<0?0:t.near},t.name!==""&&(i.name=t.type),n.cameras.push(i)-1}processAnimation(t,n){const r=this.json,i=this.nodeMap;r.animations||(r.animations=[]),t=Es.Utils.mergeMorphTargetTracks(t.clone(),n);const o=t.tracks,s=[],a=[];for(let l=0;l0){const a=[];for(let l=0,u=t.children.length;l0&&(o.children=a)}this._invokeAll(function(a){a.writeNode&&a.writeNode(t,o)});const s=n.nodes.push(o)-1;return i.set(t,s),s}processScene(t){const n=this.json,r=this.options;n.scenes||(n.scenes=[],n.scene=0);const i={};t.name!==""&&(i.name=t.name),n.scenes.push(i);const o=[];for(let s=0,a=t.children.length;s0&&(i.nodes=o),this.serializeUserData(t,i)}processObjects(t){const n=new Dr;n.name="AuxScene";for(let r=0;r0&&this.processObjects(r);for(let i=0;i0&&(s.range=t.distance)):t.isSpotLight&&(s.type="spot",t.distance>0&&(s.range=t.distance),s.spot={},s.spot.innerConeAngle=(t.penumbra-1)*t.angle*-1,s.spot.outerConeAngle=t.angle),t.decay!==void 0&&t.decay!==2&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),t.target&&(t.target.parent!==t||t.target.position.x!==0||t.target.position.y!==0||t.target.position.z!==-1)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),o[this.name]||(i.extensions=i.extensions||{},i.extensions[this.name]={lights:[]},o[this.name]=!0);const a=i.extensions[this.name].lights;a.push(s),n.extensions=n.extensions||{},n.extensions[this.name]={light:a.length-1}}}let nc=class{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}writeMaterial(e,t){if(!e.isMeshBasicMaterial)return;const n=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},n[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}},rc=class{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.clearcoat===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.clearcoatFactor=e.clearcoat,e.clearcoatMap){const o={index:n.processTexture(e.clearcoatMap),texCoord:e.clearcoatMap.channel};n.applyTextureTransform(o,e.clearcoatMap),i.clearcoatTexture=o}if(i.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){const o={index:n.processTexture(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};n.applyTextureTransform(o,e.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=o}if(e.clearcoatNormalMap){const o={index:n.processTexture(e.clearcoatNormalMap),texCoord:e.clearcoatNormalMap.channel};n.applyTextureTransform(o,e.clearcoatNormalMap),i.clearcoatNormalTexture=o}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},ic=class{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.iridescence===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.iridescenceFactor=e.iridescence,e.iridescenceMap){const o={index:n.processTexture(e.iridescenceMap),texCoord:e.iridescenceMap.channel};n.applyTextureTransform(o,e.iridescenceMap),i.iridescenceTexture=o}if(i.iridescenceIor=e.iridescenceIOR,i.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){const o={index:n.processTexture(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};n.applyTextureTransform(o,e.iridescenceThicknessMap),i.iridescenceThicknessTexture=o}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},oc=class{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.transmissionFactor=e.transmission,e.transmissionMap){const o={index:n.processTexture(e.transmissionMap),texCoord:e.transmissionMap.channel};n.applyTextureTransform(o,e.transmissionMap),i.transmissionTexture=o}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},sc=class{constructor(e){this.writer=e,this.name="KHR_materials_volume"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.thicknessFactor=e.thickness,e.thicknessMap){const o={index:n.processTexture(e.thicknessMap),texCoord:e.thicknessMap.channel};n.applyTextureTransform(o,e.thicknessMap),i.thicknessTexture=o}i.attenuationDistance=e.attenuationDistance,i.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},ac=class{constructor(e){this.writer=e,this.name="KHR_materials_ior"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.ior===1.5)return;const n=this.writer.extensionsUsed,r={};r.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}},lc=class{constructor(e){this.writer=e,this.name="KHR_materials_specular"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.specularIntensity===1&&e.specularColor.equals(qu)&&!e.specularIntensityMap&&!e.specularColorTexture)return;const n=this.writer,r=n.extensionsUsed,i={};if(e.specularIntensityMap){const o={index:n.processTexture(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};n.applyTextureTransform(o,e.specularIntensityMap),i.specularTexture=o}if(e.specularColorMap){const o={index:n.processTexture(e.specularColorMap),texCoord:e.specularColorMap.channel};n.applyTextureTransform(o,e.specularColorMap),i.specularColorTexture=o}i.specularFactor=e.specularIntensity,i.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},uc=class{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.sheen==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(e.sheenRoughnessMap){const o={index:n.processTexture(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};n.applyTextureTransform(o,e.sheenRoughnessMap),i.sheenRoughnessTexture=o}if(e.sheenColorMap){const o={index:n.processTexture(e.sheenColorMap),texCoord:e.sheenColorMap.channel};n.applyTextureTransform(o,e.sheenColorMap),i.sheenColorTexture=o}i.sheenRoughnessFactor=e.sheenRoughness,i.sheenColorFactor=e.sheenColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},cc=class{constructor(e){this.writer=e,this.name="KHR_materials_anisotropy"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.anisotropy==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(e.anisotropyMap){const o={index:n.processTexture(e.anisotropyMap)};n.applyTextureTransform(o,e.anisotropyMap),i.anisotropyTexture=o}i.anisotropyStrength=e.anisotropy,i.anisotropyRotation=e.anisotropyRotation,t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},fc=class{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}writeMaterial(e,t){if(!e.isMeshStandardMaterial||e.emissiveIntensity===1)return;const n=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}};var mn=Uint8Array,_s=Uint16Array,dc=Uint32Array,pc=new mn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),hc=new mn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ss=function(e,t){for(var n=new _s(31),r=0;r<31;++r)n[r]=t+=1<>>1|(Re&21845)<<1;bt=(bt&52428)>>>2|(bt&13107)<<2,bt=(bt&61680)>>>4|(bt&3855)<<4,yc[Re]=((bt&65280)>>>8|(bt&255)<<8)>>>1}var Yn=new mn(288);for(var Re=0;Re<144;++Re)Yn[Re]=8;for(var Re=144;Re<256;++Re)Yn[Re]=9;for(var Re=256;Re<280;++Re)Yn[Re]=7;for(var Re=280;Re<288;++Re)Yn[Re]=8;var bc=new mn(32);for(var Re=0;Re<32;++Re)bc[Re]=5;var xc=new mn(0),vc=typeof TextDecoder<"u"&&new TextDecoder,wc=0;try{vc.decode(xc,{stream:!0}),wc=1}catch{}var Tc=Object.defineProperty,Ac=(e,t,n)=>t in e?Tc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kc=(e,t,n)=>(Ac(e,t+"",n),n);const Rs=class extends Rt{constructor(e,t={}){super(e),this.isReflector=!0,this.type="Reflector",this.camera=new Tt;const n=this,r=t.color!==void 0?new Fe(t.color):new Fe(8355711),i=t.textureWidth||512,o=t.textureHeight||512,s=t.clipBias||0,a=t.shader||Rs.ReflectorShader,l=t.multisample!==void 0?t.multisample:4,u=new ss,c=new re,f=new re,p=new re,d=new mt,g=new re(0,0,-1),A=new At,v=new re,w=new re,R=new At,M=new mt,C=this.camera,O=new ul(i,o,{samples:l,type:cl}),h=new hn({uniforms:oi.clone(a.uniforms),fragmentShader:a.fragmentShader,vertexShader:a.vertexShader});h.uniforms.tDiffuse.value=O.texture,h.uniforms.color.value=r,h.uniforms.textureMatrix.value=M,this.material=h,this.onBeforeRender=function(k,b,y){if(f.setFromMatrixPosition(n.matrixWorld),p.setFromMatrixPosition(y.matrixWorld),d.extractRotation(n.matrixWorld),c.set(0,0,1),c.applyMatrix4(d),v.subVectors(f,p),v.dot(c)>0)return;v.reflect(c).negate(),v.add(f),d.extractRotation(y.matrixWorld),g.set(0,0,-1),g.applyMatrix4(d),g.add(p),w.subVectors(f,g),w.reflect(c).negate(),w.add(f),C.position.copy(v),C.up.set(0,1,0),C.up.applyMatrix4(d),C.up.reflect(c),C.lookAt(w),C.far=y.far,C.updateMatrixWorld(),C.projectionMatrix.copy(y.projectionMatrix),M.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),M.multiply(C.projectionMatrix),M.multiply(C.matrixWorldInverse),M.multiply(n.matrixWorld),u.setFromNormalAndCoplanarPoint(c,f),u.applyMatrix4(C.matrixWorldInverse),A.set(u.normal.x,u.normal.y,u.normal.z,u.constant);const m=C.projectionMatrix;R.x=(Math.sign(A.x)+m.elements[8])/m.elements[0],R.y=(Math.sign(A.y)+m.elements[9])/m.elements[5],R.z=-1,R.w=(1+m.elements[10])/m.elements[14],A.multiplyScalar(2/A.dot(R)),m.elements[2]=A.x,m.elements[6]=A.y,m.elements[10]=A.z+1-s,m.elements[14]=A.w,n.visible=!1;const T=k.getRenderTarget(),S=k.xr.enabled,B=k.shadowMap.autoUpdate,U=k.toneMapping;let F=!1;"outputColorSpace"in k?F=k.outputColorSpace==="srgb":F=k.outputEncoding===3001,k.xr.enabled=!1,k.shadowMap.autoUpdate=!1,"outputColorSpace"in k?k.outputColorSpace="srgb-linear":k.outputEncoding=3e3,k.toneMapping=fl,k.setRenderTarget(O),k.state.buffers.depth.setMask(!0),k.autoClear===!1&&k.clear(),k.render(b,C),k.xr.enabled=S,k.shadowMap.autoUpdate=B,k.toneMapping=U,"outputColorSpace"in k?k.outputColorSpace=F?"srgb":"srgb-linear":k.outputEncoding=F?3001:3e3,k.setRenderTarget(T);const P=y.viewport;P!==void 0&&k.state.viewport(P),n.visible=!0},this.getRenderTarget=function(){return O},this.dispose=function(){O.dispose(),n.material.dispose()}}};let Fr=Rs;kc(Fr,"ReflectorShader",{uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:` + `})),Ot.uniforms.blitTexture.value=e,Ot.defines.IS_SRGB="colorSpace"in e?e.colorSpace==="srgb":e.encoding===3001,Ot.needsUpdate=!0,kn||(kn=new Rt(or,Ot),kn.frustrumCulled=!1);const r=new Tt,i=new Dr;i.add(kn),n||(n=An=new hl({antialias:!1})),n.setSize(Math.min(e.image.width,t),Math.min(e.image.height,t)),n.clear(),n.render(i,r);const o=new zn(n.domElement);return o.minFilter=e.minFilter,o.magFilter=e.magFilter,o.wrapS=e.wrapS,o.wrapT=e.wrapT,o.name=e.name,An&&(An.dispose(),An=null),o}const Bi={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]};class Es{constructor(){this.pluginCallbacks=[],this.register(function(t){return new Ju(t)}),this.register(function(t){return new ec(t)}),this.register(function(t){return new rc(t)}),this.register(function(t){return new ic(t)}),this.register(function(t){return new oc(t)}),this.register(function(t){return new sc(t)}),this.register(function(t){return new tc(t)}),this.register(function(t){return new nc(t)}),this.register(function(t){return new ac(t)}),this.register(function(t){return new lc(t)}),this.register(function(t){return new uc(t)})}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,n,r,i){const o=new Qu,s=[];for(let a=0,l=this.pluginCallbacks.length;ae.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)<.001)return e.times.length-1;r[r.length-1]=t,r.set(e.times,0),i.set(e.values,0),i.set(o.evaluate(t),e.values.length),s=r.length-1}else for(let a=0;at){r.set(e.times.slice(0,a+1),0),r[a+1]=t,r.set(e.times.slice(a+1),a+2),i.set(e.values.slice(0,(a+1)*n),0),i.set(o.evaluate(t),(a+1)*n),i.set(e.values.slice((a+1)*n),(a+2)*n),s=a+1;break}}return e.times=r,e.values=i,s},mergeMorphTargetTracks:function(e,t){const n=[],r={},i=e.tracks;for(let o=0;o4?s=e.array[i*e.itemSize+o]:(o===0?s=e.getX(i):o===1?s=e.getY(i):o===2?s=e.getZ(i):o===3&&(s=e.getW(i)),e.normalized===!0&&(s=Ct.normalize(s,e.array))),r.min[o]=Math.min(r.min[o],s),r.max[o]=Math.max(r.max[o],s)}return r}function Ms(e){return Math.ceil(e/4)*4}function lr(e,t=0){const n=Ms(e.byteLength);if(n!==e.byteLength){const r=new Uint8Array(n);if(r.set(new Uint8Array(e)),t!==0)for(let i=e.byteLength;i"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function Gi(e,t){if(e.toBlob!==void 0)return new Promise(r=>e.toBlob(r,t));let n;return t==="image/jpeg"?n=.92:t==="image/webp"&&(n=.8),e.convertToBlob({type:t,quality:n})}class Qu{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(t){this.plugins=t}async write(t,n,r={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},r),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(t),await Promise.all(this.pending);const i=this,o=i.buffers,s=i.json;r=i.options;const a=i.extensionsUsed,l=i.extensionsRequired,u=new Blob(o,{type:"application/octet-stream"}),c=Object.keys(a),f=Object.keys(l);c.length>0&&(s.extensionsUsed=c),f.length>0&&(s.extensionsRequired=f),s.buffers&&s.buffers.length>0&&(s.buffers[0].byteLength=u.size),r.binary===!0?u.arrayBuffer().then(p=>{const d=lr(p),g=new DataView(new ArrayBuffer(Vi));g.setUint32(0,d.byteLength,!0),g.setUint32(4,Ku,!0);const A=lr(Wu(JSON.stringify(s)),32),v=new DataView(new ArrayBuffer(Vi));v.setUint32(0,A.byteLength,!0),v.setUint32(4,Yu,!0);const w=new ArrayBuffer(ji),R=new DataView(w);R.setUint32(0,$u,!0),R.setUint32(4,qu,!0);const M=ji+v.byteLength+A.byteLength+g.byteLength+d.byteLength;R.setUint32(8,M,!0),new Blob([w,v,A,g,d],{type:"application/octet-stream"}).arrayBuffer().then(n)}):s.buffers&&s.buffers.length>0?Fi(u).then(p=>{s.buffers[0].uri=p,n(s)}):n(s)}serializeUserData(t,n){if(Object.keys(t.userData).length===0)return;const r=this.options,i=this.extensionsUsed;try{const o=JSON.parse(JSON.stringify(t.userData));if(r.includeCustomExtensions&&o.gltfExtensions){n.extensions===void 0&&(n.extensions={});for(const s in o.gltfExtensions)n.extensions[s]=o.gltfExtensions[s],i[s]=!0;delete o.gltfExtensions}Object.keys(o).length>0&&(n.extras=o)}catch(o){console.warn("THREE.GLTFExporter: userData of '"+t.name+"' won't be serialized because of JSON.stringify error - "+o.message)}}getUID(t,n=!1){if(this.uids.has(t)===!1){const r=new Map;r.set(!0,this.uid++),r.set(!1,this.uid++),this.uids.set(t,r)}return this.uids.get(t).get(n)}isNormalizedNormalAttribute(t){if(this.cache.attributesNormalized.has(t))return!1;const n=new re;for(let r=0,i=t.count;r5e-4)return!1;return!0}createNormalizedNormalAttribute(t){const n=this.cache;if(n.attributesNormalized.has(t))return n.attributesNormalized.get(t);const r=t.clone(),i=new re;for(let o=0,s=r.count;o4?g=t.array[p*t.itemSize+d]:(d===0?g=t.getX(p):d===1?g=t.getY(p):d===2?g=t.getZ(p):d===3&&(g=t.getW(p)),t.normalized===!0&&(g=Ct.normalize(g,t.array))),n===pe.FLOAT?u.setFloat32(c,g,!0):n===pe.INT?u.setInt32(c,g,!0):n===pe.UNSIGNED_INT?u.setUint32(c,g,!0):n===pe.SHORT?u.setInt16(c,g,!0):n===pe.UNSIGNED_SHORT?u.setUint16(c,g,!0):n===pe.BYTE?u.setInt8(c,g):n===pe.UNSIGNED_BYTE&&u.setUint8(c,g),c+=a}const f={buffer:this.processBuffer(u.buffer),byteOffset:this.byteOffset,byteLength:l};return o!==void 0&&(f.target=o),o===pe.ARRAY_BUFFER&&(f.byteStride=t.itemSize*a),this.byteOffset+=l,s.bufferViews.push(f),{id:s.bufferViews.length-1,byteLength:0}}processBufferViewImage(t){const n=this,r=n.json;return r.bufferViews||(r.bufferViews=[]),t.arrayBuffer().then(i=>{const o=lr(i),s={buffer:n.processBuffer(o),byteOffset:n.byteOffset,byteLength:o.byteLength};return n.byteOffset+=o.byteLength,r.bufferViews.push(s)-1})}processAccessor(t,n,r,i){const o=this.json,s={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"};let a;if(t.array.constructor===Float32Array)a=pe.FLOAT;else if(t.array.constructor===Int32Array)a=pe.INT;else if(t.array.constructor===Uint32Array)a=pe.UNSIGNED_INT;else if(t.array.constructor===Int16Array)a=pe.SHORT;else if(t.array.constructor===Uint16Array)a=pe.UNSIGNED_SHORT;else if(t.array.constructor===Int8Array)a=pe.BYTE;else if(t.array.constructor===Uint8Array)a=pe.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+t.array.constructor.name);if(r===void 0&&(r=0),i===void 0&&(i=t.count),i===0)return null;const l=Zu(t,r,i);let u;n!==void 0&&(u=t===n.index?pe.ELEMENT_ARRAY_BUFFER:pe.ARRAY_BUFFER);const c=this.processBufferView(t,a,r,i,u),f={bufferView:c.id,byteOffset:c.byteOffset,componentType:a,count:i,max:l.max,min:l.min,type:s[t.itemSize]};return t.normalized===!0&&(f.normalized=!0),o.accessors||(o.accessors=[]),o.accessors.push(f)-1}processImage(t,n,r,i="image/png"){if(t!==null){const o=this,s=o.cache,a=o.json,l=o.options,u=o.pending;s.images.has(t)||s.images.set(t,{});const c=s.images.get(t),f=i+":flipY/"+r.toString();if(c[f]!==void 0)return c[f];a.images||(a.images=[]);const p={mimeType:i},d=Hi();d.width=Math.min(t.width,l.maxTextureSize),d.height=Math.min(t.height,l.maxTextureSize);const g=d.getContext("2d");if(r===!0&&(g.translate(0,d.height),g.scale(1,-1)),t.data!==void 0){n!==Pr&&console.error("GLTFExporter: Only RGBAFormat is supported.",n),(t.width>l.maxTextureSize||t.height>l.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",t);const v=new Uint8ClampedArray(t.height*t.width*4);for(let w=0;wo.processBufferViewImage(v)).then(v=>{p.bufferView=v})):d.toDataURL!==void 0?p.uri=d.toDataURL(i):u.push(Gi(d,i).then(Fi).then(v=>{p.uri=v}));const A=a.images.push(p)-1;return c[f]=A,A}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(t){const n=this.json;n.samplers||(n.samplers=[]);const r={magFilter:Ze[t.magFilter],minFilter:Ze[t.minFilter],wrapS:Ze[t.wrapS],wrapT:Ze[t.wrapT]};return n.samplers.push(r)-1}processTexture(t){const n=this.options,r=this.cache,i=this.json;if(r.textures.has(t))return r.textures.get(t);i.textures||(i.textures=[]),t instanceof Qn&&(t=sr(t,n.maxTextureSize));let o=t.userData.mimeType;o==="image/webp"&&(o="image/png");const s={sampler:this.processSampler(t),source:this.processImage(t.image,t.format,t.flipY,o)};t.name&&(s.name=t.name),this._invokeAll(function(l){l.writeTexture&&l.writeTexture(t,s)});const a=i.textures.push(s)-1;return r.textures.set(t,a),a}processMaterial(t){const n=this.cache,r=this.json;if(n.materials.has(t))return n.materials.get(t);if(t.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;r.materials||(r.materials=[]);const i={pbrMetallicRoughness:{}};t.isMeshStandardMaterial!==!0&&t.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const o=t.color.toArray().concat([t.opacity]);if(nn(o,[1,1,1,1])||(i.pbrMetallicRoughness.baseColorFactor=o),t.isMeshStandardMaterial?(i.pbrMetallicRoughness.metallicFactor=t.metalness,i.pbrMetallicRoughness.roughnessFactor=t.roughness):(i.pbrMetallicRoughness.metallicFactor=.5,i.pbrMetallicRoughness.roughnessFactor=.5),t.metalnessMap||t.roughnessMap){const a=this.buildMetalRoughTexture(t.metalnessMap,t.roughnessMap),l={index:this.processTexture(a),channel:a.channel};this.applyTextureTransform(l,a),i.pbrMetallicRoughness.metallicRoughnessTexture=l}if(t.map){const a={index:this.processTexture(t.map),texCoord:t.map.channel};this.applyTextureTransform(a,t.map),i.pbrMetallicRoughness.baseColorTexture=a}if(t.emissive){const a=t.emissive;if(Math.max(a.r,a.g,a.b)>0&&(i.emissiveFactor=t.emissive.toArray()),t.emissiveMap){const l={index:this.processTexture(t.emissiveMap),texCoord:t.emissiveMap.channel};this.applyTextureTransform(l,t.emissiveMap),i.emissiveTexture=l}}if(t.normalMap){const a={index:this.processTexture(t.normalMap),texCoord:t.normalMap.channel};t.normalScale&&t.normalScale.x!==1&&(a.scale=t.normalScale.x),this.applyTextureTransform(a,t.normalMap),i.normalTexture=a}if(t.aoMap){const a={index:this.processTexture(t.aoMap),texCoord:t.aoMap.channel};t.aoMapIntensity!==1&&(a.strength=t.aoMapIntensity),this.applyTextureTransform(a,t.aoMap),i.occlusionTexture=a}t.transparent?i.alphaMode="BLEND":t.alphaTest>0&&(i.alphaMode="MASK",i.alphaCutoff=t.alphaTest),t.side===qn&&(i.doubleSided=!0),t.name!==""&&(i.name=t.name),this.serializeUserData(t,i),this._invokeAll(function(a){a.writeMaterial&&a.writeMaterial(t,i)});const s=r.materials.push(i)-1;return n.materials.set(t,s),s}processMesh(t){const n=this.cache,r=this.json,i=[t.geometry.uuid];if(Array.isArray(t.material))for(let M=0,C=t.material.length;M=152?{uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3"}:{uv:"TEXCOORD_0",uv2:"TEXCOORD_1"},color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},d=s.getAttribute("normal");d!==void 0&&!this.isNormalizedNormalAttribute(d)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),s.setAttribute("normal",this.createNormalizedNormalAttribute(d)));let g=null;for(let M in s.attributes){if(M.slice(0,5)==="morph")continue;const C=s.attributes[M];if(M=p[M]||M.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(M)||(M="_"+M),n.attributes.has(this.getUID(C))){u[M]=n.attributes.get(this.getUID(C));continue}g=null;const O=C.array;M==="JOINTS_0"&&!(O instanceof Uint16Array)&&!(O instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),g=new St(new Uint16Array(O),C.itemSize,C.normalized));const h=this.processAccessor(g||C,s);h!==null&&(M.startsWith("_")||this.detectMeshQuantization(M,C),u[M]=h,n.attributes.set(this.getUID(C),h))}if(d!==void 0&&s.setAttribute("normal",d),Object.keys(u).length===0)return null;if(t.morphTargetInfluences!==void 0&&t.morphTargetInfluences.length>0){const M=[],C=[],O={};if(t.morphTargetDictionary!==void 0)for(const h in t.morphTargetDictionary)O[t.morphTargetDictionary[h]]=h;for(let h=0;h0&&(l.extras={},l.extras.targetNames=C)}const A=Array.isArray(t.material);if(A&&s.groups.length===0)return null;const v=A?t.material:[t.material],w=A?s.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let M=0,C=w.length;M0&&(O.targets=f),s.index!==null){let S=this.getUID(s.index);(w[M].start!==void 0||w[M].count!==void 0)&&(S+=":"+w[M].start+":"+w[M].count),n.attributes.has(S)?O.indices=n.attributes.get(S):(O.indices=this.processAccessor(s.index,s,w[M].start,w[M].count),n.attributes.set(S,O.indices)),O.indices===null&&delete O.indices}const h=this.processMaterial(v[w[M].materialIndex]);h!==null&&(O.material=h),c.push(O)}l.primitives=c,r.meshes||(r.meshes=[]),this._invokeAll(function(M){M.writeMesh&&M.writeMesh(t,l)});const R=r.meshes.push(l)-1;return n.meshes.set(o,R),R}detectMeshQuantization(t,n){if(this.extensionsUsed[ar])return;let r;switch(n.array.constructor){case Int8Array:r="byte";break;case Uint8Array:r="unsigned byte";break;case Int16Array:r="short";break;case Uint16Array:r="unsigned short";break;default:return}n.normalized&&(r+=" normalized");const i=t.split("_",1)[0];Bi[i]&&Bi[i].includes(r)&&(this.extensionsUsed[ar]=!0,this.extensionsRequired[ar]=!0)}processCamera(t){const n=this.json;n.cameras||(n.cameras=[]);const r=t.isOrthographicCamera,i={type:r?"orthographic":"perspective"};return r?i.orthographic={xmag:t.right*2,ymag:t.top*2,zfar:t.far<=0?.001:t.far,znear:t.near<0?0:t.near}:i.perspective={aspectRatio:t.aspect,yfov:Ct.degToRad(t.fov),zfar:t.far<=0?.001:t.far,znear:t.near<0?0:t.near},t.name!==""&&(i.name=t.type),n.cameras.push(i)-1}processAnimation(t,n){const r=this.json,i=this.nodeMap;r.animations||(r.animations=[]),t=Es.Utils.mergeMorphTargetTracks(t.clone(),n);const o=t.tracks,s=[],a=[];for(let l=0;l0){const a=[];for(let l=0,u=t.children.length;l0&&(o.children=a)}this._invokeAll(function(a){a.writeNode&&a.writeNode(t,o)});const s=n.nodes.push(o)-1;return i.set(t,s),s}processScene(t){const n=this.json,r=this.options;n.scenes||(n.scenes=[],n.scene=0);const i={};t.name!==""&&(i.name=t.name),n.scenes.push(i);const o=[];for(let s=0,a=t.children.length;s0&&(i.nodes=o),this.serializeUserData(t,i)}processObjects(t){const n=new Dr;n.name="AuxScene";for(let r=0;r0&&this.processObjects(r);for(let i=0;i0&&(s.range=t.distance)):t.isSpotLight&&(s.type="spot",t.distance>0&&(s.range=t.distance),s.spot={},s.spot.innerConeAngle=(t.penumbra-1)*t.angle*-1,s.spot.outerConeAngle=t.angle),t.decay!==void 0&&t.decay!==2&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),t.target&&(t.target.parent!==t||t.target.position.x!==0||t.target.position.y!==0||t.target.position.z!==-1)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),o[this.name]||(i.extensions=i.extensions||{},i.extensions[this.name]={lights:[]},o[this.name]=!0);const a=i.extensions[this.name].lights;a.push(s),n.extensions=n.extensions||{},n.extensions[this.name]={light:a.length-1}}}let ec=class{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}writeMaterial(e,t){if(!e.isMeshBasicMaterial)return;const n=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},n[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}},tc=class{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.clearcoat===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.clearcoatFactor=e.clearcoat,e.clearcoatMap){const o={index:n.processTexture(e.clearcoatMap),texCoord:e.clearcoatMap.channel};n.applyTextureTransform(o,e.clearcoatMap),i.clearcoatTexture=o}if(i.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){const o={index:n.processTexture(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};n.applyTextureTransform(o,e.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=o}if(e.clearcoatNormalMap){const o={index:n.processTexture(e.clearcoatNormalMap),texCoord:e.clearcoatNormalMap.channel};n.applyTextureTransform(o,e.clearcoatNormalMap),i.clearcoatNormalTexture=o}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},nc=class{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.iridescence===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.iridescenceFactor=e.iridescence,e.iridescenceMap){const o={index:n.processTexture(e.iridescenceMap),texCoord:e.iridescenceMap.channel};n.applyTextureTransform(o,e.iridescenceMap),i.iridescenceTexture=o}if(i.iridescenceIor=e.iridescenceIOR,i.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){const o={index:n.processTexture(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};n.applyTextureTransform(o,e.iridescenceThicknessMap),i.iridescenceThicknessTexture=o}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},rc=class{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.transmissionFactor=e.transmission,e.transmissionMap){const o={index:n.processTexture(e.transmissionMap),texCoord:e.transmissionMap.channel};n.applyTextureTransform(o,e.transmissionMap),i.transmissionTexture=o}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},ic=class{constructor(e){this.writer=e,this.name="KHR_materials_volume"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.thicknessFactor=e.thickness,e.thicknessMap){const o={index:n.processTexture(e.thicknessMap),texCoord:e.thicknessMap.channel};n.applyTextureTransform(o,e.thicknessMap),i.thicknessTexture=o}i.attenuationDistance=e.attenuationDistance,i.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},oc=class{constructor(e){this.writer=e,this.name="KHR_materials_ior"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.ior===1.5)return;const n=this.writer.extensionsUsed,r={};r.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}},sc=class{constructor(e){this.writer=e,this.name="KHR_materials_specular"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.specularIntensity===1&&e.specularColor.equals(Gu)&&!e.specularIntensityMap&&!e.specularColorTexture)return;const n=this.writer,r=n.extensionsUsed,i={};if(e.specularIntensityMap){const o={index:n.processTexture(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};n.applyTextureTransform(o,e.specularIntensityMap),i.specularTexture=o}if(e.specularColorMap){const o={index:n.processTexture(e.specularColorMap),texCoord:e.specularColorMap.channel};n.applyTextureTransform(o,e.specularColorMap),i.specularColorTexture=o}i.specularFactor=e.specularIntensity,i.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},ac=class{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.sheen==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(e.sheenRoughnessMap){const o={index:n.processTexture(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};n.applyTextureTransform(o,e.sheenRoughnessMap),i.sheenRoughnessTexture=o}if(e.sheenColorMap){const o={index:n.processTexture(e.sheenColorMap),texCoord:e.sheenColorMap.channel};n.applyTextureTransform(o,e.sheenColorMap),i.sheenColorTexture=o}i.sheenRoughnessFactor=e.sheenRoughness,i.sheenColorFactor=e.sheenColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},lc=class{constructor(e){this.writer=e,this.name="KHR_materials_anisotropy"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||e.anisotropy==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(e.anisotropyMap){const o={index:n.processTexture(e.anisotropyMap)};n.applyTextureTransform(o,e.anisotropyMap),i.anisotropyTexture=o}i.anisotropyStrength=e.anisotropy,i.anisotropyRotation=e.anisotropyRotation,t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}},uc=class{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}writeMaterial(e,t){if(!e.isMeshStandardMaterial||e.emissiveIntensity===1)return;const n=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}};var mn=Uint8Array,_s=Uint16Array,cc=Uint32Array,fc=new mn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),dc=new mn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ss=function(e,t){for(var n=new _s(31),r=0;r<31;++r)n[r]=t+=1<>>1|(Re&21845)<<1;xt=(xt&52428)>>>2|(xt&13107)<<2,xt=(xt&61680)>>>4|(xt&3855)<<4,mc[Re]=((xt&65280)>>>8|(xt&255)<<8)>>>1}var Yn=new mn(288);for(var Re=0;Re<144;++Re)Yn[Re]=8;for(var Re=144;Re<256;++Re)Yn[Re]=9;for(var Re=256;Re<280;++Re)Yn[Re]=7;for(var Re=280;Re<288;++Re)Yn[Re]=8;var gc=new mn(32);for(var Re=0;Re<32;++Re)gc[Re]=5;var yc=new mn(0),xc=typeof TextDecoder<"u"&&new TextDecoder,bc=0;try{xc.decode(yc,{stream:!0}),bc=1}catch{}var vc=Object.defineProperty,wc=(e,t,n)=>t in e?vc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tc=(e,t,n)=>(wc(e,t+"",n),n);const Rs=class extends Rt{constructor(e,t={}){super(e),this.isReflector=!0,this.type="Reflector",this.camera=new Tt;const n=this,r=t.color!==void 0?new Fe(t.color):new Fe(8355711),i=t.textureWidth||512,o=t.textureHeight||512,s=t.clipBias||0,a=t.shader||Rs.ReflectorShader,l=t.multisample!==void 0?t.multisample:4,u=new ss,c=new re,f=new re,p=new re,d=new mt,g=new re(0,0,-1),A=new At,v=new re,w=new re,R=new At,M=new mt,C=this.camera,O=new ll(i,o,{samples:l,type:ul}),h=new hn({uniforms:ii.clone(a.uniforms),fragmentShader:a.fragmentShader,vertexShader:a.vertexShader});h.uniforms.tDiffuse.value=O.texture,h.uniforms.color.value=r,h.uniforms.textureMatrix.value=M,this.material=h,this.onBeforeRender=function(S,x,y){if(f.setFromMatrixPosition(n.matrixWorld),p.setFromMatrixPosition(y.matrixWorld),d.extractRotation(n.matrixWorld),c.set(0,0,1),c.applyMatrix4(d),v.subVectors(f,p),v.dot(c)>0)return;v.reflect(c).negate(),v.add(f),d.extractRotation(y.matrixWorld),g.set(0,0,-1),g.applyMatrix4(d),g.add(p),w.subVectors(f,g),w.reflect(c).negate(),w.add(f),C.position.copy(v),C.up.set(0,1,0),C.up.applyMatrix4(d),C.up.reflect(c),C.lookAt(w),C.far=y.far,C.updateMatrixWorld(),C.projectionMatrix.copy(y.projectionMatrix),M.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),M.multiply(C.projectionMatrix),M.multiply(C.matrixWorldInverse),M.multiply(n.matrixWorld),u.setFromNormalAndCoplanarPoint(c,f),u.applyMatrix4(C.matrixWorldInverse),A.set(u.normal.x,u.normal.y,u.normal.z,u.constant);const m=C.projectionMatrix;R.x=(Math.sign(A.x)+m.elements[8])/m.elements[0],R.y=(Math.sign(A.y)+m.elements[9])/m.elements[5],R.z=-1,R.w=(1+m.elements[10])/m.elements[14],A.multiplyScalar(2/A.dot(R)),m.elements[2]=A.x,m.elements[6]=A.y,m.elements[10]=A.z+1-s,m.elements[14]=A.w,n.visible=!1;const T=S.getRenderTarget(),k=S.xr.enabled,B=S.shadowMap.autoUpdate,j=S.toneMapping;let D=!1;"outputColorSpace"in S?D=S.outputColorSpace==="srgb":D=S.outputEncoding===3001,S.xr.enabled=!1,S.shadowMap.autoUpdate=!1,"outputColorSpace"in S?S.outputColorSpace="srgb-linear":S.outputEncoding=3e3,S.toneMapping=cl,S.setRenderTarget(O),S.state.buffers.depth.setMask(!0),S.autoClear===!1&&S.clear(),S.render(x,C),S.xr.enabled=k,S.shadowMap.autoUpdate=B,S.toneMapping=j,"outputColorSpace"in S?S.outputColorSpace=D?"srgb":"srgb-linear":S.outputEncoding=D?3001:3e3,S.setRenderTarget(T);const P=y.viewport;P!==void 0&&S.state.viewport(P),n.visible=!0},this.getRenderTarget=function(){return O},this.dispose=function(){O.dispose(),n.material.dispose()}}};let Fr=Rs;Tc(Fr,"ReflectorShader",{uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:` uniform mat4 textureMatrix; varying vec4 vUv; @@ -118,9 +118,9 @@ var _a=Object.defineProperty;var Sa=(e,t,n)=>t in e?_a(e,t,{enumerable:!0,config gl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 ); #include - #include <${ui>=154?"colorspace_fragment":"encodings_fragment"}> + #include <${li>=154?"colorspace_fragment":"encodings_fragment"}> - }`});var Ec=Object.defineProperty,Mc=(e,t,n)=>t in e?Ec(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cs=(e,t,n)=>(Mc(e,typeof t!="symbol"?t+"":t,n),n);const Kn=new as,_c=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),Ns=new ls(_c,5);Kn.setIndex([0,1,2,0,2,3]);Kn.setAttribute("position",new ii(Ns,3,0,!1));Kn.setAttribute("uv",new ii(Ns,2,3,!1));const Br=class extends Rt{constructor(){super(Br.Geometry,new Ft({opacity:0,transparent:!0})),this.isLensflare=!0,this.type="Lensflare",this.frustumCulled=!1,this.renderOrder=1/0;const e=new re,t=new re,n=new Si(new Uint8Array(16*16*3),16,16,Pr);n.minFilter=It,n.magFilter=It,n.wrapS=Bt,n.wrapT=Bt;const r=new Si(new Uint8Array(16*16*3),16,16,Pr);r.minFilter=It,r.magFilter=It,r.wrapS=Bt,r.wrapT=Bt;const i=Br.Geometry,o=new Jn({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:` + }`});var Ac=Object.defineProperty,kc=(e,t,n)=>t in e?Ac(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cs=(e,t,n)=>(kc(e,typeof t!="symbol"?t+"":t,n),n);const Kn=new as,Ec=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),Ns=new ls(Ec,5);Kn.setIndex([0,1,2,0,2,3]);Kn.setAttribute("position",new ri(Ns,3,0,!1));Kn.setAttribute("uv",new ri(Ns,2,3,!1));const Br=class extends Rt{constructor(){super(Br.Geometry,new Ft({opacity:0,transparent:!0})),this.isLensflare=!0,this.type="Lensflare",this.frustumCulled=!1,this.renderOrder=1/0;const e=new re,t=new re,n=new _i(new Uint8Array(16*16*3),16,16,Pr);n.minFilter=It,n.magFilter=It,n.wrapS=Bt,n.wrapT=Bt;const r=new _i(new Uint8Array(16*16*3),16,16,Pr);r.minFilter=It,r.magFilter=It,r.wrapS=Bt,r.wrapT=Bt;const i=Br.Geometry,o=new Jn({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:` precision highp float; @@ -171,7 +171,7 @@ var _a=Object.defineProperty;var Sa=(e,t,n)=>t in e?_a(e,t,{enumerable:!0,config gl_FragColor = texture2D( map, vUV ); - }`,depthTest:!1,depthWrite:!1,transparent:!1}),a=new Rt(i,o),l=[],u=Ls.Shader,c=new Jn({uniforms:{map:{value:null},occlusionMap:{value:r},color:{value:new Fe(16777215)},scale:{value:new Oe},screenPosition:{value:new re}},vertexShader:u.vertexShader,fragmentShader:u.fragmentShader,blending:dl,transparent:!0,depthWrite:!1}),f=new Rt(i,c);this.addElement=function(v){l.push(v)};const p=new Oe,d=new Oe,g=new pl,A=new At;this.onBeforeRender=function(v,w,R){v.getCurrentViewport(A);const M=A.w/A.z,C=A.z/2,O=A.w/2;let h=16/A.w;if(p.set(h*M,h),g.min.set(A.x,A.y),g.max.set(A.x+(A.z-16),A.y+(A.w-16)),t.setFromMatrixPosition(this.matrixWorld),t.applyMatrix4(R.matrixWorldInverse),!(t.z>0)&&(e.copy(t).applyMatrix4(R.projectionMatrix),d.x=A.x+e.x*C+C-8,d.y=A.y+e.y*O+O-8,g.containsPoint(d))){v.copyFramebufferToTexture(d,n);let k=o.uniforms;k.scale.value=p,k.screenPosition.value=e,v.renderBufferDirect(R,null,i,o,a,null),v.copyFramebufferToTexture(d,r),k=s.uniforms,k.scale.value=p,k.screenPosition.value=e,v.renderBufferDirect(R,null,i,s,a,null);const b=-e.x*2,y=-e.y*2;for(let m=0,T=l.length;m0)&&(e.copy(t).applyMatrix4(R.projectionMatrix),d.x=A.x+e.x*C+C-8,d.y=A.y+e.y*O+O-8,g.containsPoint(d))){v.copyFramebufferToTexture(d,n);let S=o.uniforms;S.scale.value=p,S.screenPosition.value=e,v.renderBufferDirect(R,null,i,o,a,null),v.copyFramebufferToTexture(d,r),S=s.uniforms,S.scale.value=p,S.screenPosition.value=e,v.renderBufferDirect(R,null,i,s,a,null);const x=-e.x*2,y=-e.y*2;for(let m=0,T=l.length;mt in e?_a(e,t,{enumerable:!0,config gl_FragColor = texture; gl_FragColor.rgb *= color; - }`});var Ic=Object.defineProperty,Rc=(e,t,n)=>t in e?Ic(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Os=(e,t,n)=>(Rc(e,typeof t!="symbol"?t+"":t,n),n);const Nn={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new re},up:{value:new re(0,1,0)}},vertexShader:` + }`});var _c=Object.defineProperty,Sc=(e,t,n)=>t in e?_c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Os=(e,t,n)=>(Sc(e,typeof t!="symbol"?t+"":t,n),n);const Nn={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new re},up:{value:new re(0,1,0)}},vertexShader:` uniform vec3 sunPosition; uniform float rayleigh; uniform float turbidity; @@ -379,11 +379,11 @@ var _a=Object.defineProperty;var Sa=(e,t,n)=>t in e?_a(e,t,{enumerable:!0,config gl_FragColor = vec4( retColor, 1.0 ); #include - #include <${ui>=154?"colorspace_fragment":"encodings_fragment"}> + #include <${li>=154?"colorspace_fragment":"encodings_fragment"}> } - `},Ps=new hn({name:"SkyShader",fragmentShader:Nn.fragmentShader,vertexShader:Nn.vertexShader,uniforms:oi.clone(Nn.uniforms),side:Qa,depthWrite:!1});class Ds extends Rt{constructor(){super(new ll(1,1,1),Ps)}}Os(Ds,"SkyShader",Nn);Os(Ds,"material",Ps);new Ja;new re;new us(0,0,0,"YXZ");new re;var Cc=Object.defineProperty,Nc=(e,t,n)=>t in e?Cc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,te=(e,t,n)=>(Nc(e,typeof t!="symbol"?t+"":t,n),n);const En=new Za,qi=new ss,Lc=Math.cos(70*(Math.PI/180)),Yi=(e,t)=>(e%t+t)%t;class Oc extends Xa{constructor(t,n){super(),te(this,"object"),te(this,"domElement"),te(this,"enabled",!0),te(this,"target",new re),te(this,"minDistance",0),te(this,"maxDistance",1/0),te(this,"minZoom",0),te(this,"maxZoom",1/0),te(this,"minPolarAngle",0),te(this,"maxPolarAngle",Math.PI),te(this,"minAzimuthAngle",-1/0),te(this,"maxAzimuthAngle",1/0),te(this,"enableDamping",!1),te(this,"dampingFactor",.05),te(this,"enableZoom",!0),te(this,"zoomSpeed",1),te(this,"enableRotate",!0),te(this,"rotateSpeed",1),te(this,"enablePan",!0),te(this,"panSpeed",1),te(this,"screenSpacePanning",!0),te(this,"keyPanSpeed",7),te(this,"zoomToCursor",!1),te(this,"autoRotate",!1),te(this,"autoRotateSpeed",2),te(this,"reverseOrbit",!1),te(this,"reverseHorizontalOrbit",!1),te(this,"reverseVerticalOrbit",!1),te(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),te(this,"mouseButtons",{LEFT:ht.ROTATE,MIDDLE:ht.DOLLY,RIGHT:ht.PAN}),te(this,"touches",{ONE:wt.ROTATE,TWO:wt.DOLLY_PAN}),te(this,"target0"),te(this,"position0"),te(this,"zoom0"),te(this,"_domElementKeyEvents",null),te(this,"getPolarAngle"),te(this,"getAzimuthalAngle"),te(this,"setPolarAngle"),te(this,"setAzimuthalAngle"),te(this,"getDistance"),te(this,"getZoomScale"),te(this,"listenToKeyEvents"),te(this,"stopListenToKeyEvents"),te(this,"saveState"),te(this,"reset"),te(this,"update"),te(this,"connect"),te(this,"dispose"),te(this,"dollyIn"),te(this,"dollyOut"),te(this,"getScale"),te(this,"setScale"),this.object=t,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=L=>{let Y=Yi(L,2*Math.PI),J=c.phi;J<0&&(J+=2*Math.PI),Y<0&&(Y+=2*Math.PI);let Te=Math.abs(Y-J);2*Math.PI-Te{let Y=Yi(L,2*Math.PI),J=c.theta;J<0&&(J+=2*Math.PI),Y<0&&(Y+=2*Math.PI);let Te=Math.abs(Y-J);2*Math.PI-Ter.object.position.distanceTo(r.target),this.listenToKeyEvents=L=>{L.addEventListener("keydown",ne),this._domElementKeyEvents=L},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ne),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(i),r.update(),l=a.NONE},this.update=(()=>{const L=new re,Y=new re(0,1,0),J=new Dn().setFromUnitVectors(t.up,Y),Te=J.clone().invert(),We=new re,it=new Dn,xn=2*Math.PI;return function(){const Ai=r.object.position;J.setFromUnitVectors(t.up,Y),Te.copy(J).invert(),L.copy(Ai).sub(r.target),L.applyQuaternion(J),c.setFromVector3(L),r.autoRotate&&l===a.NONE&&U(S()),r.enableDamping?(c.theta+=f.theta*r.dampingFactor,c.phi+=f.phi*r.dampingFactor):(c.theta+=f.theta,c.phi+=f.phi);let ft=r.minAzimuthAngle,dt=r.maxAzimuthAngle;isFinite(ft)&&isFinite(dt)&&(ft<-Math.PI?ft+=xn:ft>Math.PI&&(ft-=xn),dt<-Math.PI?dt+=xn:dt>Math.PI&&(dt-=xn),ft<=dt?c.theta=Math.max(ft,Math.min(dt,c.theta)):c.theta=c.theta>(ft+dt)/2?Math.max(ft,c.theta):Math.min(dt,c.theta)),c.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,c.phi)),c.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(d,r.dampingFactor):r.target.add(d),r.zoomToCursor&&y||r.object.isOrthographicCamera?c.radius=I(c.radius):c.radius=I(c.radius*p),L.setFromSpherical(c),L.applyQuaternion(Te),Ai.copy(r.target).add(L),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,d.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),d.set(0,0,0));let Zt=!1;if(r.zoomToCursor&&y){let Qt=null;if(r.object instanceof Tt&&r.object.isPerspectiveCamera){const Jt=L.length();Qt=I(Jt*p);const vn=Jt-Qt;r.object.position.addScaledVector(k,vn),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const Jt=new re(b.x,b.y,0);Jt.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/p)),r.object.updateProjectionMatrix(),Zt=!0;const vn=new re(b.x,b.y,0);vn.unproject(r.object),r.object.position.sub(vn).add(Jt),r.object.updateMatrixWorld(),Qt=L.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;Qt!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(Qt).add(r.object.position):(En.origin.copy(r.object.position),En.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(En.direction))u||8*(1-it.dot(r.object.quaternion))>u?(r.dispatchEvent(i),We.copy(r.object.position),it.copy(r.object.quaternion),Zt=!1,!0):!1}})(),this.connect=L=>{r.domElement=L,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",je),r.domElement.addEventListener("pointerdown",ke),r.domElement.addEventListener("pointercancel",et),r.domElement.addEventListener("wheel",W)},this.dispose=()=>{var L,Y,J,Te,We,it;r.domElement&&(r.domElement.style.touchAction="auto"),(L=r.domElement)==null||L.removeEventListener("contextmenu",je),(Y=r.domElement)==null||Y.removeEventListener("pointerdown",ke),(J=r.domElement)==null||J.removeEventListener("pointercancel",et),(Te=r.domElement)==null||Te.removeEventListener("wheel",W),(We=r.domElement)==null||We.ownerDocument.removeEventListener("pointermove",Ue),(it=r.domElement)==null||it.ownerDocument.removeEventListener("pointerup",et),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",ne)};const r=this,i={type:"change"},o={type:"start"},s={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const u=1e-6,c=new _i,f=new _i;let p=1;const d=new re,g=new Oe,A=new Oe,v=new Oe,w=new Oe,R=new Oe,M=new Oe,C=new Oe,O=new Oe,h=new Oe,k=new re,b=new Oe;let y=!1;const m=[],T={};function S(){return 2*Math.PI/60/60*r.autoRotateSpeed}function B(){return Math.pow(.95,r.zoomSpeed)}function U(L){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=L:f.theta-=L}function F(L){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=L:f.phi-=L}const P=(()=>{const L=new re;return function(Y,J){L.setFromMatrixColumn(J,0),L.multiplyScalar(-Y),d.add(L)}})(),G=(()=>{const L=new re;return function(Y,J){r.screenSpacePanning===!0?L.setFromMatrixColumn(J,1):(L.setFromMatrixColumn(J,0),L.crossVectors(r.object.up,L)),L.multiplyScalar(Y),d.add(L)}})(),X=(()=>{const L=new re;return function(Y,J){const Te=r.domElement;if(Te&&r.object instanceof Tt&&r.object.isPerspectiveCamera){const We=r.object.position;L.copy(We).sub(r.target);let it=L.length();it*=Math.tan(r.object.fov/2*Math.PI/180),P(2*Y*it/Te.clientHeight,r.object.matrix),G(2*J*it/Te.clientHeight,r.object.matrix)}else Te&&r.object instanceof jt&&r.object.isOrthographicCamera?(P(Y*(r.object.right-r.object.left)/r.object.zoom/Te.clientWidth,r.object.matrix),G(J*(r.object.top-r.object.bottom)/r.object.zoom/Te.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function H(L){r.object instanceof Tt&&r.object.isPerspectiveCamera||r.object instanceof jt&&r.object.isOrthographicCamera?p=L:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function E(L){H(p/L)}function ae(L){H(p*L)}function ce(L){if(!r.zoomToCursor||!r.domElement)return;y=!0;const Y=r.domElement.getBoundingClientRect(),J=L.clientX-Y.left,Te=L.clientY-Y.top,We=Y.width,it=Y.height;b.x=J/We*2-1,b.y=-(Te/it)*2+1,k.set(b.x,b.y,1).unproject(r.object).sub(r.object.position).normalize()}function I(L){return Math.max(r.minDistance,Math.min(r.maxDistance,L))}function fe(L){g.set(L.clientX,L.clientY)}function he(L){ce(L),C.set(L.clientX,L.clientY)}function me(L){w.set(L.clientX,L.clientY)}function ze(L){A.set(L.clientX,L.clientY),v.subVectors(A,g).multiplyScalar(r.rotateSpeed);const Y=r.domElement;Y&&(U(2*Math.PI*v.x/Y.clientHeight),F(2*Math.PI*v.y/Y.clientHeight)),g.copy(A),r.update()}function $(L){O.set(L.clientX,L.clientY),h.subVectors(O,C),h.y>0?E(B()):h.y<0&&ae(B()),C.copy(O),r.update()}function x(L){R.set(L.clientX,L.clientY),M.subVectors(R,w).multiplyScalar(r.panSpeed),X(M.x,M.y),w.copy(R),r.update()}function _(L){ce(L),L.deltaY<0?ae(B()):L.deltaY>0&&E(B()),r.update()}function N(L){let Y=!1;switch(L.code){case r.keys.UP:X(0,r.keyPanSpeed),Y=!0;break;case r.keys.BOTTOM:X(0,-r.keyPanSpeed),Y=!0;break;case r.keys.LEFT:X(r.keyPanSpeed,0),Y=!0;break;case r.keys.RIGHT:X(-r.keyPanSpeed,0),Y=!0;break}Y&&(L.preventDefault(),r.update())}function V(){if(m.length==1)g.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),Y=.5*(m[0].pageY+m[1].pageY);g.set(L,Y)}}function D(){if(m.length==1)w.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),Y=.5*(m[0].pageY+m[1].pageY);w.set(L,Y)}}function K(){const L=m[0].pageX-m[1].pageX,Y=m[0].pageY-m[1].pageY,J=Math.sqrt(L*L+Y*Y);C.set(0,J)}function ee(){r.enableZoom&&K(),r.enablePan&&D()}function ge(){r.enableZoom&&K(),r.enableRotate&&V()}function ve(L){if(m.length==1)A.set(L.pageX,L.pageY);else{const J=ct(L),Te=.5*(L.pageX+J.x),We=.5*(L.pageY+J.y);A.set(Te,We)}v.subVectors(A,g).multiplyScalar(r.rotateSpeed);const Y=r.domElement;Y&&(U(2*Math.PI*v.x/Y.clientHeight),F(2*Math.PI*v.y/Y.clientHeight)),g.copy(A)}function ue(L){if(m.length==1)R.set(L.pageX,L.pageY);else{const Y=ct(L),J=.5*(L.pageX+Y.x),Te=.5*(L.pageY+Y.y);R.set(J,Te)}M.subVectors(R,w).multiplyScalar(r.panSpeed),X(M.x,M.y),w.copy(R)}function ye(L){const Y=ct(L),J=L.pageX-Y.x,Te=L.pageY-Y.y,We=Math.sqrt(J*J+Te*Te);O.set(0,We),h.set(0,Math.pow(O.y/C.y,r.zoomSpeed)),E(h.y),C.copy(O)}function _e(L){r.enableZoom&&ye(L),r.enablePan&&ue(L)}function xe(L){r.enableZoom&&ye(L),r.enableRotate&&ve(L)}function ke(L){var Y,J;r.enabled!==!1&&(m.length===0&&((Y=r.domElement)==null||Y.ownerDocument.addEventListener("pointermove",Ue),(J=r.domElement)==null||J.ownerDocument.addEventListener("pointerup",et)),ut(L),L.pointerType==="touch"?se(L):Xt(L))}function Ue(L){r.enabled!==!1&&(L.pointerType==="touch"?be(L):z(L))}function et(L){var Y,J,Te;rt(L),m.length===0&&((Y=r.domElement)==null||Y.releasePointerCapture(L.pointerId),(J=r.domElement)==null||J.ownerDocument.removeEventListener("pointermove",Ue),(Te=r.domElement)==null||Te.ownerDocument.removeEventListener("pointerup",et)),r.dispatchEvent(s),l=a.NONE}function Xt(L){let Y;switch(L.button){case 0:Y=r.mouseButtons.LEFT;break;case 1:Y=r.mouseButtons.MIDDLE;break;case 2:Y=r.mouseButtons.RIGHT;break;default:Y=-1}switch(Y){case ht.DOLLY:if(r.enableZoom===!1)return;he(L),l=a.DOLLY;break;case ht.ROTATE:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enablePan===!1)return;me(L),l=a.PAN}else{if(r.enableRotate===!1)return;fe(L),l=a.ROTATE}break;case ht.PAN:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enableRotate===!1)return;fe(L),l=a.ROTATE}else{if(r.enablePan===!1)return;me(L),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&r.dispatchEvent(o)}function z(L){if(r.enabled!==!1)switch(l){case a.ROTATE:if(r.enableRotate===!1)return;ze(L);break;case a.DOLLY:if(r.enableZoom===!1)return;$(L);break;case a.PAN:if(r.enablePan===!1)return;x(L);break}}function W(L){r.enabled===!1||r.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(L.preventDefault(),r.dispatchEvent(o),_(L),r.dispatchEvent(s))}function ne(L){r.enabled===!1||r.enablePan===!1||N(L)}function se(L){switch(yt(L),m.length){case 1:switch(r.touches.ONE){case wt.ROTATE:if(r.enableRotate===!1)return;V(),l=a.TOUCH_ROTATE;break;case wt.PAN:if(r.enablePan===!1)return;D(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(r.touches.TWO){case wt.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;ee(),l=a.TOUCH_DOLLY_PAN;break;case wt.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;ge(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&r.dispatchEvent(o)}function be(L){switch(yt(L),l){case a.TOUCH_ROTATE:if(r.enableRotate===!1)return;ve(L),r.update();break;case a.TOUCH_PAN:if(r.enablePan===!1)return;ue(L),r.update();break;case a.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;_e(L),r.update();break;case a.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;xe(L),r.update();break;default:l=a.NONE}}function je(L){r.enabled!==!1&&L.preventDefault()}function ut(L){m.push(L)}function rt(L){delete T[L.pointerId];for(let Y=0;Y{ae(L),r.update()},this.dollyOut=(L=B())=>{E(L),r.update()},this.getScale=()=>p,this.setScale=L=>{H(L),r.update()},this.getZoomScale=()=>B(),n!==void 0&&this.connect(n),this.update()}}new mt;new re;new us;new re;var Pc=Object.defineProperty,Dc=(e,t,n)=>t in e?Pc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ci=(e,t,n)=>(Dc(e,typeof t!="symbol"?t+"":t,n),n);class zs{constructor(t){ci(this,"data"),this.data=t}generateShapes(t,n=100,r){const i=[],o={letterSpacing:0,lineHeight:1,...r},s=zc(t,n,this.data,o);for(let a=0,l=s.length;a + `},Ps=new hn({name:"SkyShader",fragmentShader:Nn.fragmentShader,vertexShader:Nn.vertexShader,uniforms:ii.clone(Nn.uniforms),side:Za,depthWrite:!1});class Ds extends Rt{constructor(){super(new al(1,1,1),Ps)}}Os(Ds,"SkyShader",Nn);Os(Ds,"material",Ps);new Qa;new re;new us(0,0,0,"YXZ");new re;var Ic=Object.defineProperty,Rc=(e,t,n)=>t in e?Ic(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,te=(e,t,n)=>(Rc(e,typeof t!="symbol"?t+"":t,n),n);const En=new Xa,$i=new ss,Cc=Math.cos(70*(Math.PI/180)),qi=(e,t)=>(e%t+t)%t;class Nc extends Wa{constructor(t,n){super(),te(this,"object"),te(this,"domElement"),te(this,"enabled",!0),te(this,"target",new re),te(this,"minDistance",0),te(this,"maxDistance",1/0),te(this,"minZoom",0),te(this,"maxZoom",1/0),te(this,"minPolarAngle",0),te(this,"maxPolarAngle",Math.PI),te(this,"minAzimuthAngle",-1/0),te(this,"maxAzimuthAngle",1/0),te(this,"enableDamping",!1),te(this,"dampingFactor",.05),te(this,"enableZoom",!0),te(this,"zoomSpeed",1),te(this,"enableRotate",!0),te(this,"rotateSpeed",1),te(this,"enablePan",!0),te(this,"panSpeed",1),te(this,"screenSpacePanning",!0),te(this,"keyPanSpeed",7),te(this,"zoomToCursor",!1),te(this,"autoRotate",!1),te(this,"autoRotateSpeed",2),te(this,"reverseOrbit",!1),te(this,"reverseHorizontalOrbit",!1),te(this,"reverseVerticalOrbit",!1),te(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),te(this,"mouseButtons",{LEFT:ht.ROTATE,MIDDLE:ht.DOLLY,RIGHT:ht.PAN}),te(this,"touches",{ONE:wt.ROTATE,TWO:wt.DOLLY_PAN}),te(this,"target0"),te(this,"position0"),te(this,"zoom0"),te(this,"_domElementKeyEvents",null),te(this,"getPolarAngle"),te(this,"getAzimuthalAngle"),te(this,"setPolarAngle"),te(this,"setAzimuthalAngle"),te(this,"getDistance"),te(this,"getZoomScale"),te(this,"listenToKeyEvents"),te(this,"stopListenToKeyEvents"),te(this,"saveState"),te(this,"reset"),te(this,"update"),te(this,"connect"),te(this,"dispose"),te(this,"dollyIn"),te(this,"dollyOut"),te(this,"getScale"),te(this,"setScale"),this.object=t,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=L=>{let q=qi(L,2*Math.PI),J=c.phi;J<0&&(J+=2*Math.PI),q<0&&(q+=2*Math.PI);let Te=Math.abs(q-J);2*Math.PI-Te{let q=qi(L,2*Math.PI),J=c.theta;J<0&&(J+=2*Math.PI),q<0&&(q+=2*Math.PI);let Te=Math.abs(q-J);2*Math.PI-Ter.object.position.distanceTo(r.target),this.listenToKeyEvents=L=>{L.addEventListener("keydown",ne),this._domElementKeyEvents=L},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ne),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(i),r.update(),l=a.NONE},this.update=(()=>{const L=new re,q=new re(0,1,0),J=new Dn().setFromUnitVectors(t.up,q),Te=J.clone().invert(),We=new re,it=new Dn,bn=2*Math.PI;return function(){const Ti=r.object.position;J.setFromUnitVectors(t.up,q),Te.copy(J).invert(),L.copy(Ti).sub(r.target),L.applyQuaternion(J),c.setFromVector3(L),r.autoRotate&&l===a.NONE&&j(k()),r.enableDamping?(c.theta+=f.theta*r.dampingFactor,c.phi+=f.phi*r.dampingFactor):(c.theta+=f.theta,c.phi+=f.phi);let ft=r.minAzimuthAngle,dt=r.maxAzimuthAngle;isFinite(ft)&&isFinite(dt)&&(ft<-Math.PI?ft+=bn:ft>Math.PI&&(ft-=bn),dt<-Math.PI?dt+=bn:dt>Math.PI&&(dt-=bn),ft<=dt?c.theta=Math.max(ft,Math.min(dt,c.theta)):c.theta=c.theta>(ft+dt)/2?Math.max(ft,c.theta):Math.min(dt,c.theta)),c.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,c.phi)),c.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(d,r.dampingFactor):r.target.add(d),r.zoomToCursor&&y||r.object.isOrthographicCamera?c.radius=I(c.radius):c.radius=I(c.radius*p),L.setFromSpherical(c),L.applyQuaternion(Te),Ti.copy(r.target).add(L),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,d.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),d.set(0,0,0));let Xt=!1;if(r.zoomToCursor&&y){let Zt=null;if(r.object instanceof Tt&&r.object.isPerspectiveCamera){const Qt=L.length();Zt=I(Qt*p);const vn=Qt-Zt;r.object.position.addScaledVector(S,vn),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const Qt=new re(x.x,x.y,0);Qt.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/p)),r.object.updateProjectionMatrix(),Xt=!0;const vn=new re(x.x,x.y,0);vn.unproject(r.object),r.object.position.sub(vn).add(Qt),r.object.updateMatrixWorld(),Zt=L.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;Zt!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(Zt).add(r.object.position):(En.origin.copy(r.object.position),En.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(En.direction))u||8*(1-it.dot(r.object.quaternion))>u?(r.dispatchEvent(i),We.copy(r.object.position),it.copy(r.object.quaternion),Xt=!1,!0):!1}})(),this.connect=L=>{r.domElement=L,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",je),r.domElement.addEventListener("pointerdown",ke),r.domElement.addEventListener("pointercancel",et),r.domElement.addEventListener("wheel",K)},this.dispose=()=>{var L,q,J,Te,We,it;r.domElement&&(r.domElement.style.touchAction="auto"),(L=r.domElement)==null||L.removeEventListener("contextmenu",je),(q=r.domElement)==null||q.removeEventListener("pointerdown",ke),(J=r.domElement)==null||J.removeEventListener("pointercancel",et),(Te=r.domElement)==null||Te.removeEventListener("wheel",K),(We=r.domElement)==null||We.ownerDocument.removeEventListener("pointermove",Ue),(it=r.domElement)==null||it.ownerDocument.removeEventListener("pointerup",et),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",ne)};const r=this,i={type:"change"},o={type:"start"},s={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const u=1e-6,c=new Mi,f=new Mi;let p=1;const d=new re,g=new Oe,A=new Oe,v=new Oe,w=new Oe,R=new Oe,M=new Oe,C=new Oe,O=new Oe,h=new Oe,S=new re,x=new Oe;let y=!1;const m=[],T={};function k(){return 2*Math.PI/60/60*r.autoRotateSpeed}function B(){return Math.pow(.95,r.zoomSpeed)}function j(L){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=L:f.theta-=L}function D(L){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=L:f.phi-=L}const P=(()=>{const L=new re;return function(q,J){L.setFromMatrixColumn(J,0),L.multiplyScalar(-q),d.add(L)}})(),$=(()=>{const L=new re;return function(q,J){r.screenSpacePanning===!0?L.setFromMatrixColumn(J,1):(L.setFromMatrixColumn(J,0),L.crossVectors(r.object.up,L)),L.multiplyScalar(q),d.add(L)}})(),W=(()=>{const L=new re;return function(q,J){const Te=r.domElement;if(Te&&r.object instanceof Tt&&r.object.isPerspectiveCamera){const We=r.object.position;L.copy(We).sub(r.target);let it=L.length();it*=Math.tan(r.object.fov/2*Math.PI/180),P(2*q*it/Te.clientHeight,r.object.matrix),$(2*J*it/Te.clientHeight,r.object.matrix)}else Te&&r.object instanceof Ut&&r.object.isOrthographicCamera?(P(q*(r.object.right-r.object.left)/r.object.zoom/Te.clientWidth,r.object.matrix),$(J*(r.object.top-r.object.bottom)/r.object.zoom/Te.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function X(L){r.object instanceof Tt&&r.object.isPerspectiveCamera||r.object instanceof Ut&&r.object.isOrthographicCamera?p=L:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function E(L){X(p/L)}function ae(L){X(p*L)}function ce(L){if(!r.zoomToCursor||!r.domElement)return;y=!0;const q=r.domElement.getBoundingClientRect(),J=L.clientX-q.left,Te=L.clientY-q.top,We=q.width,it=q.height;x.x=J/We*2-1,x.y=-(Te/it)*2+1,S.set(x.x,x.y,1).unproject(r.object).sub(r.object.position).normalize()}function I(L){return Math.max(r.minDistance,Math.min(r.maxDistance,L))}function fe(L){g.set(L.clientX,L.clientY)}function he(L){ce(L),C.set(L.clientX,L.clientY)}function me(L){w.set(L.clientX,L.clientY)}function ze(L){A.set(L.clientX,L.clientY),v.subVectors(A,g).multiplyScalar(r.rotateSpeed);const q=r.domElement;q&&(j(2*Math.PI*v.x/q.clientHeight),D(2*Math.PI*v.y/q.clientHeight)),g.copy(A),r.update()}function H(L){O.set(L.clientX,L.clientY),h.subVectors(O,C),h.y>0?E(B()):h.y<0&&ae(B()),C.copy(O),r.update()}function b(L){R.set(L.clientX,L.clientY),M.subVectors(R,w).multiplyScalar(r.panSpeed),W(M.x,M.y),w.copy(R),r.update()}function _(L){ce(L),L.deltaY<0?ae(B()):L.deltaY>0&&E(B()),r.update()}function N(L){let q=!1;switch(L.code){case r.keys.UP:W(0,r.keyPanSpeed),q=!0;break;case r.keys.BOTTOM:W(0,-r.keyPanSpeed),q=!0;break;case r.keys.LEFT:W(r.keyPanSpeed,0),q=!0;break;case r.keys.RIGHT:W(-r.keyPanSpeed,0),q=!0;break}q&&(L.preventDefault(),r.update())}function V(){if(m.length==1)g.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),q=.5*(m[0].pageY+m[1].pageY);g.set(L,q)}}function z(){if(m.length==1)w.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),q=.5*(m[0].pageY+m[1].pageY);w.set(L,q)}}function Y(){const L=m[0].pageX-m[1].pageX,q=m[0].pageY-m[1].pageY,J=Math.sqrt(L*L+q*q);C.set(0,J)}function ee(){r.enableZoom&&Y(),r.enablePan&&z()}function ge(){r.enableZoom&&Y(),r.enableRotate&&V()}function ve(L){if(m.length==1)A.set(L.pageX,L.pageY);else{const J=ct(L),Te=.5*(L.pageX+J.x),We=.5*(L.pageY+J.y);A.set(Te,We)}v.subVectors(A,g).multiplyScalar(r.rotateSpeed);const q=r.domElement;q&&(j(2*Math.PI*v.x/q.clientHeight),D(2*Math.PI*v.y/q.clientHeight)),g.copy(A)}function ue(L){if(m.length==1)R.set(L.pageX,L.pageY);else{const q=ct(L),J=.5*(L.pageX+q.x),Te=.5*(L.pageY+q.y);R.set(J,Te)}M.subVectors(R,w).multiplyScalar(r.panSpeed),W(M.x,M.y),w.copy(R)}function ye(L){const q=ct(L),J=L.pageX-q.x,Te=L.pageY-q.y,We=Math.sqrt(J*J+Te*Te);O.set(0,We),h.set(0,Math.pow(O.y/C.y,r.zoomSpeed)),E(h.y),C.copy(O)}function _e(L){r.enableZoom&&ye(L),r.enablePan&&ue(L)}function be(L){r.enableZoom&&ye(L),r.enableRotate&&ve(L)}function ke(L){var q,J;r.enabled!==!1&&(m.length===0&&((q=r.domElement)==null||q.ownerDocument.addEventListener("pointermove",Ue),(J=r.domElement)==null||J.ownerDocument.addEventListener("pointerup",et)),ut(L),L.pointerType==="touch"?se(L):Wt(L))}function Ue(L){r.enabled!==!1&&(L.pointerType==="touch"?xe(L):F(L))}function et(L){var q,J,Te;rt(L),m.length===0&&((q=r.domElement)==null||q.releasePointerCapture(L.pointerId),(J=r.domElement)==null||J.ownerDocument.removeEventListener("pointermove",Ue),(Te=r.domElement)==null||Te.ownerDocument.removeEventListener("pointerup",et)),r.dispatchEvent(s),l=a.NONE}function Wt(L){let q;switch(L.button){case 0:q=r.mouseButtons.LEFT;break;case 1:q=r.mouseButtons.MIDDLE;break;case 2:q=r.mouseButtons.RIGHT;break;default:q=-1}switch(q){case ht.DOLLY:if(r.enableZoom===!1)return;he(L),l=a.DOLLY;break;case ht.ROTATE:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enablePan===!1)return;me(L),l=a.PAN}else{if(r.enableRotate===!1)return;fe(L),l=a.ROTATE}break;case ht.PAN:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enableRotate===!1)return;fe(L),l=a.ROTATE}else{if(r.enablePan===!1)return;me(L),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&r.dispatchEvent(o)}function F(L){if(r.enabled!==!1)switch(l){case a.ROTATE:if(r.enableRotate===!1)return;ze(L);break;case a.DOLLY:if(r.enableZoom===!1)return;H(L);break;case a.PAN:if(r.enablePan===!1)return;b(L);break}}function K(L){r.enabled===!1||r.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(L.preventDefault(),r.dispatchEvent(o),_(L),r.dispatchEvent(s))}function ne(L){r.enabled===!1||r.enablePan===!1||N(L)}function se(L){switch(yt(L),m.length){case 1:switch(r.touches.ONE){case wt.ROTATE:if(r.enableRotate===!1)return;V(),l=a.TOUCH_ROTATE;break;case wt.PAN:if(r.enablePan===!1)return;z(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(r.touches.TWO){case wt.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;ee(),l=a.TOUCH_DOLLY_PAN;break;case wt.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;ge(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&r.dispatchEvent(o)}function xe(L){switch(yt(L),l){case a.TOUCH_ROTATE:if(r.enableRotate===!1)return;ve(L),r.update();break;case a.TOUCH_PAN:if(r.enablePan===!1)return;ue(L),r.update();break;case a.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;_e(L),r.update();break;case a.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;be(L),r.update();break;default:l=a.NONE}}function je(L){r.enabled!==!1&&L.preventDefault()}function ut(L){m.push(L)}function rt(L){delete T[L.pointerId];for(let q=0;q{ae(L),r.update()},this.dollyOut=(L=B())=>{E(L),r.update()},this.getScale=()=>p,this.setScale=L=>{X(L),r.update()},this.getZoomScale=()=>B(),n!==void 0&&this.connect(n),this.update()}}new mt;new re;new us;new re;var Lc=Object.defineProperty,Oc=(e,t,n)=>t in e?Lc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ui=(e,t,n)=>(Oc(e,typeof t!="symbol"?t+"":t,n),n);class zs{constructor(t){ui(this,"data"),this.data=t}generateShapes(t,n=100,r){const i=[],o={letterSpacing:0,lineHeight:1,...r},s=Pc(t,n,this.data,o);for(let a=0,l=s.length;a #include #include uniform float thickness; @@ -423,15 +423,15 @@ var _a=Object.defineProperty;var Sa=(e,t,n)=>t in e?_a(e,t,{enumerable:!0,config gl_FragColor = vec4(color, opacity); #include #include - }`);const Bc=["args","material-uniforms-color-value"];Fr.ReflectorShader;new re;new re;new re;var ur;/Mac/.test((ur=globalThis==null?void 0:globalThis.navigator)===null||ur===void 0?void 0:ur.platform);const Uc=["target","auto-rotate","auto-rotate-speed","enable-damping","damping-factor","enable-pan","key-pan-speed","keys","max-azimuth-angle","min-azimuth-angle","max-polar-angle","min-polar-angle","min-distance","max-distance","min-zoom","max-zoom","touches","enable-zoom","zoom-speed","enable-rotate","rotate-speed","mouse-buttons","args"],jc=Je({__name:"OrbitControls",props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},target:{default:()=>[0,0,0]},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:Number.POSITIVE_INFINITY},minAzimuthAngle:{default:Number.NEGATIVE_INFINITY},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:Number.POSITIVE_INFINITY},minZoom:{default:0},maxZoom:{default:Number.POSITIVE_INFINITY},touches:{default:()=>({ONE:wt.ROTATE,TWO:wt.DOLLY_PAN})},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1},mouseButtons:{default:()=>({LEFT:ht.ROTATE,MIDDLE:ht.DOLLY,RIGHT:ht.PAN})}},emits:["change","start","end"],setup(e,{expose:t,emit:n}){const r=e,i=n,{makeDefault:o,autoRotate:s,autoRotateSpeed:a,enableDamping:l,dampingFactor:u,enablePan:c,keyPanSpeed:f,maxAzimuthAngle:p,minAzimuthAngle:d,maxPolarAngle:g,minPolarAngle:A,minDistance:v,maxDistance:w,minZoom:R,maxZoom:M,enableZoom:C,zoomSpeed:O,enableRotate:h,touches:k,rotateSpeed:b,target:y,mouseButtons:m}=ni(r),{camera:T,renderer:S,extend:B,controls:U,invalidate:F}=$n(),P=ti(null);B({OrbitControls:Oc}),Pe(P,H=>{G(),H&&o.value?U.value=H:U.value=null});function G(){ir(P.value,"change",()=>{i("change",P.value),F()}),ir(P.value,"start",()=>i("start",P.value)),ir(P.value,"end",()=>i("end",P.value))}const{onBeforeRender:X}=Pn();return X(({invalidate:H})=>{P.value&&(l.value||s.value)&&(P.value.update(),s.value&&H())}),Nt(()=>{P.value&&P.value.dispose()}),t({instance:P}),(H,E)=>(H.camera||Z(T))&&(H.domElement||Z(S))?(Me(),Ce("TresOrbitControls",{key:0,ref_key:"controlsRef",ref:P,target:Z(y),"auto-rotate":Z(s),"auto-rotate-speed":Z(a),"enable-damping":Z(l),"damping-factor":Z(u),"enable-pan":Z(c),"key-pan-speed":Z(f),keys:H.keys,"max-azimuth-angle":Z(p),"min-azimuth-angle":Z(d),"max-polar-angle":Z(g),"min-polar-angle":Z(A),"min-distance":Z(v),"max-distance":Z(w),"min-zoom":Z(R),"max-zoom":Z(M),touches:Z(k),"enable-zoom":Z(C),"zoom-speed":Z(O),"enable-rotate":Z(h),"rotate-speed":Z(b),"mouse-buttons":Z(m),args:[H.camera||Z(T),H.domElement||Z(S).domElement]},null,8,Uc)):Yt("",!0)}});function Mn(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ki={exports:{}},Wi;function Vc(){return Wi||(Wi=1,function(e,t){(function(n){e.exports=n()})(function(){return function n(r,i,o){function s(u,c){if(!i[u]){if(!r[u]){var f=typeof Mn=="function"&&Mn;if(!c&&f)return f(u,!0);if(a)return a(u,!0);throw new Error("Cannot find module '"+u+"'")}c=i[u]={exports:{}},r[u][0].call(c.exports,function(p){var d=r[u][1][p];return s(d||p)},c,c.exports,n,r,i,o)}return i[u].exports}for(var a=typeof Mn=="function"&&Mn,l=0;l[0,0,0]},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:Number.POSITIVE_INFINITY},minAzimuthAngle:{default:Number.NEGATIVE_INFINITY},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:Number.POSITIVE_INFINITY},minZoom:{default:0},maxZoom:{default:Number.POSITIVE_INFINITY},touches:{default:()=>({ONE:wt.ROTATE,TWO:wt.DOLLY_PAN})},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1},mouseButtons:{default:()=>({LEFT:ht.ROTATE,MIDDLE:ht.DOLLY,RIGHT:ht.PAN})}},emits:["change","start","end"],setup(e,{expose:t,emit:n}){const r=e,i=n,{makeDefault:o,autoRotate:s,autoRotateSpeed:a,enableDamping:l,dampingFactor:u,enablePan:c,keyPanSpeed:f,maxAzimuthAngle:p,minAzimuthAngle:d,maxPolarAngle:g,minPolarAngle:A,minDistance:v,maxDistance:w,minZoom:R,maxZoom:M,enableZoom:C,zoomSpeed:O,enableRotate:h,touches:S,rotateSpeed:x,target:y,mouseButtons:m}=ti(r),{camera:T,renderer:k,extend:B,controls:j,invalidate:D}=$n(),P=ei(null);B({OrbitControls:Nc}),Pe(P,X=>{$(),X&&o.value?j.value=X:j.value=null});function $(){ir(P.value,"change",()=>{i("change",P.value),D()}),ir(P.value,"start",()=>i("start",P.value)),ir(P.value,"end",()=>i("end",P.value))}const{onBeforeRender:W}=Pn();return W(({invalidate:X})=>{P.value&&(l.value||s.value)&&(P.value.update(),s.value&&X())}),Nt(()=>{P.value&&P.value.dispose()}),t({instance:P}),(X,E)=>(X.camera||Z(T))&&(X.domElement||Z(k))?(Me(),Ce("TresOrbitControls",{key:0,ref_key:"controlsRef",ref:P,target:Z(y),"auto-rotate":Z(s),"auto-rotate-speed":Z(a),"enable-damping":Z(l),"damping-factor":Z(u),"enable-pan":Z(c),"key-pan-speed":Z(f),keys:X.keys,"max-azimuth-angle":Z(p),"min-azimuth-angle":Z(d),"max-polar-angle":Z(g),"min-polar-angle":Z(A),"min-distance":Z(v),"max-distance":Z(w),"min-zoom":Z(R),"max-zoom":Z(M),touches:Z(S),"enable-zoom":Z(C),"zoom-speed":Z(O),"enable-rotate":Z(h),"rotate-speed":Z(x),"mouse-buttons":Z(m),args:[X.camera||Z(T),X.domElement||Z(k).domElement]},null,8,Fc)):qt("",!0)}});function Mn(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Yi={exports:{}},Ki;function Uc(){return Ki||(Ki=1,function(e,t){(function(n){e.exports=n()})(function(){return function n(r,i,o){function s(u,c){if(!i[u]){if(!r[u]){var f=typeof Mn=="function"&&Mn;if(!c&&f)return f(u,!0);if(a)return a(u,!0);throw new Error("Cannot find module '"+u+"'")}c=i[u]={exports:{}},r[u][0].call(c.exports,function(p){var d=r[u][1][p];return s(d||p)},c,c.exports,n,r,i,o)}return i[u].exports}for(var a=typeof Mn=="function"&&Mn,l=0;l>16),F((65280&m)>>8),F(255&m);return T==2?F(255&(m=k(b.charAt(y))<<2|k(b.charAt(y+1))>>4)):T==1&&(F((m=k(b.charAt(y))<<10|k(b.charAt(y+1))<<4|k(b.charAt(y+2))>>2)>>8&255),F(255&m)),S},g.fromByteArray=function(b){var y,m,T,S,B=b.length%3,U="";function F(P){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P)}for(y=0,T=b.length-B;y>18&63)+F(S>>12&63)+F(S>>6&63)+F(63&S);switch(B){case 1:U=(U+=F((m=b[b.length-1])>>2))+F(m<<4&63)+"==";break;case 2:U=(U=(U+=F((m=(b[b.length-2]<<8)+b[b.length-1])>>10))+F(m>>4&63))+F(m<<2&63)+"="}return U}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,i){(function(o,s,v,l,u,c,f,p,d){var g=n("base64-js"),A=n("ieee754");function v(x,_,N){if(!(this instanceof v))return new v(x,_,N);var V,D,K,ee,ge=typeof x;if(_==="base64"&&ge=="string")for(x=(ee=x).trim?ee.trim():ee.replace(/^\s+|\s+$/g,"");x.length%4!=0;)x+="=";if(ge=="number")V=X(x);else if(ge=="string")V=v.byteLength(x,_);else{if(ge!="object")throw new Error("First argument needs to be a number, array or string.");V=X(x.length)}if(v._useTypedArrays?D=v._augment(new Uint8Array(V)):((D=this).length=V,D._isBuffer=!0),v._useTypedArrays&&typeof x.byteLength=="number")D._set(x);else if(H(ee=x)||v.isBuffer(ee)||ee&&typeof ee=="object"&&typeof ee.length=="number")for(K=0;K>8,ee=ee%256,ge.push(ee),ge.push(K);return ge}(_),x,N,V)}function M(x,_,N){var V="";N=Math.min(x.length,N);for(var D=_;D>>0)):(_+1>>0),D}function h(x,_,N,V){if(V||($(typeof N=="boolean","missing or invalid endian"),$(_!=null,"missing offset"),$(_+1>>8*(V?K:1-K)}function T(x,_,N,V,D){if(D||($(_!=null,"missing value"),$(typeof V=="boolean","missing or invalid endian"),$(N!=null,"missing offset"),$(N+3>>8*(V?K:3-K)&255}function S(x,_,N,V,D){D||($(_!=null,"missing value"),$(typeof V=="boolean","missing or invalid endian"),$(N!=null,"missing offset"),$(N+1this.length&&(V=this.length);var D=(V=x.length-_=this.length))return this[x]},v.prototype.readUInt16LE=function(x,_){return C(this,x,!0,_)},v.prototype.readUInt16BE=function(x,_){return C(this,x,!1,_)},v.prototype.readUInt32LE=function(x,_){return O(this,x,!0,_)},v.prototype.readUInt32BE=function(x,_){return O(this,x,!1,_)},v.prototype.readInt8=function(x,_){if(_||($(x!=null,"missing offset"),$(x=this.length))return 128&this[x]?-1*(255-this[x]+1):this[x]},v.prototype.readInt16LE=function(x,_){return h(this,x,!0,_)},v.prototype.readInt16BE=function(x,_){return h(this,x,!1,_)},v.prototype.readInt32LE=function(x,_){return k(this,x,!0,_)},v.prototype.readInt32BE=function(x,_){return k(this,x,!1,_)},v.prototype.readFloatLE=function(x,_){return b(this,x,!0,_)},v.prototype.readFloatBE=function(x,_){return b(this,x,!1,_)},v.prototype.readDoubleLE=function(x,_){return y(this,x,!0,_)},v.prototype.readDoubleBE=function(x,_){return y(this,x,!1,_)},v.prototype.writeUInt8=function(x,_,N){N||($(x!=null,"missing value"),$(_!=null,"missing offset"),$(_=this.length||(this[_]=x)},v.prototype.writeUInt16LE=function(x,_,N){m(this,x,_,!0,N)},v.prototype.writeUInt16BE=function(x,_,N){m(this,x,_,!1,N)},v.prototype.writeUInt32LE=function(x,_,N){T(this,x,_,!0,N)},v.prototype.writeUInt32BE=function(x,_,N){T(this,x,_,!1,N)},v.prototype.writeInt8=function(x,_,N){N||($(x!=null,"missing value"),$(_!=null,"missing offset"),$(_=this.length||(0<=x?this.writeUInt8(x,_,N):this.writeUInt8(255+x+1,_,N))},v.prototype.writeInt16LE=function(x,_,N){S(this,x,_,!0,N)},v.prototype.writeInt16BE=function(x,_,N){S(this,x,_,!1,N)},v.prototype.writeInt32LE=function(x,_,N){B(this,x,_,!0,N)},v.prototype.writeInt32BE=function(x,_,N){B(this,x,_,!1,N)},v.prototype.writeFloatLE=function(x,_,N){U(this,x,_,!0,N)},v.prototype.writeFloatBE=function(x,_,N){U(this,x,_,!1,N)},v.prototype.writeDoubleLE=function(x,_,N){F(this,x,_,!0,N)},v.prototype.writeDoubleBE=function(x,_,N){F(this,x,_,!1,N)},v.prototype.fill=function(x,_,N){if(_=_||0,N=N||this.length,$(typeof(x=typeof(x=x||0)=="string"?x.charCodeAt(0):x)=="number"&&!isNaN(x),"value is not a number"),$(_<=N,"end < start"),N!==_&&this.length!==0){$(0<=_&&_"},v.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(v._useTypedArrays)return new v(this).buffer;for(var x=new Uint8Array(this.length),_=0,N=x.length;_=_.length||D>=x.length);D++)_[D+N]=x[D];return D}function fe(x){try{return decodeURIComponent(x)}catch{return"�"}}function he(x,_){$(typeof x=="number","cannot write a non-number as a number"),$(0<=x,"specified a negative value for writing an unsigned value"),$(x<=_,"value is larger than maximum value for type"),$(Math.floor(x)===x,"value has a fractional component")}function me(x,_,N){$(typeof x=="number","cannot write a non-number as a number"),$(x<=_,"value larger than maximum allowed value"),$(N<=x,"value smaller than minimum allowed value"),$(Math.floor(x)===x,"value has a fractional component")}function ze(x,_,N){$(typeof x=="number","cannot write a non-number as a number"),$(x<=_,"value larger than maximum allowed value"),$(N<=x,"value smaller than minimum allowed value")}function $(x,_){if(!x)throw new Error(_||"Failed assertion")}v._augment=function(x){return x._isBuffer=!0,x._get=x.get,x._set=x.set,x.get=P.get,x.set=P.set,x.write=P.write,x.toString=P.toString,x.toLocaleString=P.toString,x.toJSON=P.toJSON,x.copy=P.copy,x.slice=P.slice,x.readUInt8=P.readUInt8,x.readUInt16LE=P.readUInt16LE,x.readUInt16BE=P.readUInt16BE,x.readUInt32LE=P.readUInt32LE,x.readUInt32BE=P.readUInt32BE,x.readInt8=P.readInt8,x.readInt16LE=P.readInt16LE,x.readInt16BE=P.readInt16BE,x.readInt32LE=P.readInt32LE,x.readInt32BE=P.readInt32BE,x.readFloatLE=P.readFloatLE,x.readFloatBE=P.readFloatBE,x.readDoubleLE=P.readDoubleLE,x.readDoubleBE=P.readDoubleBE,x.writeUInt8=P.writeUInt8,x.writeUInt16LE=P.writeUInt16LE,x.writeUInt16BE=P.writeUInt16BE,x.writeUInt32LE=P.writeUInt32LE,x.writeUInt32BE=P.writeUInt32BE,x.writeInt8=P.writeInt8,x.writeInt16LE=P.writeInt16LE,x.writeInt16BE=P.writeInt16BE,x.writeInt32LE=P.writeInt32LE,x.writeInt32BE=P.writeInt32BE,x.writeFloatLE=P.writeFloatLE,x.writeFloatBE=P.writeFloatBE,x.writeDoubleLE=P.writeDoubleLE,x.writeDoubleBE=P.writeDoubleBE,x.fill=P.fill,x.inspect=P.inspect,x.toArrayBuffer=P.toArrayBuffer,x}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,r,i){(function(o,s,g,l,u,c,f,p,d){var g=n("buffer").Buffer,A=4,v=new g(A);v.fill(0),r.exports={hash:function(w,R,M,C){for(var O=R(function(m,T){m.length%A!=0&&(S=m.length+(A-m.length%A),m=g.concat([m,v],S));for(var S,B=[],U=T?m.readInt32BE:m.readInt32LE,F=0;FM?G=P(G):G.length>5]|=128<>>9<<4)]=k;for(var b=1732584193,y=-271733879,m=-1732584194,T=271733878,S=0;S>>32-m,b)}function w(h,k,b,y,m,T,S){return v(k&b|~k&y,h,k,m,T,S)}function R(h,k,b,y,m,T,S){return v(k&y|b&~y,h,k,m,T,S)}function M(h,k,b,y,m,T,S){return v(k^b^y,h,k,m,T,S)}function C(h,k,b,y,m,T,S){return v(b^(k|~y),h,k,m,T,S)}function O(h,k){var b=(65535&h)+(65535&k);return(h>>16)+(k>>16)+(b>>16)<<16|65535&b}r.exports=function(h){return g.hash(h,A,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(o,s,a,l,u,c,f,p,d){r.exports=function(g){for(var A,v=new Array(g),w=0;w>>((3&w)<<3)&255;return v}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(o,s,a,l,u,c,f,p,d){var g=n("./helpers");function A(R,M){R[M>>5]|=128<<24-M%32,R[15+(M+64>>9<<4)]=M;for(var C,O,h,k=Array(80),b=1732584193,y=-271733879,m=-1732584194,T=271733878,S=-1009589776,B=0;B>16)+(M>>16)+(C>>16)<<16|65535&C}function w(R,M){return R<>>32-M}r.exports=function(R){return g.hash(R,A,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(o,s,a,l,u,c,f,p,d){function g(M,C){var O=(65535&M)+(65535&C);return(M>>16)+(C>>16)+(O>>16)<<16|65535&O}function A(M,C){var O,h=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),k=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),b=new Array(64);M[C>>5]|=128<<24-C%32,M[15+(C+64>>9<<4)]=C;for(var y,m,T=0;T>>C|M<<32-C},R=function(M,C){return M>>>C};r.exports=function(M){return v.hash(M,A,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(o,s,a,l,u,c,f,p,d){i.read=function(g,A,v,w,T){var M,C,O=8*T-w-1,h=(1<>1,b=-7,y=v?T-1:0,m=v?-1:1,T=g[A+y];for(y+=m,M=T&(1<<-b)-1,T>>=-b,b+=O;0>=-b,b+=w;0>1,y=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=w?0:S-1,T=w?1:-1,S=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(O=isNaN(A)?1:0,C=k):(C=Math.floor(Math.log(A)/Math.LN2),A*(w=Math.pow(2,-C))<1&&(C--,w*=2),2<=(A+=1<=C+b?y/w:y*Math.pow(2,1-b))*w&&(C++,w/=2),k<=C+b?(O=0,C=k):1<=C+b?(O=(A*w-1)*Math.pow(2,R),C+=b):(O=A*Math.pow(2,b-1)*Math.pow(2,R),C=0));8<=R;g[v+m]=255&O,m+=T,O/=256,R-=8);for(C=C<>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]),Qi}var eo,to;function Bs(){return to||(to=1,eo=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]),eo}var cr,no;function Gc(){if(no)return cr;no=1;var e=Fs();return cr=e.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"]),cr}var fr,ro;function $c(){if(ro)return fr;ro=1;var e=Bs();return e=e.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),fr=e.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"]),fr}var dr,io;function qc(){if(io)return dr;io=1,dr=C;var e=Fs(),t=Hc(),n=Bs(),r=Gc(),i=$c(),o=999,s=9999,a=0,l=1,u=2,c=3,f=4,p=5,d=6,g=7,A=8,v=9,w=10,R=11,M=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function C(O){var h=0,k=0,b=o,y,m,T=[],S=[],B=1,U=0,F=0,P=!1,G=!1,X="",H;O=O||{};var E=n,ae=e;O.version==="300 es"&&(E=i,ae=r);for(var ce={},I={},h=0;h0)continue;xe=ue.slice(0,1).join("")}return fe(xe),F+=xe.length,T=T.slice(xe.length),T.length}while(!0)}function K(){return/[^a-fA-F0-9]/.test(y)?(fe(T.join("")),b=o,h):(T.push(y),m=y,h+1)}function ee(){return y==="."||/[eE]/.test(y)?(T.push(y),b=p,m=y,h+1):y==="x"&&T.length===1&&T[0]==="0"?(b=R,T.push(y),m=y,h+1):/[^\d]/.test(y)?(fe(T.join("")),b=o,h):(T.push(y),m=y,h+1)}function ge(){return y==="f"&&(T.push(y),m=y,h+=1),/[eE]/.test(y)||(y==="-"||y==="+")&&/[eE]/.test(m)?(T.push(y),m=y,h+1):/[^\d]/.test(y)?(fe(T.join("")),b=o,h):(T.push(y),m=y,h+1)}function ve(){if(/[^\d\w_]/.test(y)){var ue=T.join("");return I[ue]?b=A:ce[ue]?b=g:b=d,fe(T.join("")),b=o,h}return T.push(y),m=y,h+1}}return dr}var pr,oo;function Yc(){if(oo)return pr;oo=1;var e=qc();pr=t;function t(n,r){var i=e(r),o=[];return o=o.concat(i(n)),o=o.concat(i(null)),o}return pr}Yc();function Kc(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wc(e){var t=Kc(e,"string");return typeof t=="symbol"?t:String(t)}function Ee(e,t,n){return t=Wc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe={position:"csm_Position",positionRaw:"csm_PositionRaw",pointSize:"csm_PointSize",fragColor:"csm_FragColor",diffuseColor:"csm_DiffuseColor",normal:"csm_Normal",roughness:"csm_Roughness",metalness:"csm_Metalness",emissive:"csm_Emissive",ao:"csm_AO",bump:"csm_Bump",depthAlpha:"csm_DepthAlpha"},Ve,Pt;Ve={},Ee(Ve,"".concat(oe.normal),{"#include ":` +`)},_domwindow:function(){return y("domwindow")},_bigint:function(m){return y("bigint:"+m.toString())},_process:function(){return y("process")},_timer:function(){return y("timer")},_pipe:function(){return y("pipe")},_tcp:function(){return y("tcp")},_udp:function(){return y("udp")},_tty:function(){return y("tty")},_statwatcher:function(){return y("statwatcher")},_securecontext:function(){return y("securecontext")},_connection:function(){return y("connection")},_zlib:function(){return y("zlib")},_context:function(){return y("context")},_nodescript:function(){return y("nodescript")},_httpparser:function(){return y("httpparser")},_dataview:function(){return y("dataview")},_signal:function(){return y("signal")},_fsevent:function(){return y("fsevent")},_tlswrap:function(){return y("tlswrap")}}}function O(){return{buf:"",write:function(h){this.buf+=h},end:function(h){this.buf+=h},read:function(){return this.buf}}}i.writeToStream=function(h,S,x){return x===void 0&&(x=S,S={}),C(S=R(h,S),x).dispatch(h)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(n,r,i){(function(o,s,a,l,u,c,f,p,d){(function(g){var A=typeof Uint8Array<"u"?Uint8Array:Array,v=43,w=47,R=48,M=97,C=65,O=45,h=95;function S(x){return x=x.charCodeAt(0),x===v||x===O?62:x===w||x===h?63:x>16),D((65280&m)>>8),D(255&m);return T==2?D(255&(m=S(x.charAt(y))<<2|S(x.charAt(y+1))>>4)):T==1&&(D((m=S(x.charAt(y))<<10|S(x.charAt(y+1))<<4|S(x.charAt(y+2))>>2)>>8&255),D(255&m)),k},g.fromByteArray=function(x){var y,m,T,k,B=x.length%3,j="";function D(P){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P)}for(y=0,T=x.length-B;y>18&63)+D(k>>12&63)+D(k>>6&63)+D(63&k);switch(B){case 1:j=(j+=D((m=x[x.length-1])>>2))+D(m<<4&63)+"==";break;case 2:j=(j=(j+=D((m=(x[x.length-2]<<8)+x[x.length-1])>>10))+D(m>>4&63))+D(m<<2&63)+"="}return j}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,i){(function(o,s,v,l,u,c,f,p,d){var g=n("base64-js"),A=n("ieee754");function v(b,_,N){if(!(this instanceof v))return new v(b,_,N);var V,z,Y,ee,ge=typeof b;if(_==="base64"&&ge=="string")for(b=(ee=b).trim?ee.trim():ee.replace(/^\s+|\s+$/g,"");b.length%4!=0;)b+="=";if(ge=="number")V=W(b);else if(ge=="string")V=v.byteLength(b,_);else{if(ge!="object")throw new Error("First argument needs to be a number, array or string.");V=W(b.length)}if(v._useTypedArrays?z=v._augment(new Uint8Array(V)):((z=this).length=V,z._isBuffer=!0),v._useTypedArrays&&typeof b.byteLength=="number")z._set(b);else if(X(ee=b)||v.isBuffer(ee)||ee&&typeof ee=="object"&&typeof ee.length=="number")for(Y=0;Y>8,ee=ee%256,ge.push(ee),ge.push(Y);return ge}(_),b,N,V)}function M(b,_,N){var V="";N=Math.min(b.length,N);for(var z=_;z>>0)):(_+1>>0),z}function h(b,_,N,V){if(V||(H(typeof N=="boolean","missing or invalid endian"),H(_!=null,"missing offset"),H(_+1>>8*(V?Y:1-Y)}function T(b,_,N,V,z){if(z||(H(_!=null,"missing value"),H(typeof V=="boolean","missing or invalid endian"),H(N!=null,"missing offset"),H(N+3>>8*(V?Y:3-Y)&255}function k(b,_,N,V,z){z||(H(_!=null,"missing value"),H(typeof V=="boolean","missing or invalid endian"),H(N!=null,"missing offset"),H(N+1this.length&&(V=this.length);var z=(V=b.length-_=this.length))return this[b]},v.prototype.readUInt16LE=function(b,_){return C(this,b,!0,_)},v.prototype.readUInt16BE=function(b,_){return C(this,b,!1,_)},v.prototype.readUInt32LE=function(b,_){return O(this,b,!0,_)},v.prototype.readUInt32BE=function(b,_){return O(this,b,!1,_)},v.prototype.readInt8=function(b,_){if(_||(H(b!=null,"missing offset"),H(b=this.length))return 128&this[b]?-1*(255-this[b]+1):this[b]},v.prototype.readInt16LE=function(b,_){return h(this,b,!0,_)},v.prototype.readInt16BE=function(b,_){return h(this,b,!1,_)},v.prototype.readInt32LE=function(b,_){return S(this,b,!0,_)},v.prototype.readInt32BE=function(b,_){return S(this,b,!1,_)},v.prototype.readFloatLE=function(b,_){return x(this,b,!0,_)},v.prototype.readFloatBE=function(b,_){return x(this,b,!1,_)},v.prototype.readDoubleLE=function(b,_){return y(this,b,!0,_)},v.prototype.readDoubleBE=function(b,_){return y(this,b,!1,_)},v.prototype.writeUInt8=function(b,_,N){N||(H(b!=null,"missing value"),H(_!=null,"missing offset"),H(_=this.length||(this[_]=b)},v.prototype.writeUInt16LE=function(b,_,N){m(this,b,_,!0,N)},v.prototype.writeUInt16BE=function(b,_,N){m(this,b,_,!1,N)},v.prototype.writeUInt32LE=function(b,_,N){T(this,b,_,!0,N)},v.prototype.writeUInt32BE=function(b,_,N){T(this,b,_,!1,N)},v.prototype.writeInt8=function(b,_,N){N||(H(b!=null,"missing value"),H(_!=null,"missing offset"),H(_=this.length||(0<=b?this.writeUInt8(b,_,N):this.writeUInt8(255+b+1,_,N))},v.prototype.writeInt16LE=function(b,_,N){k(this,b,_,!0,N)},v.prototype.writeInt16BE=function(b,_,N){k(this,b,_,!1,N)},v.prototype.writeInt32LE=function(b,_,N){B(this,b,_,!0,N)},v.prototype.writeInt32BE=function(b,_,N){B(this,b,_,!1,N)},v.prototype.writeFloatLE=function(b,_,N){j(this,b,_,!0,N)},v.prototype.writeFloatBE=function(b,_,N){j(this,b,_,!1,N)},v.prototype.writeDoubleLE=function(b,_,N){D(this,b,_,!0,N)},v.prototype.writeDoubleBE=function(b,_,N){D(this,b,_,!1,N)},v.prototype.fill=function(b,_,N){if(_=_||0,N=N||this.length,H(typeof(b=typeof(b=b||0)=="string"?b.charCodeAt(0):b)=="number"&&!isNaN(b),"value is not a number"),H(_<=N,"end < start"),N!==_&&this.length!==0){H(0<=_&&_"},v.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(v._useTypedArrays)return new v(this).buffer;for(var b=new Uint8Array(this.length),_=0,N=b.length;_=_.length||z>=b.length);z++)_[z+N]=b[z];return z}function fe(b){try{return decodeURIComponent(b)}catch{return"�"}}function he(b,_){H(typeof b=="number","cannot write a non-number as a number"),H(0<=b,"specified a negative value for writing an unsigned value"),H(b<=_,"value is larger than maximum value for type"),H(Math.floor(b)===b,"value has a fractional component")}function me(b,_,N){H(typeof b=="number","cannot write a non-number as a number"),H(b<=_,"value larger than maximum allowed value"),H(N<=b,"value smaller than minimum allowed value"),H(Math.floor(b)===b,"value has a fractional component")}function ze(b,_,N){H(typeof b=="number","cannot write a non-number as a number"),H(b<=_,"value larger than maximum allowed value"),H(N<=b,"value smaller than minimum allowed value")}function H(b,_){if(!b)throw new Error(_||"Failed assertion")}v._augment=function(b){return b._isBuffer=!0,b._get=b.get,b._set=b.set,b.get=P.get,b.set=P.set,b.write=P.write,b.toString=P.toString,b.toLocaleString=P.toString,b.toJSON=P.toJSON,b.copy=P.copy,b.slice=P.slice,b.readUInt8=P.readUInt8,b.readUInt16LE=P.readUInt16LE,b.readUInt16BE=P.readUInt16BE,b.readUInt32LE=P.readUInt32LE,b.readUInt32BE=P.readUInt32BE,b.readInt8=P.readInt8,b.readInt16LE=P.readInt16LE,b.readInt16BE=P.readInt16BE,b.readInt32LE=P.readInt32LE,b.readInt32BE=P.readInt32BE,b.readFloatLE=P.readFloatLE,b.readFloatBE=P.readFloatBE,b.readDoubleLE=P.readDoubleLE,b.readDoubleBE=P.readDoubleBE,b.writeUInt8=P.writeUInt8,b.writeUInt16LE=P.writeUInt16LE,b.writeUInt16BE=P.writeUInt16BE,b.writeUInt32LE=P.writeUInt32LE,b.writeUInt32BE=P.writeUInt32BE,b.writeInt8=P.writeInt8,b.writeInt16LE=P.writeInt16LE,b.writeInt16BE=P.writeInt16BE,b.writeInt32LE=P.writeInt32LE,b.writeInt32BE=P.writeInt32BE,b.writeFloatLE=P.writeFloatLE,b.writeFloatBE=P.writeFloatBE,b.writeDoubleLE=P.writeDoubleLE,b.writeDoubleBE=P.writeDoubleBE,b.fill=P.fill,b.inspect=P.inspect,b.toArrayBuffer=P.toArrayBuffer,b}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,r,i){(function(o,s,g,l,u,c,f,p,d){var g=n("buffer").Buffer,A=4,v=new g(A);v.fill(0),r.exports={hash:function(w,R,M,C){for(var O=R(function(m,T){m.length%A!=0&&(k=m.length+(A-m.length%A),m=g.concat([m,v],k));for(var k,B=[],j=T?m.readInt32BE:m.readInt32LE,D=0;DM?$=P($):$.length>5]|=128<>>9<<4)]=S;for(var x=1732584193,y=-271733879,m=-1732584194,T=271733878,k=0;k>>32-m,x)}function w(h,S,x,y,m,T,k){return v(S&x|~S&y,h,S,m,T,k)}function R(h,S,x,y,m,T,k){return v(S&y|x&~y,h,S,m,T,k)}function M(h,S,x,y,m,T,k){return v(S^x^y,h,S,m,T,k)}function C(h,S,x,y,m,T,k){return v(x^(S|~y),h,S,m,T,k)}function O(h,S){var x=(65535&h)+(65535&S);return(h>>16)+(S>>16)+(x>>16)<<16|65535&x}r.exports=function(h){return g.hash(h,A,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(o,s,a,l,u,c,f,p,d){r.exports=function(g){for(var A,v=new Array(g),w=0;w>>((3&w)<<3)&255;return v}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(o,s,a,l,u,c,f,p,d){var g=n("./helpers");function A(R,M){R[M>>5]|=128<<24-M%32,R[15+(M+64>>9<<4)]=M;for(var C,O,h,S=Array(80),x=1732584193,y=-271733879,m=-1732584194,T=271733878,k=-1009589776,B=0;B>16)+(M>>16)+(C>>16)<<16|65535&C}function w(R,M){return R<>>32-M}r.exports=function(R){return g.hash(R,A,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(o,s,a,l,u,c,f,p,d){function g(M,C){var O=(65535&M)+(65535&C);return(M>>16)+(C>>16)+(O>>16)<<16|65535&O}function A(M,C){var O,h=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),S=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);M[C>>5]|=128<<24-C%32,M[15+(C+64>>9<<4)]=C;for(var y,m,T=0;T>>C|M<<32-C},R=function(M,C){return M>>>C};r.exports=function(M){return v.hash(M,A,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(o,s,a,l,u,c,f,p,d){i.read=function(g,A,v,w,T){var M,C,O=8*T-w-1,h=(1<>1,x=-7,y=v?T-1:0,m=v?-1:1,T=g[A+y];for(y+=m,M=T&(1<<-x)-1,T>>=-x,x+=O;0>=-x,x+=w;0>1,y=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=w?0:k-1,T=w?1:-1,k=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(O=isNaN(A)?1:0,C=S):(C=Math.floor(Math.log(A)/Math.LN2),A*(w=Math.pow(2,-C))<1&&(C--,w*=2),2<=(A+=1<=C+x?y/w:y*Math.pow(2,1-x))*w&&(C++,w/=2),S<=C+x?(O=0,C=S):1<=C+x?(O=(A*w-1)*Math.pow(2,R),C+=x):(O=A*Math.pow(2,x-1)*Math.pow(2,R),C=0));8<=R;g[v+m]=255&O,m+=T,O/=256,R-=8);for(C=C<>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]),Zi}var Ji,eo;function Bs(){return eo||(eo=1,Ji=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]),Ji}var cr,to;function Vc(){if(to)return cr;to=1;var e=Fs();return cr=e.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"]),cr}var fr,no;function Hc(){if(no)return fr;no=1;var e=Bs();return e=e.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),fr=e.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"]),fr}var dr,ro;function Gc(){if(ro)return dr;ro=1,dr=C;var e=Fs(),t=jc(),n=Bs(),r=Vc(),i=Hc(),o=999,s=9999,a=0,l=1,u=2,c=3,f=4,p=5,d=6,g=7,A=8,v=9,w=10,R=11,M=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function C(O){var h=0,S=0,x=o,y,m,T=[],k=[],B=1,j=0,D=0,P=!1,$=!1,W="",X;O=O||{};var E=n,ae=e;O.version==="300 es"&&(E=i,ae=r);for(var ce={},I={},h=0;h0)continue;be=ue.slice(0,1).join("")}return fe(be),D+=be.length,T=T.slice(be.length),T.length}while(!0)}function Y(){return/[^a-fA-F0-9]/.test(y)?(fe(T.join("")),x=o,h):(T.push(y),m=y,h+1)}function ee(){return y==="."||/[eE]/.test(y)?(T.push(y),x=p,m=y,h+1):y==="x"&&T.length===1&&T[0]==="0"?(x=R,T.push(y),m=y,h+1):/[^\d]/.test(y)?(fe(T.join("")),x=o,h):(T.push(y),m=y,h+1)}function ge(){return y==="f"&&(T.push(y),m=y,h+=1),/[eE]/.test(y)||(y==="-"||y==="+")&&/[eE]/.test(m)?(T.push(y),m=y,h+1):/[^\d]/.test(y)?(fe(T.join("")),x=o,h):(T.push(y),m=y,h+1)}function ve(){if(/[^\d\w_]/.test(y)){var ue=T.join("");return I[ue]?x=A:ce[ue]?x=g:x=d,fe(T.join("")),x=o,h}return T.push(y),m=y,h+1}}return dr}var pr,io;function $c(){if(io)return pr;io=1;var e=Gc();pr=t;function t(n,r){var i=e(r),o=[];return o=o.concat(i(n)),o=o.concat(i(null)),o}return pr}$c();function qc(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yc(e){var t=qc(e,"string");return typeof t=="symbol"?t:String(t)}function Ee(e,t,n){return t=Yc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe={position:"csm_Position",positionRaw:"csm_PositionRaw",pointSize:"csm_PointSize",fragColor:"csm_FragColor",diffuseColor:"csm_DiffuseColor",normal:"csm_Normal",roughness:"csm_Roughness",metalness:"csm_Metalness",emissive:"csm_Emissive",ao:"csm_AO",bump:"csm_Bump",depthAlpha:"csm_DepthAlpha"},Ve,Pt;Ve={},Ee(Ve,"".concat(oe.normal),{"#include ":` vec3 objectNormal = `.concat(oe.normal,`; #ifdef USE_TANGENT vec3 objectTangent = vec3( tangent.xyz ); @@ -484,9 +484,9 @@ list should be an Array.`),x.length===0)return new v(0);if(x.length===1)return x gl_FragColor = `.concat(oe.diffuseColor,`; `)}),Ee(Pt,"".concat(oe.fragColor),{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` gl_FragColor = `.concat(oe.fragColor,`; - `)});var He;He={},Ee(He,"".concat(oe.position),"*"),Ee(He,"".concat(oe.positionRaw),"*"),Ee(He,"".concat(oe.normal),"*"),Ee(He,"".concat(oe.pointSize),["PointsMaterial"]),Ee(He,"".concat(oe.diffuseColor),"*"),Ee(He,"".concat(oe.fragColor),"*"),Ee(He,"".concat(oe.emissive),["MeshStandardMaterial","MeshPhysicalMaterial"]),Ee(He,"".concat(oe.roughness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Ee(He,"".concat(oe.metalness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Ee(He,"".concat(oe.ao),["MeshStandardMaterial","MeshPhysicalMaterial","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial"]),Ee(He,"".concat(oe.bump),["MeshLambertMaterial","MeshMatcapMaterial","MeshNormalMaterial","MeshPhongMaterial","MeshPhysicalMaterial","MeshStandardMaterial","MeshToonMaterial","ShadowMaterial"]),Ee(He,"".concat(oe.depthAlpha),"*");var Xc=`void main() { + `)});var He;He={},Ee(He,"".concat(oe.position),"*"),Ee(He,"".concat(oe.positionRaw),"*"),Ee(He,"".concat(oe.normal),"*"),Ee(He,"".concat(oe.pointSize),["PointsMaterial"]),Ee(He,"".concat(oe.diffuseColor),"*"),Ee(He,"".concat(oe.fragColor),"*"),Ee(He,"".concat(oe.emissive),["MeshStandardMaterial","MeshPhysicalMaterial"]),Ee(He,"".concat(oe.roughness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Ee(He,"".concat(oe.metalness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Ee(He,"".concat(oe.ao),["MeshStandardMaterial","MeshPhysicalMaterial","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial"]),Ee(He,"".concat(oe.bump),["MeshLambertMaterial","MeshMatcapMaterial","MeshNormalMaterial","MeshPhongMaterial","MeshPhysicalMaterial","MeshStandardMaterial","MeshToonMaterial","ShadowMaterial"]),Ee(He,"".concat(oe.depthAlpha),"*");var Kc=`void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); -}`,Zc=`#include +}`,Wc=`#include void main() { vec2 center = vec2(0., 1.); @@ -511,7 +511,7 @@ void main() { mvPosition.xy += rotatedPosition; gl_Position = projectionMatrix * mvPosition; -}`;const gn=new re(0,0,0),fi=new re(0,0,0),Qc=new re(0,0,0);function so(e,t,n){const r=gn.setFromMatrixPosition(e.matrixWorld);r.project(t);const i=n.width/2,o=n.height/2;return[(Number.isNaN(r.x)?0:r.x)*i+i,-(r.y*o)+o,r.z]}function Jc(e,t){const n=gn.setFromMatrixPosition(e.matrixWorld),r=fi.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),o=t.getWorldDirection(Qc);return i.angleTo(o)>Math.PI/2}function ef(e,t,n,r){const i=gn.setFromMatrixPosition(e.matrixWorld),o=i.clone();o.project(t),n.setFromCamera(new Oe(o.x,o.y),t);const s=n.intersectObjects(r,!0);if(s.length>0){const a=s[0].distance;return i.distanceTo(n.ray.origin)Math.abs(e)<1e-10?0:e;function Us(e,t,n=""){let r="matrix3d(";for(let i=0;i!==16;i++)r+=Ur(t[i]*e.elements[i])+(i!==15?",":")");return n+r}const rf=(e=>t=>Us(t,e))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),of=(e=>(t,n)=>Us(t,e(n),"translate(-50%,-50%)"))(e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1]),sf=["geometry","material"];new fs;var jr={exports:{}},af=jr.exports,ao;function lf(){return ao||(ao=1,function(e,t){(function(n,r){e.exports=r()})(af,function(){var n=function(){function r(d){return s.appendChild(d.dom),d}function i(d){for(var g=0;gl+1e3&&(c.update(1e3*u/(d-l),100),l=d,u=0,p)){var g=performance.memory;p.update(g.usedJSHeapSize/1048576,g.jsHeapSizeLimit/1048576)}return d},update:function(){a=this.end()},domElement:s,setMode:i}};return n.Panel=function(r,i,o){var s=1/0,a=0,l=Math.round,u=l(window.devicePixelRatio||1),c=80*u,f=48*u,p=3*u,d=2*u,g=3*u,A=15*u,v=74*u,w=30*u,R=document.createElement("canvas");R.width=c,R.height=f,R.style.cssText="width:80px;height:48px";var M=R.getContext("2d");return M.font="bold "+9*u+"px Helvetica,Arial,sans-serif",M.textBaseline="top",M.fillStyle=o,M.fillRect(0,0,c,f),M.fillStyle=i,M.fillText(r,p,d),M.fillRect(g,A,v,w),M.fillStyle=o,M.globalAlpha=.9,M.fillRect(g,A,v,w),{dom:R,update:function(C,O){s=Math.min(s,C),a=Math.max(a,C),M.fillStyle=o,M.globalAlpha=1,M.fillRect(0,0,c,A),M.fillStyle=i,M.fillText(l(C)+" "+r+" ("+l(s)+"-"+l(a)+")",p,d),M.drawImage(R,g+u,A,v-u,w,g,A,v-u,w),M.fillRect(g+v-u,A,u,w),M.fillStyle=o,M.globalAlpha=.9,M.fillRect(g+v-u,A,u,l((1-C/O)*w))}}},n})}(jr)),jr.exports}lf();const uf={key:0,args:[0,1,64]},cf={key:1,args:[.5,1,64]},ff={key:2},df=["tone-mapped","map","side","color"];new Fe(16777215);const Dt=Je({__name:"Range",props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","mousedown"],setup(e,{emit:t}){const n=e,r=t,i=Q(null);function o(g,A,v){return Math.min(Math.max(g,A),v)}function s(g){const A=g.toString();return A.includes("e-")?Number.parseInt(A.split("e-")[1],10):A.includes(".")?A.split(".")[1].length:0}function a(g,A){const v=s(A),w=10**(v+3);return Number.parseFloat((g*w/w).toFixed(v))}const l=Be(()=>a(o(n.modelValue,n.min,n.max),n.step)),u=Be(()=>{const g=(l.value-n.min)/(n.max-n.min)*100;return{width:`${g}%`,backgroundSize:`${g}% 100%`}});function c(g){if(!i.value)return l.value;const A=i.value.getBoundingClientRect(),w=(g.clientX-A.left)/A.width,R=n.max-n.min,M=n.min+R*w,C=Math.round(M/n.step)*n.step;return Math.min(Math.max(C,n.min),n.max)}function f(g){if(n.disabled)return;const A=c(g);r("update:modelValue",A)}function p(g){if(n.disabled)return;g.preventDefault();const A=c(g);r("update:modelValue",A),window.addEventListener("mousemove",f),window.addEventListener("mouseup",d)}function d(g){window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}return Nt(()=>{window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}),(g,A)=>(Me(),Ce("span",{ref_key:"sliderRef",ref:i,class:cn(["range-slider disabled:pointer-events-none disabled:cursor-default disabled:opacity-50",{disabled:e.disabled}]),bg:"[#e6e1fc] dark:[#676085]","touch-action-none":"",relative:"","inline-block":"","w-full":"","cursor-ew-resize":"","rounded-sm":"",onMousedown:p},[j("span",{style:Ii(u.value),bg:"[#cabeff] dark:[#4e34b9]",relative:"",block:"","rounded-sm":"",h:"[14px]"},null,4),j("span",{role:"slider",class:"slider-thumb",style:Ii({left:`${(l.value-e.min)/(e.max-e.min)*100}%`}),absolute:"","rounded-sm":"",w:"[1px]",h:"[14px]",bg:"zinc-100 dark:zinc-400",top:"50%",transform:"translate-x-[50%] translate-y-[-50%]"},null,4)],34))}});function lo(e,t){if(t===yl)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===zr||t===bs){let n=e.getIndex();if(n===null){const s=[],a=e.getAttribute("position");if(a!==void 0){for(let l=0;l=2.0 are supported."));return}const u=new qf(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&a[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}u.setExtensions(s),u.setPlugins(a),u.parse(r,i)}parseAsync(t,n){const r=this;return new Promise(function(i,o){r.parse(t,n,i,o)})}}function hf(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const de={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class mf{constructor(t){this.parser=t,this.name=de.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(t,o.source,s)}}class If{constructor(t){this.parser=t,this.name=de.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const n=this.name,r=this.parser,i=r.json,o=i.textures[t];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const u=r.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return r.loadTextureImage(t,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){t(n.height===1)}})),this.isSupported}}class Rf{constructor(t){this.parser=t,this.name=de.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const n=this.name,r=this.parser,i=r.json,o=i.textures[t];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const u=r.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return r.loadTextureImage(t,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){t(n.height===1)}})),this.isSupported}}class Cf{constructor(t){this.name=de.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const n=this.parser.json,r=n.bufferViews[t];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(a){const l=i.byteOffset||0,u=i.byteLength||0,c=i.count,f=i.byteStride,p=new Uint8Array(a,l,u);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(c,f,p,i.mode,i.filter).then(function(d){return d.buffer}):s.ready.then(function(){const d=new ArrayBuffer(c*f);return s.decodeGltfBuffer(new Uint8Array(d),c,f,p,i.mode,i.filter),d})})}else return null}}class Nf{constructor(t){this.name=de.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const n=this.parser.json,r=n.nodes[t];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const u of i.primitives)if(u.mode!==tt.TRIANGLES&&u.mode!==tt.TRIANGLE_STRIP&&u.mode!==tt.TRIANGLE_FAN&&u.mode!==void 0)return null;const s=r.extensions[this.name].attributes,a=[],l={};for(const u in s)a.push(this.parser.getDependency("accessor",s[u]).then(c=>(l[u]=c,l[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(u=>{const c=u.pop(),f=c.isGroup?c.children:[c],p=u[0].count,d=[];for(const g of f){const A=new mt,v=new re,w=new Dn,R=new re(1,1,1),M=new Tl(g.geometry,g.material,p);for(let C=0;C0||e.search(/^data\:image\/jpeg/)===0?"image/jpeg":e.search(/\.webp($|\?)/i)>0||e.search(/^data\:image\/webp/)===0?"image/webp":e.search(/\.ktx2($|\?)/i)>0||e.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const $f=new mt;class qf{constructor(t={},n={}){this.json=t,this.extensions={},this.plugins={},this.options=n,this.cache=new hf,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=-1,o=!1,s=-1;if(typeof navigator<"u"){const a=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(a)===!0;const l=a.match(/Version\/(\d+)/);i=r&&l?parseInt(l[1],10):-1,o=a.indexOf("Firefox")>-1,s=o?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||r&&i<17||o&&s<98?this.textureLoader=new kl(this.options.manager):this.textureLoader=new El(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new xs(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(s){const a={scene:s[0][i.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:i.asset,parser:r,userData:{}};return Et(o,a,i),pt(a,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();t(a)})}).catch(n)}_markDefs(){const t=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(s);l!=null&&this.associations.set(a,l);for(const[u,c]of s.children.entries())o(c,a.children[u])};return o(r,i),i.name+="_instance_"+t.uses[n]++,i}_invokeOne(t){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&v.setY(y,h[k*l+1]),l>=3&&v.setZ(y,h[k*l+2]),l>=4&&v.setW(y,h[k*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}v.normalized=g}return v})}loadTexture(t){const n=this.json,r=this.options,o=n.textures[t].source,s=n.images[o];let a=this.textureLoader;if(s.uri){const l=r.manager.getHandler(s.uri);l!==null&&(a=l)}return this.loadTextureImage(t,o,a)}loadTextureImage(t,n,r){const i=this,o=this.json,s=o.textures[t],a=o.images[n],l=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(n,r).then(function(c){c.flipY=!1,c.name=s.name||a.name||"",c.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(c.name=a.uri);const p=(o.samplers||{})[s.sampler]||{};return c.magFilter=co[p.magFilter]||Fn,c.minFilter=co[p.minFilter]||ai,c.wrapS=fo[p.wrapS]||Bn,c.wrapT=fo[p.wrapT]||Bn,c.generateMipmaps=!c.isCompressedTexture&&c.minFilter!==It&&c.minFilter!==Fn,i.associations.set(c,{textures:t}),c}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(t,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(f=>f.clone());const s=i.images[t],a=self.URL||self.webkitURL;let l=s.uri||"",u=!1;if(s.bufferView!==void 0)l=r.getDependency("bufferView",s.bufferView).then(function(f){u=!0;const p=new Blob([f],{type:s.mimeType});return l=a.createObjectURL(p),l});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(f){return new Promise(function(p,d){let g=p;n.isImageBitmapLoader===!0&&(g=function(A){const v=new zn(A);v.needsUpdate=!0,p(v)}),n.load(on.resolveURL(f,o.path),g,void 0,d)})}).then(function(f){return u===!0&&a.revokeObjectURL(l),pt(f,s),f.userData.mimeType=s.mimeType||Gf(s.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[t]=c,c}assignTexture(t,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(s){if(!s)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(s=s.clone(),s.channel=r.texCoord),o.extensions[de.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[de.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=o.associations.get(s);s=o.extensions[de.KHR_TEXTURE_TRANSFORM].extendTexture(s,a),o.associations.set(s,l)}}return i!==void 0&&(s.colorSpace=i),t[n]=s,s})}assignFinalMaterial(t){const n=t.geometry;let r=t.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,s=n.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new Ml,er.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(a,l)),r=l}else if(t.isLine){const a="LineBasicMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new _l,er.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(a,l)),r=l}if(i||o||s){let a="ClonedMaterial:"+r.uuid+":";i&&(a+="derivative-tangents:"),o&&(a+="vertex-colors:"),s&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=r.clone(),o&&(l.vertexColors=!0),s&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(r))),r=l}t.material=r}getMaterialType(){return vs}loadMaterial(t){const n=this,r=this.json,i=this.extensions,o=r.materials[t];let s;const a={},l=o.extensions||{},u=[];if(l[de.KHR_MATERIALS_UNLIT]){const f=i[de.KHR_MATERIALS_UNLIT];s=f.getMaterialType(),u.push(f.extendParams(a,o,n))}else{const f=o.pbrMetallicRoughness||{};if(a.color=new Fe(1,1,1),a.opacity=1,Array.isArray(f.baseColorFactor)){const p=f.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],gt),a.opacity=p[3]}f.baseColorTexture!==void 0&&u.push(n.assignTexture(a,"map",f.baseColorTexture,dn)),a.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,a.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(a,"metalnessMap",f.metallicRoughnessTexture)),u.push(n.assignTexture(a,"roughnessMap",f.metallicRoughnessTexture))),s=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(t)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(t,a)})))}o.doubleSided===!0&&(a.side=qn);const c=o.alphaMode||mr.OPAQUE;if(c===mr.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,c===mr.MASK&&(a.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&s!==Ft&&(u.push(n.assignTexture(a,"normalMap",o.normalTexture)),a.normalScale=new Oe(1,1),o.normalTexture.scale!==void 0)){const f=o.normalTexture.scale;a.normalScale.set(f,f)}if(o.occlusionTexture!==void 0&&s!==Ft&&(u.push(n.assignTexture(a,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&s!==Ft){const f=o.emissiveFactor;a.emissive=new Fe().setRGB(f[0],f[1],f[2],gt)}return o.emissiveTexture!==void 0&&s!==Ft&&u.push(n.assignTexture(a,"emissiveMap",o.emissiveTexture,dn)),Promise.all(u).then(function(){const f=new s(a);return o.name&&(f.name=o.name),pt(f,o),n.associations.set(f,{materials:t}),o.extensions&&Et(i,f,o),f})}createUniqueName(t){const n=fn.sanitizeNodeName(t||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(t){const n=this,r=this.extensions,i=this.primitiveCache;function o(a){return r[de.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return po(l,a,n)})}const s=[];for(let a=0,l=t.length;a0&&Vf(w,o),w.name=n.createUniqueName(o.name||"mesh_"+t),pt(w,o),v.extensions&&Et(i,w,v),n.assignFinalMaterial(w),f.push(w)}for(let d=0,g=f.length;d1?c=new tr:u.length===1?c=u[0]:c=new li,c!==u[0])for(let f=0,p=u.length;f{const f=new Map;for(const[p,d]of i.associations)(p instanceof er||p instanceof zn)&&f.set(p,d);return c.traverse(p=>{const d=i.associations.get(p);d!=null&&f.set(p,d)}),f};return i.associations=u(o),o})}_createAnimationTracks(t,n,r,i,o){const s=[],a=t.name?t.name:t.uuid,l=[];xt[o.path]===xt.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a);let u;switch(xt[o.path]){case xt.weights:u=Ci;break;case xt.rotation:u=Ni;break;case xt.position:case xt.scale:u=Ri;break;default:switch(r.itemSize){case 1:u=Ci;break;case 2:case 3:default:u=Ri;break}break}const c=i.interpolation!==void 0?Bf[i.interpolation]:ri,f=this._getArrayFromAccessor(r);for(let p=0,d=l.length;pnew Oa(e)),Mt.register(e=>new Pa(e)),Mt)}async function Kf(e){const r=(await Hs().loadAsync(e)).userData;if(!r.vrmAnimations){console.warn("No VRM animations found in the .vrma file");return}if(r.vrmAnimations.length===0){console.warn("No VRM animations found in the .vrma file");return}return r.vrmAnimations[0]}async function Wf(e,t){if(!e){console.warn("No VRM found");return}if(t)return Da(t,e)}function Xf(){const e=Q(!1),t=Q(0),n=Q(0),r=.2,i=1,o=6,s=Q(Math.random()*(o-i)+i);function a(l,u){if(l!=null&&l.expressionManager&&(n.value+=u,!e.value&&n.value>=s.value&&(e.value=!0,t.value=0),e.value)){t.value+=u/r;const c=Math.sin(Math.PI*t.value);l.expressionManager.setValue("blink",c),t.value>=1&&(e.value=!1,n.value=0,l.expressionManager.setValue("blink",0),s.value=Math.random()*(o-i)+i)}}return{update:a}}function Zf(){let e=-1,t,n=0;function r(){t?t.set(_t(-.25,.25),_t(-.2,.15),-.65):t=new re(_t(-.25,.25),_t(-.2,.15),-.65)}function i(o,s){var a;!(o!=null&&o.expressionManager)||!o.lookAt||(n>=e?(r(),n=0,e=Qo()/1e3):t||r(),o.lookAt.target||(o.lookAt.target=new li),o.lookAt.target.position.lerp(t,_t(.2,.5)),(a=o.lookAt)==null||a.update(s),n+=s)}return{update:i}}async function Qf(e,t){const i=(await Hs().loadAsync(e,s=>{var a;return(a=t==null?void 0:t.onProgress)==null?void 0:a.call(t,s)})).userData;if(!i.vrm)return;const o=i.vrm;if(Lr.removeUnnecessaryVertices(o.scene),Lr.combineSkeletons(o.scene),o.scene.traverse(s=>{s.frustumCulled=!1}),o.lookAt){const s=new za(o.lookAt);s.name="lookAtQuaternionProxy",o.scene.add(s)}return t!=null&&t.scene&&t.scene.add(o.scene),t!=null&&t.position&&o.scene.position.set(...t.position),o}function Jf(e){const t=Q(null),n=Q(!1),r=Q(0),i=Q(new Map),o=Q(new Map),s=Q(),a=(w,R,M)=>w+(R-w)*M,l=w=>w<.5?4*w*w*w:1-(-2*w+2)**3/2,u=new Map([["happy",{expression:[{name:"happy",value:1,duration:.3},{name:"aa",value:.3}],blendDuration:.3}],["sad",{expression:[{name:"sad",value:1},{name:"oh",value:.2}],blendDuration:.3}],["angry",{expression:[{name:"angry",value:1},{name:"ee",value:.4}],blendDuration:.2}],["surprised",{expression:[{name:"Surprised",value:1},{name:"oh",value:.6}],blendDuration:.1}],["neutral",{expression:[{name:"neutral",value:1}],blendDuration:.5}]]),c=()=>{s.value&&(clearTimeout(s.value),s.value=void 0)},f=w=>{var M;if(c(),!u.has(w)){console.warn(`Emotion ${w} not found`);return}const R=u.get(w);if(t.value=w,n.value=!0,r.value=0,e.expressionManager){const C=Object.keys(e.expressionManager.expressionMap);for(const O of C)e.expressionManager.setValue(O,0)}i.value.clear(),o.value.clear();for(const C of R.expression||[]){const O=((M=e.expressionManager)==null?void 0:M.getValue(C.name))||0;i.value.set(C.name,O),o.value.set(C.name,C.value)}};return{currentEmotion:t,isTransitioning:n,setEmotion:f,setEmotionWithResetAfter:(w,R)=>{c(),f(w),s.value=setTimeout(()=>{f("neutral"),s.value=void 0},R)},update:w=>{var C;if(!n.value||!t.value)return;const M=u.get(t.value).blendDuration||.3;r.value+=w/M,r.value>=1&&(r.value=1,n.value=!1);for(const[O,h]of o.value){const k=i.value.get(O)||0,b=a(k,h,l(r.value));(C=e.expressionManager)==null||C.setValue(O,b)}},addEmotionState:(w,R)=>{u.set(w,R)},removeEmotionState:w=>{u.delete(w)},dispose:()=>{c()}}}const ed=Je({__name:"Model",props:{model:null,idleAnimation:null,loadAnimations:null,position:null,paused:{type:Boolean}},emits:["loadModelProgress","error"],setup(e,{expose:t,emit:n}){const r=e,i=n;let o;const s=Q(),a=Q(),{scene:l}=$n(),{onBeforeRender:u}=Pn(),c=Xf(),f=Zf(),p=Q();Pe(()=>r.position,([A,v,w])=>{s.value&&s.value.scene.position.set(A,v,w)}),qt(async()=>{if(l.value)try{const A=await Qf(r.model,{scene:l.value,lookAt:!0,position:r.position,onProgress:R=>i("loadModelProgress",Number.parseFloat((100*(R.loaded/R.total)).toFixed(2)))});if(!A){console.warn("No VRM model loaded");return}const v=await Kf(r.idleAnimation),w=await Wf(A,v);if(!w){console.warn("No VRM animation loaded");return}a.value=new Fl(A.scene),a.value.clipAction(w).play(),p.value=Jf(A),s.value=A,o=u(({delta:R})=>{var M,C,O;(M=a.value)==null||M.update(R),(C=s.value)==null||C.update(R),c.update(s.value,R),f.update(s.value,R),(O=p.value)==null||O.update(R)}).off}catch(A){i("error",A)}}),Nt(()=>{o==null||o(),s.value&&(s.value.scene.removeFromParent(),Lr.deepDispose(s.value.scene))}),t({setExpression(A){var v;(v=p.value)==null||v.setEmotionWithResetAfter(A,1e3)}});const{pause:d,resume:g}=Pn();return Pe(()=>r.paused,A=>{A?d():g()}),(A,v)=>pn(A.$slots,"default")}}),td=["position"],nd={absolute:"",bottom:"3",right:"3"},rd={flex:"~ row","cursor-pointer":""},id=["checked","aria-checked"],od={key:0,"min-w":"50vw",z:"{var g;(g=p.value)==null||g.setExpression(d)}}),(d,g)=>(Me(),un(Ts,{relative:""},{default:$e(({height:A,width:v})=>[Ne(Z(Bl),{alpha:!0,antialias:!0,width:v,height:A},{default:$e(()=>[Ne(Z(jc)),j("TresPerspectiveCamera",{position:[s.value,a.value,l.value]},null,8,td),g[14]||(g[14]=j("TresDirectionalLight",{color:16777215,intensity:1.2,position:[1,1,1]},null,-1)),g[15]||(g[15]=j("TresAmbientLight",{color:16777215,intensity:1.5},null,-1)),Ne(ed,{ref_key:"modelRef",ref:p,model:r.model,"idle-animation":r.idleAnimation,position:[u.value,c.value,f.value],paused:r.paused,onLoadModelProgress:g[0]||(g[0]=w=>i("loadModelProgress",w)),onError:g[1]||(g[1]=w=>i("error",w))},null,8,["model","idle-animation","position","paused"])]),_:2},1032,["width","height"]),j("div",nd,[j("div",rd,[j("label",{class:cn([o.value?"bg-zinc-300 dark:bg-zinc-200":"bg-zinc-100 dark:bg-zinc-700"]),transition:"all ease-in-out duration-500",text:"lg zinc-500 dark:zinc-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[On(j("input",{"onUpdate:modelValue":g[2]||(g[2]=w=>o.value=w),checked:o.value,"aria-checked":o.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,id),[[os,o.value]]),g[16]||(g[16]=j("div",{"select-none":""},[j("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Ne(ws,null,{default:$e(()=>[o.value?(Me(),Ce("div",od,[j("div",sd,[j("div",ad,[j("span",null,Ae(d.$t("stage.viewers.debug-menu.vrm.model.title")),1)]),Ne(Un,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:$e(()=>[j("span",ld,Ae(d.$t("stage.viewers.debug-menu.vrm.camera")),1)]),default:$e(()=>[j("div",ud,[g[17]||(g[17]=j("div",{text:"zinc-400 dark:zinc-500"},[j("span",null,"X")],-1)),j("label",cd,[Ne(Dt,{modelValue:s.value,"onUpdate:modelValue":g[3]||(g[3]=w=>s.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),j("div",fd,[j("span",null,Ae(s.value),1)]),g[18]||(g[18]=j("div",{text:"zinc-400 dark:zinc-500"},[j("span",null,"Y")],-1)),j("label",dd,[Ne(Dt,{modelValue:a.value,"onUpdate:modelValue":g[4]||(g[4]=w=>a.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),j("div",pd,[j("span",null,Ae(a.value),1)]),g[19]||(g[19]=j("div",{text:"zinc-400 dark:zinc-500"},[j("span",null,"Z")],-1)),j("label",hd,[Ne(Dt,{modelValue:l.value,"onUpdate:modelValue":g[5]||(g[5]=w=>l.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),j("div",md,[j("span",null,Ae(l.value),1)])])]),_:1}),Ne(Un,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:$e(()=>[j("span",gd,Ae(d.$t("stage.viewers.debug-menu.vrm.model.title")),1)]),default:$e(()=>[j("div",yd,[g[20]||(g[20]=j("div",{text:"zinc-400 dark:zinc-500"},[j("span",null,"X")],-1)),j("label",bd,[Ne(Dt,{modelValue:u.value,"onUpdate:modelValue":g[6]||(g[6]=w=>u.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),j("div",xd,[j("span",null,Ae(u.value),1)]),g[21]||(g[21]=j("div",{text:"zinc-400 dark:zinc-500"},[j("span",null,"Y")],-1)),j("label",vd,[Ne(Dt,{modelValue:c.value,"onUpdate:modelValue":g[7]||(g[7]=w=>c.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),j("div",wd,[j("span",null,Ae(c.value),1)]),g[22]||(g[22]=j("div",{text:"zinc-400 dark:zinc-500"},[j("span",null,"Z")],-1)),j("label",Td,[Ne(Dt,{modelValue:f.value,"onUpdate:modelValue":g[8]||(g[8]=w=>f.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),j("div",Ad,[j("span",null,Ae(f.value),1)])])]),_:1}),j("div",kd,[j("span",null,Ae(d.$t("stage.viewers.debug-menu.emotions")),1)]),j("div",Ed,[j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[9]||(g[9]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("neutral")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.neutral")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[10]||(g[10]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("surprised")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.surprised")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[11]||(g[11]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("sad")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.sad")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[12]||(g[12]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("angry")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.angry")),1),j("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[13]||(g[13]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("happy")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.happy")),1)])])])):Yt("",!0)]),_:1})])]),_:1}))}});var _d=async e=>(e.fetch??globalThis.fetch)(Jo("audio/speech",e.baseURL),{body:ts(e),headers:es({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(ns).then(async t=>t.arrayBuffer());const Sd=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class yn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}yn.prototype.normal={};yn.prototype.property={};yn.prototype.space=void 0;function Gs(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new yn(n,r,t)}function Gr(e){return e.toLowerCase()}class Ye{constructor(t,n){this.attribute=n,this.property=t}}Ye.prototype.attribute="";Ye.prototype.booleanish=!1;Ye.prototype.boolean=!1;Ye.prototype.commaOrSpaceSeparated=!1;Ye.prototype.commaSeparated=!1;Ye.prototype.defined=!1;Ye.prototype.mustUseProperty=!1;Ye.prototype.number=!1;Ye.prototype.overloadedBoolean=!1;Ye.prototype.property="";Ye.prototype.spaceSeparated=!1;Ye.prototype.space=void 0;let Id=0;const le=Lt(),Le=Lt(),$s=Lt(),q=Lt(),Se=Lt(),Ht=Lt(),Xe=Lt();function Lt(){return 2**++Id}const $r=Object.freeze(Object.defineProperty({__proto__:null,boolean:le,booleanish:Le,commaOrSpaceSeparated:Xe,commaSeparated:Ht,number:q,overloadedBoolean:$s,spaceSeparated:Se},Symbol.toStringTag,{value:"Module"})),yr=Object.keys($r);class di extends Ye{constructor(t,n,r,i){let o=-1;if(super(t,n),ho(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&Ld.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mo,Dd);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mo.test(o)){let s=o.replace(Nd,Pd);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=di}return new i(r,t)}function Pd(e){return"-"+e.toLowerCase()}function Dd(e){return e.charAt(1).toUpperCase()}const zd=Gs([qs,Rd,Ws,Xs,Zs],"html"),Qs=Gs([qs,Cd,Ws,Xs,Zs],"svg"),go={}.hasOwnProperty;function Fd(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&go.call(i,e)){const l=String(i[e]);s=go.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Bd=/["&'<>`]/g,Ud=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,jd=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Vd=/[|\\{}()[\]^$+*?.]/g,yo=new WeakMap;function Hd(e,t){if(e=e.replace(t.subset?Gd(t.subset):Bd,r),t.subset||t.escapeOnly)return e;return e.replace(Ud,n).replace(jd,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function Gd(e){let t=yo.get(e);return t||(t=$d(e),yo.set(e,t)),t}function $d(e){const t=[];let n=-1;for(;++n",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:"€"},Zd=["cent","copy","divide","gt","lt","not","para","times"],Js={}.hasOwnProperty,qr={};let _n;for(_n in br)Js.call(br,_n)&&(qr[br[_n]]=_n);const Qd=/[^\dA-Za-z]/;function Jd(e,t,n,r){const i=String.fromCharCode(e);if(Js.call(qr,i)){const o=qr[i],s="&"+o;return n&&Xd.includes(o)&&!Zd.includes(o)&&(!r||t&&t!==61&&Qd.test(String.fromCharCode(t)))?s:s+";"}return""}function ep(e,t,n){let r=Yd(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Jd(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Wd(e,t,n.omitOptionalSemicolons);o.length|^->||--!>|"],rp=["<",">"];function ip(e,t,n,r){return r.settings.bogusComments?"":"";function i(o){return Gt(o,Object.assign({},r.settings.characterReferences,{subset:rp}))}}function op(e,t,n,r){return""}function bo(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function sp(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function ap(e){return e.join(" ").trim()}const lp=/[ \t\n\f\r]/g;function pi(e){return typeof e=="object"?e.type==="text"?xo(e.value):!1:xo(e)}function xo(e){return e.replace(lp,"")===""}const De=ta(1),ea=ta(-1),up=[];function ta(e){return t;function t(n,r,i){const o=n?n.children:up;let s=(r||0)+e,a=o[s];if(!i)for(;a&&pi(a);)s+=e,a=o[s];return a}}const cp={}.hasOwnProperty;function na(e){return t;function t(n,r,i){return cp.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const hi=na({body:dp,caption:xr,colgroup:xr,dd:gp,dt:mp,head:xr,html:fp,li:hp,optgroup:yp,option:bp,p:pp,rp:vo,rt:vo,tbody:vp,td:wo,tfoot:wp,th:wo,thead:xp,tr:Tp});function xr(e,t,n){const r=De(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&pi(r.value.charAt(0)))}function fp(e,t,n){const r=De(n,t);return!r||r.type!=="comment"}function dp(e,t,n){const r=De(n,t);return!r||r.type!=="comment"}function pp(e,t,n){const r=De(n,t);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 hp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&r.tagName==="li"}function mp(e,t,n){const r=De(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function gp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function vo(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function yp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function bp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function xp(e,t,n){const r=De(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function vp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function wp(e,t,n){return!De(n,t)}function Tp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function wo(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Ap=na({body:Mp,colgroup:_p,head:Ep,html:kp,tbody:Sp});function kp(e){const t=De(e,-1);return!t||t.type!=="comment"}function Ep(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function Mp(e){const t=De(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&pi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function _p(e,t,n){const r=ea(n,t),i=De(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&hi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Sp(e,t,n){const r=ea(n,t),i=De(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&hi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Sn={name:[[` +}`;const gn=new re(0,0,0),ci=new re(0,0,0),Xc=new re(0,0,0);function oo(e,t,n){const r=gn.setFromMatrixPosition(e.matrixWorld);r.project(t);const i=n.width/2,o=n.height/2;return[(Number.isNaN(r.x)?0:r.x)*i+i,-(r.y*o)+o,r.z]}function Zc(e,t){const n=gn.setFromMatrixPosition(e.matrixWorld),r=ci.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),o=t.getWorldDirection(Xc);return i.angleTo(o)>Math.PI/2}function Qc(e,t,n,r){const i=gn.setFromMatrixPosition(e.matrixWorld),o=i.clone();o.project(t),n.setFromCamera(new Oe(o.x,o.y),t);const s=n.intersectObjects(r,!0);if(s.length>0){const a=s[0].distance;return i.distanceTo(n.ray.origin)Math.abs(e)<1e-10?0:e;function Us(e,t,n=""){let r="matrix3d(";for(let i=0;i!==16;i++)r+=Ur(t[i]*e.elements[i])+(i!==15?",":")");return n+r}const tf=(e=>t=>Us(t,e))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),nf=(e=>(t,n)=>Us(t,e(n),"translate(-50%,-50%)"))(e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1]),rf=["geometry","material"];new fs;var jr={exports:{}},of=jr.exports,so;function sf(){return so||(so=1,function(e,t){(function(n,r){e.exports=r()})(of,function(){var n=function(){function r(d){return s.appendChild(d.dom),d}function i(d){for(var g=0;gl+1e3&&(c.update(1e3*u/(d-l),100),l=d,u=0,p)){var g=performance.memory;p.update(g.usedJSHeapSize/1048576,g.jsHeapSizeLimit/1048576)}return d},update:function(){a=this.end()},domElement:s,setMode:i}};return n.Panel=function(r,i,o){var s=1/0,a=0,l=Math.round,u=l(window.devicePixelRatio||1),c=80*u,f=48*u,p=3*u,d=2*u,g=3*u,A=15*u,v=74*u,w=30*u,R=document.createElement("canvas");R.width=c,R.height=f,R.style.cssText="width:80px;height:48px";var M=R.getContext("2d");return M.font="bold "+9*u+"px Helvetica,Arial,sans-serif",M.textBaseline="top",M.fillStyle=o,M.fillRect(0,0,c,f),M.fillStyle=i,M.fillText(r,p,d),M.fillRect(g,A,v,w),M.fillStyle=o,M.globalAlpha=.9,M.fillRect(g,A,v,w),{dom:R,update:function(C,O){s=Math.min(s,C),a=Math.max(a,C),M.fillStyle=o,M.globalAlpha=1,M.fillRect(0,0,c,A),M.fillStyle=i,M.fillText(l(C)+" "+r+" ("+l(s)+"-"+l(a)+")",p,d),M.drawImage(R,g+u,A,v-u,w,g,A,v-u,w),M.fillRect(g+v-u,A,u,w),M.fillStyle=o,M.globalAlpha=.9,M.fillRect(g+v-u,A,u,l((1-C/O)*w))}}},n})}(jr)),jr.exports}sf();const af={key:0,args:[0,1,64]},lf={key:1,args:[.5,1,64]},uf={key:2},cf=["tone-mapped","map","side","color"];new Fe(16777215);const Dt=Je({__name:"Range",props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","mousedown"],setup(e,{emit:t}){const n=e,r=t,i=Q(null);function o(g,A,v){return Math.min(Math.max(g,A),v)}function s(g){const A=g.toString();return A.includes("e-")?Number.parseInt(A.split("e-")[1],10):A.includes(".")?A.split(".")[1].length:0}function a(g,A){const v=s(A),w=10**(v+3);return Number.parseFloat((g*w/w).toFixed(v))}const l=Be(()=>a(o(n.modelValue,n.min,n.max),n.step)),u=Be(()=>{const g=(l.value-n.min)/(n.max-n.min)*100;return{width:`${g}%`,backgroundSize:`${g}% 100%`}});function c(g){if(!i.value)return l.value;const A=i.value.getBoundingClientRect(),w=(g.clientX-A.left)/A.width,R=n.max-n.min,M=n.min+R*w,C=Math.round(M/n.step)*n.step;return Math.min(Math.max(C,n.min),n.max)}function f(g){if(n.disabled)return;const A=c(g);r("update:modelValue",A)}function p(g){if(n.disabled)return;g.preventDefault();const A=c(g);r("update:modelValue",A),window.addEventListener("mousemove",f),window.addEventListener("mouseup",d)}function d(g){window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}return Nt(()=>{window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}),(g,A)=>(Me(),Ce("span",{ref_key:"sliderRef",ref:i,class:cn(["range-slider disabled:pointer-events-none disabled:cursor-default disabled:opacity-50",{disabled:e.disabled}]),bg:"[#e6e1fc] dark:[#676085]","touch-action-none":"",relative:"","inline-block":"","w-full":"","cursor-ew-resize":"","rounded-sm":"",onMousedown:p},[U("span",{style:Si(u.value),bg:"[#cabeff] dark:[#4e34b9]",relative:"",block:"","rounded-sm":"",h:"[14px]"},null,4),U("span",{role:"slider",class:"slider-thumb",style:Si({left:`${(l.value-e.min)/(e.max-e.min)*100}%`}),absolute:"","rounded-sm":"",w:"[1px]",h:"[14px]",bg:"zinc-100 dark:zinc-400",top:"50%",transform:"translate-x-[50%] translate-y-[-50%]"},null,4)],34))}});function ao(e,t){if(t===gl)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===zr||t===xs){let n=e.getIndex();if(n===null){const s=[],a=e.getAttribute("position");if(a!==void 0){for(let l=0;l=2.0 are supported."));return}const u=new Gf(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&a[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}u.setExtensions(s),u.setPlugins(a),u.parse(r,i)}parseAsync(t,n){const r=this;return new Promise(function(i,o){r.parse(t,n,i,o)})}}function df(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const de={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class pf{constructor(t){this.parser=t,this.name=de.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(t,o.source,s)}}class _f{constructor(t){this.parser=t,this.name=de.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const n=this.name,r=this.parser,i=r.json,o=i.textures[t];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const u=r.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return r.loadTextureImage(t,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){t(n.height===1)}})),this.isSupported}}class Sf{constructor(t){this.parser=t,this.name=de.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const n=this.name,r=this.parser,i=r.json,o=i.textures[t];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const u=r.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return r.loadTextureImage(t,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){t(n.height===1)}})),this.isSupported}}class If{constructor(t){this.name=de.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const n=this.parser.json,r=n.bufferViews[t];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(a){const l=i.byteOffset||0,u=i.byteLength||0,c=i.count,f=i.byteStride,p=new Uint8Array(a,l,u);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(c,f,p,i.mode,i.filter).then(function(d){return d.buffer}):s.ready.then(function(){const d=new ArrayBuffer(c*f);return s.decodeGltfBuffer(new Uint8Array(d),c,f,p,i.mode,i.filter),d})})}else return null}}class Rf{constructor(t){this.name=de.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const n=this.parser.json,r=n.nodes[t];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const u of i.primitives)if(u.mode!==tt.TRIANGLES&&u.mode!==tt.TRIANGLE_STRIP&&u.mode!==tt.TRIANGLE_FAN&&u.mode!==void 0)return null;const s=r.extensions[this.name].attributes,a=[],l={};for(const u in s)a.push(this.parser.getDependency("accessor",s[u]).then(c=>(l[u]=c,l[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(u=>{const c=u.pop(),f=c.isGroup?c.children:[c],p=u[0].count,d=[];for(const g of f){const A=new mt,v=new re,w=new Dn,R=new re(1,1,1),M=new wl(g.geometry,g.material,p);for(let C=0;C0||e.search(/^data\:image\/jpeg/)===0?"image/jpeg":e.search(/\.webp($|\?)/i)>0||e.search(/^data\:image\/webp/)===0?"image/webp":e.search(/\.ktx2($|\?)/i)>0||e.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const Hf=new mt;class Gf{constructor(t={},n={}){this.json=t,this.extensions={},this.plugins={},this.options=n,this.cache=new df,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=-1,o=!1,s=-1;if(typeof navigator<"u"){const a=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(a)===!0;const l=a.match(/Version\/(\d+)/);i=r&&l?parseInt(l[1],10):-1,o=a.indexOf("Firefox")>-1,s=o?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||r&&i<17||o&&s<98?this.textureLoader=new Al(this.options.manager):this.textureLoader=new kl(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new bs(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(s){const a={scene:s[0][i.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:i.asset,parser:r,userData:{}};return Et(o,a,i),pt(a,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();t(a)})}).catch(n)}_markDefs(){const t=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(s);l!=null&&this.associations.set(a,l);for(const[u,c]of s.children.entries())o(c,a.children[u])};return o(r,i),i.name+="_instance_"+t.uses[n]++,i}_invokeOne(t){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&v.setY(y,h[S*l+1]),l>=3&&v.setZ(y,h[S*l+2]),l>=4&&v.setW(y,h[S*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}v.normalized=g}return v})}loadTexture(t){const n=this.json,r=this.options,o=n.textures[t].source,s=n.images[o];let a=this.textureLoader;if(s.uri){const l=r.manager.getHandler(s.uri);l!==null&&(a=l)}return this.loadTextureImage(t,o,a)}loadTextureImage(t,n,r){const i=this,o=this.json,s=o.textures[t],a=o.images[n],l=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(n,r).then(function(c){c.flipY=!1,c.name=s.name||a.name||"",c.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(c.name=a.uri);const p=(o.samplers||{})[s.sampler]||{};return c.magFilter=uo[p.magFilter]||Fn,c.minFilter=uo[p.minFilter]||si,c.wrapS=co[p.wrapS]||Bn,c.wrapT=co[p.wrapT]||Bn,c.generateMipmaps=!c.isCompressedTexture&&c.minFilter!==It&&c.minFilter!==Fn,i.associations.set(c,{textures:t}),c}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(t,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(f=>f.clone());const s=i.images[t],a=self.URL||self.webkitURL;let l=s.uri||"",u=!1;if(s.bufferView!==void 0)l=r.getDependency("bufferView",s.bufferView).then(function(f){u=!0;const p=new Blob([f],{type:s.mimeType});return l=a.createObjectURL(p),l});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(f){return new Promise(function(p,d){let g=p;n.isImageBitmapLoader===!0&&(g=function(A){const v=new zn(A);v.needsUpdate=!0,p(v)}),n.load(on.resolveURL(f,o.path),g,void 0,d)})}).then(function(f){return u===!0&&a.revokeObjectURL(l),pt(f,s),f.userData.mimeType=s.mimeType||Vf(s.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[t]=c,c}assignTexture(t,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(s){if(!s)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(s=s.clone(),s.channel=r.texCoord),o.extensions[de.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[de.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=o.associations.get(s);s=o.extensions[de.KHR_TEXTURE_TRANSFORM].extendTexture(s,a),o.associations.set(s,l)}}return i!==void 0&&(s.colorSpace=i),t[n]=s,s})}assignFinalMaterial(t){const n=t.geometry;let r=t.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,s=n.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new El,er.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(a,l)),r=l}else if(t.isLine){const a="LineBasicMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new Ml,er.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(a,l)),r=l}if(i||o||s){let a="ClonedMaterial:"+r.uuid+":";i&&(a+="derivative-tangents:"),o&&(a+="vertex-colors:"),s&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=r.clone(),o&&(l.vertexColors=!0),s&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(r))),r=l}t.material=r}getMaterialType(){return vs}loadMaterial(t){const n=this,r=this.json,i=this.extensions,o=r.materials[t];let s;const a={},l=o.extensions||{},u=[];if(l[de.KHR_MATERIALS_UNLIT]){const f=i[de.KHR_MATERIALS_UNLIT];s=f.getMaterialType(),u.push(f.extendParams(a,o,n))}else{const f=o.pbrMetallicRoughness||{};if(a.color=new Fe(1,1,1),a.opacity=1,Array.isArray(f.baseColorFactor)){const p=f.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],gt),a.opacity=p[3]}f.baseColorTexture!==void 0&&u.push(n.assignTexture(a,"map",f.baseColorTexture,dn)),a.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,a.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(a,"metalnessMap",f.metallicRoughnessTexture)),u.push(n.assignTexture(a,"roughnessMap",f.metallicRoughnessTexture))),s=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(t)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(t,a)})))}o.doubleSided===!0&&(a.side=qn);const c=o.alphaMode||mr.OPAQUE;if(c===mr.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,c===mr.MASK&&(a.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&s!==Ft&&(u.push(n.assignTexture(a,"normalMap",o.normalTexture)),a.normalScale=new Oe(1,1),o.normalTexture.scale!==void 0)){const f=o.normalTexture.scale;a.normalScale.set(f,f)}if(o.occlusionTexture!==void 0&&s!==Ft&&(u.push(n.assignTexture(a,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&s!==Ft){const f=o.emissiveFactor;a.emissive=new Fe().setRGB(f[0],f[1],f[2],gt)}return o.emissiveTexture!==void 0&&s!==Ft&&u.push(n.assignTexture(a,"emissiveMap",o.emissiveTexture,dn)),Promise.all(u).then(function(){const f=new s(a);return o.name&&(f.name=o.name),pt(f,o),n.associations.set(f,{materials:t}),o.extensions&&Et(i,f,o),f})}createUniqueName(t){const n=fn.sanitizeNodeName(t||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(t){const n=this,r=this.extensions,i=this.primitiveCache;function o(a){return r[de.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return fo(l,a,n)})}const s=[];for(let a=0,l=t.length;a0&&Uf(w,o),w.name=n.createUniqueName(o.name||"mesh_"+t),pt(w,o),v.extensions&&Et(i,w,v),n.assignFinalMaterial(w),f.push(w)}for(let d=0,g=f.length;d1?c=new tr:u.length===1?c=u[0]:c=new ai,c!==u[0])for(let f=0,p=u.length;f{const f=new Map;for(const[p,d]of i.associations)(p instanceof er||p instanceof zn)&&f.set(p,d);return c.traverse(p=>{const d=i.associations.get(p);d!=null&&f.set(p,d)}),f};return i.associations=u(o),o})}_createAnimationTracks(t,n,r,i,o){const s=[],a=t.name?t.name:t.uuid,l=[];bt[o.path]===bt.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a);let u;switch(bt[o.path]){case bt.weights:u=Ri;break;case bt.rotation:u=Ci;break;case bt.position:case bt.scale:u=Ii;break;default:switch(r.itemSize){case 1:u=Ri;break;case 2:case 3:default:u=Ii;break}break}const c=i.interpolation!==void 0?zf[i.interpolation]:ni,f=this._getArrayFromAccessor(r);for(let p=0,d=l.length;pnew Oa(e)),Mt.register(e=>new Pa(e)),Mt)}async function qf(e){const r=(await Hs().loadAsync(e)).userData;if(!r.vrmAnimations){console.warn("No VRM animations found in the .vrma file");return}if(r.vrmAnimations.length===0){console.warn("No VRM animations found in the .vrma file");return}return r.vrmAnimations[0]}async function Yf(e,t){if(!e){console.warn("No VRM found");return}if(t)return Da(t,e)}function Kf(){const e=Q(!1),t=Q(0),n=Q(0),r=.2,i=1,o=6,s=Q(Math.random()*(o-i)+i);function a(l,u){if(l!=null&&l.expressionManager&&(n.value+=u,!e.value&&n.value>=s.value&&(e.value=!0,t.value=0),e.value)){t.value+=u/r;const c=Math.sin(Math.PI*t.value);l.expressionManager.setValue("blink",c),t.value>=1&&(e.value=!1,n.value=0,l.expressionManager.setValue("blink",0),s.value=Math.random()*(o-i)+i)}}return{update:a}}function Wf(){let e=-1,t,n=0;function r(){t?t.set(_t(-.25,.25),_t(-.2,.15),-.65):t=new re(_t(-.25,.25),_t(-.2,.15),-.65)}function i(o,s){var a;!(o!=null&&o.expressionManager)||!o.lookAt||(n>=e?(r(),n=0,e=Zo()/1e3):t||r(),o.lookAt.target||(o.lookAt.target=new ai),o.lookAt.target.position.lerp(t,_t(.2,.5)),(a=o.lookAt)==null||a.update(s),n+=s)}return{update:i}}async function Xf(e,t){const i=(await Hs().loadAsync(e,s=>{var a;return(a=t==null?void 0:t.onProgress)==null?void 0:a.call(t,s)})).userData;if(!i.vrm)return;const o=i.vrm;if(Lr.removeUnnecessaryVertices(o.scene),Lr.combineSkeletons(o.scene),o.scene.traverse(s=>{s.frustumCulled=!1}),o.lookAt){const s=new za(o.lookAt);s.name="lookAtQuaternionProxy",o.scene.add(s)}return t!=null&&t.scene&&t.scene.add(o.scene),t!=null&&t.position&&o.scene.position.set(...t.position),o}function Zf(e){const t=Q(null),n=Q(!1),r=Q(0),i=Q(new Map),o=Q(new Map),s=Q(),a=(w,R,M)=>w+(R-w)*M,l=w=>w<.5?4*w*w*w:1-(-2*w+2)**3/2,u=new Map([["happy",{expression:[{name:"happy",value:1,duration:.3},{name:"aa",value:.3}],blendDuration:.3}],["sad",{expression:[{name:"sad",value:1},{name:"oh",value:.2}],blendDuration:.3}],["angry",{expression:[{name:"angry",value:1},{name:"ee",value:.4}],blendDuration:.2}],["surprised",{expression:[{name:"Surprised",value:1},{name:"oh",value:.6}],blendDuration:.1}],["neutral",{expression:[{name:"neutral",value:1}],blendDuration:.5}]]),c=()=>{s.value&&(clearTimeout(s.value),s.value=void 0)},f=w=>{var M;if(c(),!u.has(w)){console.warn(`Emotion ${w} not found`);return}const R=u.get(w);if(t.value=w,n.value=!0,r.value=0,e.expressionManager){const C=Object.keys(e.expressionManager.expressionMap);for(const O of C)e.expressionManager.setValue(O,0)}i.value.clear(),o.value.clear();for(const C of R.expression||[]){const O=((M=e.expressionManager)==null?void 0:M.getValue(C.name))||0;i.value.set(C.name,O),o.value.set(C.name,C.value)}};return{currentEmotion:t,isTransitioning:n,setEmotion:f,setEmotionWithResetAfter:(w,R)=>{c(),f(w),s.value=setTimeout(()=>{f("neutral"),s.value=void 0},R)},update:w=>{var C;if(!n.value||!t.value)return;const M=u.get(t.value).blendDuration||.3;r.value+=w/M,r.value>=1&&(r.value=1,n.value=!1);for(const[O,h]of o.value){const S=i.value.get(O)||0,x=a(S,h,l(r.value));(C=e.expressionManager)==null||C.setValue(O,x)}},addEmotionState:(w,R)=>{u.set(w,R)},removeEmotionState:w=>{u.delete(w)},dispose:()=>{c()}}}const Qf=Je({__name:"Model",props:{model:null,idleAnimation:null,loadAnimations:null,position:null,paused:{type:Boolean}},emits:["loadModelProgress","error"],setup(e,{expose:t,emit:n}){const r=e,i=n;let o;const s=Q(),a=Q(),{scene:l}=$n(),{onBeforeRender:u}=Pn(),c=Kf(),f=Wf(),p=Q();Pe(()=>r.position,([A,v,w])=>{s.value&&s.value.scene.position.set(A,v,w)}),$t(async()=>{if(l.value)try{const A=await Xf(r.model,{scene:l.value,lookAt:!0,position:r.position,onProgress:R=>i("loadModelProgress",Number.parseFloat((100*(R.loaded/R.total)).toFixed(2)))});if(!A){console.warn("No VRM model loaded");return}const v=await qf(r.idleAnimation),w=await Yf(A,v);if(!w){console.warn("No VRM animation loaded");return}a.value=new zl(A.scene),a.value.clipAction(w).play(),p.value=Zf(A),s.value=A,o=u(({delta:R})=>{var M,C,O;(M=a.value)==null||M.update(R),(C=s.value)==null||C.update(R),c.update(s.value,R),f.update(s.value,R),(O=p.value)==null||O.update(R)}).off}catch(A){i("error",A)}}),Nt(()=>{o==null||o(),s.value&&(s.value.scene.removeFromParent(),Lr.deepDispose(s.value.scene))}),t({setExpression(A){var v;(v=p.value)==null||v.setEmotionWithResetAfter(A,1e3)}});const{pause:d,resume:g}=Pn();return Pe(()=>r.paused,A=>{A?d():g()}),(A,v)=>pn(A.$slots,"default")}}),Jf=["position"],ed={absolute:"",bottom:"3",right:"3"},td={flex:"~ row","cursor-pointer":""},nd=["checked","aria-checked"],rd={key:0,"min-w":"50vw",z:"{var g;(g=p.value)==null||g.setExpression(d)}}),(d,g)=>(Me(),un(Ts,{relative:""},{default:$e(({height:A,width:v})=>[Ne(Z(Fl),{alpha:!0,antialias:!0,width:v,height:A},{default:$e(()=>[Ne(Z(Bc)),U("TresPerspectiveCamera",{position:[s.value,a.value,l.value]},null,8,Jf),g[14]||(g[14]=U("TresDirectionalLight",{color:16777215,intensity:1.2,position:[1,1,1]},null,-1)),g[15]||(g[15]=U("TresAmbientLight",{color:16777215,intensity:1.5},null,-1)),Ne(Qf,{ref_key:"modelRef",ref:p,model:r.model,"idle-animation":r.idleAnimation,position:[u.value,c.value,f.value],paused:r.paused,onLoadModelProgress:g[0]||(g[0]=w=>i("loadModelProgress",w)),onError:g[1]||(g[1]=w=>i("error",w))},null,8,["model","idle-animation","position","paused"])]),_:2},1032,["width","height"]),U("div",ed,[U("div",td,[U("label",{class:cn([o.value?"bg-zinc-300 dark:bg-zinc-200":"bg-zinc-100 dark:bg-zinc-700"]),transition:"all ease-in-out duration-500",text:"lg zinc-500 dark:zinc-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[On(U("input",{"onUpdate:modelValue":g[2]||(g[2]=w=>o.value=w),checked:o.value,"aria-checked":o.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,nd),[[os,o.value]]),g[16]||(g[16]=U("div",{"select-none":""},[U("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Ne(ws,null,{default:$e(()=>[o.value?(Me(),Ce("div",rd,[U("div",id,[U("div",od,[U("span",null,Ae(d.$t("stage.viewers.debug-menu.vrm.model.title")),1)]),Ne(Un,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:$e(()=>[U("span",sd,Ae(d.$t("stage.viewers.debug-menu.vrm.camera")),1)]),default:$e(()=>[U("div",ad,[g[17]||(g[17]=U("div",{text:"zinc-400 dark:zinc-500"},[U("span",null,"X")],-1)),U("label",ld,[Ne(Dt,{modelValue:s.value,"onUpdate:modelValue":g[3]||(g[3]=w=>s.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),U("div",ud,[U("span",null,Ae(s.value),1)]),g[18]||(g[18]=U("div",{text:"zinc-400 dark:zinc-500"},[U("span",null,"Y")],-1)),U("label",cd,[Ne(Dt,{modelValue:a.value,"onUpdate:modelValue":g[4]||(g[4]=w=>a.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),U("div",fd,[U("span",null,Ae(a.value),1)]),g[19]||(g[19]=U("div",{text:"zinc-400 dark:zinc-500"},[U("span",null,"Z")],-1)),U("label",dd,[Ne(Dt,{modelValue:l.value,"onUpdate:modelValue":g[5]||(g[5]=w=>l.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),U("div",pd,[U("span",null,Ae(l.value),1)])])]),_:1}),Ne(Un,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:$e(()=>[U("span",hd,Ae(d.$t("stage.viewers.debug-menu.vrm.model.title")),1)]),default:$e(()=>[U("div",md,[g[20]||(g[20]=U("div",{text:"zinc-400 dark:zinc-500"},[U("span",null,"X")],-1)),U("label",gd,[Ne(Dt,{modelValue:u.value,"onUpdate:modelValue":g[6]||(g[6]=w=>u.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),U("div",yd,[U("span",null,Ae(u.value),1)]),g[21]||(g[21]=U("div",{text:"zinc-400 dark:zinc-500"},[U("span",null,"Y")],-1)),U("label",xd,[Ne(Dt,{modelValue:c.value,"onUpdate:modelValue":g[7]||(g[7]=w=>c.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),U("div",bd,[U("span",null,Ae(c.value),1)]),g[22]||(g[22]=U("div",{text:"zinc-400 dark:zinc-500"},[U("span",null,"Z")],-1)),U("label",vd,[Ne(Dt,{modelValue:f.value,"onUpdate:modelValue":g[8]||(g[8]=w=>f.value=w),min:-10,max:10,step:.01},null,8,["modelValue"])]),U("div",wd,[U("span",null,Ae(f.value),1)])])]),_:1}),U("div",Td,[U("span",null,Ae(d.$t("stage.viewers.debug-menu.emotions")),1)]),U("div",Ad,[U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[9]||(g[9]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("neutral")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.neutral")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[10]||(g[10]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("surprised")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.surprised")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[11]||(g[11]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("sad")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.sad")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[12]||(g[12]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("angry")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.angry")),1),U("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:g[13]||(g[13]=w=>{var R;return(R=p.value)==null?void 0:R.setExpression("happy")})},Ae(d.$t("stage.viewers.debug-menu.emotions-btn.happy")),1)])])])):qt("",!0)]),_:1})])]),_:1}))}});var Ed=async e=>(e.fetch??globalThis.fetch)(Qo("audio/speech",e.baseURL),{body:es(e),headers:Jo({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(ts).then(async t=>t.arrayBuffer());const Md=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class yn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}yn.prototype.normal={};yn.prototype.property={};yn.prototype.space=void 0;function Gs(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new yn(n,r,t)}function Gr(e){return e.toLowerCase()}class Ye{constructor(t,n){this.attribute=n,this.property=t}}Ye.prototype.attribute="";Ye.prototype.booleanish=!1;Ye.prototype.boolean=!1;Ye.prototype.commaOrSpaceSeparated=!1;Ye.prototype.commaSeparated=!1;Ye.prototype.defined=!1;Ye.prototype.mustUseProperty=!1;Ye.prototype.number=!1;Ye.prototype.overloadedBoolean=!1;Ye.prototype.property="";Ye.prototype.spaceSeparated=!1;Ye.prototype.space=void 0;let _d=0;const le=Lt(),Le=Lt(),$s=Lt(),G=Lt(),Se=Lt(),Vt=Lt(),Xe=Lt();function Lt(){return 2**++_d}const $r=Object.freeze(Object.defineProperty({__proto__:null,boolean:le,booleanish:Le,commaOrSpaceSeparated:Xe,commaSeparated:Vt,number:G,overloadedBoolean:$s,spaceSeparated:Se},Symbol.toStringTag,{value:"Module"})),yr=Object.keys($r);class fi extends Ye{constructor(t,n,r,i){let o=-1;if(super(t,n),po(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&Cd.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ho,Od);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ho.test(o)){let s=o.replace(Rd,Ld);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=fi}return new i(r,t)}function Ld(e){return"-"+e.toLowerCase()}function Od(e){return e.charAt(1).toUpperCase()}const Pd=Gs([qs,Sd,Ws,Xs,Zs],"html"),Qs=Gs([qs,Id,Ws,Xs,Zs],"svg"),mo={}.hasOwnProperty;function Dd(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&mo.call(i,e)){const l=String(i[e]);s=mo.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const zd=/["&'<>`]/g,Fd=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Bd=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Ud=/[|\\{}()[\]^$+*?.]/g,go=new WeakMap;function jd(e,t){if(e=e.replace(t.subset?Vd(t.subset):zd,r),t.subset||t.escapeOnly)return e;return e.replace(Fd,n).replace(Bd,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function Vd(e){let t=go.get(e);return t||(t=Hd(e),go.set(e,t)),t}function Hd(e){const t=[];let n=-1;for(;++n",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:"€"},Wd=["cent","copy","divide","gt","lt","not","para","times"],Js={}.hasOwnProperty,qr={};let _n;for(_n in xr)Js.call(xr,_n)&&(qr[xr[_n]]=_n);const Xd=/[^\dA-Za-z]/;function Zd(e,t,n,r){const i=String.fromCharCode(e);if(Js.call(qr,i)){const o=qr[i],s="&"+o;return n&&Kd.includes(o)&&!Wd.includes(o)&&(!r||t&&t!==61&&Xd.test(String.fromCharCode(t)))?s:s+";"}return""}function Qd(e,t,n){let r=$d(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Zd(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Yd(e,t,n.omitOptionalSemicolons);o.length|^->||--!>|"],tp=["<",">"];function np(e,t,n,r){return r.settings.bogusComments?"":"";function i(o){return Ht(o,Object.assign({},r.settings.characterReferences,{subset:tp}))}}function rp(e,t,n,r){return""}function yo(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ip(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function op(e){return e.join(" ").trim()}const sp=/[ \t\n\f\r]/g;function di(e){return typeof e=="object"?e.type==="text"?xo(e.value):!1:xo(e)}function xo(e){return e.replace(sp,"")===""}const De=ta(1),ea=ta(-1),ap=[];function ta(e){return t;function t(n,r,i){const o=n?n.children:ap;let s=(r||0)+e,a=o[s];if(!i)for(;a&&di(a);)s+=e,a=o[s];return a}}const lp={}.hasOwnProperty;function na(e){return t;function t(n,r,i){return lp.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const pi=na({body:cp,caption:br,colgroup:br,dd:hp,dt:pp,head:br,html:up,li:dp,optgroup:mp,option:gp,p:fp,rp:bo,rt:bo,tbody:xp,td:vo,tfoot:bp,th:vo,thead:yp,tr:vp});function br(e,t,n){const r=De(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&di(r.value.charAt(0)))}function up(e,t,n){const r=De(n,t);return!r||r.type!=="comment"}function cp(e,t,n){const r=De(n,t);return!r||r.type!=="comment"}function fp(e,t,n){const r=De(n,t);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 dp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&r.tagName==="li"}function pp(e,t,n){const r=De(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function hp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function bo(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function mp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function gp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function yp(e,t,n){const r=De(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function xp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function bp(e,t,n){return!De(n,t)}function vp(e,t,n){const r=De(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function vo(e,t,n){const r=De(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const wp=na({body:kp,colgroup:Ep,head:Ap,html:Tp,tbody:Mp});function Tp(e){const t=De(e,-1);return!t||t.type!=="comment"}function Ap(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function kp(e){const t=De(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&di(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function Ep(e,t,n){const r=ea(n,t),i=De(e,-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 Mp(e,t,n){const r=ea(n,t),i=De(e,-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 Sn={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 @@ -519,16 +519,16 @@ void main() { \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Ip(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const a=[];let l;i.space==="html"&&e.tagName==="svg"&&(r.schema=Qs);const u=Rp(r,e.properties),c=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,c&&(s=!1),(u||!o||!Ap(e,t,n))&&(a.push("<",e.tagName,u?" "+u:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(c),!s&&(!o||!hi(e,t,n))&&a.push(""),a.join("")}function Rp(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=Cp(e,i,t[i]);o&&n.push(o)}}for(;++rbo(n,e.alternative)&&(s=e.alternative),a=s+Gt(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?Sn.single:Sn.double)[i][o],attribute:!0}))+s),l+(a&&"="+a))}const Np=["<","&"];function ra(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Gt(e.value,Object.assign({},r.settings.characterReferences,{subset:Np}))}function Lp(e,t,n,r){return r.settings.allowDangerousHtml?e.value:ra(e,t,n,r)}function Op(e,t,n,r){return r.all(e)}const Pp=Fd("type",{invalid:Dp,unknown:zp,handlers:{comment:ip,doctype:op,element:Ip,raw:Lp,root:Op,text:ra}});function Dp(e){throw new Error("Expected node, not `"+e+"`")}function zp(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Fp={},Bp={},Up=[];function jp(e,t){const n=t||Fp,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Vp,all:Hp,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Sd,characterReferences:n.characterReferences||Bp,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Qs:zd,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Vp(e,t,n){return Pp(e,t,n,this)}function Hp(e){const t=[],n=e&&e.children||Up;let r=-1;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o0?(at(e,e.length,0,t),e):t}const ko={}.hasOwnProperty;function Kp(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function $t(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const st=kt(/[A-Za-z]/),Qe=kt(/[\dA-Za-z]/),Zp=kt(/[#-'*+\--9=?A-Z^-~]/);function Yr(e){return e!==null&&(e<32||e===127)}const Kr=kt(/\d/),Qp=kt(/[\dA-Fa-f]/),Jp=kt(/[!-/:-@[-`{-~]/);function ie(e){return e!==null&&e<-2}function qe(e){return e!==null&&(e<0||e===32)}function we(e){return e===-2||e===-1||e===32}const eh=kt(new RegExp("\\p{P}|\\p{S}","u")),th=kt(/\s/);function kt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Wt(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return we(l)?(e.enter(n),a(l)):t(l)}function a(l){return we(l)&&o++s))return;const k=t.events.length;let b=k,y,m;for(;b--;)if(t.events[b][0]==="exit"&&t.events[b][1].type==="chunkFlow"){if(y){m=t.events[b][1].end;break}y=!0}for(w(r),h=k;hM;){const O=n[C];t.containerState=O[1],O[0].exit.call(t,e)}n.length=M}function R(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sh(e,t,n){return Ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Mo(e){if(e===null||qe(e)||th(e))return 1;if(eh(e))return 2}function gi(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[n][1].start};_o(f,-l),_o(p,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=nt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=nt(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=nt(u,gi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=nt(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=nt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,at(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&we(h)?Ie(e,R,"linePrefix",o+1)(h):R(h)}function R(h){return h===null||ie(h)?e.check(So,A,C)(h):(e.enter("codeFlowValue"),M(h))}function M(h){return h===null||ie(h)?(e.exit("codeFlowValue"),R(h)):(e.consume(h),M)}function C(h){return e.exit("codeFenced"),t(h)}function O(h,k,b){let y=0;return m;function m(F){return h.enter("lineEnding"),h.consume(F),h.exit("lineEnding"),T}function T(F){return h.enter("codeFencedFence"),we(F)?Ie(h,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):S(F)}function S(F){return F===a?(h.enter("codeFencedFenceSequence"),B(F)):b(F)}function B(F){return F===a?(y++,h.consume(F),B):y>=s?(h.exit("codeFencedFenceSequence"),we(F)?Ie(h,U,"whitespace")(F):U(F)):b(F)}function U(F){return F===null||ie(F)?(h.exit("codeFencedFence"),k(F)):b(F)}}}function bh(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const vr={name:"codeIndented",tokenize:vh},xh={partial:!0,tokenize:wh};function vh(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ie(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):ie(u)?e.attempt(xh,s,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||ie(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function wh(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ie(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ie(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):ie(s)?i(s):n(s)}}const Th={name:"codeText",previous:kh,resolve:Ah,tokenize:Eh};function Ah(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length)return this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse();const i=this.left.slice(t);return i.push(...this.right.slice(this.right.length-r+this.left.length).reverse()),i}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&tn(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),tn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),tn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function ca(e,t,n,r,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(w){return w===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(w),e.exit(o),p):w===null||w===32||w===41||Yr(w)?n(w):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),A(w))}function p(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(w))}function d(w){return w===62?(e.exit("chunkString"),e.exit(a),p(w)):w===null||w===60||ie(w)?n(w):(e.consume(w),w===92?g:d)}function g(w){return w===60||w===62||w===92?(e.consume(w),d):d(w)}function A(w){return!c&&(w===null||w===41||qe(w))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(w)):c999||d===null||d===91||d===93&&!l||d===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||ie(d)||a++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!we(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),a++,f):f(d)}}function da(e,t,n,r,i,o){let s;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,l):n(p)}function l(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===s?(e.exit(o),l(s)):p===null?n(p):ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ie(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||ie(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:c)}function f(p){return p===s||p===92?(e.consume(p),c):c(p)}}function sn(e,t){let n;return r;function r(i){return ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):we(i)?Ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Lh={name:"definition",tokenize:Ph},Oh={partial:!0,tokenize:Dh};function Ph(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),s(d)}function s(d){return fa.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function a(d){return i=$t(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return qe(d)?sn(e,u)(d):u(d)}function u(d){return ca(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(Oh,f,f)(d)}function f(d){return we(d)?Ie(e,p,"whitespace")(d):p(d)}function p(d){return d===null||ie(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function Dh(e,t,n){return r;function r(a){return qe(a)?sn(e,i)(a):n(a)}function i(a){return da(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return we(a)?Ie(e,s,"whitespace")(a):s(a)}function s(a){return a===null||ie(a)?t(a):n(a)}}const zh={name:"hardBreakEscape",tokenize:Fh};function Fh(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ie(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Bh={name:"headingAtx",resolve:Uh,tokenize:jh};function Uh(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},at(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function jh(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||qe(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||ie(c)?(e.exit("atxHeading"),t(c)):we(c)?Ie(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||qe(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const Vh=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ro=["pre","script","style","textarea"],Hh={concrete:!0,name:"htmlFlow",resolveTo:qh,tokenize:Yh},Gh={partial:!0,tokenize:Wh},$h={partial:!0,tokenize:Kh};function qh(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Yh(e,t,n){const r=this;let i,o,s,a,l;return u;function u(I){return c(I)}function c(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),f}function f(I){return I===33?(e.consume(I),p):I===47?(e.consume(I),o=!0,A):I===63?(e.consume(I),i=3,r.interrupt?t:E):st(I)?(e.consume(I),s=String.fromCharCode(I),v):n(I)}function p(I){return I===45?(e.consume(I),i=2,d):I===91?(e.consume(I),i=5,a=0,g):st(I)?(e.consume(I),i=4,r.interrupt?t:E):n(I)}function d(I){return I===45?(e.consume(I),r.interrupt?t:E):n(I)}function g(I){const fe="CDATA[";return I===fe.charCodeAt(a++)?(e.consume(I),a===fe.length?r.interrupt?t:S:g):n(I)}function A(I){return st(I)?(e.consume(I),s=String.fromCharCode(I),v):n(I)}function v(I){if(I===null||I===47||I===62||qe(I)){const fe=I===47,he=s.toLowerCase();return!fe&&!o&&Ro.includes(he)?(i=1,r.interrupt?t(I):S(I)):Vh.includes(s.toLowerCase())?(i=6,fe?(e.consume(I),w):r.interrupt?t(I):S(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):o?R(I):M(I))}return I===45||Qe(I)?(e.consume(I),s+=String.fromCharCode(I),v):n(I)}function w(I){return I===62?(e.consume(I),r.interrupt?t:S):n(I)}function R(I){return we(I)?(e.consume(I),R):m(I)}function M(I){return I===47?(e.consume(I),m):I===58||I===95||st(I)?(e.consume(I),C):we(I)?(e.consume(I),M):m(I)}function C(I){return I===45||I===46||I===58||I===95||Qe(I)?(e.consume(I),C):O(I)}function O(I){return I===61?(e.consume(I),h):we(I)?(e.consume(I),O):M(I)}function h(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),l=I,k):we(I)?(e.consume(I),h):b(I)}function k(I){return I===l?(e.consume(I),l=null,y):I===null||ie(I)?n(I):(e.consume(I),k)}function b(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||qe(I)?O(I):(e.consume(I),b)}function y(I){return I===47||I===62||we(I)?M(I):n(I)}function m(I){return I===62?(e.consume(I),T):n(I)}function T(I){return I===null||ie(I)?S(I):we(I)?(e.consume(I),T):n(I)}function S(I){return I===45&&i===2?(e.consume(I),P):I===60&&i===1?(e.consume(I),G):I===62&&i===4?(e.consume(I),ae):I===63&&i===3?(e.consume(I),E):I===93&&i===5?(e.consume(I),H):ie(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Gh,ce,B)(I)):I===null||ie(I)?(e.exit("htmlFlowData"),B(I)):(e.consume(I),S)}function B(I){return e.check($h,U,ce)(I)}function U(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),F}function F(I){return I===null||ie(I)?B(I):(e.enter("htmlFlowData"),S(I))}function P(I){return I===45?(e.consume(I),E):S(I)}function G(I){return I===47?(e.consume(I),s="",X):S(I)}function X(I){if(I===62){const fe=s.toLowerCase();return Ro.includes(fe)?(e.consume(I),ae):S(I)}return st(I)&&s.length<8?(e.consume(I),s+=String.fromCharCode(I),X):S(I)}function H(I){return I===93?(e.consume(I),E):S(I)}function E(I){return I===62?(e.consume(I),ae):I===45&&i===2?(e.consume(I),E):S(I)}function ae(I){return I===null||ie(I)?(e.exit("htmlFlowData"),ce(I)):(e.consume(I),ae)}function ce(I){return e.exit("htmlFlow"),t(I)}}function Kh(e,t,n){const r=this;return i;function i(s){return ie(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Wh(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Wn,t,n)}}const Xh={name:"htmlText",tokenize:Zh};function Zh(e,t,n){const r=this;let i,o,s;return a;function a(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),l}function l(E){return E===33?(e.consume(E),u):E===47?(e.consume(E),O):E===63?(e.consume(E),M):st(E)?(e.consume(E),b):n(E)}function u(E){return E===45?(e.consume(E),c):E===91?(e.consume(E),o=0,g):st(E)?(e.consume(E),R):n(E)}function c(E){return E===45?(e.consume(E),d):n(E)}function f(E){return E===null?n(E):E===45?(e.consume(E),p):ie(E)?(s=f,G(E)):(e.consume(E),f)}function p(E){return E===45?(e.consume(E),d):f(E)}function d(E){return E===62?P(E):E===45?p(E):f(E)}function g(E){const ae="CDATA[";return E===ae.charCodeAt(o++)?(e.consume(E),o===ae.length?A:g):n(E)}function A(E){return E===null?n(E):E===93?(e.consume(E),v):ie(E)?(s=A,G(E)):(e.consume(E),A)}function v(E){return E===93?(e.consume(E),w):A(E)}function w(E){return E===62?P(E):E===93?(e.consume(E),w):A(E)}function R(E){return E===null||E===62?P(E):ie(E)?(s=R,G(E)):(e.consume(E),R)}function M(E){return E===null?n(E):E===63?(e.consume(E),C):ie(E)?(s=M,G(E)):(e.consume(E),M)}function C(E){return E===62?P(E):M(E)}function O(E){return st(E)?(e.consume(E),h):n(E)}function h(E){return E===45||Qe(E)?(e.consume(E),h):k(E)}function k(E){return ie(E)?(s=k,G(E)):we(E)?(e.consume(E),k):P(E)}function b(E){return E===45||Qe(E)?(e.consume(E),b):E===47||E===62||qe(E)?y(E):n(E)}function y(E){return E===47?(e.consume(E),P):E===58||E===95||st(E)?(e.consume(E),m):ie(E)?(s=y,G(E)):we(E)?(e.consume(E),y):P(E)}function m(E){return E===45||E===46||E===58||E===95||Qe(E)?(e.consume(E),m):T(E)}function T(E){return E===61?(e.consume(E),S):ie(E)?(s=T,G(E)):we(E)?(e.consume(E),T):y(E)}function S(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,B):ie(E)?(s=S,G(E)):we(E)?(e.consume(E),S):(e.consume(E),U)}function B(E){return E===i?(e.consume(E),i=void 0,F):E===null?n(E):ie(E)?(s=B,G(E)):(e.consume(E),B)}function U(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||qe(E)?y(E):(e.consume(E),U)}function F(E){return E===47||E===62||qe(E)?y(E):n(E)}function P(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function G(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),X}function X(E){return we(E)?Ie(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):H(E)}function H(E){return e.enter("htmlTextData"),s(E)}}const yi={name:"labelEnd",resolveAll:tm,resolveTo:nm,tokenize:rm},Qh={tokenize:im},Jh={tokenize:om},em={tokenize:sm};function tm(e){let t=-1;const n=[];for(;++t=3&&(u===null||ie(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),we(u)?Ie(e,a,"whitespace")(u):a(u))}}const Ge={continuation:{tokenize:gm},exit:bm,name:"list",tokenize:mm},pm={partial:!0,tokenize:xm},hm={partial:!0,tokenize:ym};function mm(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(d){const g=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Kr(d)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Ln,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return Kr(d)&&++s<10?(e.consume(d),l):(!r.interrupt||s<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Wn,r.interrupt?n:c,e.attempt(pm,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return we(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function gm(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Wn,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ie(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!we(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hm,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ie(e,e.attempt(Ge,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ym(e,t,n){const r=this;return Ie(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function bm(e){e.exit(this.containerState.type)}function xm(e,t,n){const r=this;return Ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!we(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Co={name:"setextUnderline",resolveTo:vm,tokenize:wm};function vm(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function wm(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),we(u)?Ie(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ie(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Tm={tokenize:Am};function Am(e){const t=this,n=e.attempt(Wn,r,e.attempt(this.parser.constructs.flowInitial,i,Ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Sh,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const km={resolveAll:ha()},Em=pa("string"),Mm=pa("text");function pa(e){return{resolveAll:ha(e==="text"?_m:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function Um(e,t){let n=-1;const r=[];let i;for(;++n\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function _p(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const a=[];let l;i.space==="html"&&e.tagName==="svg"&&(r.schema=Qs);const u=Sp(r,e.properties),c=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,c&&(s=!1),(u||!o||!wp(e,t,n))&&(a.push("<",e.tagName,u?" "+u:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(c),!s&&(!o||!pi(e,t,n))&&a.push(""),a.join("")}function Sp(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=Ip(e,i,t[i]);o&&n.push(o)}}for(;++ryo(n,e.alternative)&&(s=e.alternative),a=s+Ht(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?Sn.single:Sn.double)[i][o],attribute:!0}))+s),l+(a&&"="+a))}const Rp=["<","&"];function ra(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Ht(e.value,Object.assign({},r.settings.characterReferences,{subset:Rp}))}function Cp(e,t,n,r){return r.settings.allowDangerousHtml?e.value:ra(e,t,n,r)}function Np(e,t,n,r){return r.all(e)}const Lp=Dd("type",{invalid:Op,unknown:Pp,handlers:{comment:np,doctype:rp,element:_p,raw:Cp,root:Np,text:ra}});function Op(e){throw new Error("Expected node, not `"+e+"`")}function Pp(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Dp={},zp={},Fp=[];function Bp(e,t){const n=t||Dp,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Up,all:jp,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Md,characterReferences:n.characterReferences||zp,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Qs:Pd,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Up(e,t,n){return Lp(e,t,n,this)}function jp(e){const t=[],n=e&&e.children||Fp;let r=-1;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o0?(at(e,e.length,0,t),e):t}const Ao={}.hasOwnProperty;function qp(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Gt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const st=kt(/[A-Za-z]/),Qe=kt(/[\dA-Za-z]/),Wp=kt(/[#-'*+\--9=?A-Z^-~]/);function Yr(e){return e!==null&&(e<32||e===127)}const Kr=kt(/\d/),Xp=kt(/[\dA-Fa-f]/),Zp=kt(/[!-/:-@[-`{-~]/);function ie(e){return e!==null&&e<-2}function qe(e){return e!==null&&(e<0||e===32)}function we(e){return e===-2||e===-1||e===32}const Qp=kt(new RegExp("\\p{P}|\\p{S}","u")),Jp=kt(/\s/);function kt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Kt(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return we(l)?(e.enter(n),a(l)):t(l)}function a(l){return we(l)&&o++s))return;const S=t.events.length;let x=S,y,m;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){if(y){m=t.events[x][1].end;break}y=!0}for(w(r),h=S;hM;){const O=n[C];t.containerState=O[1],O[0].exit.call(t,e)}n.length=M}function R(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ih(e,t,n){return Ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Eo(e){if(e===null||qe(e)||Jp(e))return 1;if(Qp(e))return 2}function mi(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[n][1].start};Mo(f,-l),Mo(p,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=nt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=nt(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=nt(u,mi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=nt(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=nt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,at(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&we(h)?Ie(e,R,"linePrefix",o+1)(h):R(h)}function R(h){return h===null||ie(h)?e.check(_o,A,C)(h):(e.enter("codeFlowValue"),M(h))}function M(h){return h===null||ie(h)?(e.exit("codeFlowValue"),R(h)):(e.consume(h),M)}function C(h){return e.exit("codeFenced"),t(h)}function O(h,S,x){let y=0;return m;function m(D){return h.enter("lineEnding"),h.consume(D),h.exit("lineEnding"),T}function T(D){return h.enter("codeFencedFence"),we(D)?Ie(h,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):k(D)}function k(D){return D===a?(h.enter("codeFencedFenceSequence"),B(D)):x(D)}function B(D){return D===a?(y++,h.consume(D),B):y>=s?(h.exit("codeFencedFenceSequence"),we(D)?Ie(h,j,"whitespace")(D):j(D)):x(D)}function j(D){return D===null||ie(D)?(h.exit("codeFencedFence"),S(D)):x(D)}}}function gh(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const vr={name:"codeIndented",tokenize:xh},yh={partial:!0,tokenize:bh};function xh(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ie(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):ie(u)?e.attempt(yh,s,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||ie(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function bh(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ie(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ie(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):ie(s)?i(s):n(s)}}const vh={name:"codeText",previous:Th,resolve:wh,tokenize:Ah};function wh(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length)return this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse();const i=this.left.slice(t);return i.push(...this.right.slice(this.right.length-r+this.left.length).reverse()),i}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&en(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),en(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),en(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function ca(e,t,n,r,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(w){return w===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(w),e.exit(o),p):w===null||w===32||w===41||Yr(w)?n(w):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),A(w))}function p(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(w))}function d(w){return w===62?(e.exit("chunkString"),e.exit(a),p(w)):w===null||w===60||ie(w)?n(w):(e.consume(w),w===92?g:d)}function g(w){return w===60||w===62||w===92?(e.consume(w),d):d(w)}function A(w){return!c&&(w===null||w===41||qe(w))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(w)):c999||d===null||d===91||d===93&&!l||d===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||ie(d)||a++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!we(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),a++,f):f(d)}}function da(e,t,n,r,i,o){let s;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,l):n(p)}function l(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===s?(e.exit(o),l(s)):p===null?n(p):ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ie(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||ie(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:c)}function f(p){return p===s||p===92?(e.consume(p),c):c(p)}}function sn(e,t){let n;return r;function r(i){return ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):we(i)?Ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Ch={name:"definition",tokenize:Lh},Nh={partial:!0,tokenize:Oh};function Lh(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),s(d)}function s(d){return fa.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function a(d){return i=Gt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return qe(d)?sn(e,u)(d):u(d)}function u(d){return ca(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(Nh,f,f)(d)}function f(d){return we(d)?Ie(e,p,"whitespace")(d):p(d)}function p(d){return d===null||ie(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function Oh(e,t,n){return r;function r(a){return qe(a)?sn(e,i)(a):n(a)}function i(a){return da(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return we(a)?Ie(e,s,"whitespace")(a):s(a)}function s(a){return a===null||ie(a)?t(a):n(a)}}const Ph={name:"hardBreakEscape",tokenize:Dh};function Dh(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ie(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const zh={name:"headingAtx",resolve:Fh,tokenize:Bh};function Fh(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},at(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Bh(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||qe(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||ie(c)?(e.exit("atxHeading"),t(c)):we(c)?Ie(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||qe(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const Uh=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Io=["pre","script","style","textarea"],jh={concrete:!0,name:"htmlFlow",resolveTo:Gh,tokenize:$h},Vh={partial:!0,tokenize:Yh},Hh={partial:!0,tokenize:qh};function Gh(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $h(e,t,n){const r=this;let i,o,s,a,l;return u;function u(I){return c(I)}function c(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),f}function f(I){return I===33?(e.consume(I),p):I===47?(e.consume(I),o=!0,A):I===63?(e.consume(I),i=3,r.interrupt?t:E):st(I)?(e.consume(I),s=String.fromCharCode(I),v):n(I)}function p(I){return I===45?(e.consume(I),i=2,d):I===91?(e.consume(I),i=5,a=0,g):st(I)?(e.consume(I),i=4,r.interrupt?t:E):n(I)}function d(I){return I===45?(e.consume(I),r.interrupt?t:E):n(I)}function g(I){const fe="CDATA[";return I===fe.charCodeAt(a++)?(e.consume(I),a===fe.length?r.interrupt?t:k:g):n(I)}function A(I){return st(I)?(e.consume(I),s=String.fromCharCode(I),v):n(I)}function v(I){if(I===null||I===47||I===62||qe(I)){const fe=I===47,he=s.toLowerCase();return!fe&&!o&&Io.includes(he)?(i=1,r.interrupt?t(I):k(I)):Uh.includes(s.toLowerCase())?(i=6,fe?(e.consume(I),w):r.interrupt?t(I):k(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):o?R(I):M(I))}return I===45||Qe(I)?(e.consume(I),s+=String.fromCharCode(I),v):n(I)}function w(I){return I===62?(e.consume(I),r.interrupt?t:k):n(I)}function R(I){return we(I)?(e.consume(I),R):m(I)}function M(I){return I===47?(e.consume(I),m):I===58||I===95||st(I)?(e.consume(I),C):we(I)?(e.consume(I),M):m(I)}function C(I){return I===45||I===46||I===58||I===95||Qe(I)?(e.consume(I),C):O(I)}function O(I){return I===61?(e.consume(I),h):we(I)?(e.consume(I),O):M(I)}function h(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),l=I,S):we(I)?(e.consume(I),h):x(I)}function S(I){return I===l?(e.consume(I),l=null,y):I===null||ie(I)?n(I):(e.consume(I),S)}function x(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||qe(I)?O(I):(e.consume(I),x)}function y(I){return I===47||I===62||we(I)?M(I):n(I)}function m(I){return I===62?(e.consume(I),T):n(I)}function T(I){return I===null||ie(I)?k(I):we(I)?(e.consume(I),T):n(I)}function k(I){return I===45&&i===2?(e.consume(I),P):I===60&&i===1?(e.consume(I),$):I===62&&i===4?(e.consume(I),ae):I===63&&i===3?(e.consume(I),E):I===93&&i===5?(e.consume(I),X):ie(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Vh,ce,B)(I)):I===null||ie(I)?(e.exit("htmlFlowData"),B(I)):(e.consume(I),k)}function B(I){return e.check(Hh,j,ce)(I)}function j(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),D}function D(I){return I===null||ie(I)?B(I):(e.enter("htmlFlowData"),k(I))}function P(I){return I===45?(e.consume(I),E):k(I)}function $(I){return I===47?(e.consume(I),s="",W):k(I)}function W(I){if(I===62){const fe=s.toLowerCase();return Io.includes(fe)?(e.consume(I),ae):k(I)}return st(I)&&s.length<8?(e.consume(I),s+=String.fromCharCode(I),W):k(I)}function X(I){return I===93?(e.consume(I),E):k(I)}function E(I){return I===62?(e.consume(I),ae):I===45&&i===2?(e.consume(I),E):k(I)}function ae(I){return I===null||ie(I)?(e.exit("htmlFlowData"),ce(I)):(e.consume(I),ae)}function ce(I){return e.exit("htmlFlow"),t(I)}}function qh(e,t,n){const r=this;return i;function i(s){return ie(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Yh(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Wn,t,n)}}const Kh={name:"htmlText",tokenize:Wh};function Wh(e,t,n){const r=this;let i,o,s;return a;function a(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),l}function l(E){return E===33?(e.consume(E),u):E===47?(e.consume(E),O):E===63?(e.consume(E),M):st(E)?(e.consume(E),x):n(E)}function u(E){return E===45?(e.consume(E),c):E===91?(e.consume(E),o=0,g):st(E)?(e.consume(E),R):n(E)}function c(E){return E===45?(e.consume(E),d):n(E)}function f(E){return E===null?n(E):E===45?(e.consume(E),p):ie(E)?(s=f,$(E)):(e.consume(E),f)}function p(E){return E===45?(e.consume(E),d):f(E)}function d(E){return E===62?P(E):E===45?p(E):f(E)}function g(E){const ae="CDATA[";return E===ae.charCodeAt(o++)?(e.consume(E),o===ae.length?A:g):n(E)}function A(E){return E===null?n(E):E===93?(e.consume(E),v):ie(E)?(s=A,$(E)):(e.consume(E),A)}function v(E){return E===93?(e.consume(E),w):A(E)}function w(E){return E===62?P(E):E===93?(e.consume(E),w):A(E)}function R(E){return E===null||E===62?P(E):ie(E)?(s=R,$(E)):(e.consume(E),R)}function M(E){return E===null?n(E):E===63?(e.consume(E),C):ie(E)?(s=M,$(E)):(e.consume(E),M)}function C(E){return E===62?P(E):M(E)}function O(E){return st(E)?(e.consume(E),h):n(E)}function h(E){return E===45||Qe(E)?(e.consume(E),h):S(E)}function S(E){return ie(E)?(s=S,$(E)):we(E)?(e.consume(E),S):P(E)}function x(E){return E===45||Qe(E)?(e.consume(E),x):E===47||E===62||qe(E)?y(E):n(E)}function y(E){return E===47?(e.consume(E),P):E===58||E===95||st(E)?(e.consume(E),m):ie(E)?(s=y,$(E)):we(E)?(e.consume(E),y):P(E)}function m(E){return E===45||E===46||E===58||E===95||Qe(E)?(e.consume(E),m):T(E)}function T(E){return E===61?(e.consume(E),k):ie(E)?(s=T,$(E)):we(E)?(e.consume(E),T):y(E)}function k(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,B):ie(E)?(s=k,$(E)):we(E)?(e.consume(E),k):(e.consume(E),j)}function B(E){return E===i?(e.consume(E),i=void 0,D):E===null?n(E):ie(E)?(s=B,$(E)):(e.consume(E),B)}function j(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||qe(E)?y(E):(e.consume(E),j)}function D(E){return E===47||E===62||qe(E)?y(E):n(E)}function P(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function $(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),W}function W(E){return we(E)?Ie(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):X(E)}function X(E){return e.enter("htmlTextData"),s(E)}}const gi={name:"labelEnd",resolveAll:Jh,resolveTo:em,tokenize:tm},Xh={tokenize:nm},Zh={tokenize:rm},Qh={tokenize:im};function Jh(e){let t=-1;const n=[];for(;++t=3&&(u===null||ie(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),we(u)?Ie(e,a,"whitespace")(u):a(u))}}const Ge={continuation:{tokenize:hm},exit:gm,name:"list",tokenize:pm},fm={partial:!0,tokenize:ym},dm={partial:!0,tokenize:mm};function pm(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(d){const g=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Kr(d)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Ln,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return Kr(d)&&++s<10?(e.consume(d),l):(!r.interrupt||s<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Wn,r.interrupt?n:c,e.attempt(fm,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return we(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function hm(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Wn,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ie(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!we(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dm,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ie(e,e.attempt(Ge,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function mm(e,t,n){const r=this;return Ie(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function gm(e){e.exit(this.containerState.type)}function ym(e,t,n){const r=this;return Ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!we(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Ro={name:"setextUnderline",resolveTo:xm,tokenize:bm};function xm(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function bm(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),we(u)?Ie(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ie(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const vm={tokenize:wm};function wm(e){const t=this,n=e.attempt(Wn,r,e.attempt(this.parser.constructs.flowInitial,i,Ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Mh,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Tm={resolveAll:ha()},Am=pa("string"),km=pa("text");function pa(e){return{resolveAll:ha(e==="text"?Em:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function Fm(e,t){let n=-1;const r=[];let i;for(;++n0){const je=ne.tokenStack[ne.tokenStack.length-1];(je[1]||Po).call(ne,void 0,je[0])}for(W.position={start:vt(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:vt(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function rg(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ig(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ya(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function og(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ya(e,t);const i={src:Wt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function sg(e,t){const n={src:Wt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ag(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function lg(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ya(e,t);const i={href:Wt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function ug(e,t){const n={href:Wt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cg(e,t,n){const r=e.all(t),i=n?fg(n):ba(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a0){const je=ne.tokenStack[ne.tokenStack.length-1];(je[1]||Oo).call(ne,void 0,je[0])}for(K.position={start:vt(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:vt(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},xe=-1;++xe1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function tg(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ng(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ya(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function rg(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ya(e,t);const i={src:Kt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function ig(e,t){const n={src:Kt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function og(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function sg(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ya(e,t);const i={href:Kt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function ag(e,t){const n={href:Kt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lg(e,t,n){const r=e.all(t),i=n?ug(n):xa(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1}function dg(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.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 gg(e){const t=va(e),n=xa(e);if(t&&n)return{start:t,end:n}}function yg(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=va(t.children[1]),l=xa(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function bg(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Fo(t.slice(i),i>0,!1)),o.join("")}function Fo(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Do||o===zo;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Do||o===zo;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function wg(e,t){const n={type:"text",value:vg(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Tg(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Ag={blockquote:Zm,break:Qm,code:Jm,delete:eg,emphasis:tg,footnoteReference:ng,heading:rg,html:ig,imageReference:og,image:sg,inlineCode:ag,linkReference:lg,link:ug,listItem:cg,list:dg,paragraph:pg,root:hg,strong:mg,table:yg,tableCell:xg,tableRow:bg,text:wg,thematicBreak:Tg,toml:In,yaml:In,definition:In,footnoteDefinition:In};function In(){}const Ta=-1,Xn=0,jn=1,Vn=2,bi=3,xi=4,vi=5,wi=6,Aa=7,ka=8,Bo=typeof self=="object"?self:globalThis,kg=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Xn:case Ta:return n(s,i);case jn:{const a=n([],i);for(const l of s)a.push(r(l));return a}case Vn:{const a=n({},i);for(const[l,u]of s)a[r(l)]=r(u);return a}case bi:return n(new Date(s),i);case xi:{const{source:a,flags:l}=s;return n(new RegExp(a,l),i)}case vi:{const a=n(new Map,i);for(const[l,u]of s)a.set(r(l),r(u));return a}case wi:{const a=n(new Set,i);for(const l of s)a.add(r(l));return a}case Aa:{const{name:a,message:l}=s;return n(new Bo[a](l),i)}case ka:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new Bo[o](s),i)};return r},Uo=e=>kg(new Map,e)(0),zt="",{toString:Eg}={},{keys:Mg}=Object,nn=e=>{const t=typeof e;if(t!=="object"||!e)return[Xn,t];const n=Eg.call(e).slice(8,-1);switch(n){case"Array":return[jn,zt];case"Object":return[Vn,zt];case"Date":return[bi,zt];case"RegExp":return[xi,zt];case"Map":return[vi,zt];case"Set":return[wi,zt]}return n.includes("Array")?[jn,n]:n.includes("Error")?[Aa,n]:[Vn,n]},Rn=([e,t])=>e===Xn&&(t==="function"||t==="symbol"),_g=(e,t,n,r)=>{const i=(s,a)=>{const l=r.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=nn(s);switch(a){case Xn:{let c=s;switch(l){case"bigint":a=ka,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([Ta],s)}return i([a,c],s)}case jn:{if(l)return i([l,[...s]],s);const c=[],f=i([a,c],s);for(const p of s)c.push(o(p));return f}case Vn:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],f=i([a,c],s);for(const p of Mg(s))(e||!Rn(nn(s[p])))&&c.push([o(p),o(s[p])]);return f}case bi:return i([a,s.toISOString()],s);case xi:{const{source:c,flags:f}=s;return i([a,{source:c,flags:f}],s)}case vi:{const c=[],f=i([a,c],s);for(const[p,d]of s)(e||!(Rn(nn(p))||Rn(nn(d))))&&c.push([o(p),o(d)]);return f}case wi:{const c=[],f=i([a,c],s);for(const p of s)(e||!Rn(nn(p)))&&c.push(o(p));return f}}const{message:u}=s;return i([a,{name:l,message:u}],s)};return o},jo=(e,{json:t,lossy:n}={})=>{const r=[];return _g(!(t||n),!!t,new Map,r)(e),r},Hn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Uo(jo(e,t)):structuredClone(e):(e,t)=>Uo(jo(e,t));function Sg(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ig(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Rg(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Sg,r=e.options.footnoteBackLabel||Ig,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&g.push({type:"text",value:" "});let R=typeof n=="string"?n:n(l,d);typeof R=="string"&&(R={type:"text",value:R}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const v=c[c.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const R=v.children[v.children.length-1];R&&R.type==="text"?R.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else c.push(...g);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(u,w),a.push(w)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Hn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function ug(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r1}function cg(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.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 hg(e){const t=va(e),n=ba(e);if(t&&n)return{start:t,end:n}}function mg(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=va(t.children[1]),l=ba(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function gg(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(zo(t.slice(i),i>0,!1)),o.join("")}function zo(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Po||o===Do;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Po||o===Do;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function bg(e,t){const n={type:"text",value:xg(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vg(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const wg={blockquote:Wm,break:Xm,code:Zm,delete:Qm,emphasis:Jm,footnoteReference:eg,heading:tg,html:ng,imageReference:rg,image:ig,inlineCode:og,linkReference:sg,link:ag,listItem:lg,list:cg,paragraph:fg,root:dg,strong:pg,table:mg,tableCell:yg,tableRow:gg,text:bg,thematicBreak:vg,toml:In,yaml:In,definition:In,footnoteDefinition:In};function In(){}const Ta=-1,Xn=0,jn=1,Vn=2,yi=3,xi=4,bi=5,vi=6,Aa=7,ka=8,Fo=typeof self=="object"?self:globalThis,Tg=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Xn:case Ta:return n(s,i);case jn:{const a=n([],i);for(const l of s)a.push(r(l));return a}case Vn:{const a=n({},i);for(const[l,u]of s)a[r(l)]=r(u);return a}case yi:return n(new Date(s),i);case xi:{const{source:a,flags:l}=s;return n(new RegExp(a,l),i)}case bi:{const a=n(new Map,i);for(const[l,u]of s)a.set(r(l),r(u));return a}case vi:{const a=n(new Set,i);for(const l of s)a.add(r(l));return a}case Aa:{const{name:a,message:l}=s;return n(new Fo[a](l),i)}case ka:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new Fo[o](s),i)};return r},Bo=e=>Tg(new Map,e)(0),zt="",{toString:Ag}={},{keys:kg}=Object,tn=e=>{const t=typeof e;if(t!=="object"||!e)return[Xn,t];const n=Ag.call(e).slice(8,-1);switch(n){case"Array":return[jn,zt];case"Object":return[Vn,zt];case"Date":return[yi,zt];case"RegExp":return[xi,zt];case"Map":return[bi,zt];case"Set":return[vi,zt]}return n.includes("Array")?[jn,n]:n.includes("Error")?[Aa,n]:[Vn,n]},Rn=([e,t])=>e===Xn&&(t==="function"||t==="symbol"),Eg=(e,t,n,r)=>{const i=(s,a)=>{const l=r.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=tn(s);switch(a){case Xn:{let c=s;switch(l){case"bigint":a=ka,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([Ta],s)}return i([a,c],s)}case jn:{if(l)return i([l,[...s]],s);const c=[],f=i([a,c],s);for(const p of s)c.push(o(p));return f}case Vn:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],f=i([a,c],s);for(const p of kg(s))(e||!Rn(tn(s[p])))&&c.push([o(p),o(s[p])]);return f}case yi:return i([a,s.toISOString()],s);case xi:{const{source:c,flags:f}=s;return i([a,{source:c,flags:f}],s)}case bi:{const c=[],f=i([a,c],s);for(const[p,d]of s)(e||!(Rn(tn(p))||Rn(tn(d))))&&c.push([o(p),o(d)]);return f}case vi:{const c=[],f=i([a,c],s);for(const p of s)(e||!Rn(tn(p)))&&c.push(o(p));return f}}const{message:u}=s;return i([a,{name:l,message:u}],s)};return o},Uo=(e,{json:t,lossy:n}={})=>{const r=[];return Eg(!(t||n),!!t,new Map,r)(e),r},Hn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Bo(Uo(e,t)):structuredClone(e):(e,t)=>Bo(Uo(e,t));function Mg(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function _g(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Sg(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Mg,r=e.options.footnoteBackLabel||_g,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&g.push({type:"text",value:" "});let R=typeof n=="string"?n:n(l,d);typeof R=="string"&&(R={type:"text",value:R}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const v=c[c.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const R=v.children[v.children.length-1];R&&R.type==="text"?R.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else c.push(...g);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(u,w),a.push(w)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Hn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:` -`}]}}const Ea=function(e){if(e==null)return Og;if(typeof e=="function")return Zn(e);if(typeof e=="object")return Array.isArray(e)?Cg(e):Ng(e);if(typeof e=="string")return Lg(e);throw new Error("Expected function, string, or object as test")};function Cg(e){const t=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let d=Ma,g,A,v;if((!t||o(l,u,c[c.length-1]||void 0))&&(d=Bg(n(l,c)),d[0]===Vo))return d;if("children"in l&&l.children){const w=l;if(w.children&&d[0]!==zg)for(A=(r?w.children.length:-1)+s,v=c.concat(w);A>-1&&A":""))+")"})}return p;function p(){let d=Ma,g,A,v;if((!t||o(l,u,c[c.length-1]||void 0))&&(d=zg(n(l,c)),d[0]===jo))return d;if("children"in l&&l.children){const w=l;if(w.children&&d[0]!==Pg)for(A=(r?w.children.length:-1)+s,v=c.concat(w);A>-1&&A0&&n.push({type:"text",value:` -`}),n}function Ho(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Go(e,t){const n=Vg(e,t),r=n.one(e,void 0),i=Rg(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` -`},i),o}function Yg(e,t){return e&&"run"in e?async function(n,r){const i=Go(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Go(n,{file:r,...e||t})}}function $o(e){if(e)throw e}var Tr,qo;function Kg(){if(qo)return Tr;qo=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var c=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},s=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},a=function(u,c){if(c==="__proto__")if(e.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return Tr=function l(){var u,c,f,p,d,g,A=arguments[0],v=1,w=arguments.length,R=!1;for(typeof A=="boolean"&&(R=A,A=arguments[1]||{},v=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});vs.length;let l;a&&s.push(i);try{l=e.apply(this,s)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}class Ke extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=an(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ke.prototype.file="";Ke.prototype.name="";Ke.prototype.reason="";Ke.prototype.message="";Ke.prototype.stack="";Ke.prototype.column=void 0;Ke.prototype.line=void 0;Ke.prototype.ancestors=void 0;Ke.prototype.cause=void 0;Ke.prototype.fatal=void 0;Ke.prototype.place=void 0;Ke.prototype.ruleId=void 0;Ke.prototype.source=void 0;const ot={basename:Qg,dirname:Jg,extname:ey,join:ty,sep:"/"};function Qg(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bn(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Jg(e){if(bn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function ey(e){bn(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ty(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ry(e,t){let n="",r=0,i=-1,o=0,s=-1,a,l;for(;++s<=e.length;){if(s2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function bn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const iy={cwd:oy};function oy(){return"/"}function Jr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function sy(e){if(typeof e=="string")e=new URL(e);else if(!Jr(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ay(e)}function ay(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[d,...g]=c;const A=r[p][1];Qr(A)&&Qr(d)&&(d=Ar(!0,A,d)),r[p]=[u,d,...g]}}}}const dy=new Ti().freeze();function _r(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Sr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ir(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ko(e){if(!Qr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Wo(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cn(e){return py(e)?e:new ly(e)}function py(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function hy(e){return typeof e=="string"||my(e)}function my(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function gy(){const e=dy().use(Xm).use(Yg).use(Gp);return{process:t=>e.processSync(t).toString()}}const yy={relative:""},by={"h-full":"","w-full":""},xy={key:0,class:"animate-stripe",absolute:"",left:"1/2",bottom:"20%",z:"20","rounded-2xl":"",text:"primary-600","px-2":"","py-2":"",transform:"translate-x--1/2"},vy={bg:"primary-50","rounded-xl":"","px-10":"","py-6":""},wy=["innerHTML"],Ty=Je({__name:"Stage",props:{paused:{type:Boolean,default:!1}},setup(e){const t=Q(),n=Q(),{stageView:r,elevenLabsApiKey:i,elevenlabsVoiceEnglish:o,elevenlabsVoiceJapanese:s}=Ut(ln()),{mouthOpenSize:a}=Ut(mu()),{audioContext:l,calculateVolume:u}=hu(),{onBeforeMessageComposed:c,onBeforeSend:f,onTokenLiteral:p,onTokenSpecial:d,onStreamEnd:g,streamingMessage:A,onAssistantResponseEnd:v}=Au(),{process:w}=gy(),{locale:R}=ei(),M=Q(),C=Q(!1),O=Q(!1),h=nr({handlers:[P=>new Promise(G=>{const X=l.createBufferSource();X.buffer=P.data.audioBuffer,X.connect(l.destination),X.connect(M.value),C.value=!0,X.start(0),X.onended=()=>{C.value=!1,G()}})]}),k=nr({handlers:[async P=>{let G=jl.Camilla_KM;R.value==="jp"||R.value==="jp-JP"?G=s.value:G=o.value;const X=Date.now(),H=Ha(i.value,"https://unspeech.hyp3r.link/v1/"),E=await _d({...H.speech("eleven_multilingual_v2",{voiceSettings:{stability:.4,similarityBoost:.5}}),input:P.data,voice:Vl[G]}),ae=Date.now()-X;console.debug("TTS took",ae,"ms");const ce=await l.decodeAudioData(E);await h.add({audioBuffer:ce,text:P.data})}]});k.on("add",P=>{console.debug("ttsQueue added",P)});const b=Kl(k),{live2dCurrentMotion:y}=Ut(ln()),m=nr({handlers:[async P=>{if(r.value==="3d"){const G=tu[P.data];if(!G)return;await n.value.setExpression(G)}else r.value==="2d"&&(y.value={group:nu[P.data]})}]}),T=Wl(m);T.onHandlerEvent("emotion",P=>{console.debug("emotion detected",P)});const S=Xl();S.onHandlerEvent("delay",P=>{console.debug("delay detected",P)});function B(){requestAnimationFrame(B),C.value&&(a.value=u(M.value,"linear"))}function U(){O.value||(B(),l.resume(),O.value=!0)}function F(){M.value||(M.value=l.createAnalyser())}return c(async()=>{F(),U()}),f(async()=>{y.value={group:Pi}}),p(async P=>{await b.add(P)}),d(async P=>{await S.add(P),await T.add(P)}),g(async()=>{await S.add(Zl)}),v(async P=>{}),Nt(()=>{var G,X,H;O.value=!1;const P=window;(G=P.electron)==null||G.ipcRenderer.removeAllListeners("before-hide"),(X=P.electron)==null||X.ipcRenderer.removeAllListeners("after-show"),(H=P.electron)==null||H.ipcRenderer.removeAllListeners("before-quit")}),qt(()=>{var G,X,H;const P=window;(G=P.electron)==null||G.ipcRenderer.on("before-hide",()=>{y.value={group:Jl}}),(X=P.electron)==null||X.ipcRenderer.on("after-show",()=>{y.value={group:eu}}),(H=P.electron)==null||H.ipcRenderer.on("before-quit",()=>{y.value={group:Pi}})}),qt(async()=>{t.value=Fa("duckdb-wasm://?bundles=import-url"),await t.value.execute(Ba`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(P,G)=>(Me(),Ce("div",yy,[j("div",by,[Z(r)==="2d"?(Me(),un(Nu,{key:0,"mouth-open-size":Z(a),"min-w":"50% {l&&l.length>0&&(r.live2dMotionMap={},r.live2dModelFile=l[0],r.live2dLoadSource="file",r.loadingLive2dModel=!0)}),Pe(()=>r.loadingLive2dModel,l=>{l||r.live2dLoadSource==="file"&&r.availableLive2dMotions.forEach(u=>{u.motionName in Di?r.live2dMotionMap[u.fileName]=u.motionName:r.live2dMotionMap[u.fileName]=ru})});async function o(l,u){if(!Object.keys(u).length)return l;const f=await new Ua().loadAsync(l),p=Object.keys(f.files).find(w=>w.endsWith("model3.json"));if(!p)throw new Error("model3.json not found");const d=await f.file(p).async("string"),g=JSON.parse(d),A={};Object.entries(u).forEach(([w,R])=>{if(A[R]){A[R].push({File:w});return}A[R]=[{File:w}]}),g.FileReferences.Motions=A,f.file(p,JSON.stringify(g,null,2));const v=await f.generateAsync({type:"blob"});return new File([v],l.name,{type:l.type,lastModified:l.lastModified})}async function s(){const l=await Nr.getItem("live2dModel");if(!l)return;const u=await o(l,r.live2dMotionMap);r.live2dModelFile=u,r.live2dLoadSource="file",r.loadingLive2dModel=!0}const a=$l(r.live2dModelFile);return(l,u)=>(Me(),Ce("div",null,[Ne(Z(Un),{"w-full":"",default:!0},{trigger:$e(c=>[j("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:f=>c.setVisible(!c.visible)},[j("div",ky,[u[3]||(u[3]=j("div",{"i-solar:magic-stick-3-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"},null,-1)),j("div",null,Ae(Z(t)("settings.live2d.change-model.title")),1)]),j("div",{transform:"",transition:"transform duration-250",class:cn({"rotate-180":c.visible})},u[4]||(u[4]=[j("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,Ay)]),default:$e(()=>[j("div",Ey,[j("div",My,[j("div",_y,[j("div",null,[j("div",Sy,Ae(Z(t)("settings.live2d.change-model.from-url")),1)]),j("div",null,[On(j("input",{"onUpdate:modelValue":u[0]||(u[0]=c=>i.value=c),disabled:Z(r).loadingLive2dModel,type:"text",rounded:"",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:Z(t)("settings.live2d.change-model.from-url-placeholder")},null,8,Iy),[[ql,i.value]]),j("button",{disabled:Z(r).loadingLive2dModel,bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","ml-2":"",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:u[1]||(u[1]=c=>Z(r).live2dModelUrl=i.value)},Ae(Z(t)("settings.live2d.change-model.from-url-confirm")),9,Ry)])]),j("div",Cy,[j("div",null,[j("div",Ny,Ae(Z(t)("settings.live2d.change-model.from-file")),1)]),j("button",{disabled:Z(r).loadingLive2dModel,rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:u[2]||(u[2]=c=>Z(n).open())},Ae(Z(t)("settings.live2d.change-model.from-file-select")),9,Ly)])])])]),_:1}),Ne(Z(Un),{"mt-4":"","w-full":"",default:!0},{trigger:$e(c=>[j("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:f=>c.setVisible(!c.visible)},[u[6]||(u[6]=j("div",{flex:"~ row 1","items-center":"","gap-1.5":""},[j("div",{"i-solar:face-scan-circle-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"}),j("div",null," Edit motion map ")],-1)),j("div",{transform:"",transition:"transform duration-250",class:cn({"rotate-180":c.visible})},u[5]||(u[5]=[j("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,Oy)]),default:$e(()=>{var c;return[j("div",Py,[Z(r).live2dLoadSource==="file"?(Me(),Ce("div",Dy,[(Me(!0),Ce(Or,null,Oi(Z(r).availableLive2dMotions,f=>(Me(),Ce("div",{key:f.fileName,class:"flex items-center justify-between"},[j("div",zy,Ae(f.fileName),1),j("div",Fy,[On(j("select",{"onUpdate:modelValue":p=>Z(r).live2dMotionMap[f.fileName]=p},[(Me(!0),Ce(Or,null,Oi(Object.keys(Z(Di)),p=>(Me(),Ce("option",{key:p},Ae(p),1))),128))],8,By),[[Yl,Z(r).live2dMotionMap[f.fileName]]]),j("button",{disabled:Z(r).loadingLive2dModel,rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:p=>Z(r).live2dCurrentMotion={group:f.motionName,index:f.motionIndex}}," Play ",8,Uy)])]))),128)),j("button",{disabled:Z(r).loadingLive2dModel,"w-full":"",rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250",onClick:s}," Save and patch ",8,jy),j("a",{"mt-2":"",block:"",href:Z(a),download:`${(c=Z(r).live2dModelFile)==null?void 0:c.name}-motion-edited.zip`},[j("button",{disabled:Z(r).loadingLive2dModel,"w-full":"",rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250"}," Export ",8,Hy)],8,Vy)])):(Me(),Ce("div",Gy," Not available for URL model "))])]}),_:1})]))}});export{e0 as W,t0 as _,gy as a,hu as b,Au as u}; +`}),n}function Vo(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ho(e,t){const n=Ug(e,t),r=n.one(e,void 0),i=Sg(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` +`},i),o}function $g(e,t){return e&&"run"in e?async function(n,r){const i=Ho(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ho(n,{file:r,...e||t})}}function Go(e){if(e)throw e}var Tr,$o;function qg(){if($o)return Tr;$o=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var c=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},s=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},a=function(u,c){if(c==="__proto__")if(e.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return Tr=function l(){var u,c,f,p,d,g,A=arguments[0],v=1,w=arguments.length,R=!1;for(typeof A=="boolean"&&(R=A,A=arguments[1]||{},v=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});vs.length;let l;a&&s.push(i);try{l=e.apply(this,s)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}class Ke extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=an(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ke.prototype.file="";Ke.prototype.name="";Ke.prototype.reason="";Ke.prototype.message="";Ke.prototype.stack="";Ke.prototype.column=void 0;Ke.prototype.line=void 0;Ke.prototype.ancestors=void 0;Ke.prototype.cause=void 0;Ke.prototype.fatal=void 0;Ke.prototype.place=void 0;Ke.prototype.ruleId=void 0;Ke.prototype.source=void 0;const ot={basename:Xg,dirname:Zg,extname:Qg,join:Jg,sep:"/"};function Xg(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xn(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Zg(e){if(xn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Qg(e){xn(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Jg(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ty(e,t){let n="",r=0,i=-1,o=0,s=-1,a,l;for(;++s<=e.length;){if(s2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function xn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ny={cwd:ry};function ry(){return"/"}function Jr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function iy(e){if(typeof e=="string")e=new URL(e);else if(!Jr(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return oy(e)}function oy(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[d,...g]=c;const A=r[p][1];Qr(A)&&Qr(d)&&(d=Ar(!0,A,d)),r[p]=[u,d,...g]}}}}const cy=new wi().freeze();function _r(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Sr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ir(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Yo(e){if(!Qr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ko(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cn(e){return fy(e)?e:new sy(e)}function fy(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function dy(e){return typeof e=="string"||py(e)}function py(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function hy(){const e=cy().use(Km).use($g).use(Vp);return{process:t=>e.processSync(t).toString()}}const my={relative:""},gy={"h-full":"","w-full":""},yy={key:0,class:"animate-stripe",absolute:"",left:"1/2",bottom:"20%",z:"20","rounded-2xl":"",text:"primary-600","px-2":"","py-2":"",transform:"translate-x--1/2"},xy={bg:"primary-50","rounded-xl":"","px-10":"","py-6":""},by=["innerHTML"],vy=Je({__name:"Stage",props:{paused:{type:Boolean,default:!1}},setup(e){const t=Q(),n=Q(),{stageView:r}=rn(ln()),{mouthOpenSize:i}=rn(pu()),{audioContext:o,calculateVolume:s}=du(),{onBeforeMessageComposed:a,onBeforeSend:l,onTokenLiteral:u,onTokenSpecial:c,onStreamEnd:f,streamingMessage:p,onAssistantResponseEnd:d}=wu(),{process:g}=hy(),A=Va(),v=Q(),w=Q(!1),R=Q(!1),M=nr({handlers:[D=>new Promise(P=>{const $=o.createBufferSource();$.buffer=D.data.audioBuffer,$.connect(o.destination),$.connect(v.value),w.value=!0,$.start(0),$.onended=()=>{w.value=!1,P()}})]}),C=tu();async function O(D){try{if(!C.activeSpeechProvider){console.warn("No active speech provider configured");return}const P=A.getProviderInstance(C.activeSpeechProvider);if(!P){console.error("Failed to initialize speech provider");return}const $=await Ed({...P.speech(C.activeSpeechModel),input:D.data,voice:C.voiceId,...C.ssmlEnabled&&{input:C.generateSSML(D.data)},voiceSettings:{stability:.4,similarityBoost:.5}}),W=await o.decodeAudioData($);await M.add({audioBuffer:W,text:D.data})}catch(P){console.error("Speech generation failed:",P)}}const h=nr({handlers:[O]});h.on("add",D=>{console.debug("ttsQueue added",D)});const S=$l(h),{live2dCurrentMotion:x}=rn(ln()),y=nr({handlers:[async D=>{if(r.value==="3d"){const P=Ql[D.data];if(!P)return;await n.value.setExpression(P)}else r.value==="2d"&&(x.value={group:Jl[D.data]})}]}),m=ql(y);m.onHandlerEvent("emotion",D=>{console.debug("emotion detected",D)});const T=Yl();T.onHandlerEvent("delay",D=>{console.debug("delay detected",D)});function k(){requestAnimationFrame(k),w.value&&(i.value=s(v.value,"linear"))}function B(){R.value||(k(),o.resume(),R.value=!0)}function j(){v.value||(v.value=o.createAnalyser())}return a(async()=>{j(),B()}),l(async()=>{x.value={group:Oi}}),u(async D=>{await S.add(D)}),c(async D=>{await T.add(D),await m.add(D)}),f(async()=>{await T.add(Kl)}),d(async D=>{}),Nt(()=>{var P,$,W;R.value=!1;const D=window;(P=D.electron)==null||P.ipcRenderer.removeAllListeners("before-hide"),($=D.electron)==null||$.ipcRenderer.removeAllListeners("after-show"),(W=D.electron)==null||W.ipcRenderer.removeAllListeners("before-quit")}),$t(()=>{var P,$,W;const D=window;(P=D.electron)==null||P.ipcRenderer.on("before-hide",()=>{x.value={group:Xl}}),($=D.electron)==null||$.ipcRenderer.on("after-show",()=>{x.value={group:Zl}}),(W=D.electron)==null||W.ipcRenderer.on("before-quit",()=>{x.value={group:Oi}})}),$t(async()=>{t.value=Fa("duckdb-wasm://?bundles=import-url"),await t.value.execute(Ba`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(D,P)=>(Me(),Ce("div",my,[U("div",gy,[Z(r)==="2d"?(Me(),un(Ru,{key:0,"mouth-open-size":Z(i),"min-w":"50% {l&&l.length>0&&(r.live2dMotionMap={},r.live2dModelFile=l[0],r.live2dLoadSource="file",r.loadingLive2dModel=!0)}),Pe(()=>r.loadingLive2dModel,l=>{l||r.live2dLoadSource==="file"&&r.availableLive2dMotions.forEach(u=>{u.motionName in Pi?r.live2dMotionMap[u.fileName]=u.motionName:r.live2dMotionMap[u.fileName]=eu})});async function o(l,u){if(!Object.keys(u).length)return l;const f=await new Ua().loadAsync(l),p=Object.keys(f.files).find(w=>w.endsWith("model3.json"));if(!p)throw new Error("model3.json not found");const d=await f.file(p).async("string"),g=JSON.parse(d),A={};Object.entries(u).forEach(([w,R])=>{if(A[R]){A[R].push({File:w});return}A[R]=[{File:w}]}),g.FileReferences.Motions=A,f.file(p,JSON.stringify(g,null,2));const v=await f.generateAsync({type:"blob"});return new File([v],l.name,{type:l.type,lastModified:l.lastModified})}async function s(){const l=await Nr.getItem("live2dModel");if(!l)return;const u=await o(l,r.live2dMotionMap);r.live2dModelFile=u,r.live2dLoadSource="file",r.loadingLive2dModel=!0}const a=Vl(r.live2dModelFile);return(l,u)=>(Me(),Ce("div",null,[Ne(Z(Un),{"w-full":"",default:!0},{trigger:$e(c=>[U("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:f=>c.setVisible(!c.visible)},[U("div",Ty,[u[3]||(u[3]=U("div",{"i-solar:magic-stick-3-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"},null,-1)),U("div",null,Ae(Z(t)("settings.live2d.change-model.title")),1)]),U("div",{transform:"",transition:"transform duration-250",class:cn({"rotate-180":c.visible})},u[4]||(u[4]=[U("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,wy)]),default:$e(()=>[U("div",Ay,[U("div",ky,[U("div",Ey,[U("div",null,[U("div",My,Ae(Z(t)("settings.live2d.change-model.from-url")),1)]),U("div",null,[On(U("input",{"onUpdate:modelValue":u[0]||(u[0]=c=>i.value=c),disabled:Z(r).loadingLive2dModel,type:"text",rounded:"",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:Z(t)("settings.live2d.change-model.from-url-placeholder")},null,8,_y),[[Hl,i.value]]),U("button",{disabled:Z(r).loadingLive2dModel,bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","ml-2":"",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:u[1]||(u[1]=c=>Z(r).live2dModelUrl=i.value)},Ae(Z(t)("settings.live2d.change-model.from-url-confirm")),9,Sy)])]),U("div",Iy,[U("div",null,[U("div",Ry,Ae(Z(t)("settings.live2d.change-model.from-file")),1)]),U("button",{disabled:Z(r).loadingLive2dModel,rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:u[2]||(u[2]=c=>Z(n).open())},Ae(Z(t)("settings.live2d.change-model.from-file-select")),9,Cy)])])])]),_:1}),Ne(Z(Un),{"mt-4":"","w-full":"",default:!0},{trigger:$e(c=>[U("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:f=>c.setVisible(!c.visible)},[u[6]||(u[6]=U("div",{flex:"~ row 1","items-center":"","gap-1.5":""},[U("div",{"i-solar:face-scan-circle-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"}),U("div",null," Edit motion map ")],-1)),U("div",{transform:"",transition:"transform duration-250",class:cn({"rotate-180":c.visible})},u[5]||(u[5]=[U("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,Ny)]),default:$e(()=>{var c;return[U("div",Ly,[Z(r).live2dLoadSource==="file"?(Me(),Ce("div",Oy,[(Me(!0),Ce(Or,null,Li(Z(r).availableLive2dMotions,f=>(Me(),Ce("div",{key:f.fileName,class:"flex items-center justify-between"},[U("div",Py,Ae(f.fileName),1),U("div",Dy,[On(U("select",{"onUpdate:modelValue":p=>Z(r).live2dMotionMap[f.fileName]=p},[(Me(!0),Ce(Or,null,Li(Object.keys(Z(Pi)),p=>(Me(),Ce("option",{key:p},Ae(p),1))),128))],8,zy),[[Gl,Z(r).live2dMotionMap[f.fileName]]]),U("button",{disabled:Z(r).loadingLive2dModel,rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:p=>Z(r).live2dCurrentMotion={group:f.motionName,index:f.motionIndex}}," Play ",8,Fy)])]))),128)),U("button",{disabled:Z(r).loadingLive2dModel,"w-full":"",rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250",onClick:s}," Save and patch ",8,By),U("a",{"mt-2":"",block:"",href:Z(a),download:`${(c=Z(r).live2dModelFile)==null?void 0:c.name}-motion-edited.zip`},[U("button",{disabled:Z(r).loadingLive2dModel,"w-full":"",rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250"}," Export ",8,jy)],8,Uy)])):(Me(),Ce("div",Vy," Not available for URL model "))])]}),_:1})]))}});export{Jy as W,e0 as _,hy as a,du as b,wu as u}; diff --git a/assets/MobileInteractiveArea-C9fsJcq-.css b/assets/MobileInteractiveArea-olUfoEr4.css similarity index 70% rename from assets/MobileInteractiveArea-C9fsJcq-.css rename to assets/MobileInteractiveArea-olUfoEr4.css index 900d8a7ea40830c15f60b5c60490e76312f8c41c..91ea6836023a8cc69e6b8a410ddf6e0a3cb52753 100644 --- a/assets/MobileInteractiveArea-C9fsJcq-.css +++ b/assets/MobileInteractiveArea-olUfoEr4.css @@ -1 +1 @@ -.animate-stripe[data-v-79ad68e9]{background-image:repeating-linear-gradient(-45deg,#a16207,#a16207 25px,#eab308 25px,#eab308 50px);background-size:175% 100%}.animate-stripe[data-v-79ad68e9]:hover{animation:progress-79ad68e9 2s linear infinite}@-webkit-keyframes progress-79ad68e9{0%{background-position:0 0}to{background-position:-75px 0px}}@-moz-keyframes progress-79ad68e9{0%{background-position:0 0}to{background-position:-75px 0px}}@-ms-keyframes progress-79ad68e9{0%{background-position:0 0}to{background-position:-75px 0px}}@keyframes progress-79ad68e9{0%{background-position:0 0}to{background-position:-70px 0px}}.theme-colored[data-v-2d5e277e]{filter:hue-rotate(calc(var(--theme-colors-hue, 0) * 1deg))}.slide-forward-enter-active[data-v-2a32d08f],.slide-forward-leave-active[data-v-2a32d08f]{transition:all .2s ease;position:absolute;width:100%}.slide-forward-enter-from[data-v-2a32d08f]{transform:translate(100%)}.slide-forward-leave-to[data-v-2a32d08f]{transform:translate(-30%);opacity:0}.slide-forward-enter-to[data-v-2a32d08f],.slide-forward-leave-from[data-v-2a32d08f]{transform:translate(0)}.slide-backward-enter-active[data-v-2a32d08f],.slide-backward-leave-active[data-v-2a32d08f]{transition:all .2s ease;position:absolute;width:100%}.slide-backward-enter-from[data-v-2a32d08f]{transform:translate(-30%);opacity:0}.slide-backward-leave-to[data-v-2a32d08f]{transform:translate(100%)}.slide-backward-enter-to[data-v-2a32d08f],.slide-backward-leave-from[data-v-2a32d08f]{transform:translate(0)} +.animate-stripe[data-v-e8dbc010]{background-image:repeating-linear-gradient(-45deg,#a16207,#a16207 25px,#eab308 25px,#eab308 50px);background-size:175% 100%}.animate-stripe[data-v-e8dbc010]:hover{animation:progress-e8dbc010 2s linear infinite}@-webkit-keyframes progress-e8dbc010{0%{background-position:0 0}to{background-position:-75px 0px}}@-moz-keyframes progress-e8dbc010{0%{background-position:0 0}to{background-position:-75px 0px}}@-ms-keyframes progress-e8dbc010{0%{background-position:0 0}to{background-position:-75px 0px}}@keyframes progress-e8dbc010{0%{background-position:0 0}to{background-position:-70px 0px}}.theme-colored[data-v-2d5e277e]{filter:hue-rotate(calc(var(--theme-colors-hue, 0) * 1deg))}.slide-forward-enter-active[data-v-2a32d08f],.slide-forward-leave-active[data-v-2a32d08f]{transition:all .2s ease;position:absolute;width:100%}.slide-forward-enter-from[data-v-2a32d08f]{transform:translate(100%)}.slide-forward-leave-to[data-v-2a32d08f]{transform:translate(-30%);opacity:0}.slide-forward-enter-to[data-v-2a32d08f],.slide-forward-leave-from[data-v-2a32d08f]{transform:translate(0)}.slide-backward-enter-active[data-v-2a32d08f],.slide-backward-leave-active[data-v-2a32d08f]{transition:all .2s ease;position:absolute;width:100%}.slide-backward-enter-from[data-v-2a32d08f]{transform:translate(-30%);opacity:0}.slide-backward-leave-to[data-v-2a32d08f]{transform:translate(100%)}.slide-backward-enter-to[data-v-2a32d08f],.slide-backward-leave-from[data-v-2a32d08f]{transform:translate(0)} diff --git a/assets/MobileInteractiveArea.vue_vue_type_script_setup_true_lang-DFvt4_Ml.js b/assets/MobileInteractiveArea.vue_vue_type_script_setup_true_lang-DFvt4_Ml.js new file mode 100644 index 0000000000000000000000000000000000000000..fa0914e5b8349f0aa0bc52efdf4df48dbcdccc3f --- /dev/null +++ b/assets/MobileInteractiveArea.vue_vue_type_script_setup_true_lang-DFvt4_Ml.js @@ -0,0 +1,3 @@ +import{d as N,c as $,o as b,a as f,b as S,k as z,e as m,G as _n,L as dt,g as x,M as kn,w as X,N as xn,O as $n,P as Ae,Q as On,x as fe,S as zt,U as Nt,V as le,W as Ht,z as pe,F as ke,C as Te,m as te,t as B,X as En,y as ct,v as pt,q as Ce,Y as je,T as it,A as Kt,_ as ft,i as Vt,Z as Dn,$ as ge,a0 as Pn,a1 as Ge,a2 as In,a3 as Cn,h as J,a4 as vt,a5 as Ye,a6 as Pt,a7 as Tn,a8 as Le,a9 as mt,aa as An,ab as Mn,ac as Rn,f as ne,p as Ue,j as Z,ad as Ln,ae as Un,af as xe,ag as St,ah as Fn,n as Wt,ai as Bn,aj as zn,ak as Nn,al as It,am as Hn,an as Kn,ao as Vn,ap as Sn,aq as Wn,J as Ct,E as Tt,B as qn}from"./index-lQIQ1Nea.js";import{H as Jn,L as Gn,a as Yn}from"./HeaderLink-Cxo-rQt1.js";import{_ as qt}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-DTJgscnz.js";import{_ as Xn}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import{u as $e,a as Jt,b as Qn,_ as Zn}from"./Live2DSettings.vue_vue_type_script_setup_true_lang-BZ13gadG.js";import{u as Gt}from"./consciousness-CCzKId_z.js";import{u as yt}from"./providers-B5WAuhMk.js";import"./emotions-D2WM87AE.js";import{d as At}from"./index-CBwQWPyY.js";import{_ as jn}from"./Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js";const ea={"mb-1":"","w-full":"","gap-2":""},ta={"w-full":""},Di=N({__name:"Header",setup(e){return(t,n)=>(b(),$("header",ea,[f("div",ta,[S(Jn)]),S(m(_n),{class:"m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-zinc-100 p-2 text-lg text-zinc-500 outline-none dark:bg-zinc-800 dark:text-zinc-400",to:"/settings"},{default:z(()=>n[0]||(n[0]=[f("div",{"i-solar:settings-minimalistic-bold-duotone":""},null,-1)])),_:1})]))}});function Yt(e,t){const n=dt(t??{},{...At.getDefaultRealTimeVADOptions("v5"),preSpeechPadFrames:30,positiveSpeechThreshold:.5,negativeSpeechThreshold:.35,minSpeechFrames:30,auto:!0}),a=x(),r=kn("microphone");async function o(){if(a.value&&(a.value.destroy(),a.value=void 0,console.warn("existing MicVAD destroyed")),!r.value)return;const i=m(e);if(!i)return;const d=await navigator.mediaDevices.getUserMedia({audio:{deviceId:i}});a.value=await At.MicVAD.new({...n,stream:d}),n.auto&&a.value.start()}return X(r,o,{immediate:!0}),X(xn(e),o,{immediate:!0}),$n(o),Ae(()=>{a.value&&(a.value.destroy(),a.value=void 0)}),{destroy:()=>{a.value&&(a.value.destroy(),a.value=void 0)},start:()=>{a.value&&a.value.start()}}}function na(e,t){const n=dt(t,{onLoading:()=>{},onInitiate:()=>{},onProgress:()=>{},onDone:()=>{},onReady:()=>{},onStart:()=>{},onUpdate:()=>{},onComplete:()=>{}}),{post:a,data:r,terminate:o}=On(e,{type:"module"}),i=x(null),d=x(""),p=x([]),v=x(!1),c=x(0),l=x("");return X(r,s=>{var y,u,h,w,k,g,_,O;switch(s.status){case"loading":i.value="loading",d.value=s.data,(y=n.onLoading)==null||y.call(n,s.data);break;case"initiate":p.value.push(s),(u=n.onInitiate)==null||u.call(n,s);break;case"progress":p.value=p.value.map(P=>P.file===s.file?{...P,...s}:P),(h=n.onProgress)==null||h.call(n,s);break;case"done":p.value=p.value.filter(P=>P.file!==s.file),(w=n.onDone)==null||w.call(n,s);break;case"ready":i.value="ready",(k=n.onReady)==null||k.call(n);break;case"start":v.value=!0,(g=n.onStart)==null||g.call(n);break;case"update":c.value=s.tps,(_=n.onUpdate)==null||_.call(n,s.tps);break;case"complete":v.value=!1,l.value=s.output[0]||"",console.debug("Whisper result:",l.value),(O=n.onComplete)==null||O.call(n,s.output[0]);break}}),Ae(()=>{o()}),{transcribe:s=>a(s),status:i,loadingMessage:d,loadingProgress:p,transcribing:v,tps:c,result:l,load:()=>a({type:"load"}),terminate:o}}const aa="/assets/worker-mw0r3G9H.js";async function ra(e,t){const n=new ArrayBuffer(44+e.length*2),a=new DataView(n);He(a,0,"RIFF"),a.setUint32(4,36+e.length*2,!0),He(a,8,"WAVE"),He(a,12,"fmt "),a.setUint32(16,16,!0),a.setUint16(20,1,!0),a.setUint16(22,1,!0),a.setUint32(24,t,!0),a.setUint32(28,t*2,!0),a.setUint16(32,2,!0),a.setUint16(34,16,!0),He(a,36,"data"),a.setUint32(40,e.length*2,!0),oa(a,44,e);const r=new Blob([a],{type:"audio/wav"});return new Promise((o,i)=>{const d=new FileReader;d.onload=()=>{const p=d.result.split(",")[1];o(p)},d.onerror=i,d.readAsDataURL(r)})}function He(e,t,n){for(let a=0;a{le().then(()=>{r.update(),o.value=r.height.value})}),p(async()=>{le().then(()=>{r.update(),o.value=r.height.value})}),(v,c)=>{const l=Ht("auto-animate");return b(),$("div",ia,[c[2]||(c[2]=f("div",{"flex-1":""},null,-1)),pe((b(),$("div",{ref_key:"chatHistoryRef",ref:t,"h-full":"","w-full":"",flex:"~ col","overflow-scroll":""},[c[1]||(c[1]=f("div",{"flex-1":""},null,-1)),(b(!0),$(ke,null,Te(m(n),(s,y)=>(b(),$("div",{key:y,"mb-2":""},[s.role==="error"?(b(),$("div",sa,[f("div",la,[f("div",ua,[f("div",da,[f("span",ca,B(v.$t("stage.chat.message.character-name.core-system")),1)]),c[0]||(c[0]=f("div",{"i-solar:danger-triangle-bold-duotone":"","text-violet-500":""},null,-1))]),m(a)?(b(),$("div",pa)):(b(),$("div",{key:1,class:"markdown-content text-violet-500",text:"base {!A||!A.trim()||await s(A,{chatProvider:o.getProviderInstance(i.value),model:d.value})}});async function P(){if(t.value.trim())try{await s(t.value,{chatProvider:o.getProviderInstance(i.value),model:d.value})}catch(A){u.value.pop(),u.value.push({role:"error",content:A.message})}}const{destroy:C,start:V}=Yt(l,{onSpeechStart:()=>{n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:A=>{n.value=!1,ue(A)},auto:!1});function ae(){_.value!=="loading"&&(g(),V())}async function ue(A){await h.resume();const I=await ra(A,h.sampleRate);k({type:"generate",data:{audio:I,language:"en"}})}async function be(A){const I=A.target,D=p.value.find(me=>me.deviceId===I.value);if(!D){v.value=void 0;return}v.value=D}return X(c,async A=>{A==="false"&&(C(),O())}),y(async()=>{t.value=""}),(A,I)=>(b(),$("div",Oa,[f("fieldset",Ea,[f("label",{class:Ce([a.value==="chat"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",a.value==="chat"?"text-primary-500 dark:text-primary-500":""]),flex:"~ row",checked:a.value==="chat","aria-checked":a.value==="chat",border:"solid l-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-l-lg":"","px-2":""},[pe(f("input",{"onUpdate:modelValue":I[0]||(I[0]=D=>a.value=D),type:"radio",name:"tab",value:"chat",hidden:""},null,512),[[je,a.value]]),I[5]||(I[5]=f("div",{"i-solar:dialog-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),f("div",Pa,[f("span",Ia,B(A.$t("stage.chat.tabs.chat")),1)])],10,Da),f("label",{class:Ce([a.value==="custom"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",a.value==="custom"?"text-primary-500 dark:text-primary-500":""]),flex:"~ row",checked:a.value==="custom","aria-checked":a.value==="custom",border:"solid t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","px-2":""},[pe(f("input",{"onUpdate:modelValue":I[1]||(I[1]=D=>a.value=D),type:"radio",name:"tab",value:"custom",hidden:""},null,512),[[je,a.value]]),I[6]||(I[6]=f("div",{"i-solar:star-fall-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),f("div",Ta,[f("span",null,B(A.$t("stage.chat.tabs.custom")),1)])],10,Ca),f("label",{class:Ce([a.value==="clothes"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",a.value==="clothes"?"text-primary-500 dark:text-primary-500":""]),flex:"~ row",checked:a.value==="clothes","aria-checked":a.value==="clothes",border:"solid r-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-r-lg":"","px-2":""},[pe(f("input",{"onUpdate:modelValue":I[2]||(I[2]=D=>a.value=D),type:"radio",name:"tab",value:"clothes",hidden:""},null,512),[[je,a.value]]),I[7]||(I[7]=f("div",{"i-solar:magic-stick-3-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),f("div",Ma,[f("span",null,B(A.$t("stage.chat.tabs.clothes")),1)])],10,Aa)]),f("div",Ra,[f("div",La,[S($a,{"h-full":"","flex-1":"","p-4":"",w:"full","max-h":"t.value=D),placeholder:m(w)("stage.message"),text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","min-h":"[100px]","w-full":"","rounded-t-xl":"","p-4":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",onSubmit:P},null,8,["modelValue","placeholder"])])])]),f("div",Fa,[f("button",{bg:"complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700",transition:"all duration-250 ease-in-out",text:"complementary-400","mb-6":"",flex:"","cursor-pointer":"","items-center":"","justify-center":"","gap-2":"","rounded-full":"","px-4":"","py-2":"",onClick:ae},[S(it,{mode:"out-in"},{default:z(()=>[m(_)===null?(b(),$("div",Ba,B(A.$t("stage.operations.load-models")),1)):m(_)==="loading"?(b(),$("div",za,[I[8]||(I[8]=f("div",{"i-svg-spinners:bouncing-ball":"",class:"text-cyan"},null,-1)),f("span",null,B(A.$t("stage.operations.load-models-status.loading")),1)])):m(_)==="ready"?(b(),$("div",Na,[I[9]||(I[9]=f("div",{"i-lucide:check":"",class:"text-cyan"},null,-1)),f("span",null,B(A.$t("stage.operations.load-models-status.ready")),1)])):te("",!0)]),_:1})]),f("div",Ha,[S(m(Xn),null,{default:z(()=>[r.value?(b(),$("fieldset",Ka,[(b(!0),$(ke,null,Te(m(p),(D,me)=>(b(),$("label",{key:me,class:"[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900"},[f("input",{type:"radio",name:"audioInput",value:D.deviceId,hidden:"",onChange:be},null,40,Va),f("div",Sa,[f("div",Wa,[D.deviceId===m(l)?(b(),$("div",qa)):te("",!0)]),f("span",{"inline-block":"",class:Ce([D.deviceId===m(l)?"cyan-400 dark:text-white":"cyan-400/50 dark:text-white/50"]),transition:"all duration-250 ease-in-out"},B(D.label),3)])]))),128))])):te("",!0)]),_:1}),f("label",Ja,[pe(f("input",{"onUpdate:modelValue":I[4]||(I[4]=D=>r.value=D),type:"checkbox",hidden:""},null,512),[[Kt,r.value]]),I[10]||(I[10]=f("div",{"i-solar:microphone-2-bold-duotone":""},null,-1)),f("div",null,[n.value?(b(),$("span",Ya,"Listening...")):(b(),$("span",Ga,B(A.$t("settings.microphone")),1))])])])])]))}}),Pi=ft(Xa,[["__scopeId","data-v-e8dbc010"]]),Qa={"mb-1":"","mt-2":"","w-full":"","gap-2":""},Za={flex:"~ 1","w-full":"","items-center":"","justify-center":"","gap-2":"","px-2":"","text-nowrap":"","text-lg":""},ja=["src"],er=["src"],tr=N({__name:"MobileHeader",setup(e){const t=Vt();return(n,a)=>(b(),$("header",Qa,[f("div",Za,[m(t)?(b(),$("img",{key:0,src:m(Gn),"h-8":"","w-8":"",class:"theme-colored"},null,8,ja)):(b(),$("img",{key:1,src:m(Yn),"h-8":"","w-8":"",class:"theme-colored"},null,8,er)),a[0]||(a[0]=f("div",{"font-cute":""},[f("span",null,"アイリ")],-1))])]))}}),Ii=ft(tr,[["__scopeId","data-v-2d5e277e"]]);function ht(e){return e?e.flatMap(t=>t.type===ke?ht(t.children):[t]):[]}const nr=N({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var p,v;if(!n.default)return null;const a=ht(n.default()),r=a.findIndex(c=>c.type!==Dn);if(r===-1)return a;const o=a[r];(p=o.props)==null||delete p.ref;const i=o.props?ge(t,o.props):t;t.class&&((v=o.props)!=null&&v.class)&&delete o.props.class;const d=Pn(o,i);for(const c in i)c.startsWith("on")&&(d.props||(d.props={}),d.props[c]=i[c]);return a.length===1?d:(a[r]=d,a)}}}),Xe=N({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const a=e.asChild?"template":e.as;return typeof a=="string"&&["area","img","input"].includes(a)?()=>Ge(a,t):a!=="template"?()=>Ge(e.as,t,{default:n.default}):()=>Ge(nr,t,{default:n.default})}});function gt(e,t){const n=typeof e=="string"?`${e}Context`:t,a=Symbol(n);return[i=>{const d=In(a,i);if(d||d===null)return d;throw new Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},i=>(Cn(a,i),i)]}const[Xt,Ci]=gt("ConfigProvider");function ve(){const e=Ye(),t=x(),n=J(()=>{var i,d;return["#text","#comment"].includes((i=t.value)==null?void 0:i.$el.nodeName)?(d=t.value)==null?void 0:d.$el.nextElementSibling:vt(t)}),a=Object.assign({},e.exposed),r={};for(const i in e.props)Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get:()=>e.props[i]});if(Object.keys(a).length>0)for(const i in a)Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get:()=>a[i]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r;function o(i){t.value=i,i&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>i instanceof Element?i:i.$el}),e.exposed=r)}return{forwardRef:o,currentRef:t,currentElement:n}}let ar=0;function st(e,t="reka"){const n=Xt({useId:void 0});return Pt?`${t}-${Pt()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++ar}`}function rr(e,t){const n=x(e);function a(o){return t[n.value][o]??n.value}return{state:n,dispatch:o=>{n.value=a(o)}}}function or(e,t){var w;const n=x({}),a=x("none"),r=x(e),o=e.value?"mounted":"unmounted";let i;const d=((w=t.value)==null?void 0:w.ownerDocument.defaultView)??Tn,{state:p,dispatch:v}=rr(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=k=>{var g;if(Le){const _=new CustomEvent(k,{bubbles:!1,cancelable:!1});(g=t.value)==null||g.dispatchEvent(_)}};X(e,async(k,g)=>{var O;const _=g!==k;if(await le(),_){const P=a.value,C=Ke(t.value);k?(v("MOUNT"),c("enter"),C==="none"&&c("after-enter")):C==="none"||((O=n.value)==null?void 0:O.display)==="none"?(v("UNMOUNT"),c("leave"),c("after-leave")):g&&P!==C?(v("ANIMATION_OUT"),c("leave")):(v("UNMOUNT"),c("after-leave"))}},{immediate:!0});const l=k=>{const g=Ke(t.value),_=g.includes(k.animationName),O=p.value==="mounted"?"enter":"leave";if(k.target===t.value&&_&&(c(`after-${O}`),v("ANIMATION_END"),!r.value)){const P=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",i=d==null?void 0:d.setTimeout(()=>{var C;((C=t.value)==null?void 0:C.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=P)})}k.target===t.value&&g==="none"&&v("ANIMATION_END")},s=k=>{k.target===t.value&&(a.value=Ke(t.value))},y=X(t,(k,g)=>{k?(n.value=getComputedStyle(k),k.addEventListener("animationstart",s),k.addEventListener("animationcancel",l),k.addEventListener("animationend",l)):(v("ANIMATION_END"),i!==void 0&&(d==null||d.clearTimeout(i)),g==null||g.removeEventListener("animationstart",s),g==null||g.removeEventListener("animationcancel",l),g==null||g.removeEventListener("animationend",l))},{immediate:!0}),u=X(p,()=>{const k=Ke(t.value);a.value=p.value==="mounted"?k:"none"});return Ae(()=>{y(),u()}),{isPresent:J(()=>["mounted","unmountSuspended"].includes(p.value))}}function Ke(e){return e&&getComputedStyle(e).animationName||"none"}const Qt=N({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var v;const{present:a,forceMount:r}=mt(e),o=x(),{isPresent:i}=or(a,o);n({present:i});let d=t.default({present:i.value});d=ht(d||[]);const p=Ye();if(d&&(d==null?void 0:d.length)>1){const c=(v=p==null?void 0:p.parent)!=null&&v.type.name?`<${p.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` 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(l=>` - ${l}`).join(` +`)].join(` +`))}return()=>r.value||a.value||i.value?Ge(t.default({present:i.value})[0],{ref:c=>{const l=vt(c);return typeof(l==null?void 0:l.hasAttribute)>"u"||(l!=null&&l.hasAttribute("data-reka-popper-content-wrapper")?o.value=l.firstElementChild:o.value=l),l}}):null}});function bt(e){const t=Ye(),n=t==null?void 0:t.type.emits,a={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(r=>{a[An(Mn(r))]=(...o)=>e(r,...o)}),a}const[Oe,ir]=gt("DialogRoot"),sr=N({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=Rn(n,"open",t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),o=x(),i=x(),{modal:d}=mt(n);return ir({open:r,modal:d,openModal:()=>{r.value=!0},onOpenChange:p=>{r.value=p},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:o,contentElement:i}),(p,v)=>ne(p.$slots,"default",{open:m(r)})}}),lr=N({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Oe(),{forwardRef:a,currentElement:r}=ve();return n.contentId||(n.contentId=st(void 0,"reka-dialog-content")),Ue(()=>{n.triggerElement.value=r.value}),(o,i)=>(b(),Z(m(Xe),ge(t,{ref:m(a),type:o.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":m(n).open.value||!1,"aria-controls":m(n).open.value?m(n).contentId:void 0,"data-state":m(n).open.value?"open":"closed",onClick:m(n).onOpenToggle}),{default:z(()=>[ne(o.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),ur=N({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=Ln();return(n,a)=>m(t)||n.forceMount?(b(),Z(Un,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[ne(n.$slots,"default")],8,["to","disabled","defer"])):te("",!0)}});function Zt(e,t,n){const a=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),a.dispatchEvent(r)}const dr="dismissableLayer.pointerDownOutside",cr="dismissableLayer.focusOutside";function jt(e,t){const n=t.closest("[data-dismissable-layer]"),a=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),r=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&a===n||r.indexOf(a){});return xe(i=>{if(!Le)return;const d=async v=>{const c=v.target;if(t!=null&&t.value){if(jt(t.value,c)){a.value=!1;return}if(v.target&&!a.value){let l=function(){Zt(dr,e,s)};const s={originalEvent:v};v.pointerType==="touch"?(n.removeEventListener("click",r.value),r.value=l,n.addEventListener("click",r.value,{once:!0})):l()}else n.removeEventListener("click",r.value);a.value=!1}},p=window.setTimeout(()=>{n.addEventListener("pointerdown",d)},0);i(()=>{window.clearTimeout(p),n.removeEventListener("pointerdown",d),n.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>a.value=!0}}function fr(e,t){var r;const n=((r=t==null?void 0:t.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),a=x(!1);return xe(o=>{if(!Le)return;const i=async d=>{t!=null&&t.value&&(await le(),!(!t.value||jt(t.value,d.target))&&d.target&&!a.value&&Zt(cr,e,{originalEvent:d}))};n.addEventListener("focusin",i),o(()=>n.removeEventListener("focusin",i))}),{onFocusCapture:()=>a.value=!0,onBlurCapture:()=>a.value=!1}}const de=St({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vr=N({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,a=t,{forwardRef:r,currentElement:o}=ve(),i=J(()=>{var u;return((u=o.value)==null?void 0:u.ownerDocument)??globalThis.document}),d=J(()=>de.layersRoot),p=J(()=>o.value?Array.from(d.value).indexOf(o.value):-1),v=J(()=>de.layersWithOutsidePointerEventsDisabled.size>0),c=J(()=>{const u=Array.from(d.value),[h]=[...de.layersWithOutsidePointerEventsDisabled].slice(-1),w=u.indexOf(h);return p.value>=w}),l=pr(async u=>{const h=[...de.branches].some(w=>w==null?void 0:w.contains(u.target));!c.value||h||(a("pointerDownOutside",u),a("interactOutside",u),await le(),u.defaultPrevented||a("dismiss"))},o),s=fr(u=>{[...de.branches].some(w=>w==null?void 0:w.contains(u.target))||(a("focusOutside",u),a("interactOutside",u),u.defaultPrevented||a("dismiss"))},o);Fn("Escape",u=>{p.value===d.value.size-1&&(a("escapeKeyDown",u),u.defaultPrevented||a("dismiss"))});let y;return xe(u=>{o.value&&(n.disableOutsidePointerEvents&&(de.layersWithOutsidePointerEventsDisabled.size===0&&(y=i.value.body.style.pointerEvents,i.value.body.style.pointerEvents="none"),de.layersWithOutsidePointerEventsDisabled.add(o.value)),d.value.add(o.value),u(()=>{n.disableOutsidePointerEvents&&de.layersWithOutsidePointerEventsDisabled.size===1&&(i.value.body.style.pointerEvents=y)}))}),xe(u=>{u(()=>{o.value&&(d.value.delete(o.value),de.layersWithOutsidePointerEventsDisabled.delete(o.value))})}),(u,h)=>(b(),Z(m(Xe),{ref:m(r),"as-child":u.asChild,as:u.as,"data-dismissable-layer":"",style:Wt({pointerEvents:v.value?c.value?"auto":"none":void 0}),onFocusCapture:m(s).onFocusCapture,onBlurCapture:m(s).onBlurCapture,onPointerdownCapture:m(l).onPointerDownCapture},{default:z(()=>[ne(u.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}});function he(){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 mr(e){return e?"open":"closed"}const et="focusScope.autoFocusOnMount",tt="focusScope.autoFocusOnUnmount",Mt={bubbles:!1,cancelable:!0};function yr(e,{select:t=!1}={}){const n=he();for(const a of e)if(ye(a,{select:t}),he()!==n)return!0}function hr(e){const t=en(e),n=Rt(t,e),a=Rt(t.reverse(),e);return[n,a]}function en(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const r=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||r?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rt(e,t){for(const n of e)if(!gr(n,{upTo:t}))return n}function gr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function br(e){return e instanceof HTMLInputElement&&"select"in e}function ye(e,{select:t=!1}={}){if(e&&e.focus){const n=he();e.focus({preventScroll:!0}),e!==n&&br(e)&&t&&e.select()}}const wr=Bn(()=>x([]));function _r(){const e=wr();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=Lt(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=Lt(e.value,t),(n=e.value[0])==null||n.resume()}}}function Lt(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function kr(e){return e.filter(t=>t.tagName!=="A")}const xr=N({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,a=t,{currentRef:r,currentElement:o}=ve(),i=x(null),d=_r(),p=St({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});xe(c=>{if(!Le)return;const l=o.value;if(!n.trapped)return;function s(w){if(p.paused||!l)return;const k=w.target;l.contains(k)?i.value=k:ye(i.value,{select:!0})}function y(w){if(p.paused||!l)return;const k=w.relatedTarget;k!==null&&(l.contains(k)||ye(i.value,{select:!0}))}function u(w){l.contains(i.value)||ye(l)}document.addEventListener("focusin",s),document.addEventListener("focusout",y);const h=new MutationObserver(u);l&&h.observe(l,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",y),h.disconnect()})}),xe(async c=>{const l=o.value;if(await le(),!l)return;d.add(p);const s=he();if(!l.contains(s)){const u=new CustomEvent(et,Mt);l.addEventListener(et,h=>a("mountAutoFocus",h)),l.dispatchEvent(u),u.defaultPrevented||(yr(kr(en(l)),{select:!0}),he()===s&&ye(l))}c(()=>{l.removeEventListener(et,w=>a("mountAutoFocus",w));const u=new CustomEvent(tt,Mt),h=w=>{a("unmountAutoFocus",w)};l.addEventListener(tt,h),l.dispatchEvent(u),setTimeout(()=>{u.defaultPrevented||ye(s??document.body,{select:!0}),l.removeEventListener(tt,h),d.remove(p)},0)})});function v(c){if(!n.loop&&!n.trapped||p.paused)return;const l=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,s=he();if(l&&s){const y=c.currentTarget,[u,h]=hr(y);u&&h?!c.shiftKey&&s===h?(c.preventDefault(),n.loop&&ye(u,{select:!0})):c.shiftKey&&s===u&&(c.preventDefault(),n.loop&&ye(h,{select:!0})):s===y&&c.preventDefault()}}return(c,l)=>(b(),Z(m(Xe),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:v},{default:z(()=>[ne(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),tn=N({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=Oe(),{forwardRef:o,currentElement:i}=ve();return r.titleId||(r.titleId=st(void 0,"reka-dialog-title")),r.descriptionId||(r.descriptionId=st(void 0,"reka-dialog-description")),Ue(()=>{r.contentElement=i,he()!==document.body&&(r.triggerElement.value=he())}),(d,p)=>(b(),Z(m(xr),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:p[5]||(p[5]=v=>a("openAutoFocus",v)),onUnmountAutoFocus:p[6]||(p[6]=v=>a("closeAutoFocus",v))},{default:z(()=>[S(m(vr),ge({id:m(r).contentId,ref:m(o),as:d.as,"as-child":d.asChild,"disable-outside-pointer-events":d.disableOutsidePointerEvents,role:"dialog","aria-describedby":m(r).descriptionId,"aria-labelledby":m(r).titleId,"data-state":m(mr)(m(r).open.value)},d.$attrs,{onDismiss:p[0]||(p[0]=v=>m(r).onOpenChange(!1)),onEscapeKeyDown:p[1]||(p[1]=v=>a("escapeKeyDown",v)),onFocusOutside:p[2]||(p[2]=v=>a("focusOutside",v)),onInteractOutside:p[3]||(p[3]=v=>a("interactOutside",v)),onPointerDownOutside:p[4]||(p[4]=v=>a("pointerDownOutside",v))}),{default:z(()=>[ne(d.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}});var $r=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ie=new WeakMap,Ve=new WeakMap,Se={},nt=0,nn=function(e){return e&&(e.host||nn(e.parentNode))},Or=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=nn(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Er=function(e,t,n,a){var r=Or(t,Array.isArray(e)?e:[e]);Se[n]||(Se[n]=new WeakMap);var o=Se[n],i=[],d=new Set,p=new Set(r),v=function(l){!l||d.has(l)||(d.add(l),v(l.parentNode))};r.forEach(v);var c=function(l){!l||p.has(l)||Array.prototype.forEach.call(l.children,function(s){if(d.has(s))c(s);else try{var y=s.getAttribute(a),u=y!==null&&y!=="false",h=(Ie.get(s)||0)+1,w=(o.get(s)||0)+1;Ie.set(s,h),o.set(s,w),i.push(s),h===1&&u&&Ve.set(s,!0),w===1&&s.setAttribute(n,"true"),u||s.setAttribute(a,"true")}catch(k){console.error("aria-hidden: cannot operate on ",s,k)}})};return c(t),d.clear(),nt++,function(){i.forEach(function(l){var s=Ie.get(l)-1,y=o.get(l)-1;Ie.set(l,s),o.set(l,y),s||(Ve.has(l)||l.removeAttribute(a),Ve.delete(l)),y||l.removeAttribute(n)}),nt--,nt||(Ie=new WeakMap,Ie=new WeakMap,Ve=new WeakMap,Se={})}},Dr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),r=$r(e);return r?(a.push.apply(a,Array.from(r.querySelectorAll("[aria-live]"))),Er(a,r,n,"aria-hidden")):function(){return null}};function Pr(e){let t;X(()=>vt(e),n=>{n?t=Dr(n):t&&t()}),Ae(()=>{t&&t()})}const Ir=N({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=Oe(),o=bt(a),{forwardRef:i,currentElement:d}=ve();return Pr(d),(p,v)=>(b(),Z(tn,ge({...n,...m(o)},{ref:m(i),"trap-focus":m(r).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:v[0]||(v[0]=c=>{var l;c.defaultPrevented||(c.preventDefault(),(l=m(r).triggerElement.value)==null||l.focus())}),onPointerDownOutside:v[1]||(v[1]=c=>{const l=c.detail.originalEvent,s=l.button===0&&l.ctrlKey===!0;(l.button===2||s)&&c.preventDefault()}),onFocusOutside:v[2]||(v[2]=c=>{c.preventDefault()})}),{default:z(()=>[ne(p.$slots,"default")]),_:3},16,["trap-focus"]))}}),Cr=N({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=bt(t);ve();const o=Oe(),i=x(!1),d=x(!1);return(p,v)=>(b(),Z(tn,ge({...n,...m(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:v[0]||(v[0]=c=>{var l;c.defaultPrevented||(i.value||(l=m(o).triggerElement.value)==null||l.focus(),c.preventDefault()),i.value=!1,d.value=!1}),onInteractOutside:v[1]||(v[1]=c=>{var y;c.defaultPrevented||(i.value=!0,c.detail.originalEvent.type==="pointerdown"&&(d.value=!0));const l=c.target;((y=m(o).triggerElement.value)==null?void 0:y.contains(l))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&d.value&&c.preventDefault()})}),{default:z(()=>[ne(p.$slots,"default")]),_:3},16))}}),Tr=N({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=Oe(),o=bt(a),{forwardRef:i}=ve();return(d,p)=>(b(),Z(m(Qt),{present:d.forceMount||m(r).open.value},{default:z(()=>[m(r).modal.value?(b(),Z(Ir,ge({key:0,ref:m(i)},{...n,...m(o),...d.$attrs}),{default:z(()=>[ne(d.$slots,"default")]),_:3},16)):(b(),Z(Cr,ge({key:1,ref:m(i)},{...n,...m(o),...d.$attrs}),{default:z(()=>[ne(d.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Ar=zn(()=>{const e=x(new Map),t=x(),n=J(()=>{for(const i of e.value.values())if(i)return!0;return!1}),a=Xt({scrollBody:x(!0)});let r=null;const o=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",It&&(r==null||r()),t.value=void 0};return X(n,(i,d)=>{var l;if(!Le)return;if(!i){d&&o();return}t.value===void 0&&(t.value=document.body.style.overflow);const p=window.innerWidth-document.documentElement.clientWidth,v={padding:p,margin:0},c=(l=a.scrollBody)!=null&&l.value?typeof a.scrollBody.value=="object"?dt({padding:a.scrollBody.value.padding===!0?p:a.scrollBody.value.padding,margin:a.scrollBody.value.margin===!0?p:a.scrollBody.value.margin},v):v:{padding:0,margin:0};p>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.body.style.setProperty("--scrollbar-width",`${p}px`),document.body.style.overflow="hidden"),It&&(r=Hn(document,"touchmove",s=>Rr(s),{passive:!1})),le(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Mr(e){const t=Math.random().toString(36).substring(2,7),n=Ar();n.value.set(t,e);const a=J({get:()=>n.value.get(t)??!1,set:r=>n.value.set(t,r)});return Nn(()=>{n.value.delete(t)}),a}function an(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}const Lr=N({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(e){const t=Oe();return Mr(!0),ve(),(n,a)=>(b(),Z(m(Xe),{as:n.as,"as-child":n.asChild,"data-state":m(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:z(()=>[ne(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Ur=N({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=Oe(),{forwardRef:n}=ve();return(a,r)=>{var o;return(o=m(t))!=null&&o.modal.value?(b(),Z(m(Qt),{key:0,present:a.forceMount||m(t).open.value},{default:z(()=>[S(Lr,ge(a.$attrs,{ref:m(n),as:a.as,"as-child":a.asChild}),{default:z(()=>[ne(a.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):te("",!0)}}}),Fr=N({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,a)=>(b(),Z(m(ur),Kn(Vn(t)),{default:z(()=>[ne(n.$slots,"default")]),_:3},16))}});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top],.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left],.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top],[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left],[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]:after{content:"";position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@keyframes fake-animation{}@media (hover: hover) and (pointer: fine){[vaul-drawer]{-webkit-user-select:none;user-select:none}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const Br=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zr=e=>typeof e<"u";function Nr(e){return JSON.parse(JSON.stringify(e))}function Ut(e,t,n,a={}){var r,o,i;const{clone:d=!1,passive:p=!1,eventName:v,deep:c=!1,defaultValue:l,shouldEmit:s}=a,y=Ye(),u=n||(y==null?void 0:y.emit)||((r=y==null?void 0:y.$emit)==null?void 0:r.bind(y))||((i=(o=y==null?void 0:y.proxy)==null?void 0:o.$emit)==null?void 0:i.bind(y==null?void 0:y.proxy));let h=v;t||(t="modelValue"),h=h||`update:${t.toString()}`;const w=_=>d?typeof d=="function"?d(_):Nr(_):_,k=()=>zr(e[t])?w(e[t]):l,g=_=>{s?s(_)&&u(h,_):u(h,_)};if(p){const _=k(),O=x(_);let P=!1;return X(()=>e[t],C=>{P||(P=!0,O.value=w(C),le(()=>P=!1))}),X(O,C=>{!P&&(C!==e[t]||c)&&g(C)},{deep:c}),O}else return J({get(){return k()},set(_){g(_)}})}const[rn,Hr]=gt("DrawerRoot"),on=new WeakMap;function K(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;const a={};Object.entries(t).forEach(([r,o])=>{if(r.startsWith("--")){e.style.setProperty(r,o);return}a[r]=e.style[r],e.style[r]=o}),!n&&on.set(e,a)}function We(e,t){if(!e||!(e instanceof HTMLElement))return;const n=on.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach(([a,r])=>{e.style[a]=r}))}function qe(e,t){const n=window.getComputedStyle(e),a=n.transform||n.webkitTransform||n.mozTransform;let r=a.match(/^matrix3d\((.+)\)$/);return r?Number.parseFloat(r[1].split(", ")[q(t)?13:12]):(r=a.match(/^matrix\((.+)\)$/),r?Number.parseFloat(r[1].split(", ")[q(t)?5:4]):null)}function Kr(e){return 8*(Math.log(e+1)-2)}function q(e){switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}}const U={DURATION:.5,EASE:[.32,.72,0,1]},sn=.4;function Vr({activeSnapPoint:e,snapPoints:t,drawerRef:n,overlayRef:a,fadeFromIndex:r,onSnapPointChange:o,direction:i}){const d=x(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function p(){d.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}Ue(()=>{typeof window<"u"&&window.addEventListener("resize",p)}),Wn(()=>{typeof window<"u"&&window.removeEventListener("resize",p)});const v=J(()=>(t.value&&e.value===t.value[t.value.length-1])??null),c=J(()=>t.value&&t.value.length>0&&((r==null?void 0:r.value)||(r==null?void 0:r.value)===0)&&!Number.isNaN(r==null?void 0:r.value)&&t.value[(r==null?void 0:r.value)??-1]===e.value||!t.value),l=J(()=>{var g;return((g=t.value)==null?void 0:g.findIndex(_=>_===e.value))??null}),s=J(()=>{var g;return((g=t.value)==null?void 0:g.map(_=>{const O=typeof _=="string";let P=0;if(O&&(P=Number.parseInt(_,10)),q(i.value)){const V=O?P:d.value?_*d.value.innerHeight:0;return d.value?i.value==="bottom"?d.value.innerHeight-V:-d.value.innerHeight+V:V}const C=O?P:d.value?_*d.value.innerWidth:0;return d.value?i.value==="right"?d.value.innerWidth-C:-d.value.innerWidth+C:C}))??[]}),y=J(()=>{var g;return l.value!==null?(g=s.value)==null?void 0:g[l.value]:null}),u=g=>{var _,O,P,C;const V=((_=s.value)==null?void 0:_.findIndex(ae=>ae===g))??null;le(()=>{var ae;o(V,s.value),K((ae=n.value)==null?void 0:ae.$el,{transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,transform:q(i.value)?`translate3d(0, ${g}px, 0)`:`translate3d(${g}px, 0, 0)`})}),s.value&&V!==s.value.length-1&&V!==(r==null?void 0:r.value)?K((O=a.value)==null?void 0:O.$el,{transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,opacity:"0"}):K((P=a.value)==null?void 0:P.$el,{transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,opacity:"1"}),e.value=V!==null?((C=t.value)==null?void 0:C[V])??null:null};X([e,s,t],()=>{var g;if(e.value){const _=((g=t.value)==null?void 0:g.findIndex(O=>O===e.value))??-1;s.value&&_!==-1&&typeof s.value[_]=="number"&&u(s.value[_])}},{immediate:!0});function h({draggedDistance:g,closeDrawer:_,velocity:O,dismissible:P}){var C,V,ae;if(r.value===void 0)return;const ue=i.value==="bottom"||i.value==="right"?(y.value??0)-g:(y.value??0)+g,be=l.value===r.value-1,A=l.value===0,I=g>0;if(be&&K((C=a.value)==null?void 0:C.$el,{transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`}),O>2&&!I){P?_():u(s.value[0]);return}if(O>2&&I&&s&&t.value){u(s.value[t.value.length-1]);return}const D=(V=s.value)==null?void 0:V.reduce((W,Ee)=>typeof W!="number"||typeof Ee!="number"?W:Math.abs(Ee-ue)sn&&Math.abs(g)0&&v){u(s.value[(((ae=t.value)==null?void 0:ae.length)??0)-1]);return}if(A&&W<0&&P&&_(),l.value===null)return;u(s.value[l.value+W]);return}u(D)}function w({draggedDistance:g}){var _;if(y.value===null)return;const O=i.value==="bottom"||i.value==="right"?y.value-g:y.value+g;(i.value==="bottom"||i.value==="right")&&Os.value[s.value.length-1]||K((_=n.value)==null?void 0:_.$el,{transform:q(i.value)?`translate3d(0, ${O}px, 0)`:`translate3d(${O}px, 0, 0)`})}function k(g,_){if(!t.value||typeof l.value!="number"||!s.value||r.value===void 0)return null;const O=l.value===r.value-1;if(l.value>=r.value&&_)return 0;if(O&&!_)return 1;if(!c.value&&!O)return null;const P=O?l.value+1:l.value-1,C=O?s.value[P]-s.value[P-1]:s.value[P+1]-s.value[P],V=g/Math.abs(C);return O?1-V:V}return{isLastSnapPoint:v,shouldFade:c,getPercentageDragged:k,activeSnapPointIndex:l,onRelease:h,onDrag:w,snapPointsOffset:s}}let Re=null;function Sr(e){const{isOpen:t,modal:n,nested:a,hasBeenOpened:r}=e,o=x(typeof window<"u"?window.location.href:""),i=x(0);function d(){if(Re===null&&t.value){Re={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:v,innerHeight:c}=window;document.body.style.position="fixed",document.body.style.top=`-${i.value}px`,document.body.style.left=`-${v}px`,document.body.style.right="0px",document.body.style.height="auto",setTimeout(()=>{requestAnimationFrame(()=>{const l=c-window.innerHeight;l&&i.value>=c&&(document.body.style.top=`-${i.value+l}px`)})},300)}}function p(){if(Re!==null){const v=-Number.parseInt(document.body.style.top,10),c=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,Re),requestAnimationFrame(()=>{if(o.value!==window.location.href){o.value=window.location.href;return}window.scrollTo(c,v)}),Re=null}}return Ue(()=>{function v(){i.value=window.scrollY}v(),window.addEventListener("scroll",v),Ae(()=>{window.removeEventListener("scroll",v)})}),X([t,r,o],()=>{a.value||!r.value||(t.value?(!window.matchMedia("(display-mode: standalone)").matches&&d(),n.value||setTimeout(()=>{p()},500)):p())}),{restorePositionSetting:p}}const Wr=.25,qr=100,Ft=8,Je=16,Jr=26,Bt="vaul-dragging";function Gr(e,t){return e&&e.value?e:t}function Yr(e){const{emitDrag:t,emitRelease:n,emitClose:a,emitOpenChange:r,open:o,dismissible:i,nested:d,modal:p,shouldScaleBackground:v,scrollLockTimeout:c,closeThreshold:l,activeSnapPoint:s,fadeFromIndex:y,direction:u}=e,h=x(o.value??!1),w=x(!1),k=x(!1),g=x(!1),_=x(!1),O=x(null),P=x(null),C=x(null),V=x(null),ae=x(null),ue=x(!0),be=x(null),A=x(0),I=x(!1);x(0);const D=x(null);x(0);const me=J(()=>{var E;return((E=D.value)==null?void 0:E.$el.getBoundingClientRect().height)||0}),W=Gr(e.snapPoints,x(void 0)),{activeSnapPointIndex:Ee,onRelease:ln,snapPointsOffset:un,onDrag:dn,shouldFade:_t,getPercentageDragged:cn}=Vr({snapPoints:W,activeSnapPoint:s,drawerRef:D,fadeFromIndex:y,overlayRef:O,onSnapPointChange:pn,direction:u});function pn(E,M){W.value&&E===M.length-1&&(P.value=new Date)}const{restorePositionSetting:fn}=Sr({isOpen:h,modal:p,nested:d,hasBeenOpened:w});function De(){return(window.innerWidth-Jr)/window.innerWidth}function kt(E,M){var G;if(!E)return!1;let H=E;const Y=(G=window.getSelection())==null?void 0:G.toString(),j=D.value?qe(D.value.$el,u.value):null,se=new Date;if(H.hasAttribute("data-vaul-no-drag")||H.closest("[data-vaul-no-drag]"))return!1;if(u.value==="right"||u.value==="left")return!0;if(P.value&&se.getTime()-P.value.getTime()<500)return!1;if(j!==null&&(u.value==="bottom"?j>0:j<0))return!0;if(Y&&Y.length>0)return!1;if(ae.value&&se.getTime()-ae.value.getTime()H.clientHeight){if(H.scrollTop!==0)return ae.value=new Date,!1;if(H.getAttribute("role")==="dialog")return!0}H=H.parentNode}return!0}function vn(E){!i.value&&!W.value||D.value&&!D.value.$el.contains(E.target)||(g.value=!0,C.value=new Date,E.target.setPointerCapture(E.pointerId),A.value=q(u.value)?E.clientY:E.clientX)}function mn(E){var M,G,H,Y,j,se;if(D.value&&g.value){const Pe=u.value==="bottom"||u.value==="right"?1:-1,Be=(A.value-(q(u.value)?E.clientY:E.clientX))*Pe,ze=Be>0,$t=W.value&&!i.value&&!ze;if($t&&Ee.value===0)return;const Ze=Math.abs(Be),Ot=document.querySelector("[vaul-drawer-wrapper]");let we=Ze/me.value;const Et=cn(Ze,ze);if(Et!==null&&(we=Et),$t&&we>=1||!ue.value&&!kt(E.target,ze))return;if((M=D==null?void 0:D.value)==null||M.$el.classList.add(Bt),ue.value=!0,K((G=D.value)==null?void 0:G.$el,{transition:"none"}),K((H=O.value)==null?void 0:H.$el,{transition:"none"}),W.value&&dn({draggedDistance:Be}),ze&&!W.value){const _e=Kr(Be),Ne=Math.min(_e*-1,0)*Pe;K((Y=D.value)==null?void 0:Y.$el,{transform:q(u.value)?`translate3d(0, ${Ne}px, 0)`:`translate3d(${Ne}px, 0, 0)`});return}const wn=1-we;if((_t.value||y.value&&Ee.value===y.value-1)&&(t(we),K((j=O.value)==null?void 0:j.$el,{opacity:`${wn}`,transition:"none"},!0)),Ot&&O.value&&v.value){const _e=Math.min(De()+we*(1-De()),1),Ne=8-we*8,Dt=Math.max(0,14-we*14);K(Ot,{borderRadius:`${Ne}px`,transform:q(u.value)?`scale(${_e}) translate3d(0, ${Dt}px, 0)`:`scale(${_e}) translate3d(${Dt}px, 0, 0)`,transition:"none"},!0)}if(!W.value){const _e=Ze*Pe;K((se=D.value)==null?void 0:se.$el,{transform:q(u.value)?`translate3d(0, ${_e}px, 0)`:`translate3d(${_e}px, 0, 0)`})}}}function xt(){var E;if(!D.value)return;const M=document.querySelector("[vaul-drawer-wrapper]"),G=qe(D.value.$el,u.value);K(D.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`}),K((E=O.value)==null?void 0:E.$el,{transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,opacity:"1"}),v.value&&G&&G>0&&h.value&&K(M,{borderRadius:`${Ft}px`,overflow:"hidden",...q(u.value)?{transform:`scale(${De()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${De()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${U.DURATION}s`,transitionTimingFunction:`cubic-bezier(${U.EASE.join(",")})`},!0)}function Me(){var E;D.value&&(a(),K(D.value.$el,{transform:q(u.value)?`translate3d(0, ${u.value==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${u.value==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`}),K((E=O.value)==null?void 0:E.$el,{opacity:"0",transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`}),Qe(!1),window.setTimeout(()=>{k.value=!1,h.value=!1},300),window.setTimeout(()=>{W.value&&(s.value=W.value[0])},U.DURATION*1e3))}xe(()=>{if(!h.value&&v.value&&Br){const E=setTimeout(()=>{We(document.body)},200);return()=>clearTimeout(E)}}),Ae(()=>{Qe(!1),fn()});function yn(E){if(!g.value||!D.value)return;D.value.$el.classList.remove(Bt),ue.value=!1,g.value=!1,V.value=new Date;const M=qe(D.value.$el,u.value);if(!kt(E.target,!1)||!M||Number.isNaN(M)||C.value===null)return;const G=V.value.getTime()-C.value.getTime(),H=A.value-(q(u.value)?E.clientY:E.clientX),Y=Math.abs(H)/G;if(Y>.05&&(_.value=!0,window.setTimeout(()=>{_.value=!1},200)),W.value){const se=u.value==="bottom"||u.value==="right"?1:-1;ln({draggedDistance:H*se,closeDrawer:Me,velocity:Y,dismissible:i.value}),n(!0);return}if(u.value==="bottom"||u.value==="right"?H>0:H<0){xt(),n(!0);return}if(Y>sn){Me(),n(!1);return}const j=Math.min(D.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(M>=j*l.value){Me(),n(!1);return}n(!0),xt()}X(h,E=>{E&&(P.value=new Date,Qe(!0)),r(E)},{immediate:!0}),X(o,E=>{E?(h.value=E,w.value=!0):Me()},{immediate:!0});function Qe(E){const M=document.querySelector("[vaul-drawer-wrapper]");!M||!v.value||(E?(K(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),K(document.body,{background:"black"},!0),K(M,{borderRadius:`${Ft}px`,overflow:"hidden",...q(u.value)?{transform:`scale(${De()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${De()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${U.DURATION}s`,transitionTimingFunction:`cubic-bezier(${U.EASE.join(",")})`})):(We(M,"overflow"),We(M,"transform"),We(M,"borderRadius"),K(M,{transitionProperty:"transform, border-radius",transitionDuration:`${U.DURATION}s`,transitionTimingFunction:`cubic-bezier(${U.EASE.join(",")})`})))}function hn(E){var M,G;const H=E?(window.innerWidth-Je)/window.innerWidth:1,Y=E?-16:0;be.value&&window.clearTimeout(be.value),K((M=D.value)==null?void 0:M.$el,{transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,transform:`scale(${H}) translate3d(0, ${Y}px, 0)`}),!E&&(G=D.value)!=null&&G.$el&&(be.value=window.setTimeout(()=>{var j,se;const Pe=qe((j=D.value)==null?void 0:j.$el,u.value);K((se=D.value)==null?void 0:se.$el,{transition:"none",transform:q(u.value)?`translate3d(0, ${Pe}px, 0)`:`translate3d(${Pe}px, 0, 0)`})},500))}function gn(E){var M;if(E<0)return;const G=q(u.value)?window.innerHeight:window.innerWidth,H=(G-Je)/G,Y=H+E*(1-H),j=-16+E*Je;K((M=D.value)==null?void 0:M.$el,{transform:q(u.value)?`scale(${Y}) translate3d(0, ${j}px, 0)`:`scale(${Y}) translate3d(${j}px, 0, 0)`,transition:"none"})}function bn(E){var M;const G=q(u.value)?window.innerHeight:window.innerWidth,H=E?(G-Je)/G:1,Y=E?-16:0;E&&K((M=D.value)==null?void 0:M.$el,{transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,transform:q(u.value)?`scale(${H}) translate3d(0, ${Y}px, 0)`:`scale(${H}) translate3d(${Y}px, 0, 0)`})}return{open:o,isOpen:h,modal:p,keyboardIsOpen:I,hasBeenOpened:w,isVisible:k,drawerRef:D,drawerHeightRef:me,overlayRef:O,isDragging:g,dragStartTime:C,isAllowedToDrag:ue,snapPoints:W,activeSnapPoint:s,pointerStart:A,dismissible:i,snapPointsOffset:un,direction:u,shouldFade:_t,fadeFromIndex:y,shouldScaleBackground:v,onPress:vn,onDrag:mn,onRelease:yn,closeDrawer:Me,onNestedDrag:gn,onNestedRelease:bn,onNestedOpenChange:hn,emitClose:a,emitDrag:t,emitRelease:n,emitOpenChange:r,nested:d}}const Xr=N({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:Wr},shouldScaleBackground:{type:Boolean,default:void 0},scrollLockTimeout:{default:qr},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:"bottom"},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{expose:t,emit:n}){const a=e,r=n;Sn();const o=J(()=>a.fadeFromIndex??(a.snapPoints&&a.snapPoints.length-1)),i=Ut(a,"open",r,{defaultValue:a.defaultOpen,passive:a.open===void 0}),d=Ut(a,"activeSnapPoint",r,{passive:a.activeSnapPoint===void 0}),p={emitDrag:u=>r("drag",u),emitRelease:u=>r("release",u),emitClose:()=>r("close"),emitOpenChange:u=>{r("update:open",u),setTimeout(()=>{r("animationEnd",u)},U.DURATION*1e3)}},{closeDrawer:v,hasBeenOpened:c,modal:l,isOpen:s}=Hr(Yr({...p,...mt(a),activeSnapPoint:d,fadeFromIndex:o,open:i}));function y(u){if(i.value!==void 0){p.emitOpenChange(u);return}u?(c.value=!0,s.value=u):v()}return t({open:s}),(u,h)=>(b(),Z(m(sr),{open:m(s),modal:m(l),"onUpdate:open":y},{default:z(()=>[ne(u.$slots,"default",{open:m(s)})]),_:3},8,["open","modal"]))}}),Qr=N({__name:"DrawerOverlay",setup(e){const{overlayRef:t,snapPoints:n,isVisible:a,isOpen:r,shouldFade:o}=rn(),i=J(()=>{var d;return n&&(((d=n.value)==null?void 0:d.length)??0)>0});return(d,p)=>(b(),Z(m(Ur),{ref_key:"overlayRef",ref:t,"vaul-drawer-visible":m(a)?"true":"false","vaul-overlay":"","vaul-snap-points":m(r)&&i.value?"true":"false","vaul-snap-points-overlay":m(r)&&m(o)?"true":"false"},null,8,["vaul-drawer-visible","vaul-snap-points","vaul-snap-points-overlay"]))}}),Zr=N({__name:"DrawerContent",setup(e){const{open:t,isOpen:n,isVisible:a,snapPointsOffset:r,drawerRef:o,onPress:i,onDrag:d,onRelease:p,modal:v,emitOpenChange:c,dismissible:l,keyboardIsOpen:s,closeDrawer:y,direction:u}=rn(),h=J(()=>r.value&&r.value.length>0?`${r.value[0]}px`:"0");function w(k){if(!v.value||k.defaultPrevented){k.preventDefault();return}s.value&&(s.value=!1),k.preventDefault(),l.value&&c(!1),!(!l.value||t.value!==void 0)&&y()}return X(n,k=>{k&&setTimeout(()=>{a.value=!0},1)},{immediate:!0}),(k,g)=>(b(),Z(m(Tr),{ref_key:"drawerRef",ref:o,"vaul-drawer":"","vaul-drawer-direction":m(u),"vaul-drawer-visible":m(a)?"true":"false",style:Wt({"--snap-point-height":h.value}),onPointerdown:m(i),onPointermove:m(d),onPointerup:m(p),onPointerDownOutside:w,onEscapeKeyDown:g[0]||(g[0]=_=>{m(l)||_.preventDefault()})},{default:z(()=>[ne(k.$slots,"default")]),_:3},8,["vaul-drawer-direction","vaul-drawer-visible","style","onPointerdown","onPointermove","onPointerup"]))}}),jr={py:"1",flex:"~ col",rounded:"lg","overflow-hidden":""},eo={key:0,flex:"",mr:"12"},to={flex:"~ col",border:"4 solid primary-200/50 dark:primary-500/50",shadow:"md primary-200/50 dark:none","min-w-20":"","rounded-lg":"","px-2":"","py-1":"",h:"unset {le().then(()=>{a.update(),r.value=a.height.value})}),d(async()=>{le().then(()=>{a.update(),r.value=a.height.value})}),(p,v)=>{const c=Ht("auto-animate");return b(),$("div",jr,[v[1]||(v[1]=f("div",{"flex-1":""},null,-1)),pe((b(),$("div",{ref_key:"chatHistoryRef",ref:t,"h-full":"","w-full":"","max-h":"30vh",flex:"~ col","overflow-scroll":""},[v[0]||(v[0]=f("div",{"flex-1":""},null,-1)),(b(!0),$(ke,null,Te(m(n),(l,s)=>(b(),$("div",{key:s,"mb-2":""},[l.role==="assistant"?(b(),$("div",eo,[f("div",to,[f("div",null,[f("span",no,B(p.$t("stage.chat.message.character-name.airi")),1)]),l.content?(b(),$("div",{key:0,class:"markdown-content",text:"base 0&&ee('A "pipe" with multiple schemas cannot be converted to JSON Schema.',n);const d=ie({},i,n,a);if(d.$ref){const p=d.$ref.split("/")[2];Object.assign(e,a.definitions[p])}else Object.assign(e,d)}else e=go(e,i,n)}return e}switch(t.type){case"boolean":{e.type="boolean";break}case"null":{e.type="null";break}case"number":{e.type="number";break}case"string":{e.type="string";break}case"array":{e.type="array",e.items=ie({},t.item,n,a);break}case"tuple":case"tuple_with_rest":case"loose_tuple":case"strict_tuple":{e.type="array",e.items=[];for(const o of t.items)e.items.push(ie({},o,n,a));t.type==="tuple_with_rest"?e.additionalItems=ie({},t.rest,n,a):e.additionalItems=t.type==="loose_tuple";break}case"object":case"object_with_rest":case"loose_object":case"strict_object":{e.type="object",e.properties={},e.required=[];for(const o in t.entries){const i=t.entries[o];e.properties[o]=ie({},i,n,a),i.type!=="nullish"&&i.type!=="optional"&&e.required.push(o)}t.type==="object_with_rest"?e.additionalProperties=ie({},t.rest,n,a):t.type==="strict_object"&&(e.additionalProperties=!1);break}case"record":{"pipe"in t.key&&ee('The "record" schema with a schema for the key that contains a "pipe" cannot be converted to JSON Schema.',n),t.key.type!=="string"&&ee(`The "record" schema with the "${t.key.type}" schema for the key cannot be converted to JSON Schema.`,n),e.type="object",e.additionalProperties=ie({},t.value,n,a);break}case"any":case"unknown":break;case"nullable":case"nullish":{e.anyOf=[ie({},t.wrapped,n,a),{type:"null"}],t.default!==void 0&&(e.default=lt(t));break}case"exact_optional":case"optional":case"undefinedable":{e=ie(e,t.wrapped,n,a),t.default!==void 0&&(e.default=lt(t));break}case"literal":{typeof t.literal!="boolean"&&typeof t.literal!="number"&&typeof t.literal!="string"&&ee('The value of the "literal" schema is not JSON compatible.',n),e.const=t.literal;break}case"enum":{e.enum=t.options;break}case"picklist":{t.options.some(o=>typeof o!="number"&&typeof o!="string")&&ee('An option of the "picklist" schema is not JSON compatible.',n),e.enum=t.options;break}case"union":case"variant":{e.anyOf=t.options.map(o=>ie({},o,n,a));break}case"intersect":{e.allOf=t.options.map(o=>ie({},o,n,a));break}case"lazy":{let o=a.getterMap.get(t.getter);o||(o=t.getter(void 0),a.getterMap.set(t.getter,o));let i=a.referenceMap.get(o);i||(i=`${bo++}`,a.referenceMap.set(o,i),a.definitions[i]=ie({},o,n,a)),e.$ref=`#/$defs/${i}`;break}default:ee(`The "${t.type}" schema cannot be converted to JSON Schema.`,n)}return e}function oe(e,t){const n={definitions:{},referenceMap:new Map,getterMap:new Map},a=ie({$schema:"http://json-schema.org/draft-07/schema#"},e,t,n);return n.referenceMap.size&&(a.$defs=n.definitions),a}const wo={flex:"~ col","gap-2":""},_o=["onClick"],ko={flex:"~ row 1","items-center":"","gap-1.5":""},xo={"p-4":""},$o={class:"space-y-4"},Oo={key:0},Eo={class:"flex items-center justify-between"},Do={class:"flex items-center gap-1 text-sm font-medium"},Po={key:0,class:"text-red-500"},Io={key:0,class:"text-xs text-zinc-500 dark:text-zinc-400"},Co=["onClick"],To={class:"mt-2 space-y-2"},Ao=["onUpdate:modelValue","onInput"],Mo=["onUpdate:modelValue","onInput"],Ro=["onClick"],Lo={key:1,class:"flex items-center justify-between"},Uo={class:"flex items-center gap-1 text-sm font-medium"},Fo={key:0,class:"text-red-500"},Bo={key:0,class:"text-xs text-zinc-400 dark:text-zinc-600"},zo=["type","value","placeholder","onInput"],No=N({__name:"ModelProviderSettings",setup(e){const t=J(()=>[{id:"openrouter-ai",name:"OpenRouter",icon:"i-lobe-icons:openrouter",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for OpenRouter")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")),"https://openrouter.ai/api/v1/")}))},{id:"openai",name:"OpenAI",icon:"i-lobe-icons:openai",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for OpenAI services")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")),"https://api.openai.com/v1/")}))},{id:"ollama-ai",name:"Ollama",icon:"i-lobe-icons:ollama",fields:oe(re({baseUrl:Q(F(T(),L("Host"),R("Host of the Ollama instance (optional)"))),extraHeaders:Q(F(ut(T(),T()),L("Headers"),R("Custom Headers for Ollama instance (optional)")))}))},{id:"vllm",name:"vLLM",icon:"i-lobe-icons:vllm-color",fields:oe(re({baseUrl:Q(F(T(),L("Host"),R("Host of the vLLM instance (optional)"))),apiKey:Q(F(T(),L("API Key"),R("API Key for vLLM"))),extraHeaders:Q(F(ut(T(),T()),L("Headers"),R("Custom Headers for vLLM instance (optional)")))}))},{id:"elevenlabs",name:"ElevenLabs",icon:"i-simple-icons:elevenlabs",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for ElevenLabs")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")))}))},{id:"xai",name:"xAI",icon:"i-lobe-icons:xai",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for xAI")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")),"https://api.x.ai/v1/")}))},{id:"deepseek",name:"DeepSeek",icon:"i-lobe-icons:deepseek-color",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for DeepSeek")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")),"https://api.deepseek.com/")}))},{id:"together-ai",name:"Together.ai",icon:"i-lobe-icons:together-color",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for Together.ai")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")),"https://api.together.xyz/v1/")}))},{id:"novita-ai",name:"Novita",icon:"i-lobe-icons:novita-color",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for Novita")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")),"https://api.novita.ai/v3/openai/")}))},{id:"fireworks-ai",name:"Fireworks.ai",icon:"i-lobe-icons:fireworks",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for Fireworks.ai")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")),"https://api.fireworks.ai/inference/v1/")}))},{id:"cloudflare-workers-ai",name:"Cloudflare Workers AI",icon:"i-lobe-icons:cloudflare-color",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key")),accountId:F(T(),L("Account ID"),R("Cloudflare Account ID"))}))},{id:"mistral-ai",name:"Mistral",icon:"i-lobe-icons:mistral-color",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for OpenRouter")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")),"https://api.mistral.ai/v1/")}))},{id:"moonshot-ai",name:"Moonshot AI",icon:"i-lobe-icons:moonshot",fields:oe(re({apiKey:F(T(),L("API Key"),R("API Key for OpenRouter")),baseUrl:Q(F(T(),L("Base URL"),R("Custom base URL (optional)")),"https://api.moonshot.cn/v1/")}))}]),{providers:n}=fe(yt());function a(s,y){var u;return((u=n.value[s])==null?void 0:u[y])||""}function r(s,y,u){n.value[s]||(n.value[s]={}),n.value[s][y]=u}function o(s,y){var h;const u=(h=n.value[s])==null?void 0:h[y];if(!u)return[["",""]];try{return Object.entries(u)}catch{return[["",""]]}}function i(s,y,u){var k;const h=u.filter(([g,_])=>g||_);if(h.length===0){(k=n.value[s])==null||delete k[y];return}const w=Object.fromEntries(h);r(s,y,w)}function d(s){s.push(["",""])}function p(s,y){s.splice(y,1)}function v(s,y){if(s.default!==void 0)return s.default;if(s.type==="object"&&s.additionalProperties)return[];switch(s.type){case"string":return"";case"number":case"integer":return 0;case"boolean":return!1;case"array":return[];case"object":return{};default:return""}}function c(s,y,u){var w;if(((w=n.value[s])==null?void 0:w[y])===void 0){const k=v(u);r(s,y,k)}}function l(s){const y=t.value.find(u=>u.id===s);!y||!y.fields.properties||Object.entries(y.fields.properties).forEach(([u,h])=>{c(s,u,h)})}return(s,y)=>(b(),$("div",wo,[(b(!0),$(ke,null,Te(t.value,u=>(b(),$("div",{key:u.id},[S(m(jn),{"w-full":""},{trigger:z(h=>[f("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:w=>h.setVisible(!h.visible)&&l(u.id)},[f("div",ko,[f("div",{class:Ce([u.icon,"provider-icon size-6"]),transition:"filter duration-250 ease-in-out"},null,2),f("div",null,B(u.name),1)]),f("div",{transform:"",transition:"transform duration-250",class:Ce({"rotate-180":h.visible})},y[0]||(y[0]=[f("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,_o)]),default:z(()=>[f("div",xo,[f("div",$o,[(b(!0),$(ke,null,Te(u.fields.properties,(h,w)=>{var k,g;return b(),$("div",{key:w,class:"space-y-1"},[typeof h!="boolean"&&typeof w!="number"&&h.type==="object"&&h.additionalProperties?(b(),$("div",Oo,[f("div",Eo,[f("div",null,[f("div",Do,[Ct(B(h.title||w)+" ",1),(k=u.fields.required)!=null&&k.includes(w)?(b(),$("span",Po,"*")):te("",!0)]),h.description?(b(),$("div",Io,B(h.description),1)):te("",!0)]),f("button",{class:"text-sm",onClick:_=>d(o(u.id,w))},y[1]||(y[1]=[f("div",{"i-solar:add-circle-line-duotone":""},null,-1)]),8,Co)]),f("div",To,[(b(!0),$(ke,null,Te(o(u.id,w),(_,O)=>(b(),$("div",{key:O,class:"flex items-center gap-2"},[pe(f("input",{"onUpdate:modelValue":P=>o(u.id,w)[O][0]=P,type:"text",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","flex-1":"",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:"Key",onInput:P=>i(u.id,w,o(u.id,w))},null,40,Ao),[[Tt,o(u.id,w)[O][0]]]),pe(f("input",{"onUpdate:modelValue":P=>o(u.id,w)[O][1]=P,type:"text",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","flex-1":"",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:"Value",onInput:P=>i(u.id,w,o(u.id,w))},null,40,Mo),[[Tt,o(u.id,w)[O][1]]]),f("button",{class:"text-red-500 hover:text-red-600",onClick:P=>p(o(u.id,w),O)},y[2]||(y[2]=[f("div",{"i-solar:trash-bin-trash-bold-duotone":""},null,-1)]),8,Ro)]))),128))])])):te("",!0),typeof h!="boolean"&&typeof w!="number"&&h.type==="string"?(b(),$("div",Lo,[f("div",null,[f("div",Uo,[Ct(B(h.title)+" ",1),(g=u.fields.required)!=null&&g.includes(w)?(b(),$("span",Fo,"*")):te("",!0)]),h.description?(b(),$("div",Bo,B(h.description),1)):te("",!0)]),f("input",{type:w.toLowerCase().includes("key")?"password":"text",value:a(u.id,w),rounded:"",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:h.default&&String(h.default)||`Enter ${h.title||w}`,onInput:_=>r(u.id,w,_.target.value)},null,40,zo)])):te("",!0)])}),128))])])]),_:2},1024)]))),128))]))}}),Ho={text:"zinc-500 dark:zinc-400",class:"relative"},Ko={key:"main"},Vo={text:"zinc-800/80 dark:zinc-200/80 xl","mb-4":"","font-bold":""},So={class:"space-y-2"},Wo={text:"sm"},qo={grid:"~ cols-[150px_1fr]",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":""},Jo={text:"sm"},Go={flex:"~ row","w-full":"","justify-end":""},Yo={value:"en-US"},Xo={value:"zh-CN"},Qo={bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","cursor-pointer":"","rounded-lg":"","px-4":"","py-3":""},Zo=["checked","aria-checked"],jo={flex:"~ row","w-full":"","items-center":"","gap-1.5":""},ei={text:"sm","w-full":"","flex-1":""},ti={"select-none":""},ni={key:0,"i-solar:moon-stars-bold-duotone":"",transition:"all ease-in-out duration-250"},ai={key:1,"i-solar:sun-fog-bold-duotone":"",transition:"all ease-in-out duration-250"},ri={text:"sm"},oi={key:"providers"},ii={"mb-4":"",flex:"","items-center":"","gap-2":""},si={text:"zinc-800/80 dark:zinc-200/80 xl","font-bold":""},li={key:"live2d"},ui={"mb-4":"",flex:"","items-center":"","gap-2":""},di={text:"zinc-800/80 dark:zinc-200/80 xl","font-bold":""},ci=N({__name:"MobileSettings",setup(e){const{t}=pt(),n=fe(ct()),a=Vt({disableTransition:!1}),r=x("main"),o=x("forward");function i(c){const l=c.target;n.language.value=l.value}function d(){o.value="forward",r.value="providers"}function p(){o.value="forward",r.value="live2d"}function v(){o.value="backward",r.value="main"}return(c,l)=>{const s=Zn;return b(),$("div",Ho,[S(it,{name:o.value==="forward"?"slide-forward":"slide-backward"},{default:z(()=>[r.value==="main"?(b(),$("div",Ko,[f("h2",Vo,B(m(t)("settings.title")),1),f("div",null,[f("div",So,[f("div",{grid:"~ cols-[150px_1fr]",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","cursor-pointer":"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"",onClick:d},[f("div",Wo,[f("span",null,B(m(t)("settings.model-provider.title")),1)]),l[1]||(l[1]=f("div",{flex:"~ row","w-full":"","justify-end":"",text:"sm"},[f("div",{"i-solar:alt-arrow-right-bold-duotone":""})],-1))]),f("div",qo,[f("div",Jo,[f("span",null,B(m(t)("settings.language.title")),1)]),f("div",Go,[f("select",{class:"w-32",bg:"transparent",text:"sm right zinc-800 dark:zinc-100",transition:"all ease-in-out duration-250",outline:"none",onChange:i},[f("option",Yo,B(m(t)("settings.language.english")),1),f("option",Xo,B(m(t)("settings.language.chinese")),1)],32)])]),f("label",Qo,[pe(f("input",{"onUpdate:modelValue":l[0]||(l[0]=y=>qn(a)?a.value=y:null),text:"zinc-800 dark:zinc-100",checked:m(a),"aria-checked":m(a),type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,Zo),[[Kt,m(a)]]),f("div",jo,[f("div",ei,[f("span",null,B(m(t)("settings.theme")),1)]),f("div",ti,[S(it,{name:"slide-away",mode:"out-in"},{default:z(()=>[m(a)?(b(),$("div",ni)):(b(),$("div",ai))]),_:1})])])]),f("div",{grid:"~ cols-[150px_1fr]",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","cursor-pointer":"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"",onClick:p},[f("div",ri,[f("span",null,B(m(t)("settings.live2d.title")),1)]),l[2]||(l[2]=f("div",{flex:"~ row","w-full":"","justify-end":""},[f("div",{"i-solar:alt-arrow-right-bold-duotone":""})],-1))])])])])):r.value==="providers"?(b(),$("div",oi,[f("div",ii,[f("button",{text:"zinc-800/80 dark:zinc-200/80",onClick:v},l[3]||(l[3]=[f("div",{"i-solar:alt-arrow-left-bold-duotone":""},null,-1)])),f("h2",si,B(m(t)("settings.model-provider.title")),1)]),S(No)])):r.value==="live2d"?(b(),$("div",li,[f("div",ui,[f("button",{text:"zinc-800/80 dark:zinc-200/80",onClick:v},l[4]||(l[4]=[f("div",{"i-solar:alt-arrow-left-bold-duotone":""},null,-1)])),f("h2",di,B(m(t)("settings.live2d.title")),1)]),S(s)])):te("",!0)]),_:1},8,["name"])])}}}),pi=ft(ci,[["__scopeId","data-v-2a32d08f"]]),fi={relative:"","w-full":"",flex:"","gap-1":""},vi={flex:"","flex-1":""},mi={class:"flex flex-1 flex-col rounded-t-lg p-5",bg:"[#fffbff] dark:[#1f1a1d]","gap-2":""},Ti=N({__name:"MobileInteractiveArea",emits:["settingsOpen"],setup(e,{emit:t}){const n=t,a=x(""),r=x(!1),o=yt(),{activeProvider:i,activeModel:d}=fe(Gt()),{isAudioInputOn:p,selectedAudioDeviceId:v}=fe(ct()),{send:c,onAfterSend:l}=$e(),{t:s}=pt();async function y(){a.value.trim()&&await c(a.value,{chatProvider:o.getProviderInstance(i.value),model:d.value})}const{destroy:u,start:h}=Yt(v,{onSpeechStart:()=>{r.value=!0},onVADMisfire:()=>{r.value=!1},onSpeechEnd:g=>{r.value=!1,w()},auto:!1});function w(g){alert("Transcription is not implemented yet")}function k(g){n("settingsOpen",g)}return X(p,async g=>{g==="false"&&u()}),l(async()=>{a.value=""}),Ue(()=>{h()}),(g,_)=>(b(),$("div",null,[f("div",fi,[S(co,{absolute:"","left-0":"","top-0":"",transform:"translate-y-[-100%]","w-full":""}),f("div",vi,[S(m(qt),{modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=O=>a.value=O),placeholder:m(s)("stage.message"),border:"solid 2 primary-100 dark:primary-400/20",text:"primary-400 hover:primary-600 dark:[#905073] dark:hover:primary-600 placeholder:primary-400 placeholder:hover:primary-600 placeholder:dark:[#905073] placeholder:dark:hover:primary-600",bg:"primary-50 dark:[#3c2632]","max-h":"[10lh]","min-h":"[1lh]","w-full":"","resize-none":"","overflow-y-scroll":"","rounded-l-xl":"","p-2":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",onSubmit:y},null,8,["modelValue","placeholder"])]),S(m(Xr),{"should-scale-background":"","onUpdate:open":k},{default:z(()=>[S(m(lr),{class:"px-4 py-2.5",border:"solid 2 primary-100 dark:primary-400/20",text:"lg primary-400 hover:primary-600 dark:[#905073] dark:hover:primary-600 placeholder:primary-400 placeholder:hover:primary-600 placeholder:dark:[#905073] placeholder:dark:hover:primary-600",bg:"primary-50 dark:[#3c2632]","max-h":"[10lh]","min-h":"[1lh]","rounded-r-xl":""},{default:z(()=>_[1]||(_[1]=[f("div",{"i-solar:settings-bold-duotone":""},null,-1)])),_:1}),S(m(Fr),null,{default:z(()=>[S(m(Qr),{class:"fixed inset-0 z-50 bg-black/40"}),S(m(Zr),{"max-h":"[75%]",fixed:"","bottom-0":"","left-0":"","right-0":"","z-50":"","mt-24":"","h-full":"",flex:"","flex-col":"","rounded-t-lg":"",bg:"[#fffbff] dark:[#1f1a1d]"},{default:z(()=>[f("div",mi,[S(pi)])]),_:1})]),_:1})]),_:1})])]))}});export{Pi as I,Ii as M,Di as _,Ti as a}; diff --git a/assets/MobileInteractiveArea.vue_vue_type_script_setup_true_lang-Ds2PSx0x.js b/assets/MobileInteractiveArea.vue_vue_type_script_setup_true_lang-Ds2PSx0x.js deleted file mode 100644 index c38274dd691d93afedae9849ddbf88091ed1e61a..0000000000000000000000000000000000000000 --- a/assets/MobileInteractiveArea.vue_vue_type_script_setup_true_lang-Ds2PSx0x.js +++ /dev/null @@ -1,3 +0,0 @@ -import{d as N,c as x,o as b,a as f,b as W,k as z,e as m,H as bn,M as dt,g as k,N as wn,w as Q,O as _n,P as kn,Q as Ce,S as xn,x as we,U as Bt,V as zt,W as le,X as Nt,z as pe,F as be,C as Pe,m as ne,t as B,Y as $n,y as ct,v as pt,q as Ie,Z as je,T as it,A as Ht,_ as ft,i as Kt,$ as On,a0 as ye,a1 as En,a2 as Ge,a3 as Dn,a4 as In,h as G,a5 as vt,a6 as Ye,a7 as Dt,a8 as Pn,a9 as Me,aa as mt,ab as Cn,ac as Tn,ad as An,f as ae,p as Le,j,ae as Rn,af as Mn,ag as _e,ah as Vt,ai as Ln,n as St,aj as Un,ak as Fn,al as Bn,am as It,an as zn,ao as Nn,ap as Hn,aq as Kn,ar as Vn,K as Pt,I as Ct,B as Sn}from"./index-SpDrDth7.js";import{H as Wn,L as qn,a as Jn}from"./HeaderLink-BKyhECz0.js";import{_ as Wt}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-CfG2YTbd.js";import{_ as Gn}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js";import"./Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js";import{u as ke,a as qt,b as Yn,_ as Xn}from"./Live2DSettings.vue_vue_type_script_setup_true_lang-kg4G8Afm.js";import"./emotions-D2WM87AE.js";import{d as Tt}from"./index-aMTQzeGD.js";import{_ as Qn}from"./Collapsable.vue_vue_type_script_setup_true_lang-BcCSAMoU.js";import{u as Zn}from"./providers-CpyZMi_V.js";const jn={"mb-1":"","w-full":"","gap-2":""},ea={"w-full":""},Oi=N({__name:"Header",setup(e){return(t,n)=>(b(),x("header",jn,[f("div",ea,[W(Wn)]),W(m(bn),{class:"m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-zinc-100 p-2 text-lg text-zinc-500 outline-none dark:bg-zinc-800 dark:text-zinc-400",to:"/settings"},{default:z(()=>n[0]||(n[0]=[f("div",{"i-solar:settings-minimalistic-bold-duotone":""},null,-1)])),_:1})]))}});function Jt(e,t){const n=dt(t??{},{...Tt.getDefaultRealTimeVADOptions("v5"),preSpeechPadFrames:30,positiveSpeechThreshold:.5,negativeSpeechThreshold:.35,minSpeechFrames:30,auto:!0}),a=k(),r=wn("microphone");async function o(){if(a.value&&(a.value.destroy(),a.value=void 0,console.warn("existing MicVAD destroyed")),!r.value)return;const i=m(e);if(!i)return;const d=await navigator.mediaDevices.getUserMedia({audio:{deviceId:i}});a.value=await Tt.MicVAD.new({...n,stream:d}),n.auto&&a.value.start()}return Q(r,o,{immediate:!0}),Q(_n(e),o,{immediate:!0}),kn(o),Ce(()=>{a.value&&(a.value.destroy(),a.value=void 0)}),{destroy:()=>{a.value&&(a.value.destroy(),a.value=void 0)},start:()=>{a.value&&a.value.start()}}}function ta(e,t){const n=dt(t,{onLoading:()=>{},onInitiate:()=>{},onProgress:()=>{},onDone:()=>{},onReady:()=>{},onStart:()=>{},onUpdate:()=>{},onComplete:()=>{}}),{post:a,data:r,terminate:o}=xn(e,{type:"module"}),i=k(null),d=k(""),p=k([]),v=k(!1),c=k(0),l=k("");return Q(r,s=>{var y,u,h,g,_,w,$,O;switch(s.status){case"loading":i.value="loading",d.value=s.data,(y=n.onLoading)==null||y.call(n,s.data);break;case"initiate":p.value.push(s),(u=n.onInitiate)==null||u.call(n,s);break;case"progress":p.value=p.value.map(D=>D.file===s.file?{...D,...s}:D),(h=n.onProgress)==null||h.call(n,s);break;case"done":p.value=p.value.filter(D=>D.file!==s.file),(g=n.onDone)==null||g.call(n,s);break;case"ready":i.value="ready",(_=n.onReady)==null||_.call(n);break;case"start":v.value=!0,(w=n.onStart)==null||w.call(n);break;case"update":c.value=s.tps,($=n.onUpdate)==null||$.call(n,s.tps);break;case"complete":v.value=!1,l.value=s.output[0]||"",console.debug("Whisper result:",l.value),(O=n.onComplete)==null||O.call(n,s.output[0]);break}}),Ce(()=>{o()}),{transcribe:s=>a(s),status:i,loadingMessage:d,loadingProgress:p,transcribing:v,tps:c,result:l,load:()=>a({type:"load"}),terminate:o}}const na="/assets/worker-mw0r3G9H.js";async function aa(e,t){const n=new ArrayBuffer(44+e.length*2),a=new DataView(n);He(a,0,"RIFF"),a.setUint32(4,36+e.length*2,!0),He(a,8,"WAVE"),He(a,12,"fmt "),a.setUint32(16,16,!0),a.setUint16(20,1,!0),a.setUint16(22,1,!0),a.setUint32(24,t,!0),a.setUint32(28,t*2,!0),a.setUint16(32,2,!0),a.setUint16(34,16,!0),He(a,36,"data"),a.setUint32(40,e.length*2,!0),ra(a,44,e);const r=new Blob([a],{type:"audio/wav"});return new Promise((o,i)=>{const d=new FileReader;d.onload=()=>{const p=d.result.split(",")[1];o(p)},d.onerror=i,d.readAsDataURL(r)})}function He(e,t,n){for(let a=0;a{le().then(()=>{r.update(),o.value=r.height.value})}),p(async()=>{le().then(()=>{r.update(),o.value=r.height.value})}),(v,c)=>{const l=Nt("auto-animate");return b(),x("div",oa,[c[2]||(c[2]=f("div",{"flex-1":""},null,-1)),pe((b(),x("div",{ref_key:"chatHistoryRef",ref:t,"h-full":"","w-full":"",flex:"~ col","overflow-scroll":""},[c[1]||(c[1]=f("div",{"flex-1":""},null,-1)),(b(!0),x(be,null,Pe(m(n),(s,y)=>(b(),x("div",{key:y,"mb-2":""},[s.role==="error"?(b(),x("div",ia,[f("div",sa,[f("div",la,[f("div",ua,[f("span",da,B(v.$t("stage.chat.message.character-name.core-system")),1)]),c[0]||(c[0]=f("div",{"i-solar:danger-triangle-bold-duotone":"","text-violet-500":""},null,-1))]),m(a)?(b(),x("div",ca)):(b(),x("div",{key:1,class:"markdown-content text-violet-500",text:"base {!I||!I.trim()||await v(I)}});async function w(){if(t.value.trim())try{await v(t.value)}catch(I){l.value.pop(),l.value.push({role:"error",content:I.message})}}const{destroy:$,start:O}=Jt(p,{onSpeechStart:()=>{n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:I=>{n.value=!1,C(I)},auto:!1});function D(){g.value!=="loading"&&(h(),O())}async function C(I){await s.resume();const P=await aa(I,s.sampleRate);u({type:"generate",data:{audio:P,language:"en"}})}async function S(I){const P=I.target,V=o.value.find(ue=>ue.deviceId===P.value);if(!V){i.value=void 0;return}i.value=V}return Q(d,async I=>{I==="false"&&($(),_())}),c(async()=>{t.value=""}),(I,P)=>(b(),x("div",$a,[f("fieldset",Oa,[f("label",{class:Ie([a.value==="chat"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",a.value==="chat"?"text-primary-500 dark:text-primary-500":""]),flex:"~ row",checked:a.value==="chat","aria-checked":a.value==="chat",border:"solid l-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-l-lg":"","px-2":""},[pe(f("input",{"onUpdate:modelValue":P[0]||(P[0]=V=>a.value=V),type:"radio",name:"tab",value:"chat",hidden:""},null,512),[[je,a.value]]),P[5]||(P[5]=f("div",{"i-solar:dialog-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),f("div",Da,[f("span",Ia,B(I.$t("stage.chat.tabs.chat")),1)])],10,Ea),f("label",{class:Ie([a.value==="custom"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",a.value==="custom"?"text-primary-500 dark:text-primary-500":""]),flex:"~ row",checked:a.value==="custom","aria-checked":a.value==="custom",border:"solid t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","px-2":""},[pe(f("input",{"onUpdate:modelValue":P[1]||(P[1]=V=>a.value=V),type:"radio",name:"tab",value:"custom",hidden:""},null,512),[[je,a.value]]),P[6]||(P[6]=f("div",{"i-solar:star-fall-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),f("div",Ca,[f("span",null,B(I.$t("stage.chat.tabs.custom")),1)])],10,Pa),f("label",{class:Ie([a.value==="clothes"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",a.value==="clothes"?"text-primary-500 dark:text-primary-500":""]),flex:"~ row",checked:a.value==="clothes","aria-checked":a.value==="clothes",border:"solid r-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-r-lg":"","px-2":""},[pe(f("input",{"onUpdate:modelValue":P[2]||(P[2]=V=>a.value=V),type:"radio",name:"tab",value:"clothes",hidden:""},null,512),[[je,a.value]]),P[7]||(P[7]=f("div",{"i-solar:magic-stick-3-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),f("div",Aa,[f("span",null,B(I.$t("stage.chat.tabs.clothes")),1)])],10,Ta)]),f("div",Ra,[f("div",Ma,[W(xa,{"h-full":"","flex-1":"","p-4":"",w:"full","max-h":"t.value=V),placeholder:m(y)("stage.message"),text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","min-h":"[100px]","w-full":"","rounded-t-xl":"","p-4":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",onSubmit:w},null,8,["modelValue","placeholder"])])])]),f("div",Ua,[f("button",{bg:"complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700",transition:"all duration-250 ease-in-out",text:"complementary-400","mb-6":"",flex:"","cursor-pointer":"","items-center":"","justify-center":"","gap-2":"","rounded-full":"","px-4":"","py-2":"",onClick:D},[W(it,{mode:"out-in"},{default:z(()=>[m(g)===null?(b(),x("div",Fa,B(I.$t("stage.operations.load-models")),1)):m(g)==="loading"?(b(),x("div",Ba,[P[8]||(P[8]=f("div",{"i-svg-spinners:bouncing-ball":"",class:"text-cyan"},null,-1)),f("span",null,B(I.$t("stage.operations.load-models-status.loading")),1)])):m(g)==="ready"?(b(),x("div",za,[P[9]||(P[9]=f("div",{"i-lucide:check":"",class:"text-cyan"},null,-1)),f("span",null,B(I.$t("stage.operations.load-models-status.ready")),1)])):ne("",!0)]),_:1})]),f("div",Na,[W(m(Gn),null,{default:z(()=>[r.value?(b(),x("fieldset",Ha,[(b(!0),x(be,null,Pe(m(o),(V,ue)=>(b(),x("label",{key:ue,class:"[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900"},[f("input",{type:"radio",name:"audioInput",value:V.deviceId,hidden:"",onChange:S},null,40,Ka),f("div",Va,[f("div",Sa,[V.deviceId===m(p)?(b(),x("div",Wa)):ne("",!0)]),f("span",{"inline-block":"",class:Ie([V.deviceId===m(p)?"cyan-400 dark:text-white":"cyan-400/50 dark:text-white/50"]),transition:"all duration-250 ease-in-out"},B(V.label),3)])]))),128))])):ne("",!0)]),_:1}),f("label",qa,[pe(f("input",{"onUpdate:modelValue":P[4]||(P[4]=V=>r.value=V),type:"checkbox",hidden:""},null,512),[[Ht,r.value]]),P[10]||(P[10]=f("div",{"i-solar:microphone-2-bold-duotone":""},null,-1)),f("div",null,[n.value?(b(),x("span",Ga,"Listening...")):(b(),x("span",Ja,B(I.$t("settings.microphone")),1))])])])])]))}}),Ei=ft(Ya,[["__scopeId","data-v-79ad68e9"]]),Xa={"mb-1":"","mt-2":"","w-full":"","gap-2":""},Qa={flex:"~ 1","w-full":"","items-center":"","justify-center":"","gap-2":"","px-2":"","text-nowrap":"","text-lg":""},Za=["src"],ja=["src"],er=N({__name:"MobileHeader",setup(e){const t=Kt();return(n,a)=>(b(),x("header",Xa,[f("div",Qa,[m(t)?(b(),x("img",{key:0,src:m(qn),"h-8":"","w-8":"",class:"theme-colored"},null,8,Za)):(b(),x("img",{key:1,src:m(Jn),"h-8":"","w-8":"",class:"theme-colored"},null,8,ja)),a[0]||(a[0]=f("div",{"font-cute":""},[f("span",null,"アイリ")],-1))])]))}}),Di=ft(er,[["__scopeId","data-v-2d5e277e"]]);function yt(e){return e?e.flatMap(t=>t.type===be?yt(t.children):[t]):[]}const tr=N({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var p,v;if(!n.default)return null;const a=yt(n.default()),r=a.findIndex(c=>c.type!==On);if(r===-1)return a;const o=a[r];(p=o.props)==null||delete p.ref;const i=o.props?ye(t,o.props):t;t.class&&((v=o.props)!=null&&v.class)&&delete o.props.class;const d=En(o,i);for(const c in i)c.startsWith("on")&&(d.props||(d.props={}),d.props[c]=i[c]);return a.length===1?d:(a[r]=d,a)}}}),Xe=N({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const a=e.asChild?"template":e.as;return typeof a=="string"&&["area","img","input"].includes(a)?()=>Ge(a,t):a!=="template"?()=>Ge(e.as,t,{default:n.default}):()=>Ge(tr,t,{default:n.default})}});function ht(e,t){const n=typeof e=="string"?`${e}Context`:t,a=Symbol(n);return[i=>{const d=Dn(a,i);if(d||d===null)return d;throw new Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},i=>(In(a,i),i)]}const[Gt,Ii]=ht("ConfigProvider");function fe(){const e=Ye(),t=k(),n=G(()=>{var i,d;return["#text","#comment"].includes((i=t.value)==null?void 0:i.$el.nodeName)?(d=t.value)==null?void 0:d.$el.nextElementSibling:vt(t)}),a=Object.assign({},e.exposed),r={};for(const i in e.props)Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get:()=>e.props[i]});if(Object.keys(a).length>0)for(const i in a)Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get:()=>a[i]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r;function o(i){t.value=i,i&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>i instanceof Element?i:i.$el}),e.exposed=r)}return{forwardRef:o,currentRef:t,currentElement:n}}let nr=0;function st(e,t="reka"){const n=Gt({useId:void 0});return Dt?`${t}-${Dt()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++nr}`}function ar(e,t){const n=k(e);function a(o){return t[n.value][o]??n.value}return{state:n,dispatch:o=>{n.value=a(o)}}}function rr(e,t){var g;const n=k({}),a=k("none"),r=k(e),o=e.value?"mounted":"unmounted";let i;const d=((g=t.value)==null?void 0:g.ownerDocument.defaultView)??Pn,{state:p,dispatch:v}=ar(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=_=>{var w;if(Me){const $=new CustomEvent(_,{bubbles:!1,cancelable:!1});(w=t.value)==null||w.dispatchEvent($)}};Q(e,async(_,w)=>{var O;const $=w!==_;if(await le(),$){const D=a.value,C=Ke(t.value);_?(v("MOUNT"),c("enter"),C==="none"&&c("after-enter")):C==="none"||((O=n.value)==null?void 0:O.display)==="none"?(v("UNMOUNT"),c("leave"),c("after-leave")):w&&D!==C?(v("ANIMATION_OUT"),c("leave")):(v("UNMOUNT"),c("after-leave"))}},{immediate:!0});const l=_=>{const w=Ke(t.value),$=w.includes(_.animationName),O=p.value==="mounted"?"enter":"leave";if(_.target===t.value&&$&&(c(`after-${O}`),v("ANIMATION_END"),!r.value)){const D=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",i=d==null?void 0:d.setTimeout(()=>{var C;((C=t.value)==null?void 0:C.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=D)})}_.target===t.value&&w==="none"&&v("ANIMATION_END")},s=_=>{_.target===t.value&&(a.value=Ke(t.value))},y=Q(t,(_,w)=>{_?(n.value=getComputedStyle(_),_.addEventListener("animationstart",s),_.addEventListener("animationcancel",l),_.addEventListener("animationend",l)):(v("ANIMATION_END"),i!==void 0&&(d==null||d.clearTimeout(i)),w==null||w.removeEventListener("animationstart",s),w==null||w.removeEventListener("animationcancel",l),w==null||w.removeEventListener("animationend",l))},{immediate:!0}),u=Q(p,()=>{const _=Ke(t.value);a.value=p.value==="mounted"?_:"none"});return Ce(()=>{y(),u()}),{isPresent:G(()=>["mounted","unmountSuspended"].includes(p.value))}}function Ke(e){return e&&getComputedStyle(e).animationName||"none"}const Yt=N({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var v;const{present:a,forceMount:r}=mt(e),o=k(),{isPresent:i}=rr(a,o);n({present:i});let d=t.default({present:i.value});d=yt(d||[]);const p=Ye();if(d&&(d==null?void 0:d.length)>1){const c=(v=p==null?void 0:p.parent)!=null&&v.type.name?`<${p.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` 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(l=>` - ${l}`).join(` -`)].join(` -`))}return()=>r.value||a.value||i.value?Ge(t.default({present:i.value})[0],{ref:c=>{const l=vt(c);return typeof(l==null?void 0:l.hasAttribute)>"u"||(l!=null&&l.hasAttribute("data-reka-popper-content-wrapper")?o.value=l.firstElementChild:o.value=l),l}}):null}});function gt(e){const t=Ye(),n=t==null?void 0:t.type.emits,a={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(r=>{a[Cn(Tn(r))]=(...o)=>e(r,...o)}),a}const[xe,or]=ht("DialogRoot"),ir=N({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=An(n,"open",t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),o=k(),i=k(),{modal:d}=mt(n);return or({open:r,modal:d,openModal:()=>{r.value=!0},onOpenChange:p=>{r.value=p},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:o,contentElement:i}),(p,v)=>ae(p.$slots,"default",{open:m(r)})}}),sr=N({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=xe(),{forwardRef:a,currentElement:r}=fe();return n.contentId||(n.contentId=st(void 0,"reka-dialog-content")),Le(()=>{n.triggerElement.value=r.value}),(o,i)=>(b(),j(m(Xe),ye(t,{ref:m(a),type:o.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":m(n).open.value||!1,"aria-controls":m(n).open.value?m(n).contentId:void 0,"data-state":m(n).open.value?"open":"closed",onClick:m(n).onOpenToggle}),{default:z(()=>[ae(o.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),lr=N({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=Rn();return(n,a)=>m(t)||n.forceMount?(b(),j(Mn,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[ae(n.$slots,"default")],8,["to","disabled","defer"])):ne("",!0)}});function Xt(e,t,n){const a=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),a.dispatchEvent(r)}const ur="dismissableLayer.pointerDownOutside",dr="dismissableLayer.focusOutside";function Qt(e,t){const n=t.closest("[data-dismissable-layer]"),a=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),r=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&a===n||r.indexOf(a){});return _e(i=>{if(!Me)return;const d=async v=>{const c=v.target;if(t!=null&&t.value){if(Qt(t.value,c)){a.value=!1;return}if(v.target&&!a.value){let l=function(){Xt(ur,e,s)};const s={originalEvent:v};v.pointerType==="touch"?(n.removeEventListener("click",r.value),r.value=l,n.addEventListener("click",r.value,{once:!0})):l()}else n.removeEventListener("click",r.value);a.value=!1}},p=window.setTimeout(()=>{n.addEventListener("pointerdown",d)},0);i(()=>{window.clearTimeout(p),n.removeEventListener("pointerdown",d),n.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>a.value=!0}}function pr(e,t){var r;const n=((r=t==null?void 0:t.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),a=k(!1);return _e(o=>{if(!Me)return;const i=async d=>{t!=null&&t.value&&(await le(),!(!t.value||Qt(t.value,d.target))&&d.target&&!a.value&&Xt(dr,e,{originalEvent:d}))};n.addEventListener("focusin",i),o(()=>n.removeEventListener("focusin",i))}),{onFocusCapture:()=>a.value=!0,onBlurCapture:()=>a.value=!1}}const de=Vt({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fr=N({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,a=t,{forwardRef:r,currentElement:o}=fe(),i=G(()=>{var u;return((u=o.value)==null?void 0:u.ownerDocument)??globalThis.document}),d=G(()=>de.layersRoot),p=G(()=>o.value?Array.from(d.value).indexOf(o.value):-1),v=G(()=>de.layersWithOutsidePointerEventsDisabled.size>0),c=G(()=>{const u=Array.from(d.value),[h]=[...de.layersWithOutsidePointerEventsDisabled].slice(-1),g=u.indexOf(h);return p.value>=g}),l=cr(async u=>{const h=[...de.branches].some(g=>g==null?void 0:g.contains(u.target));!c.value||h||(a("pointerDownOutside",u),a("interactOutside",u),await le(),u.defaultPrevented||a("dismiss"))},o),s=pr(u=>{[...de.branches].some(g=>g==null?void 0:g.contains(u.target))||(a("focusOutside",u),a("interactOutside",u),u.defaultPrevented||a("dismiss"))},o);Ln("Escape",u=>{p.value===d.value.size-1&&(a("escapeKeyDown",u),u.defaultPrevented||a("dismiss"))});let y;return _e(u=>{o.value&&(n.disableOutsidePointerEvents&&(de.layersWithOutsidePointerEventsDisabled.size===0&&(y=i.value.body.style.pointerEvents,i.value.body.style.pointerEvents="none"),de.layersWithOutsidePointerEventsDisabled.add(o.value)),d.value.add(o.value),u(()=>{n.disableOutsidePointerEvents&&de.layersWithOutsidePointerEventsDisabled.size===1&&(i.value.body.style.pointerEvents=y)}))}),_e(u=>{u(()=>{o.value&&(d.value.delete(o.value),de.layersWithOutsidePointerEventsDisabled.delete(o.value))})}),(u,h)=>(b(),j(m(Xe),{ref:m(r),"as-child":u.asChild,as:u.as,"data-dismissable-layer":"",style:St({pointerEvents:v.value?c.value?"auto":"none":void 0}),onFocusCapture:m(s).onFocusCapture,onBlurCapture:m(s).onBlurCapture,onPointerdownCapture:m(l).onPointerDownCapture},{default:z(()=>[ae(u.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}});function me(){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 vr(e){return e?"open":"closed"}const et="focusScope.autoFocusOnMount",tt="focusScope.autoFocusOnUnmount",At={bubbles:!1,cancelable:!0};function mr(e,{select:t=!1}={}){const n=me();for(const a of e)if(ve(a,{select:t}),me()!==n)return!0}function yr(e){const t=Zt(e),n=Rt(t,e),a=Rt(t.reverse(),e);return[n,a]}function Zt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const r=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||r?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rt(e,t){for(const n of e)if(!hr(n,{upTo:t}))return n}function hr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function gr(e){return e instanceof HTMLInputElement&&"select"in e}function ve(e,{select:t=!1}={}){if(e&&e.focus){const n=me();e.focus({preventScroll:!0}),e!==n&&gr(e)&&t&&e.select()}}const br=Un(()=>k([]));function wr(){const e=br();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=Mt(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=Mt(e.value,t),(n=e.value[0])==null||n.resume()}}}function Mt(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function _r(e){return e.filter(t=>t.tagName!=="A")}const kr=N({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,a=t,{currentRef:r,currentElement:o}=fe(),i=k(null),d=wr(),p=Vt({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});_e(c=>{if(!Me)return;const l=o.value;if(!n.trapped)return;function s(g){if(p.paused||!l)return;const _=g.target;l.contains(_)?i.value=_:ve(i.value,{select:!0})}function y(g){if(p.paused||!l)return;const _=g.relatedTarget;_!==null&&(l.contains(_)||ve(i.value,{select:!0}))}function u(g){l.contains(i.value)||ve(l)}document.addEventListener("focusin",s),document.addEventListener("focusout",y);const h=new MutationObserver(u);l&&h.observe(l,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",y),h.disconnect()})}),_e(async c=>{const l=o.value;if(await le(),!l)return;d.add(p);const s=me();if(!l.contains(s)){const u=new CustomEvent(et,At);l.addEventListener(et,h=>a("mountAutoFocus",h)),l.dispatchEvent(u),u.defaultPrevented||(mr(_r(Zt(l)),{select:!0}),me()===s&&ve(l))}c(()=>{l.removeEventListener(et,g=>a("mountAutoFocus",g));const u=new CustomEvent(tt,At),h=g=>{a("unmountAutoFocus",g)};l.addEventListener(tt,h),l.dispatchEvent(u),setTimeout(()=>{u.defaultPrevented||ve(s??document.body,{select:!0}),l.removeEventListener(tt,h),d.remove(p)},0)})});function v(c){if(!n.loop&&!n.trapped||p.paused)return;const l=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,s=me();if(l&&s){const y=c.currentTarget,[u,h]=yr(y);u&&h?!c.shiftKey&&s===h?(c.preventDefault(),n.loop&&ve(u,{select:!0})):c.shiftKey&&s===u&&(c.preventDefault(),n.loop&&ve(h,{select:!0})):s===y&&c.preventDefault()}}return(c,l)=>(b(),j(m(Xe),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:v},{default:z(()=>[ae(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),jt=N({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=xe(),{forwardRef:o,currentElement:i}=fe();return r.titleId||(r.titleId=st(void 0,"reka-dialog-title")),r.descriptionId||(r.descriptionId=st(void 0,"reka-dialog-description")),Le(()=>{r.contentElement=i,me()!==document.body&&(r.triggerElement.value=me())}),(d,p)=>(b(),j(m(kr),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:p[5]||(p[5]=v=>a("openAutoFocus",v)),onUnmountAutoFocus:p[6]||(p[6]=v=>a("closeAutoFocus",v))},{default:z(()=>[W(m(fr),ye({id:m(r).contentId,ref:m(o),as:d.as,"as-child":d.asChild,"disable-outside-pointer-events":d.disableOutsidePointerEvents,role:"dialog","aria-describedby":m(r).descriptionId,"aria-labelledby":m(r).titleId,"data-state":m(vr)(m(r).open.value)},d.$attrs,{onDismiss:p[0]||(p[0]=v=>m(r).onOpenChange(!1)),onEscapeKeyDown:p[1]||(p[1]=v=>a("escapeKeyDown",v)),onFocusOutside:p[2]||(p[2]=v=>a("focusOutside",v)),onInteractOutside:p[3]||(p[3]=v=>a("interactOutside",v)),onPointerDownOutside:p[4]||(p[4]=v=>a("pointerDownOutside",v))}),{default:z(()=>[ae(d.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}});var xr=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},De=new WeakMap,Ve=new WeakMap,Se={},nt=0,en=function(e){return e&&(e.host||en(e.parentNode))},$r=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=en(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Or=function(e,t,n,a){var r=$r(t,Array.isArray(e)?e:[e]);Se[n]||(Se[n]=new WeakMap);var o=Se[n],i=[],d=new Set,p=new Set(r),v=function(l){!l||d.has(l)||(d.add(l),v(l.parentNode))};r.forEach(v);var c=function(l){!l||p.has(l)||Array.prototype.forEach.call(l.children,function(s){if(d.has(s))c(s);else try{var y=s.getAttribute(a),u=y!==null&&y!=="false",h=(De.get(s)||0)+1,g=(o.get(s)||0)+1;De.set(s,h),o.set(s,g),i.push(s),h===1&&u&&Ve.set(s,!0),g===1&&s.setAttribute(n,"true"),u||s.setAttribute(a,"true")}catch(_){console.error("aria-hidden: cannot operate on ",s,_)}})};return c(t),d.clear(),nt++,function(){i.forEach(function(l){var s=De.get(l)-1,y=o.get(l)-1;De.set(l,s),o.set(l,y),s||(Ve.has(l)||l.removeAttribute(a),Ve.delete(l)),y||l.removeAttribute(n)}),nt--,nt||(De=new WeakMap,De=new WeakMap,Ve=new WeakMap,Se={})}},Er=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),r=xr(e);return r?(a.push.apply(a,Array.from(r.querySelectorAll("[aria-live]"))),Or(a,r,n,"aria-hidden")):function(){return null}};function Dr(e){let t;Q(()=>vt(e),n=>{n?t=Er(n):t&&t()}),Ce(()=>{t&&t()})}const Ir=N({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=xe(),o=gt(a),{forwardRef:i,currentElement:d}=fe();return Dr(d),(p,v)=>(b(),j(jt,ye({...n,...m(o)},{ref:m(i),"trap-focus":m(r).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:v[0]||(v[0]=c=>{var l;c.defaultPrevented||(c.preventDefault(),(l=m(r).triggerElement.value)==null||l.focus())}),onPointerDownOutside:v[1]||(v[1]=c=>{const l=c.detail.originalEvent,s=l.button===0&&l.ctrlKey===!0;(l.button===2||s)&&c.preventDefault()}),onFocusOutside:v[2]||(v[2]=c=>{c.preventDefault()})}),{default:z(()=>[ae(p.$slots,"default")]),_:3},16,["trap-focus"]))}}),Pr=N({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=gt(t);fe();const o=xe(),i=k(!1),d=k(!1);return(p,v)=>(b(),j(jt,ye({...n,...m(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:v[0]||(v[0]=c=>{var l;c.defaultPrevented||(i.value||(l=m(o).triggerElement.value)==null||l.focus(),c.preventDefault()),i.value=!1,d.value=!1}),onInteractOutside:v[1]||(v[1]=c=>{var y;c.defaultPrevented||(i.value=!0,c.detail.originalEvent.type==="pointerdown"&&(d.value=!0));const l=c.target;((y=m(o).triggerElement.value)==null?void 0:y.contains(l))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&d.value&&c.preventDefault()})}),{default:z(()=>[ae(p.$slots,"default")]),_:3},16))}}),Cr=N({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=xe(),o=gt(a),{forwardRef:i}=fe();return(d,p)=>(b(),j(m(Yt),{present:d.forceMount||m(r).open.value},{default:z(()=>[m(r).modal.value?(b(),j(Ir,ye({key:0,ref:m(i)},{...n,...m(o),...d.$attrs}),{default:z(()=>[ae(d.$slots,"default")]),_:3},16)):(b(),j(Pr,ye({key:1,ref:m(i)},{...n,...m(o),...d.$attrs}),{default:z(()=>[ae(d.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Tr=Fn(()=>{const e=k(new Map),t=k(),n=G(()=>{for(const i of e.value.values())if(i)return!0;return!1}),a=Gt({scrollBody:k(!0)});let r=null;const o=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",It&&(r==null||r()),t.value=void 0};return Q(n,(i,d)=>{var l;if(!Me)return;if(!i){d&&o();return}t.value===void 0&&(t.value=document.body.style.overflow);const p=window.innerWidth-document.documentElement.clientWidth,v={padding:p,margin:0},c=(l=a.scrollBody)!=null&&l.value?typeof a.scrollBody.value=="object"?dt({padding:a.scrollBody.value.padding===!0?p:a.scrollBody.value.padding,margin:a.scrollBody.value.margin===!0?p:a.scrollBody.value.margin},v):v:{padding:0,margin:0};p>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.body.style.setProperty("--scrollbar-width",`${p}px`),document.body.style.overflow="hidden"),It&&(r=zn(document,"touchmove",s=>Rr(s),{passive:!1})),le(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Ar(e){const t=Math.random().toString(36).substring(2,7),n=Tr();n.value.set(t,e);const a=G({get:()=>n.value.get(t)??!1,set:r=>n.value.set(t,r)});return Bn(()=>{n.value.delete(t)}),a}function tn(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}const Mr=N({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(e){const t=xe();return Ar(!0),fe(),(n,a)=>(b(),j(m(Xe),{as:n.as,"as-child":n.asChild,"data-state":m(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:z(()=>[ae(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Lr=N({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=xe(),{forwardRef:n}=fe();return(a,r)=>{var o;return(o=m(t))!=null&&o.modal.value?(b(),j(m(Yt),{key:0,present:a.forceMount||m(t).open.value},{default:z(()=>[W(Mr,ye(a.$attrs,{ref:m(n),as:a.as,"as-child":a.asChild}),{default:z(()=>[ae(a.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):ne("",!0)}}}),Ur=N({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,a)=>(b(),j(m(lr),Nn(Hn(t)),{default:z(()=>[ae(n.$slots,"default")]),_:3},16))}});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top],.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left],.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top],[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left],[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]:after{content:"";position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@keyframes fake-animation{}@media (hover: hover) and (pointer: fine){[vaul-drawer]{-webkit-user-select:none;user-select:none}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const Fr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Br=e=>typeof e<"u";function zr(e){return JSON.parse(JSON.stringify(e))}function Lt(e,t,n,a={}){var r,o,i;const{clone:d=!1,passive:p=!1,eventName:v,deep:c=!1,defaultValue:l,shouldEmit:s}=a,y=Ye(),u=n||(y==null?void 0:y.emit)||((r=y==null?void 0:y.$emit)==null?void 0:r.bind(y))||((i=(o=y==null?void 0:y.proxy)==null?void 0:o.$emit)==null?void 0:i.bind(y==null?void 0:y.proxy));let h=v;t||(t="modelValue"),h=h||`update:${t.toString()}`;const g=$=>d?typeof d=="function"?d($):zr($):$,_=()=>Br(e[t])?g(e[t]):l,w=$=>{s?s($)&&u(h,$):u(h,$)};if(p){const $=_(),O=k($);let D=!1;return Q(()=>e[t],C=>{D||(D=!0,O.value=g(C),le(()=>D=!1))}),Q(O,C=>{!D&&(C!==e[t]||c)&&w(C)},{deep:c}),O}else return G({get(){return _()},set($){w($)}})}const[nn,Nr]=ht("DrawerRoot"),an=new WeakMap;function K(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;const a={};Object.entries(t).forEach(([r,o])=>{if(r.startsWith("--")){e.style.setProperty(r,o);return}a[r]=e.style[r],e.style[r]=o}),!n&&an.set(e,a)}function We(e,t){if(!e||!(e instanceof HTMLElement))return;const n=an.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach(([a,r])=>{e.style[a]=r}))}function qe(e,t){const n=window.getComputedStyle(e),a=n.transform||n.webkitTransform||n.mozTransform;let r=a.match(/^matrix3d\((.+)\)$/);return r?Number.parseFloat(r[1].split(", ")[J(t)?13:12]):(r=a.match(/^matrix\((.+)\)$/),r?Number.parseFloat(r[1].split(", ")[J(t)?5:4]):null)}function Hr(e){return 8*(Math.log(e+1)-2)}function J(e){switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}}const U={DURATION:.5,EASE:[.32,.72,0,1]},rn=.4;function Kr({activeSnapPoint:e,snapPoints:t,drawerRef:n,overlayRef:a,fadeFromIndex:r,onSnapPointChange:o,direction:i}){const d=k(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function p(){d.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}Le(()=>{typeof window<"u"&&window.addEventListener("resize",p)}),Vn(()=>{typeof window<"u"&&window.removeEventListener("resize",p)});const v=G(()=>(t.value&&e.value===t.value[t.value.length-1])??null),c=G(()=>t.value&&t.value.length>0&&((r==null?void 0:r.value)||(r==null?void 0:r.value)===0)&&!Number.isNaN(r==null?void 0:r.value)&&t.value[(r==null?void 0:r.value)??-1]===e.value||!t.value),l=G(()=>{var w;return((w=t.value)==null?void 0:w.findIndex($=>$===e.value))??null}),s=G(()=>{var w;return((w=t.value)==null?void 0:w.map($=>{const O=typeof $=="string";let D=0;if(O&&(D=Number.parseInt($,10)),J(i.value)){const S=O?D:d.value?$*d.value.innerHeight:0;return d.value?i.value==="bottom"?d.value.innerHeight-S:-d.value.innerHeight+S:S}const C=O?D:d.value?$*d.value.innerWidth:0;return d.value?i.value==="right"?d.value.innerWidth-C:-d.value.innerWidth+C:C}))??[]}),y=G(()=>{var w;return l.value!==null?(w=s.value)==null?void 0:w[l.value]:null}),u=w=>{var $,O,D,C;const S=(($=s.value)==null?void 0:$.findIndex(I=>I===w))??null;le(()=>{var I;o(S,s.value),K((I=n.value)==null?void 0:I.$el,{transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,transform:J(i.value)?`translate3d(0, ${w}px, 0)`:`translate3d(${w}px, 0, 0)`})}),s.value&&S!==s.value.length-1&&S!==(r==null?void 0:r.value)?K((O=a.value)==null?void 0:O.$el,{transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,opacity:"0"}):K((D=a.value)==null?void 0:D.$el,{transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,opacity:"1"}),e.value=S!==null?((C=t.value)==null?void 0:C[S])??null:null};Q([e,s,t],()=>{var w;if(e.value){const $=((w=t.value)==null?void 0:w.findIndex(O=>O===e.value))??-1;s.value&&$!==-1&&typeof s.value[$]=="number"&&u(s.value[$])}},{immediate:!0});function h({draggedDistance:w,closeDrawer:$,velocity:O,dismissible:D}){var C,S,I;if(r.value===void 0)return;const P=i.value==="bottom"||i.value==="right"?(y.value??0)-w:(y.value??0)+w,V=l.value===r.value-1,ue=l.value===0,Te=w>0;if(V&&K((C=a.value)==null?void 0:C.$el,{transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`}),O>2&&!Te){D?$():u(s.value[0]);return}if(O>2&&Te&&s&&t.value){u(s.value[t.value.length-1]);return}const T=(S=s.value)==null?void 0:S.reduce((q,$e)=>typeof q!="number"||typeof $e!="number"?q:Math.abs($e-P)rn&&Math.abs(w)0&&v){u(s.value[(((I=t.value)==null?void 0:I.length)??0)-1]);return}if(ue&&q<0&&D&&$(),l.value===null)return;u(s.value[l.value+q]);return}u(T)}function g({draggedDistance:w}){var $;if(y.value===null)return;const O=i.value==="bottom"||i.value==="right"?y.value-w:y.value+w;(i.value==="bottom"||i.value==="right")&&Os.value[s.value.length-1]||K(($=n.value)==null?void 0:$.$el,{transform:J(i.value)?`translate3d(0, ${O}px, 0)`:`translate3d(${O}px, 0, 0)`})}function _(w,$){if(!t.value||typeof l.value!="number"||!s.value||r.value===void 0)return null;const O=l.value===r.value-1;if(l.value>=r.value&&$)return 0;if(O&&!$)return 1;if(!c.value&&!O)return null;const D=O?l.value+1:l.value-1,C=O?s.value[D]-s.value[D-1]:s.value[D+1]-s.value[D],S=w/Math.abs(C);return O?1-S:S}return{isLastSnapPoint:v,shouldFade:c,getPercentageDragged:_,activeSnapPointIndex:l,onRelease:h,onDrag:g,snapPointsOffset:s}}let Re=null;function Vr(e){const{isOpen:t,modal:n,nested:a,hasBeenOpened:r}=e,o=k(typeof window<"u"?window.location.href:""),i=k(0);function d(){if(Re===null&&t.value){Re={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:v,innerHeight:c}=window;document.body.style.position="fixed",document.body.style.top=`-${i.value}px`,document.body.style.left=`-${v}px`,document.body.style.right="0px",document.body.style.height="auto",setTimeout(()=>{requestAnimationFrame(()=>{const l=c-window.innerHeight;l&&i.value>=c&&(document.body.style.top=`-${i.value+l}px`)})},300)}}function p(){if(Re!==null){const v=-Number.parseInt(document.body.style.top,10),c=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,Re),requestAnimationFrame(()=>{if(o.value!==window.location.href){o.value=window.location.href;return}window.scrollTo(c,v)}),Re=null}}return Le(()=>{function v(){i.value=window.scrollY}v(),window.addEventListener("scroll",v),Ce(()=>{window.removeEventListener("scroll",v)})}),Q([t,r,o],()=>{a.value||!r.value||(t.value?(!window.matchMedia("(display-mode: standalone)").matches&&d(),n.value||setTimeout(()=>{p()},500)):p())}),{restorePositionSetting:p}}const Sr=.25,Wr=100,Ut=8,Je=16,qr=26,Ft="vaul-dragging";function Jr(e,t){return e&&e.value?e:t}function Gr(e){const{emitDrag:t,emitRelease:n,emitClose:a,emitOpenChange:r,open:o,dismissible:i,nested:d,modal:p,shouldScaleBackground:v,scrollLockTimeout:c,closeThreshold:l,activeSnapPoint:s,fadeFromIndex:y,direction:u}=e,h=k(o.value??!1),g=k(!1),_=k(!1),w=k(!1),$=k(!1),O=k(null),D=k(null),C=k(null),S=k(null),I=k(null),P=k(!0),V=k(null),ue=k(0),Te=k(!1);k(0);const T=k(null);k(0);const Fe=G(()=>{var E;return((E=T.value)==null?void 0:E.$el.getBoundingClientRect().height)||0}),q=Jr(e.snapPoints,k(void 0)),{activeSnapPointIndex:$e,onRelease:on,snapPointsOffset:sn,onDrag:ln,shouldFade:wt,getPercentageDragged:un}=Kr({snapPoints:q,activeSnapPoint:s,drawerRef:T,fadeFromIndex:y,overlayRef:O,onSnapPointChange:dn,direction:u});function dn(E,R){q.value&&E===R.length-1&&(D.value=new Date)}const{restorePositionSetting:cn}=Vr({isOpen:h,modal:p,nested:d,hasBeenOpened:g});function Oe(){return(window.innerWidth-qr)/window.innerWidth}function _t(E,R){var Y;if(!E)return!1;let H=E;const X=(Y=window.getSelection())==null?void 0:Y.toString(),ee=T.value?qe(T.value.$el,u.value):null,se=new Date;if(H.hasAttribute("data-vaul-no-drag")||H.closest("[data-vaul-no-drag]"))return!1;if(u.value==="right"||u.value==="left")return!0;if(D.value&&se.getTime()-D.value.getTime()<500)return!1;if(ee!==null&&(u.value==="bottom"?ee>0:ee<0))return!0;if(X&&X.length>0)return!1;if(I.value&&se.getTime()-I.value.getTime()H.clientHeight){if(H.scrollTop!==0)return I.value=new Date,!1;if(H.getAttribute("role")==="dialog")return!0}H=H.parentNode}return!0}function pn(E){!i.value&&!q.value||T.value&&!T.value.$el.contains(E.target)||(w.value=!0,C.value=new Date,E.target.setPointerCapture(E.pointerId),ue.value=J(u.value)?E.clientY:E.clientX)}function fn(E){var R,Y,H,X,ee,se;if(T.value&&w.value){const Ee=u.value==="bottom"||u.value==="right"?1:-1,Be=(ue.value-(J(u.value)?E.clientY:E.clientX))*Ee,ze=Be>0,xt=q.value&&!i.value&&!ze;if(xt&&$e.value===0)return;const Ze=Math.abs(Be),$t=document.querySelector("[vaul-drawer-wrapper]");let he=Ze/Fe.value;const Ot=un(Ze,ze);if(Ot!==null&&(he=Ot),xt&&he>=1||!P.value&&!_t(E.target,ze))return;if((R=T==null?void 0:T.value)==null||R.$el.classList.add(Ft),P.value=!0,K((Y=T.value)==null?void 0:Y.$el,{transition:"none"}),K((H=O.value)==null?void 0:H.$el,{transition:"none"}),q.value&&ln({draggedDistance:Be}),ze&&!q.value){const ge=Hr(Be),Ne=Math.min(ge*-1,0)*Ee;K((X=T.value)==null?void 0:X.$el,{transform:J(u.value)?`translate3d(0, ${Ne}px, 0)`:`translate3d(${Ne}px, 0, 0)`});return}const gn=1-he;if((wt.value||y.value&&$e.value===y.value-1)&&(t(he),K((ee=O.value)==null?void 0:ee.$el,{opacity:`${gn}`,transition:"none"},!0)),$t&&O.value&&v.value){const ge=Math.min(Oe()+he*(1-Oe()),1),Ne=8-he*8,Et=Math.max(0,14-he*14);K($t,{borderRadius:`${Ne}px`,transform:J(u.value)?`scale(${ge}) translate3d(0, ${Et}px, 0)`:`scale(${ge}) translate3d(${Et}px, 0, 0)`,transition:"none"},!0)}if(!q.value){const ge=Ze*Ee;K((se=T.value)==null?void 0:se.$el,{transform:J(u.value)?`translate3d(0, ${ge}px, 0)`:`translate3d(${ge}px, 0, 0)`})}}}function kt(){var E;if(!T.value)return;const R=document.querySelector("[vaul-drawer-wrapper]"),Y=qe(T.value.$el,u.value);K(T.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`}),K((E=O.value)==null?void 0:E.$el,{transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,opacity:"1"}),v.value&&Y&&Y>0&&h.value&&K(R,{borderRadius:`${Ut}px`,overflow:"hidden",...J(u.value)?{transform:`scale(${Oe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Oe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${U.DURATION}s`,transitionTimingFunction:`cubic-bezier(${U.EASE.join(",")})`},!0)}function Ae(){var E;T.value&&(a(),K(T.value.$el,{transform:J(u.value)?`translate3d(0, ${u.value==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${u.value==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`}),K((E=O.value)==null?void 0:E.$el,{opacity:"0",transition:`opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`}),Qe(!1),window.setTimeout(()=>{_.value=!1,h.value=!1},300),window.setTimeout(()=>{q.value&&(s.value=q.value[0])},U.DURATION*1e3))}_e(()=>{if(!h.value&&v.value&&Fr){const E=setTimeout(()=>{We(document.body)},200);return()=>clearTimeout(E)}}),Ce(()=>{Qe(!1),cn()});function vn(E){if(!w.value||!T.value)return;T.value.$el.classList.remove(Ft),P.value=!1,w.value=!1,S.value=new Date;const R=qe(T.value.$el,u.value);if(!_t(E.target,!1)||!R||Number.isNaN(R)||C.value===null)return;const Y=S.value.getTime()-C.value.getTime(),H=ue.value-(J(u.value)?E.clientY:E.clientX),X=Math.abs(H)/Y;if(X>.05&&($.value=!0,window.setTimeout(()=>{$.value=!1},200)),q.value){const se=u.value==="bottom"||u.value==="right"?1:-1;on({draggedDistance:H*se,closeDrawer:Ae,velocity:X,dismissible:i.value}),n(!0);return}if(u.value==="bottom"||u.value==="right"?H>0:H<0){kt(),n(!0);return}if(X>rn){Ae(),n(!1);return}const ee=Math.min(T.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(R>=ee*l.value){Ae(),n(!1);return}n(!0),kt()}Q(h,E=>{E&&(D.value=new Date,Qe(!0)),r(E)},{immediate:!0}),Q(o,E=>{E?(h.value=E,g.value=!0):Ae()},{immediate:!0});function Qe(E){const R=document.querySelector("[vaul-drawer-wrapper]");!R||!v.value||(E?(K(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),K(document.body,{background:"black"},!0),K(R,{borderRadius:`${Ut}px`,overflow:"hidden",...J(u.value)?{transform:`scale(${Oe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Oe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${U.DURATION}s`,transitionTimingFunction:`cubic-bezier(${U.EASE.join(",")})`})):(We(R,"overflow"),We(R,"transform"),We(R,"borderRadius"),K(R,{transitionProperty:"transform, border-radius",transitionDuration:`${U.DURATION}s`,transitionTimingFunction:`cubic-bezier(${U.EASE.join(",")})`})))}function mn(E){var R,Y;const H=E?(window.innerWidth-Je)/window.innerWidth:1,X=E?-16:0;V.value&&window.clearTimeout(V.value),K((R=T.value)==null?void 0:R.$el,{transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,transform:`scale(${H}) translate3d(0, ${X}px, 0)`}),!E&&(Y=T.value)!=null&&Y.$el&&(V.value=window.setTimeout(()=>{var ee,se;const Ee=qe((ee=T.value)==null?void 0:ee.$el,u.value);K((se=T.value)==null?void 0:se.$el,{transition:"none",transform:J(u.value)?`translate3d(0, ${Ee}px, 0)`:`translate3d(${Ee}px, 0, 0)`})},500))}function yn(E){var R;if(E<0)return;const Y=J(u.value)?window.innerHeight:window.innerWidth,H=(Y-Je)/Y,X=H+E*(1-H),ee=-16+E*Je;K((R=T.value)==null?void 0:R.$el,{transform:J(u.value)?`scale(${X}) translate3d(0, ${ee}px, 0)`:`scale(${X}) translate3d(${ee}px, 0, 0)`,transition:"none"})}function hn(E){var R;const Y=J(u.value)?window.innerHeight:window.innerWidth,H=E?(Y-Je)/Y:1,X=E?-16:0;E&&K((R=T.value)==null?void 0:R.$el,{transition:`transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,transform:J(u.value)?`scale(${H}) translate3d(0, ${X}px, 0)`:`scale(${H}) translate3d(${X}px, 0, 0)`})}return{open:o,isOpen:h,modal:p,keyboardIsOpen:Te,hasBeenOpened:g,isVisible:_,drawerRef:T,drawerHeightRef:Fe,overlayRef:O,isDragging:w,dragStartTime:C,isAllowedToDrag:P,snapPoints:q,activeSnapPoint:s,pointerStart:ue,dismissible:i,snapPointsOffset:sn,direction:u,shouldFade:wt,fadeFromIndex:y,shouldScaleBackground:v,onPress:pn,onDrag:fn,onRelease:vn,closeDrawer:Ae,onNestedDrag:yn,onNestedRelease:hn,onNestedOpenChange:mn,emitClose:a,emitDrag:t,emitRelease:n,emitOpenChange:r,nested:d}}const Yr=N({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:Sr},shouldScaleBackground:{type:Boolean,default:void 0},scrollLockTimeout:{default:Wr},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:"bottom"},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{expose:t,emit:n}){const a=e,r=n;Kn();const o=G(()=>a.fadeFromIndex??(a.snapPoints&&a.snapPoints.length-1)),i=Lt(a,"open",r,{defaultValue:a.defaultOpen,passive:a.open===void 0}),d=Lt(a,"activeSnapPoint",r,{passive:a.activeSnapPoint===void 0}),p={emitDrag:u=>r("drag",u),emitRelease:u=>r("release",u),emitClose:()=>r("close"),emitOpenChange:u=>{r("update:open",u),setTimeout(()=>{r("animationEnd",u)},U.DURATION*1e3)}},{closeDrawer:v,hasBeenOpened:c,modal:l,isOpen:s}=Nr(Gr({...p,...mt(a),activeSnapPoint:d,fadeFromIndex:o,open:i}));function y(u){if(i.value!==void 0){p.emitOpenChange(u);return}u?(c.value=!0,s.value=u):v()}return t({open:s}),(u,h)=>(b(),j(m(ir),{open:m(s),modal:m(l),"onUpdate:open":y},{default:z(()=>[ae(u.$slots,"default",{open:m(s)})]),_:3},8,["open","modal"]))}}),Xr=N({__name:"DrawerOverlay",setup(e){const{overlayRef:t,snapPoints:n,isVisible:a,isOpen:r,shouldFade:o}=nn(),i=G(()=>{var d;return n&&(((d=n.value)==null?void 0:d.length)??0)>0});return(d,p)=>(b(),j(m(Lr),{ref_key:"overlayRef",ref:t,"vaul-drawer-visible":m(a)?"true":"false","vaul-overlay":"","vaul-snap-points":m(r)&&i.value?"true":"false","vaul-snap-points-overlay":m(r)&&m(o)?"true":"false"},null,8,["vaul-drawer-visible","vaul-snap-points","vaul-snap-points-overlay"]))}}),Qr=N({__name:"DrawerContent",setup(e){const{open:t,isOpen:n,isVisible:a,snapPointsOffset:r,drawerRef:o,onPress:i,onDrag:d,onRelease:p,modal:v,emitOpenChange:c,dismissible:l,keyboardIsOpen:s,closeDrawer:y,direction:u}=nn(),h=G(()=>r.value&&r.value.length>0?`${r.value[0]}px`:"0");function g(_){if(!v.value||_.defaultPrevented){_.preventDefault();return}s.value&&(s.value=!1),_.preventDefault(),l.value&&c(!1),!(!l.value||t.value!==void 0)&&y()}return Q(n,_=>{_&&setTimeout(()=>{a.value=!0},1)},{immediate:!0}),(_,w)=>(b(),j(m(Cr),{ref_key:"drawerRef",ref:o,"vaul-drawer":"","vaul-drawer-direction":m(u),"vaul-drawer-visible":m(a)?"true":"false",style:St({"--snap-point-height":h.value}),onPointerdown:m(i),onPointermove:m(d),onPointerup:m(p),onPointerDownOutside:g,onEscapeKeyDown:w[0]||(w[0]=$=>{m(l)||$.preventDefault()})},{default:z(()=>[ae(_.$slots,"default")]),_:3},8,["vaul-drawer-direction","vaul-drawer-visible","style","onPointerdown","onPointermove","onPointerup"]))}}),Zr={py:"1",flex:"~ col",rounded:"lg","overflow-hidden":""},jr={key:0,flex:"",mr:"12"},eo={flex:"~ col",border:"4 solid primary-200/50 dark:primary-500/50",shadow:"md primary-200/50 dark:none","min-w-20":"","rounded-lg":"","px-2":"","py-1":"",h:"unset {le().then(()=>{a.update(),r.value=a.height.value})}),d(async()=>{le().then(()=>{a.update(),r.value=a.height.value})}),(p,v)=>{const c=Nt("auto-animate");return b(),x("div",Zr,[v[1]||(v[1]=f("div",{"flex-1":""},null,-1)),pe((b(),x("div",{ref_key:"chatHistoryRef",ref:t,"h-full":"","w-full":"","max-h":"30vh",flex:"~ col","overflow-scroll":""},[v[0]||(v[0]=f("div",{"flex-1":""},null,-1)),(b(!0),x(be,null,Pe(m(n),(l,s)=>(b(),x("div",{key:s,"mb-2":""},[l.role==="assistant"?(b(),x("div",jr,[f("div",eo,[f("div",null,[f("span",to,B(p.$t("stage.chat.message.character-name.airi")),1)]),l.content?(b(),x("div",{key:0,class:"markdown-content",text:"base 0&&te('A "pipe" with multiple schemas cannot be converted to JSON Schema.',n);const d=ie({},i,n,a);if(d.$ref){const p=d.$ref.split("/")[2];Object.assign(e,a.definitions[p])}else Object.assign(e,d)}else e=ho(e,i,n)}return e}switch(t.type){case"boolean":{e.type="boolean";break}case"null":{e.type="null";break}case"number":{e.type="number";break}case"string":{e.type="string";break}case"array":{e.type="array",e.items=ie({},t.item,n,a);break}case"tuple":case"tuple_with_rest":case"loose_tuple":case"strict_tuple":{e.type="array",e.items=[];for(const o of t.items)e.items.push(ie({},o,n,a));t.type==="tuple_with_rest"?e.additionalItems=ie({},t.rest,n,a):e.additionalItems=t.type==="loose_tuple";break}case"object":case"object_with_rest":case"loose_object":case"strict_object":{e.type="object",e.properties={},e.required=[];for(const o in t.entries){const i=t.entries[o];e.properties[o]=ie({},i,n,a),i.type!=="nullish"&&i.type!=="optional"&&e.required.push(o)}t.type==="object_with_rest"?e.additionalProperties=ie({},t.rest,n,a):t.type==="strict_object"&&(e.additionalProperties=!1);break}case"record":{"pipe"in t.key&&te('The "record" schema with a schema for the key that contains a "pipe" cannot be converted to JSON Schema.',n),t.key.type!=="string"&&te(`The "record" schema with the "${t.key.type}" schema for the key cannot be converted to JSON Schema.`,n),e.type="object",e.additionalProperties=ie({},t.value,n,a);break}case"any":case"unknown":break;case"nullable":case"nullish":{e.anyOf=[ie({},t.wrapped,n,a),{type:"null"}],t.default!==void 0&&(e.default=lt(t));break}case"exact_optional":case"optional":case"undefinedable":{e=ie(e,t.wrapped,n,a),t.default!==void 0&&(e.default=lt(t));break}case"literal":{typeof t.literal!="boolean"&&typeof t.literal!="number"&&typeof t.literal!="string"&&te('The value of the "literal" schema is not JSON compatible.',n),e.const=t.literal;break}case"enum":{e.enum=t.options;break}case"picklist":{t.options.some(o=>typeof o!="number"&&typeof o!="string")&&te('An option of the "picklist" schema is not JSON compatible.',n),e.enum=t.options;break}case"union":case"variant":{e.anyOf=t.options.map(o=>ie({},o,n,a));break}case"intersect":{e.allOf=t.options.map(o=>ie({},o,n,a));break}case"lazy":{let o=a.getterMap.get(t.getter);o||(o=t.getter(void 0),a.getterMap.set(t.getter,o));let i=a.referenceMap.get(o);i||(i=`${go++}`,a.referenceMap.set(o,i),a.definitions[i]=ie({},o,n,a)),e.$ref=`#/$defs/${i}`;break}default:te(`The "${t.type}" schema cannot be converted to JSON Schema.`,n)}return e}function oe(e,t){const n={definitions:{},referenceMap:new Map,getterMap:new Map},a=ie({$schema:"http://json-schema.org/draft-07/schema#"},e,t,n);return n.referenceMap.size&&(a.$defs=n.definitions),a}const bo={flex:"~ col","gap-2":""},wo=["onClick"],_o={flex:"~ row 1","items-center":"","gap-1.5":""},ko={"p-4":""},xo={class:"space-y-4"},$o={key:0},Oo={class:"flex items-center justify-between"},Eo={class:"flex items-center gap-1 text-sm font-medium"},Do={key:0,class:"text-red-500"},Io={key:0,class:"text-xs text-zinc-500 dark:text-zinc-400"},Po=["onClick"],Co={class:"mt-2 space-y-2"},To=["onUpdate:modelValue","onInput"],Ao=["onUpdate:modelValue","onInput"],Ro=["onClick"],Mo={key:1,class:"flex items-center justify-between"},Lo={class:"flex items-center gap-1 text-sm font-medium"},Uo={key:0,class:"text-red-500"},Fo={key:0,class:"text-xs text-zinc-400 dark:text-zinc-600"},Bo=["type","value","placeholder","onInput"],zo=N({__name:"ModelProviderSettings",setup(e){const t=G(()=>[{id:"openrouter-ai",name:"OpenRouter",icon:"i-lobe-icons:openrouter",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for OpenRouter")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")),"https://openrouter.ai/api/v1/")}))},{id:"openai",name:"OpenAI",icon:"i-lobe-icons:openai",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for OpenAI services")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")),"https://api.openai.com/v1/")}))},{id:"ollama-ai",name:"Ollama",icon:"i-lobe-icons:ollama",fields:oe(re({baseUrl:Z(F(A(),L("Host"),M("Host of the Ollama instance (optional)"))),extraHeaders:Z(F(ut(A(),A()),L("Headers"),M("Custom Headers for Ollama instance (optional)")))}))},{id:"vllm",name:"vLLM",icon:"i-lobe-icons:vllm-color",fields:oe(re({baseUrl:Z(F(A(),L("Host"),M("Host of the vLLM instance (optional)"))),apiKey:Z(F(A(),L("API Key"),M("API Key for vLLM"))),extraHeaders:Z(F(ut(A(),A()),L("Headers"),M("Custom Headers for vLLM instance (optional)")))}))},{id:"elevenlabs",name:"ElevenLabs",icon:"i-simple-icons:elevenlabs",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for ElevenLabs")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")))}))},{id:"xai",name:"xAI",icon:"i-lobe-icons:xai",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for xAI")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")),"https://api.x.ai/v1/")}))},{id:"deepseek",name:"DeepSeek",icon:"i-lobe-icons:deepseek-color",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for DeepSeek")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")),"https://api.deepseek.com/")}))},{id:"together-ai",name:"Together.ai",icon:"i-lobe-icons:together-color",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for Together.ai")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")),"https://api.together.xyz/v1/")}))},{id:"novita-ai",name:"Novita",icon:"i-lobe-icons:novita-color",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for Novita")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")),"https://api.novita.ai/v3/openai/")}))},{id:"fireworks-ai",name:"Fireworks.ai",icon:"i-lobe-icons:fireworks",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for Fireworks.ai")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")),"https://api.fireworks.ai/inference/v1/")}))},{id:"cloudflare-workers-ai",name:"Cloudflare Workers AI",icon:"i-lobe-icons:cloudflare-color",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key")),accountId:F(A(),L("Account ID"),M("Cloudflare Account ID"))}))},{id:"mistral-ai",name:"Mistral",icon:"i-lobe-icons:mistral-color",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for OpenRouter")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")),"https://api.mistral.ai/v1/")}))},{id:"moonshot-ai",name:"Moonshot AI",icon:"i-lobe-icons:moonshot",fields:oe(re({apiKey:F(A(),L("API Key"),M("API Key for OpenRouter")),baseUrl:Z(F(A(),L("Base URL"),M("Custom base URL (optional)")),"https://api.moonshot.cn/v1/")}))}]),{providers:n}=we(Zn());function a(s,y){var u;return((u=n.value[s])==null?void 0:u[y])||""}function r(s,y,u){n.value[s]||(n.value[s]={}),n.value[s][y]=u}function o(s,y){var h;const u=(h=n.value[s])==null?void 0:h[y];if(!u)return[["",""]];try{return Object.entries(u)}catch{return[["",""]]}}function i(s,y,u){var _;const h=u.filter(([w,$])=>w||$);if(h.length===0){(_=n.value[s])==null||delete _[y];return}const g=Object.fromEntries(h);r(s,y,g)}function d(s){s.push(["",""])}function p(s,y){s.splice(y,1)}function v(s,y){if(s.default!==void 0)return s.default;if(s.type==="object"&&s.additionalProperties)return[];switch(s.type){case"string":return"";case"number":case"integer":return 0;case"boolean":return!1;case"array":return[];case"object":return{};default:return""}}function c(s,y,u){var g;if(((g=n.value[s])==null?void 0:g[y])===void 0){const _=v(u);r(s,y,_)}}function l(s){const y=t.value.find(u=>u.id===s);!y||!y.fields.properties||Object.entries(y.fields.properties).forEach(([u,h])=>{c(s,u,h)})}return(s,y)=>(b(),x("div",bo,[(b(!0),x(be,null,Pe(t.value,u=>(b(),x("div",{key:u.id},[W(m(Qn),{"w-full":""},{trigger:z(h=>[f("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:g=>h.setVisible(!h.visible)&&l(u.id)},[f("div",_o,[f("div",{class:Ie([u.icon,"provider-icon size-6"]),transition:"filter duration-250 ease-in-out"},null,2),f("div",null,B(u.name),1)]),f("div",{transform:"",transition:"transform duration-250",class:Ie({"rotate-180":h.visible})},y[0]||(y[0]=[f("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,wo)]),default:z(()=>[f("div",ko,[f("div",xo,[(b(!0),x(be,null,Pe(u.fields.properties,(h,g)=>{var _,w;return b(),x("div",{key:g,class:"space-y-1"},[typeof h!="boolean"&&typeof g!="number"&&h.type==="object"&&h.additionalProperties?(b(),x("div",$o,[f("div",Oo,[f("div",null,[f("div",Eo,[Pt(B(h.title||g)+" ",1),(_=u.fields.required)!=null&&_.includes(g)?(b(),x("span",Do,"*")):ne("",!0)]),h.description?(b(),x("div",Io,B(h.description),1)):ne("",!0)]),f("button",{class:"text-sm",onClick:$=>d(o(u.id,g))},y[1]||(y[1]=[f("div",{"i-solar:add-circle-line-duotone":""},null,-1)]),8,Po)]),f("div",Co,[(b(!0),x(be,null,Pe(o(u.id,g),($,O)=>(b(),x("div",{key:O,class:"flex items-center gap-2"},[pe(f("input",{"onUpdate:modelValue":D=>o(u.id,g)[O][0]=D,type:"text",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","flex-1":"",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:"Key",onInput:D=>i(u.id,g,o(u.id,g))},null,40,To),[[Ct,o(u.id,g)[O][0]]]),pe(f("input",{"onUpdate:modelValue":D=>o(u.id,g)[O][1]=D,type:"text",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","flex-1":"",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:"Value",onInput:D=>i(u.id,g,o(u.id,g))},null,40,Ao),[[Ct,o(u.id,g)[O][1]]]),f("button",{class:"text-red-500 hover:text-red-600",onClick:D=>p(o(u.id,g),O)},y[2]||(y[2]=[f("div",{"i-solar:trash-bin-trash-bold-duotone":""},null,-1)]),8,Ro)]))),128))])])):ne("",!0),typeof h!="boolean"&&typeof g!="number"&&h.type==="string"?(b(),x("div",Mo,[f("div",null,[f("div",Lo,[Pt(B(h.title)+" ",1),(w=u.fields.required)!=null&&w.includes(g)?(b(),x("span",Uo,"*")):ne("",!0)]),h.description?(b(),x("div",Fo,B(h.description),1)):ne("",!0)]),f("input",{type:g.toLowerCase().includes("key")?"password":"text",value:a(u.id,g),rounded:"",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:h.default&&String(h.default)||`Enter ${h.title||g}`,onInput:$=>r(u.id,g,$.target.value)},null,40,Bo)])):ne("",!0)])}),128))])])]),_:2},1024)]))),128))]))}}),No={text:"zinc-500 dark:zinc-400",class:"relative"},Ho={key:"main"},Ko={text:"zinc-800/80 dark:zinc-200/80 xl","mb-4":"","font-bold":""},Vo={class:"space-y-2"},So={text:"sm"},Wo={grid:"~ cols-[150px_1fr]",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":""},qo={text:"sm"},Jo={flex:"~ row","w-full":"","justify-end":""},Go={value:"en-US"},Yo={value:"zh-CN"},Xo={bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","cursor-pointer":"","rounded-lg":"","px-4":"","py-3":""},Qo=["checked","aria-checked"],Zo={flex:"~ row","w-full":"","items-center":"","gap-1.5":""},jo={text:"sm","w-full":"","flex-1":""},ei={"select-none":""},ti={key:0,"i-solar:moon-stars-bold-duotone":"",transition:"all ease-in-out duration-250"},ni={key:1,"i-solar:sun-fog-bold-duotone":"",transition:"all ease-in-out duration-250"},ai={text:"sm"},ri={key:"providers"},oi={"mb-4":"",flex:"","items-center":"","gap-2":""},ii={text:"zinc-800/80 dark:zinc-200/80 xl","font-bold":""},si={key:"live2d"},li={"mb-4":"",flex:"","items-center":"","gap-2":""},ui={text:"zinc-800/80 dark:zinc-200/80 xl","font-bold":""},di=N({__name:"MobileSettings",setup(e){const{t}=pt(),n=we(ct()),a=Kt({disableTransition:!1}),r=k("main"),o=k("forward");function i(c){const l=c.target;n.language.value=l.value}function d(){o.value="forward",r.value="providers"}function p(){o.value="forward",r.value="live2d"}function v(){o.value="backward",r.value="main"}return(c,l)=>{const s=Xn;return b(),x("div",No,[W(it,{name:o.value==="forward"?"slide-forward":"slide-backward"},{default:z(()=>[r.value==="main"?(b(),x("div",Ho,[f("h2",Ko,B(m(t)("settings.title")),1),f("div",null,[f("div",Vo,[f("div",{grid:"~ cols-[150px_1fr]",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","cursor-pointer":"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"",onClick:d},[f("div",So,[f("span",null,B(m(t)("settings.model-provider.title")),1)]),l[1]||(l[1]=f("div",{flex:"~ row","w-full":"","justify-end":"",text:"sm"},[f("div",{"i-solar:alt-arrow-right-bold-duotone":""})],-1))]),f("div",Wo,[f("div",qo,[f("span",null,B(m(t)("settings.language.title")),1)]),f("div",Jo,[f("select",{class:"w-32",bg:"transparent",text:"sm right zinc-800 dark:zinc-100",transition:"all ease-in-out duration-250",outline:"none",onChange:i},[f("option",Go,B(m(t)("settings.language.english")),1),f("option",Yo,B(m(t)("settings.language.chinese")),1)],32)])]),f("label",Xo,[pe(f("input",{"onUpdate:modelValue":l[0]||(l[0]=y=>Sn(a)?a.value=y:null),text:"zinc-800 dark:zinc-100",checked:m(a),"aria-checked":m(a),type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,Qo),[[Ht,m(a)]]),f("div",Zo,[f("div",jo,[f("span",null,B(m(t)("settings.theme")),1)]),f("div",ei,[W(it,{name:"slide-away",mode:"out-in"},{default:z(()=>[m(a)?(b(),x("div",ti)):(b(),x("div",ni))]),_:1})])])]),f("div",{grid:"~ cols-[150px_1fr]",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","cursor-pointer":"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"",onClick:p},[f("div",ai,[f("span",null,B(m(t)("settings.live2d.title")),1)]),l[2]||(l[2]=f("div",{flex:"~ row","w-full":"","justify-end":""},[f("div",{"i-solar:alt-arrow-right-bold-duotone":""})],-1))])])])])):r.value==="providers"?(b(),x("div",ri,[f("div",oi,[f("button",{text:"zinc-800/80 dark:zinc-200/80",onClick:v},l[3]||(l[3]=[f("div",{"i-solar:alt-arrow-left-bold-duotone":""},null,-1)])),f("h2",ii,B(m(t)("settings.model-provider.title")),1)]),W(zo)])):r.value==="live2d"?(b(),x("div",si,[f("div",li,[f("button",{text:"zinc-800/80 dark:zinc-200/80",onClick:v},l[4]||(l[4]=[f("div",{"i-solar:alt-arrow-left-bold-duotone":""},null,-1)])),f("h2",ui,B(m(t)("settings.live2d.title")),1)]),W(s)])):ne("",!0)]),_:1},8,["name"])])}}}),ci=ft(di,[["__scopeId","data-v-2a32d08f"]]),pi={relative:"","w-full":"",flex:"","gap-1":""},fi={flex:"","flex-1":""},vi={class:"flex flex-1 flex-col rounded-t-lg p-5",bg:"[#fffbff] dark:[#1f1a1d]","gap-2":""},Pi=N({__name:"MobileInteractiveArea",emits:["settingsOpen"],setup(e,{emit:t}){const n=t,a=k(""),r=k(!1),{isAudioInputOn:o,selectedAudioDeviceId:i}=we(ct()),{send:d,onAfterSend:p}=ke(),{t:v}=pt();async function c(){a.value.trim()&&await d(a.value)}const{destroy:l,start:s}=Jt(i,{onSpeechStart:()=>{r.value=!0},onVADMisfire:()=>{r.value=!1},onSpeechEnd:h=>{r.value=!1,y()},auto:!1});function y(h){alert("Transcription is not implemented yet")}function u(h){n("settingsOpen",h)}return Q(o,async h=>{h==="false"&&l()}),p(async()=>{a.value=""}),Le(()=>{s()}),(h,g)=>(b(),x("div",null,[f("div",pi,[W(uo,{absolute:"","left-0":"","top-0":"",transform:"translate-y-[-100%]","w-full":""}),f("div",fi,[W(m(Wt),{modelValue:a.value,"onUpdate:modelValue":g[0]||(g[0]=_=>a.value=_),placeholder:m(v)("stage.message"),border:"solid 2 primary-100 dark:primary-400/20",text:"primary-400 hover:primary-600 dark:[#905073] dark:hover:primary-600 placeholder:primary-400 placeholder:hover:primary-600 placeholder:dark:[#905073] placeholder:dark:hover:primary-600",bg:"primary-50 dark:[#3c2632]","max-h":"[10lh]","min-h":"[1lh]","w-full":"","resize-none":"","overflow-y-scroll":"","rounded-l-xl":"","p-2":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",onSubmit:c},null,8,["modelValue","placeholder"])]),W(m(Yr),{"should-scale-background":"","onUpdate:open":u},{default:z(()=>[W(m(sr),{class:"px-4 py-2.5",border:"solid 2 primary-100 dark:primary-400/20",text:"lg primary-400 hover:primary-600 dark:[#905073] dark:hover:primary-600 placeholder:primary-400 placeholder:hover:primary-600 placeholder:dark:[#905073] placeholder:dark:hover:primary-600",bg:"primary-50 dark:[#3c2632]","max-h":"[10lh]","min-h":"[1lh]","rounded-r-xl":""},{default:z(()=>g[1]||(g[1]=[f("div",{"i-solar:settings-bold-duotone":""},null,-1)])),_:1}),W(m(Ur),null,{default:z(()=>[W(m(Xr),{class:"fixed inset-0 z-50 bg-black/40"}),W(m(Qr),{"max-h":"[75%]",fixed:"","bottom-0":"","left-0":"","right-0":"","z-50":"","mt-24":"","h-full":"",flex:"","flex-col":"","rounded-t-lg":"",bg:"[#fffbff] dark:[#1f1a1d]"},{default:z(()=>[f("div",vi,[W(ci)])]),_:1})]),_:1})]),_:1})])]))}});export{Ei as I,Di as M,Oi as _,Pi as a}; diff --git a/assets/RadioCardSimple.vue_vue_type_script_setup_true_lang-BPQCQDzL.js b/assets/RadioCardSimple.vue_vue_type_script_setup_true_lang-BPQCQDzL.js new file mode 100644 index 0000000000000000000000000000000000000000..c60d7e903f26cbebbcd540cffb568c78af1ec773 --- /dev/null +++ b/assets/RadioCardSimple.vue_vue_type_script_setup_true_lang-BPQCQDzL.js @@ -0,0 +1 @@ +import{d as o,c as l,o as i,q as r,a,m as u,t as d}from"./index-lQIQ1Nea.js";const s=["checked","name","value"],m={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},k=o({__name:"RadioCardSimple",props:{id:null,name:null,value:null,title:null,description:null,modelValue:null},emits:["update:modelValue"],setup(e){return(n,t)=>(i(),l("label",{key:e.id,border:"2px solid",class:r(["relative",[e.modelValue===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900":"bg-white dark:bg-neutral-900/20 border-neutral-200 dark:border-neutral-700 hover:border-primary-500/30 dark:hover:border-primary-400/30"]]),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":""},[a("input",{checked:e.modelValue===e.value,type:"radio",name:e.name,value:e.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100",onChange:t[0]||(t[0]=c=>n.$emit("update:modelValue",e.value))},null,40,s),t[1]||(t[1]=a("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"},[a("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)),a("div",m,[a("span",{class:r(["radio-item-name font-bold",[e.modelValue===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"},d(e.title),3),e.description?(i(),l("span",{key:0,class:r(["radio-item-description",[e.modelValue===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},d(e.description),3)):u("",!0)]),t[2]||(t[2]=a("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))}});export{k as _}; diff --git a/assets/Stage-BSOKcxWs.css b/assets/Stage-BSOKcxWs.css deleted file mode 100644 index 21bf4274c317ea6c5539324dad14673b99aa96d6..0000000000000000000000000000000000000000 --- a/assets/Stage-BSOKcxWs.css +++ /dev/null @@ -1 +0,0 @@ -.animate-stripe[data-v-4bb9f885]{background-image:repeating-linear-gradient(-45deg,#f472b6,#f472b6 25px,#f9a8d4 25px,#f9a8d4 50px);animation:progress-4bb9f885 2s linear infinite;background-size:150% 100%}@-webkit-keyframes progress-4bb9f885{0%{background-position:0 0}to{background-position:-75px 0px}}@-moz-keyframes progress-4bb9f885{0%{background-position:0 0}to{background-position:-75px 0px}}@-ms-keyframes progress-4bb9f885{0%{background-position:0 0}to{background-position:-75px 0px}}@keyframes progress-4bb9f885{0%{background-position:0 0}to{background-position:-70px 0px}} diff --git a/assets/Stage-CFqYomWq.css b/assets/Stage-CFqYomWq.css new file mode 100644 index 0000000000000000000000000000000000000000..052c2ecfe5569a8e482bcc327a774f9a7de73fd0 --- /dev/null +++ b/assets/Stage-CFqYomWq.css @@ -0,0 +1 @@ +.animate-stripe[data-v-ab8bfbcc]{background-image:repeating-linear-gradient(-45deg,#f472b6,#f472b6 25px,#f9a8d4 25px,#f9a8d4 50px);animation:progress-ab8bfbcc 2s linear infinite;background-size:150% 100%}@-webkit-keyframes progress-ab8bfbcc{0%{background-position:0 0}to{background-position:-75px 0px}}@-moz-keyframes progress-ab8bfbcc{0%{background-position:0 0}to{background-position:-75px 0px}}@-ms-keyframes progress-ab8bfbcc{0%{background-position:0 0}to{background-position:-75px 0px}}@keyframes progress-ab8bfbcc{0%{background-position:0 0}to{background-position:-70px 0px}} diff --git a/assets/Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js b/assets/Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js similarity index 95% rename from assets/Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js rename to assets/Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js index 9d50f9ac5c75419e2b314e0e2662300981f1ebaf..33b1b2462cfb95fafda3f6fabae4f2057cd01f05 100644 --- a/assets/Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js +++ b/assets/Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-DRTvwjMK.js","assets/index-SpDrDth7.js","assets/index-DdeMWJSg.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 VM=Object.defineProperty;var jM=(r,t,e)=>t in r?VM(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var W=(r,t,e)=>jM(r,typeof t!="symbol"?t+"":t,e);import{ca as Xp,cj as $n,bS as $M,aT as GM,b0 as Be,aE as gt,aG as oe,aW as Hs,b_ as ea,bj as wg,b4 as Sg,b8 as Tg,bT as Bc,bW as Yp,ck as WM,aS as HM,cl as XM,aU as YM,cm as pa,cn as On,aO as nn,aX as ti,bO as Ja,bg as cr,co as qM,aP as Ki,bX as QM,bV as ZM,cp as Ig,b$ as qp,cq as KM,b7 as Cu,aI as Ao,c0 as JM,c3 as tE,c4 as eE,M as rE,cr as Bi}from"./index-SpDrDth7.js";/*! +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-DJABTJPz.js","assets/index-lQIQ1Nea.js","assets/index-CJvf-hh9.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 VM=Object.defineProperty;var jM=(r,t,e)=>t in r?VM(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var W=(r,t,e)=>jM(r,typeof t!="symbol"?t+"":t,e);import{ca as Xp,ch as $n,bS as $M,aT as GM,b0 as Be,aE as gt,aG as oe,aW as Hs,b_ as ea,bj as wg,b4 as Sg,b8 as Tg,bT as Bc,bW as Yp,ci as WM,aS as HM,cj as XM,aU as YM,ck as pa,cl as On,aO as nn,aX as ti,bO as Ja,bg as cr,cm as qM,aP as Ki,bX as QM,bV as ZM,cn as Ig,b$ as qp,co as KM,b7 as Cu,aI as Ao,c0 as JM,c3 as tE,c4 as eE,L as rE,cp as Bi}from"./index-lQIQ1Nea.js";/*! * @pixi/constants - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -11,8 +11,8 @@ var VM=Object.defineProperty;var jM=(r,t,e)=>t in r?VM(r,t,{enumerable:!0,config * * @pixi/settings is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var nE={createCanvas:function(r,t){var e=document.createElement("canvas");return e.width=r,e.height=t,e},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var r;return(r=document.baseURI)!==null&&r!==void 0?r:window.location.href},fetch:function(r,t){return fetch(r,t)}},Ch=/iPhone/i,Eg=/iPod/i,Ag=/iPad/i,Cg=/\biOS-universal(?:.+)Mac\b/i,Oh=/\bAndroid(?:.+)Mobile\b/i,Og=/Android/i,ro=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Vl=/Silk/i,ii=/Windows Phone/i,Pg=/\bWindows(?:.+)ARM\b/i,Rg=/BlackBerry/i,Fg=/BB10/i,Dg=/Opera Mini/i,Lg=/\b(CriOS|Chrome)(?:.+)Mobile/i,Ng=/Mobile(?:.+)Firefox\b/i,Bg=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function iE(r){return function(t){return t.test(r)}}function sE(r){var t={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?t.userAgent=r:r&&r.userAgent&&(t={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var e=t.userAgent,n=e.split("[FBAN");typeof n[1]<"u"&&(e=n[0]),n=e.split("Twitter"),typeof n[1]<"u"&&(e=n[0]);var i=iE(e),s={apple:{phone:i(Ch)&&!i(ii),ipod:i(Eg),tablet:!i(Ch)&&(i(Ag)||Bg(t))&&!i(ii),universal:i(Cg),device:(i(Ch)||i(Eg)||i(Ag)||i(Cg)||Bg(t))&&!i(ii)},amazon:{phone:i(ro),tablet:!i(ro)&&i(Vl),device:i(ro)||i(Vl)},android:{phone:!i(ii)&&i(ro)||!i(ii)&&i(Oh),tablet:!i(ii)&&!i(ro)&&!i(Oh)&&(i(Vl)||i(Og)),device:!i(ii)&&(i(ro)||i(Vl)||i(Oh)||i(Og))||i(/\bokhttp\b/i)},windows:{phone:i(ii),tablet:i(Pg),device:i(ii)||i(Pg)},other:{blackberry:i(Rg),blackberry10:i(Fg),opera:i(Dg),firefox:i(Ng),chrome:i(Lg),device:i(Rg)||i(Fg)||i(Dg)||i(Ng)||i(Lg)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}var Cs=sE(globalThis.navigator);function oE(){return!Cs.apple.device}function aE(r){var t=!0;if(Cs.tablet||Cs.phone){if(Cs.apple.device){var e=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(e){var n=parseInt(e[1],10);n<11&&(t=!1)}}if(Cs.android.device){var e=navigator.userAgent.match(/Android\s([0-9.]*)/);if(e){var n=parseInt(e[1],10);n<7&&(t=!1)}}}return t?r:4}var Ct={ADAPTER:nE,MIPMAP_TEXTURES:Xn.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:We.NONE,SPRITE_MAX_TEXTURES:aE(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:Fu.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:Ru.CLAMP,SCALE_MODE:Ur.LINEAR,PRECISION_VERTEX:zr.HIGH,PRECISION_FRAGMENT:Cs.apple.device?zr.HIGH:zr.MEDIUM,CAN_UPLOAD_SAME_BUFFER:oE(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Ph={exports:{}},kg;function lE(){return kg||(kg=1,function(r){var t=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function s(l,u,c,h,f){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new i(c,h||l,f),m=e?e+u:u;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],d]:l._events[m].push(d):(l._events[m]=d,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],c,h;if(this._eventsCount===0)return u;for(h in c=this._events)t.call(c,h)&&u.push(e?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},a.prototype.listeners=function(u){var c=e?e+u:u,h=this._events[c];if(!h)return[];if(h.fn)return[h.fn];for(var f=0,d=h.length,m=new Array(d);f80*R){$=et=P[0],tt=yt=P[1];for(var bt=R;btet&&(et=_t),ct>yt&&(yt=ct);xt=Math.max(et-$,yt-tt),xt=xt!==0?32767/xt:0}return n(A,O,R,$,tt,xt,0),O}function t(P,C,R,U,k){var A,O;if(k===nt(P,C,R,U)>0)for(A=C;A=C;A-=U)O=I(A,P[A],P[A+1],O);return O&&T(O,O.next)&&(Q(O),O=O.next),O}function e(P,C){if(!P)return P;C||(C=P);var R=P,U;do if(U=!1,!R.steiner&&(T(R,R.next)||S(R.prev,R,R.next)===0)){if(Q(R),R=C=R.prev,R===R.next)break;U=!0}else R=R.next;while(U||R!==C);return C}function n(P,C,R,U,k,A,O){if(P){!O&&A&&d(P,U,k,A);for(var $=P,tt,et;P.prev!==P.next;){if(tt=P.prev,et=P.next,A?s(P,U,k,A):i(P)){C.push(tt.i/R|0),C.push(P.i/R|0),C.push(et.i/R|0),Q(P),P=et.next,$=et.next;continue}if(P=et,P===$){O?O===1?(P=o(e(P),C,R),n(P,C,R,U,k,A,2)):O===2&&a(P,C,R,U,k,A):n(e(P),C,R,U,k,A,1);break}}}}function i(P){var C=P.prev,R=P,U=P.next;if(S(C,R,U)>=0)return!1;for(var k=C.x,A=R.x,O=U.x,$=C.y,tt=R.y,et=U.y,yt=kA?k>O?k:O:A>O?A:O,xt=$>tt?$>et?$:et:tt>et?tt:et,bt=U.next;bt!==C;){if(bt.x>=yt&&bt.x<=ct&&bt.y>=_t&&bt.y<=xt&&y(k,$,A,tt,O,et,bt.x,bt.y)&&S(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function s(P,C,R,U){var k=P.prev,A=P,O=P.next;if(S(k,A,O)>=0)return!1;for(var $=k.x,tt=A.x,et=O.x,yt=k.y,_t=A.y,ct=O.y,xt=$tt?$>et?$:et:tt>et?tt:et,se=yt>_t?yt>ct?yt:ct:_t>ct?_t:ct,de=g(xt,bt,C,R,U),b=g(At,se,C,R,U),K=P.prevZ,Z=P.nextZ;K&&K.z>=de&&Z&&Z.z<=b;){if(K.x>=xt&&K.x<=At&&K.y>=bt&&K.y<=se&&K!==k&&K!==O&&y($,yt,tt,_t,et,ct,K.x,K.y)&&S(K.prev,K,K.next)>=0||(K=K.prevZ,Z.x>=xt&&Z.x<=At&&Z.y>=bt&&Z.y<=se&&Z!==k&&Z!==O&&y($,yt,tt,_t,et,ct,Z.x,Z.y)&&S(Z.prev,Z,Z.next)>=0))return!1;Z=Z.nextZ}for(;K&&K.z>=de;){if(K.x>=xt&&K.x<=At&&K.y>=bt&&K.y<=se&&K!==k&&K!==O&&y($,yt,tt,_t,et,ct,K.x,K.y)&&S(K.prev,K,K.next)>=0)return!1;K=K.prevZ}for(;Z&&Z.z<=b;){if(Z.x>=xt&&Z.x<=At&&Z.y>=bt&&Z.y<=se&&Z!==k&&Z!==O&&y($,yt,tt,_t,et,ct,Z.x,Z.y)&&S(Z.prev,Z,Z.next)>=0)return!1;Z=Z.nextZ}return!0}function o(P,C,R){var U=P;do{var k=U.prev,A=U.next.next;!T(k,A)&&_(k,U,U.next,A)&&L(k,A)&&L(A,k)&&(C.push(k.i/R|0),C.push(U.i/R|0),C.push(A.i/R|0),Q(U),Q(U.next),U=P=A),U=U.next}while(U!==P);return e(U)}function a(P,C,R,U,k,A){var O=P;do{for(var $=O.next.next;$!==O.prev;){if(O.i!==$.i&&v(O,$)){var tt=it(O,$);O=e(O,O.next),tt=e(tt,tt.next),n(O,C,R,U,k,A,0),n(tt,C,R,U,k,A,0);return}$=$.next}O=O.next}while(O!==P)}function l(P,C,R,U){var k=[],A,O,$,tt,et;for(A=0,O=C.length;A=R.next.y&&R.next.y!==R.y){var $=R.x+(k-R.y)*(R.next.x-R.x)/(R.next.y-R.y);if($<=U&&$>A&&(A=$,O=R.x=R.x&&R.x>=et&&U!==R.x&&y(kO.x||R.x===O.x&&f(O,R)))&&(O=R,_t=ct)),R=R.next;while(R!==tt);return O}function f(P,C){return S(P.prev,P,C.prev)<0&&S(C.next,P,P.next)<0}function d(P,C,R,U){var k=P;do k.z===0&&(k.z=g(k.x,k.y,C,R,U)),k.prevZ=k.prev,k.nextZ=k.next,k=k.next;while(k!==P);k.prevZ.nextZ=null,k.prevZ=null,m(k)}function m(P){var C,R,U,k,A,O,$,tt,et=1;do{for(R=P,P=null,A=null,O=0;R;){for(O++,U=R,$=0,C=0;C0||tt>0&&U;)$!==0&&(tt===0||!U||R.z<=U.z)?(k=R,R=R.nextZ,$--):(k=U,U=U.nextZ,tt--),A?A.nextZ=k:P=k,k.prevZ=A,A=k;R=U}A.nextZ=null,et*=2}while(O>1);return P}function g(P,C,R,U,k){return P=(P-R)*k|0,C=(C-U)*k|0,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,P|C<<1}function p(P){var C=P,R=P;do(C.x=(P-O)*(A-$)&&(P-O)*(U-$)>=(R-O)*(C-$)&&(R-O)*(A-$)>=(k-O)*(U-$)}function v(P,C){return P.next.i!==C.i&&P.prev.i!==C.i&&!N(P,C)&&(L(P,C)&&L(C,P)&&j(P,C)&&(S(P.prev,P,C.prev)||S(P,C.prev,C))||T(P,C)&&S(P.prev,P,P.next)>0&&S(C.prev,C,C.next)>0)}function S(P,C,R){return(C.y-P.y)*(R.x-C.x)-(C.x-P.x)*(R.y-C.y)}function T(P,C){return P.x===C.x&&P.y===C.y}function _(P,C,R,U){var k=x(S(P,C,R)),A=x(S(P,C,U)),O=x(S(R,U,P)),$=x(S(R,U,C));return!!(k!==A&&O!==$||k===0&&M(P,R,C)||A===0&&M(P,U,C)||O===0&&M(R,P,U)||$===0&&M(R,C,U))}function M(P,C,R){return C.x<=Math.max(P.x,R.x)&&C.x>=Math.min(P.x,R.x)&&C.y<=Math.max(P.y,R.y)&&C.y>=Math.min(P.y,R.y)}function x(P){return P>0?1:P<0?-1:0}function N(P,C){var R=P;do{if(R.i!==P.i&&R.next.i!==P.i&&R.i!==C.i&&R.next.i!==C.i&&_(R,R.next,P,C))return!0;R=R.next}while(R!==P);return!1}function L(P,C){return S(P.prev,P,P.next)<0?S(P,C,P.next)>=0&&S(P,P.prev,C)>=0:S(P,C,P.prev)<0||S(P,P.next,C)<0}function j(P,C){var R=P,U=!1,k=(P.x+C.x)/2,A=(P.y+C.y)/2;do R.y>A!=R.next.y>A&&R.next.y!==R.y&&k<(R.next.x-R.x)*(A-R.y)/(R.next.y-R.y)+R.x&&(U=!U),R=R.next;while(R!==P);return U}function it(P,C){var R=new w(P.i,P.x,P.y),U=new w(C.i,C.x,C.y),k=P.next,A=C.prev;return P.next=C,C.prev=P,R.next=k,k.prev=R,U.next=R,R.prev=U,A.next=U,U.prev=A,U}function I(P,C,R,U){var k=new w(P,C,R);return U?(k.next=U.next,k.prev=U,U.next.prev=k,U.next=k):(k.prev=k,k.next=k),k}function Q(P){P.next.prev=P.prev,P.prev.next=P.next,P.prevZ&&(P.prevZ.nextZ=P.nextZ),P.nextZ&&(P.nextZ.prevZ=P.prevZ)}function w(P,C,R){this.i=P,this.x=C,this.y=R,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}r.deviation=function(P,C,R,U){var k=C&&C.length,A=k?C[0]*R:P.length,O=Math.abs(nt(P,0,A,R));if(k)for(var $=0,tt=C.length;$0&&(U+=P[k-1].length,R.holes.push(U))}return R},jl.exports}cE();var os={},Oa={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var hE=Oa.exports,zg;function dE(){return zg||(zg=1,function(r,t){(function(e){var n=t&&!t.nodeType&&t,i=r&&!r.nodeType&&r,s=typeof $n=="object"&&$n;(s.global===s||s.window===s||s.self===s)&&(e=s);var o,a=2147483647,l=36,u=1,c=26,h=38,f=700,d=72,m=128,g="-",p=/^xn--/,y=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=l-u,_=Math.floor,M=String.fromCharCode,x;function N(k){throw new RangeError(S[k])}function L(k,A){for(var O=k.length,$=[];O--;)$[O]=A(k[O]);return $}function j(k,A){var O=k.split("@"),$="";O.length>1&&($=O[0]+"@",k=O[1]),k=k.replace(v,".");var tt=k.split("."),et=L(tt,A).join(".");return $+et}function it(k){for(var A=[],O=0,$=k.length,tt,et;O<$;)tt=k.charCodeAt(O++),tt>=55296&&tt<=56319&&O<$?(et=k.charCodeAt(O++),(et&64512)==56320?A.push(((tt&1023)<<10)+(et&1023)+65536):(A.push(tt),O--)):A.push(tt);return A}function I(k){return L(k,function(A){var O="";return A>65535&&(A-=65536,O+=M(A>>>10&1023|55296),A=56320|A&1023),O+=M(A),O}).join("")}function Q(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:l}function w(k,A){return k+22+75*(k<26)-((A!=0)<<5)}function nt(k,A,O){var $=0;for(k=O?_(k/f):k>>1,k+=_(k/A);k>T*c>>1;$+=l)k=_(k/T);return _($+(T+1)*k/(k+h))}function P(k){var A=[],O=k.length,$,tt=0,et=m,yt=d,_t,ct,xt,bt,At,se,de,b,K;for(_t=k.lastIndexOf(g),_t<0&&(_t=0),ct=0;ct<_t;++ct)k.charCodeAt(ct)>=128&&N("not-basic"),A.push(k.charCodeAt(ct));for(xt=_t>0?_t+1:0;xt=O&&N("invalid-input"),de=Q(k.charCodeAt(xt++)),(de>=l||de>_((a-tt)/At))&&N("overflow"),tt+=de*At,b=se<=yt?u:se>=yt+c?c:se-yt,!(de_(a/K)&&N("overflow"),At*=K;$=A.length+1,yt=nt(tt-bt,$,bt==0),_(tt/$)>a-et&&N("overflow"),et+=_(tt/$),tt%=$,A.splice(tt++,0,et)}return I(A)}function C(k){var A,O,$,tt,et,yt,_t,ct,xt,bt,At,se=[],de,b,K,Z;for(k=it(k),de=k.length,A=m,O=0,et=d,yt=0;yt=A&&At<_t&&(_t=At);for(b=$+1,_t-A>_((a-O)/b)&&N("overflow"),O+=(_t-A)*b,A=_t,yt=0;yta&&N("overflow"),At==A){for(ct=O,xt=l;bt=xt<=et?u:xt>=et+c?c:xt-et,!(ct{if(u&&(typeof u=="object"||typeof u=="function")){if(n)return n.get(u)}else if(i)return i.get(u)},o=(u,c)=>{u&&(typeof u=="object"||typeof u=="function")?(n||(n=new WeakMap),n.set(u,c)):(i||(i=new Map),i.set(u,c))},a=u=>{if(u&&(typeof u=="object"||typeof u=="function")){if(n)return n.has(u)}else if(i)return i.has(u);return!1};return{get:s,set:o,has:a,assert:u=>{if(!a(u))throw new TypeError("Side channel does not contain the given key")}}}t.default=e,(typeof t.default=="object"&&t.default!==null||typeof t.default=="function")&&(Object.assign(t.default,t),r.exports=t.default)}($l,$l.exports)),$l.exports}var Rh,jg;function Qp(){if(jg)return Rh;jg=1;var r=String.prototype.replace,t=/%20/g,e={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Rh={default:e.RFC3986,formatters:{RFC1738:function(n){return r.call(n,t,"+")},RFC3986:function(n){return String(n)}},RFC1738:e.RFC1738,RFC3986:e.RFC3986},Rh}var Fh,$g;function wx(){if($g)return Fh;$g=1;var r=Qp(),t=Object.prototype.hasOwnProperty,e=Array.isArray,n=function(){for(var p=[],y=0;y<256;++y)p.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return p}(),i=function(y){for(;y.length>1;){var v=y.pop(),S=v.obj[v.prop];if(e(S)){for(var T=[],_=0;_=u?M.slice(N,N+u):M,j=[],it=0;it=48&&I<=57||I>=65&&I<=90||I>=97&&I<=122||_===r.RFC1738&&(I===40||I===41)){j[j.length]=L.charAt(it);continue}if(I<128){j[j.length]=n[I];continue}if(I<2048){j[j.length]=n[192|I>>6]+n[128|I&63];continue}if(I<55296||I>=57344){j[j.length]=n[224|I>>12]+n[128|I>>6&63]+n[128|I&63];continue}it+=1,I=65536+((I&1023)<<10|L.charCodeAt(it)&1023),j[j.length]=n[240|I>>18]+n[128|I>>12&63]+n[128|I>>6&63]+n[128|I&63]}x+=j.join("")}return x},h=function(y){for(var v=[{obj:{o:y},prop:"o"}],S=[],T=0;T"u"&&(k=0)}if(typeof L=="function"?R=L(y,R):R instanceof Date?R=I(R):v==="comma"&&s(R)&&(R=t.maybeMap(R,function(K){return K instanceof Date?I(K):K})),R===null){if(_)return N&&!nt?N(y,c.encoder,P,"key",Q):y;R=""}if(h(R)||t.isBuffer(R)){if(N){var $=nt?y:N(y,c.encoder,P,"key",Q);return[w($)+"="+w(N(R,c.encoder,P,"value",Q))]}return[w(y)+"="+w(String(R))]}var tt=[];if(typeof R>"u")return tt;var et;if(v==="comma"&&s(R))nt&&N&&(R=t.maybeMap(R,N)),et=[{value:R.length>0?R.join(",")||null:void 0}];else if(s(L))et=L;else{var yt=Object.keys(R);et=j?yt.sort(j):yt}var _t=x?String(y).replace(/\./g,"%2E"):String(y),ct=S&&s(R)&&R.length===1?_t+"[]":_t;if(T&&s(R)&&R.length===0)return ct+"[]";for(var xt=0;xt"u"?p.encodeDotInKeys===!0?!0:c.allowDots:!!p.allowDots;return{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:c.addQueryPrefix,allowDots:M,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:c.allowEmptyArrays,arrayFormat:_,charset:y,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:c.charsetSentinel,commaRoundTrip:!!p.commaRoundTrip,delimiter:typeof p.delimiter>"u"?c.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:c.encode,encodeDotInKeys:typeof p.encodeDotInKeys=="boolean"?p.encodeDotInKeys:c.encodeDotInKeys,encoder:typeof p.encoder=="function"?p.encoder:c.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:c.encodeValuesOnly,filter:T,format:v,formatter:S,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:c.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:c.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:c.strictNullHandling}};return Dh=function(g,p){var y=g,v=m(p),S,T;typeof v.filter=="function"?(T=v.filter,y=T("",y)):s(v.filter)&&(T=v.filter,S=T);var _=[];if(typeof y!="object"||y===null)return"";var M=i[v.arrayFormat],x=M==="comma"&&v.commaRoundTrip;S||(S=Object.keys(y)),v.sort&&S.sort(v.sort);for(var N=r(),L=0;L0?Q+I:""},Dh}var Lh,Wg;function mE(){if(Wg)return Lh;Wg=1;var r=wx(),t=Object.prototype.hasOwnProperty,e=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},i=function(f){return f.replace(/&#(\d+);/g,function(d,m){return String.fromCharCode(parseInt(m,10))})},s=function(f,d,m){if(f&&typeof f=="string"&&d.comma&&f.indexOf(",")>-1)return f.split(",");if(d.throwOnLimitExceeded&&m>=d.arrayLimit)throw new RangeError("Array limit exceeded. Only "+d.arrayLimit+" element"+(d.arrayLimit===1?"":"s")+" allowed in an array.");return f},o="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(d,m){var g={__proto__:null},p=m.ignoreQueryPrefix?d.replace(/^\?/,""):d;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=m.parameterLimit===1/0?void 0:m.parameterLimit,v=p.split(m.delimiter,m.throwOnLimitExceeded?y+1:y);if(m.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var S=-1,T,_=m.charset;if(m.charsetSentinel)for(T=0;T-1&&(j=e(j)?[j]:j);var it=t.call(g,L);it&&m.duplicates==="combine"?g[L]=r.combine(g[L],j):(!it||m.duplicates==="last")&&(g[L]=j)}return g},u=function(f,d,m,g){var p=0;if(f.length>0&&f[f.length-1]==="[]"){var y=f.slice(0,-1).join("");p=Array.isArray(d)&&d[y]?d[y].length:0}for(var v=g?d:s(d,m,p),S=f.length-1;S>=0;--S){var T,_=f[S];if(_==="[]"&&m.parseArrays)T=m.allowEmptyArrays&&(v===""||m.strictNullHandling&&v===null)?[]:r.combine([],v);else{T=m.plainObjects?{__proto__:null}:{};var M=_.charAt(0)==="["&&_.charAt(_.length-1)==="]"?_.slice(1,-1):_,x=m.decodeDotInKeys?M.replace(/%2E/g,"."):M,N=parseInt(x,10);!m.parseArrays&&x===""?T={0:v}:!isNaN(N)&&_!==x&&String(N)===x&&N>=0&&m.parseArrays&&N<=m.arrayLimit?(T=[],T[N]=v):x!=="__proto__"&&(T[x]=v)}v=T}return v},c=function(d,m,g,p){if(d){var y=g.allowDots?d.replace(/\.([^.[]+)/g,"[$1]"):d,v=/(\[[^[\]]*])/,S=/(\[[^[\]]*])/g,T=g.depth>0&&v.exec(y),_=T?y.slice(0,T.index):y,M=[];if(_){if(!g.plainObjects&&t.call(Object.prototype,_)&&!g.allowPrototypes)return;M.push(_)}for(var x=0;g.depth>0&&(T=S.exec(y))!==null&&x"u"?n.charset:d.charset,g=typeof d.duplicates>"u"?n.duplicates:d.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var p=typeof d.allowDots>"u"?d.decodeDotInKeys===!0?!0:n.allowDots:!!d.allowDots;return{allowDots:p,allowEmptyArrays:typeof d.allowEmptyArrays=="boolean"?!!d.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof d.allowPrototypes=="boolean"?d.allowPrototypes:n.allowPrototypes,allowSparse:typeof d.allowSparse=="boolean"?d.allowSparse:n.allowSparse,arrayLimit:typeof d.arrayLimit=="number"?d.arrayLimit:n.arrayLimit,charset:m,charsetSentinel:typeof d.charsetSentinel=="boolean"?d.charsetSentinel:n.charsetSentinel,comma:typeof d.comma=="boolean"?d.comma:n.comma,decodeDotInKeys:typeof d.decodeDotInKeys=="boolean"?d.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof d.decoder=="function"?d.decoder:n.decoder,delimiter:typeof d.delimiter=="string"||r.isRegExp(d.delimiter)?d.delimiter:n.delimiter,depth:typeof d.depth=="number"||d.depth===!1?+d.depth:n.depth,duplicates:g,ignoreQueryPrefix:d.ignoreQueryPrefix===!0,interpretNumericEntities:typeof d.interpretNumericEntities=="boolean"?d.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof d.parameterLimit=="number"?d.parameterLimit:n.parameterLimit,parseArrays:d.parseArrays!==!1,plainObjects:typeof d.plainObjects=="boolean"?d.plainObjects:n.plainObjects,strictDepth:typeof d.strictDepth=="boolean"?!!d.strictDepth:n.strictDepth,strictNullHandling:typeof d.strictNullHandling=="boolean"?d.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:typeof d.throwOnLimitExceeded=="boolean"?d.throwOnLimitExceeded:!1}};return Lh=function(f,d){var m=h(d);if(f===""||f===null||typeof f>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof f=="string"?l(f,m):f,p=m.plainObjects?{__proto__:null}:{},y=Object.keys(g),v=0;v",'"',"`"," ","\r",` -`," "],o=["{","}","|","\\","^","`"].concat(s),a=["'"].concat(o),l=["%","/","?",";","#"].concat(a),u=["/","?","#"],c=255,h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},p=gE();function y(_,M,x){if(_&&typeof _=="object"&&_ instanceof t)return _;var N=new t;return N.parse(_,M,x),N}t.prototype.parse=function(_,M,x){if(typeof _!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof _);var N=_.indexOf("?"),L=N!==-1&&N<_.indexOf("#")?"?":"#",j=_.split(L),it=/\\/g;j[0]=j[0].replace(it,"/"),_=j.join(L);var I=_;if(I=I.trim(),!x&&_.split("#").length===1){var Q=i.exec(I);if(Q)return this.path=I,this.href=I,this.pathname=Q[1],Q[2]?(this.search=Q[2],M?this.query=p.parse(this.search.substr(1)):this.query=this.search.substr(1)):M&&(this.search="",this.query={}),this}var w=e.exec(I);if(w){w=w[0];var nt=w.toLowerCase();this.protocol=nt,I=I.substr(w.length)}if(x||w||I.match(/^\/\/[^@/]+@[^@/]+/)){var P=I.substr(0,2)==="//";P&&!(w&&m[w])&&(I=I.substr(2),this.slashes=!0)}if(!m[w]&&(P||w&&!g[w])){for(var C=-1,R=0;R127?yt+="x":yt+=et[_t];if(!yt.match(h)){var xt=$.slice(0,R),bt=$.slice(R+1),At=et.match(f);At&&(xt.push(At[1]),bt.unshift(At[2])),bt.length&&(I="/"+bt.join(".")+I),this.hostname=xt.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=r.toASCII(this.hostname));var se=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+se,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),I[0]!=="/"&&(I="/"+I))}if(!d[nt])for(var R=0,tt=a.length;R0?x.host.split("@"):!1;yt&&(x.auth=yt.shift(),x.hostname=yt.shift(),x.host=x.hostname)}return x.search=_.search,x.query=_.query,(x.pathname!==null||x.search!==null)&&(x.path=(x.pathname?x.pathname:"")+(x.search?x.search:"")),x.href=x.format(),x}if(!$.length)return x.pathname=null,x.search?x.path="/"+x.search:x.path=null,x.href=x.format(),x;for(var _t=$.slice(-1)[0],ct=(x.host||_.host||$.length>1)&&(_t==="."||_t==="..")||_t==="",xt=0,bt=$.length;bt>=0;bt--)_t=$[bt],_t==="."?$.splice(bt,1):_t===".."?($.splice(bt,1),xt++):xt&&($.splice(bt,1),xt--);if(!A&&!O)for(;xt--;xt)$.unshift("..");A&&$[0]!==""&&(!$[0]||$[0].charAt(0)!=="/")&&$.unshift(""),ct&&$.join("/").substr(-1)!=="/"&&$.push("");var At=$[0]===""||$[0]&&$[0].charAt(0)==="/";if(et){x.hostname=At?"":$.length?$.shift():"",x.host=x.hostname;var yt=x.host&&x.host.indexOf("@")>0?x.host.split("@"):!1;yt&&(x.auth=yt.shift(),x.hostname=yt.shift(),x.host=x.hostname)}return A=A||x.host&&$.length,A&&!At&&$.unshift(""),$.length>0?x.pathname=$.join("/"):(x.pathname=null,x.path=null),(x.pathname!==null||x.search!==null)&&(x.path=(x.pathname?x.pathname:"")+(x.search?x.search:"")),x.auth=_.auth||x.auth,x.slashes=x.slashes||_.slashes,x.href=x.format(),x},t.prototype.parseHost=function(){var _=this.host,M=n.exec(_);M&&(M=M[0],M!==":"&&(this.port=M.substr(1)),_=_.substr(0,_.length-M.length)),_&&(this.hostname=_)},os.parse=y,os.resolve=S,os.resolveObject=T,os.format=v,os.Url=t,os}var Bh=yE();/*! + */var nE={createCanvas:function(r,t){var e=document.createElement("canvas");return e.width=r,e.height=t,e},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var r;return(r=document.baseURI)!==null&&r!==void 0?r:window.location.href},fetch:function(r,t){return fetch(r,t)}},Ch=/iPhone/i,Eg=/iPod/i,Ag=/iPad/i,Cg=/\biOS-universal(?:.+)Mac\b/i,Oh=/\bAndroid(?:.+)Mobile\b/i,Og=/Android/i,ro=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Vl=/Silk/i,ii=/Windows Phone/i,Pg=/\bWindows(?:.+)ARM\b/i,Rg=/BlackBerry/i,Fg=/BB10/i,Lg=/Opera Mini/i,Dg=/\b(CriOS|Chrome)(?:.+)Mobile/i,Ng=/Mobile(?:.+)Firefox\b/i,Bg=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function iE(r){return function(t){return t.test(r)}}function sE(r){var t={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?t.userAgent=r:r&&r.userAgent&&(t={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var e=t.userAgent,n=e.split("[FBAN");typeof n[1]<"u"&&(e=n[0]),n=e.split("Twitter"),typeof n[1]<"u"&&(e=n[0]);var i=iE(e),s={apple:{phone:i(Ch)&&!i(ii),ipod:i(Eg),tablet:!i(Ch)&&(i(Ag)||Bg(t))&&!i(ii),universal:i(Cg),device:(i(Ch)||i(Eg)||i(Ag)||i(Cg)||Bg(t))&&!i(ii)},amazon:{phone:i(ro),tablet:!i(ro)&&i(Vl),device:i(ro)||i(Vl)},android:{phone:!i(ii)&&i(ro)||!i(ii)&&i(Oh),tablet:!i(ii)&&!i(ro)&&!i(Oh)&&(i(Vl)||i(Og)),device:!i(ii)&&(i(ro)||i(Vl)||i(Oh)||i(Og))||i(/\bokhttp\b/i)},windows:{phone:i(ii),tablet:i(Pg),device:i(ii)||i(Pg)},other:{blackberry:i(Rg),blackberry10:i(Fg),opera:i(Lg),firefox:i(Ng),chrome:i(Dg),device:i(Rg)||i(Fg)||i(Lg)||i(Ng)||i(Dg)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}var Cs=sE(globalThis.navigator);function oE(){return!Cs.apple.device}function aE(r){var t=!0;if(Cs.tablet||Cs.phone){if(Cs.apple.device){var e=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(e){var n=parseInt(e[1],10);n<11&&(t=!1)}}if(Cs.android.device){var e=navigator.userAgent.match(/Android\s([0-9.]*)/);if(e){var n=parseInt(e[1],10);n<7&&(t=!1)}}}return t?r:4}var Ct={ADAPTER:nE,MIPMAP_TEXTURES:Xn.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:We.NONE,SPRITE_MAX_TEXTURES:aE(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:Fu.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:Ru.CLAMP,SCALE_MODE:Ur.LINEAR,PRECISION_VERTEX:zr.HIGH,PRECISION_FRAGMENT:Cs.apple.device?zr.HIGH:zr.MEDIUM,CAN_UPLOAD_SAME_BUFFER:oE(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Ph={exports:{}},kg;function lE(){return kg||(kg=1,function(r){var t=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function s(l,u,c,h,f){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new i(c,h||l,f),m=e?e+u:u;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],d]:l._events[m].push(d):(l._events[m]=d,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],c,h;if(this._eventsCount===0)return u;for(h in c=this._events)t.call(c,h)&&u.push(e?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},a.prototype.listeners=function(u){var c=e?e+u:u,h=this._events[c];if(!h)return[];if(h.fn)return[h.fn];for(var f=0,d=h.length,m=new Array(d);f80*R){$=et=P[0],tt=yt=P[1];for(var bt=R;btet&&(et=_t),ct>yt&&(yt=ct);xt=Math.max(et-$,yt-tt),xt=xt!==0?32767/xt:0}return n(A,O,R,$,tt,xt,0),O}function t(P,C,R,U,k){var A,O;if(k===nt(P,C,R,U)>0)for(A=C;A=C;A-=U)O=I(A,P[A],P[A+1],O);return O&&T(O,O.next)&&(Q(O),O=O.next),O}function e(P,C){if(!P)return P;C||(C=P);var R=P,U;do if(U=!1,!R.steiner&&(T(R,R.next)||S(R.prev,R,R.next)===0)){if(Q(R),R=C=R.prev,R===R.next)break;U=!0}else R=R.next;while(U||R!==C);return C}function n(P,C,R,U,k,A,O){if(P){!O&&A&&d(P,U,k,A);for(var $=P,tt,et;P.prev!==P.next;){if(tt=P.prev,et=P.next,A?s(P,U,k,A):i(P)){C.push(tt.i/R|0),C.push(P.i/R|0),C.push(et.i/R|0),Q(P),P=et.next,$=et.next;continue}if(P=et,P===$){O?O===1?(P=o(e(P),C,R),n(P,C,R,U,k,A,2)):O===2&&a(P,C,R,U,k,A):n(e(P),C,R,U,k,A,1);break}}}}function i(P){var C=P.prev,R=P,U=P.next;if(S(C,R,U)>=0)return!1;for(var k=C.x,A=R.x,O=U.x,$=C.y,tt=R.y,et=U.y,yt=kA?k>O?k:O:A>O?A:O,xt=$>tt?$>et?$:et:tt>et?tt:et,bt=U.next;bt!==C;){if(bt.x>=yt&&bt.x<=ct&&bt.y>=_t&&bt.y<=xt&&y(k,$,A,tt,O,et,bt.x,bt.y)&&S(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function s(P,C,R,U){var k=P.prev,A=P,O=P.next;if(S(k,A,O)>=0)return!1;for(var $=k.x,tt=A.x,et=O.x,yt=k.y,_t=A.y,ct=O.y,xt=$tt?$>et?$:et:tt>et?tt:et,se=yt>_t?yt>ct?yt:ct:_t>ct?_t:ct,de=g(xt,bt,C,R,U),b=g(At,se,C,R,U),K=P.prevZ,Z=P.nextZ;K&&K.z>=de&&Z&&Z.z<=b;){if(K.x>=xt&&K.x<=At&&K.y>=bt&&K.y<=se&&K!==k&&K!==O&&y($,yt,tt,_t,et,ct,K.x,K.y)&&S(K.prev,K,K.next)>=0||(K=K.prevZ,Z.x>=xt&&Z.x<=At&&Z.y>=bt&&Z.y<=se&&Z!==k&&Z!==O&&y($,yt,tt,_t,et,ct,Z.x,Z.y)&&S(Z.prev,Z,Z.next)>=0))return!1;Z=Z.nextZ}for(;K&&K.z>=de;){if(K.x>=xt&&K.x<=At&&K.y>=bt&&K.y<=se&&K!==k&&K!==O&&y($,yt,tt,_t,et,ct,K.x,K.y)&&S(K.prev,K,K.next)>=0)return!1;K=K.prevZ}for(;Z&&Z.z<=b;){if(Z.x>=xt&&Z.x<=At&&Z.y>=bt&&Z.y<=se&&Z!==k&&Z!==O&&y($,yt,tt,_t,et,ct,Z.x,Z.y)&&S(Z.prev,Z,Z.next)>=0)return!1;Z=Z.nextZ}return!0}function o(P,C,R){var U=P;do{var k=U.prev,A=U.next.next;!T(k,A)&&_(k,U,U.next,A)&&D(k,A)&&D(A,k)&&(C.push(k.i/R|0),C.push(U.i/R|0),C.push(A.i/R|0),Q(U),Q(U.next),U=P=A),U=U.next}while(U!==P);return e(U)}function a(P,C,R,U,k,A){var O=P;do{for(var $=O.next.next;$!==O.prev;){if(O.i!==$.i&&v(O,$)){var tt=it(O,$);O=e(O,O.next),tt=e(tt,tt.next),n(O,C,R,U,k,A,0),n(tt,C,R,U,k,A,0);return}$=$.next}O=O.next}while(O!==P)}function l(P,C,R,U){var k=[],A,O,$,tt,et;for(A=0,O=C.length;A=R.next.y&&R.next.y!==R.y){var $=R.x+(k-R.y)*(R.next.x-R.x)/(R.next.y-R.y);if($<=U&&$>A&&(A=$,O=R.x=R.x&&R.x>=et&&U!==R.x&&y(kO.x||R.x===O.x&&f(O,R)))&&(O=R,_t=ct)),R=R.next;while(R!==tt);return O}function f(P,C){return S(P.prev,P,C.prev)<0&&S(C.next,P,P.next)<0}function d(P,C,R,U){var k=P;do k.z===0&&(k.z=g(k.x,k.y,C,R,U)),k.prevZ=k.prev,k.nextZ=k.next,k=k.next;while(k!==P);k.prevZ.nextZ=null,k.prevZ=null,m(k)}function m(P){var C,R,U,k,A,O,$,tt,et=1;do{for(R=P,P=null,A=null,O=0;R;){for(O++,U=R,$=0,C=0;C0||tt>0&&U;)$!==0&&(tt===0||!U||R.z<=U.z)?(k=R,R=R.nextZ,$--):(k=U,U=U.nextZ,tt--),A?A.nextZ=k:P=k,k.prevZ=A,A=k;R=U}A.nextZ=null,et*=2}while(O>1);return P}function g(P,C,R,U,k){return P=(P-R)*k|0,C=(C-U)*k|0,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,P|C<<1}function p(P){var C=P,R=P;do(C.x=(P-O)*(A-$)&&(P-O)*(U-$)>=(R-O)*(C-$)&&(R-O)*(A-$)>=(k-O)*(U-$)}function v(P,C){return P.next.i!==C.i&&P.prev.i!==C.i&&!N(P,C)&&(D(P,C)&&D(C,P)&&j(P,C)&&(S(P.prev,P,C.prev)||S(P,C.prev,C))||T(P,C)&&S(P.prev,P,P.next)>0&&S(C.prev,C,C.next)>0)}function S(P,C,R){return(C.y-P.y)*(R.x-C.x)-(C.x-P.x)*(R.y-C.y)}function T(P,C){return P.x===C.x&&P.y===C.y}function _(P,C,R,U){var k=x(S(P,C,R)),A=x(S(P,C,U)),O=x(S(R,U,P)),$=x(S(R,U,C));return!!(k!==A&&O!==$||k===0&&M(P,R,C)||A===0&&M(P,U,C)||O===0&&M(R,P,U)||$===0&&M(R,C,U))}function M(P,C,R){return C.x<=Math.max(P.x,R.x)&&C.x>=Math.min(P.x,R.x)&&C.y<=Math.max(P.y,R.y)&&C.y>=Math.min(P.y,R.y)}function x(P){return P>0?1:P<0?-1:0}function N(P,C){var R=P;do{if(R.i!==P.i&&R.next.i!==P.i&&R.i!==C.i&&R.next.i!==C.i&&_(R,R.next,P,C))return!0;R=R.next}while(R!==P);return!1}function D(P,C){return S(P.prev,P,P.next)<0?S(P,C,P.next)>=0&&S(P,P.prev,C)>=0:S(P,C,P.prev)<0||S(P,P.next,C)<0}function j(P,C){var R=P,U=!1,k=(P.x+C.x)/2,A=(P.y+C.y)/2;do R.y>A!=R.next.y>A&&R.next.y!==R.y&&k<(R.next.x-R.x)*(A-R.y)/(R.next.y-R.y)+R.x&&(U=!U),R=R.next;while(R!==P);return U}function it(P,C){var R=new w(P.i,P.x,P.y),U=new w(C.i,C.x,C.y),k=P.next,A=C.prev;return P.next=C,C.prev=P,R.next=k,k.prev=R,U.next=R,R.prev=U,A.next=U,U.prev=A,U}function I(P,C,R,U){var k=new w(P,C,R);return U?(k.next=U.next,k.prev=U,U.next.prev=k,U.next=k):(k.prev=k,k.next=k),k}function Q(P){P.next.prev=P.prev,P.prev.next=P.next,P.prevZ&&(P.prevZ.nextZ=P.nextZ),P.nextZ&&(P.nextZ.prevZ=P.prevZ)}function w(P,C,R){this.i=P,this.x=C,this.y=R,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}r.deviation=function(P,C,R,U){var k=C&&C.length,A=k?C[0]*R:P.length,O=Math.abs(nt(P,0,A,R));if(k)for(var $=0,tt=C.length;$0&&(U+=P[k-1].length,R.holes.push(U))}return R},jl.exports}cE();var os={},Oa={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var hE=Oa.exports,zg;function dE(){return zg||(zg=1,function(r,t){(function(e){var n=t&&!t.nodeType&&t,i=r&&!r.nodeType&&r,s=typeof $n=="object"&&$n;(s.global===s||s.window===s||s.self===s)&&(e=s);var o,a=2147483647,l=36,u=1,c=26,h=38,f=700,d=72,m=128,g="-",p=/^xn--/,y=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=l-u,_=Math.floor,M=String.fromCharCode,x;function N(k){throw new RangeError(S[k])}function D(k,A){for(var O=k.length,$=[];O--;)$[O]=A(k[O]);return $}function j(k,A){var O=k.split("@"),$="";O.length>1&&($=O[0]+"@",k=O[1]),k=k.replace(v,".");var tt=k.split("."),et=D(tt,A).join(".");return $+et}function it(k){for(var A=[],O=0,$=k.length,tt,et;O<$;)tt=k.charCodeAt(O++),tt>=55296&&tt<=56319&&O<$?(et=k.charCodeAt(O++),(et&64512)==56320?A.push(((tt&1023)<<10)+(et&1023)+65536):(A.push(tt),O--)):A.push(tt);return A}function I(k){return D(k,function(A){var O="";return A>65535&&(A-=65536,O+=M(A>>>10&1023|55296),A=56320|A&1023),O+=M(A),O}).join("")}function Q(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:l}function w(k,A){return k+22+75*(k<26)-((A!=0)<<5)}function nt(k,A,O){var $=0;for(k=O?_(k/f):k>>1,k+=_(k/A);k>T*c>>1;$+=l)k=_(k/T);return _($+(T+1)*k/(k+h))}function P(k){var A=[],O=k.length,$,tt=0,et=m,yt=d,_t,ct,xt,bt,At,se,de,b,K;for(_t=k.lastIndexOf(g),_t<0&&(_t=0),ct=0;ct<_t;++ct)k.charCodeAt(ct)>=128&&N("not-basic"),A.push(k.charCodeAt(ct));for(xt=_t>0?_t+1:0;xt=O&&N("invalid-input"),de=Q(k.charCodeAt(xt++)),(de>=l||de>_((a-tt)/At))&&N("overflow"),tt+=de*At,b=se<=yt?u:se>=yt+c?c:se-yt,!(de_(a/K)&&N("overflow"),At*=K;$=A.length+1,yt=nt(tt-bt,$,bt==0),_(tt/$)>a-et&&N("overflow"),et+=_(tt/$),tt%=$,A.splice(tt++,0,et)}return I(A)}function C(k){var A,O,$,tt,et,yt,_t,ct,xt,bt,At,se=[],de,b,K,Z;for(k=it(k),de=k.length,A=m,O=0,et=d,yt=0;yt=A&&At<_t&&(_t=At);for(b=$+1,_t-A>_((a-O)/b)&&N("overflow"),O+=(_t-A)*b,A=_t,yt=0;yta&&N("overflow"),At==A){for(ct=O,xt=l;bt=xt<=et?u:xt>=et+c?c:xt-et,!(ct{if(u&&(typeof u=="object"||typeof u=="function")){if(n)return n.get(u)}else if(i)return i.get(u)},o=(u,c)=>{u&&(typeof u=="object"||typeof u=="function")?(n||(n=new WeakMap),n.set(u,c)):(i||(i=new Map),i.set(u,c))},a=u=>{if(u&&(typeof u=="object"||typeof u=="function")){if(n)return n.has(u)}else if(i)return i.has(u);return!1};return{get:s,set:o,has:a,assert:u=>{if(!a(u))throw new TypeError("Side channel does not contain the given key")}}}t.default=e,(typeof t.default=="object"&&t.default!==null||typeof t.default=="function")&&(Object.assign(t.default,t),r.exports=t.default)}($l,$l.exports)),$l.exports}var Rh,jg;function Qp(){if(jg)return Rh;jg=1;var r=String.prototype.replace,t=/%20/g,e={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Rh={default:e.RFC3986,formatters:{RFC1738:function(n){return r.call(n,t,"+")},RFC3986:function(n){return String(n)}},RFC1738:e.RFC1738,RFC3986:e.RFC3986},Rh}var Fh,$g;function wx(){if($g)return Fh;$g=1;var r=Qp(),t=Object.prototype.hasOwnProperty,e=Array.isArray,n=function(){for(var p=[],y=0;y<256;++y)p.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return p}(),i=function(y){for(;y.length>1;){var v=y.pop(),S=v.obj[v.prop];if(e(S)){for(var T=[],_=0;_=u?M.slice(N,N+u):M,j=[],it=0;it=48&&I<=57||I>=65&&I<=90||I>=97&&I<=122||_===r.RFC1738&&(I===40||I===41)){j[j.length]=D.charAt(it);continue}if(I<128){j[j.length]=n[I];continue}if(I<2048){j[j.length]=n[192|I>>6]+n[128|I&63];continue}if(I<55296||I>=57344){j[j.length]=n[224|I>>12]+n[128|I>>6&63]+n[128|I&63];continue}it+=1,I=65536+((I&1023)<<10|D.charCodeAt(it)&1023),j[j.length]=n[240|I>>18]+n[128|I>>12&63]+n[128|I>>6&63]+n[128|I&63]}x+=j.join("")}return x},h=function(y){for(var v=[{obj:{o:y},prop:"o"}],S=[],T=0;T"u"&&(k=0)}if(typeof D=="function"?R=D(y,R):R instanceof Date?R=I(R):v==="comma"&&s(R)&&(R=t.maybeMap(R,function(K){return K instanceof Date?I(K):K})),R===null){if(_)return N&&!nt?N(y,c.encoder,P,"key",Q):y;R=""}if(h(R)||t.isBuffer(R)){if(N){var $=nt?y:N(y,c.encoder,P,"key",Q);return[w($)+"="+w(N(R,c.encoder,P,"value",Q))]}return[w(y)+"="+w(String(R))]}var tt=[];if(typeof R>"u")return tt;var et;if(v==="comma"&&s(R))nt&&N&&(R=t.maybeMap(R,N)),et=[{value:R.length>0?R.join(",")||null:void 0}];else if(s(D))et=D;else{var yt=Object.keys(R);et=j?yt.sort(j):yt}var _t=x?String(y).replace(/\./g,"%2E"):String(y),ct=S&&s(R)&&R.length===1?_t+"[]":_t;if(T&&s(R)&&R.length===0)return ct+"[]";for(var xt=0;xt"u"?p.encodeDotInKeys===!0?!0:c.allowDots:!!p.allowDots;return{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:c.addQueryPrefix,allowDots:M,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:c.allowEmptyArrays,arrayFormat:_,charset:y,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:c.charsetSentinel,commaRoundTrip:!!p.commaRoundTrip,delimiter:typeof p.delimiter>"u"?c.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:c.encode,encodeDotInKeys:typeof p.encodeDotInKeys=="boolean"?p.encodeDotInKeys:c.encodeDotInKeys,encoder:typeof p.encoder=="function"?p.encoder:c.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:c.encodeValuesOnly,filter:T,format:v,formatter:S,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:c.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:c.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:c.strictNullHandling}};return Lh=function(g,p){var y=g,v=m(p),S,T;typeof v.filter=="function"?(T=v.filter,y=T("",y)):s(v.filter)&&(T=v.filter,S=T);var _=[];if(typeof y!="object"||y===null)return"";var M=i[v.arrayFormat],x=M==="comma"&&v.commaRoundTrip;S||(S=Object.keys(y)),v.sort&&S.sort(v.sort);for(var N=r(),D=0;D0?Q+I:""},Lh}var Dh,Wg;function mE(){if(Wg)return Dh;Wg=1;var r=wx(),t=Object.prototype.hasOwnProperty,e=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},i=function(f){return f.replace(/&#(\d+);/g,function(d,m){return String.fromCharCode(parseInt(m,10))})},s=function(f,d,m){if(f&&typeof f=="string"&&d.comma&&f.indexOf(",")>-1)return f.split(",");if(d.throwOnLimitExceeded&&m>=d.arrayLimit)throw new RangeError("Array limit exceeded. Only "+d.arrayLimit+" element"+(d.arrayLimit===1?"":"s")+" allowed in an array.");return f},o="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(d,m){var g={__proto__:null},p=m.ignoreQueryPrefix?d.replace(/^\?/,""):d;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=m.parameterLimit===1/0?void 0:m.parameterLimit,v=p.split(m.delimiter,m.throwOnLimitExceeded?y+1:y);if(m.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var S=-1,T,_=m.charset;if(m.charsetSentinel)for(T=0;T-1&&(j=e(j)?[j]:j);var it=t.call(g,D);it&&m.duplicates==="combine"?g[D]=r.combine(g[D],j):(!it||m.duplicates==="last")&&(g[D]=j)}return g},u=function(f,d,m,g){var p=0;if(f.length>0&&f[f.length-1]==="[]"){var y=f.slice(0,-1).join("");p=Array.isArray(d)&&d[y]?d[y].length:0}for(var v=g?d:s(d,m,p),S=f.length-1;S>=0;--S){var T,_=f[S];if(_==="[]"&&m.parseArrays)T=m.allowEmptyArrays&&(v===""||m.strictNullHandling&&v===null)?[]:r.combine([],v);else{T=m.plainObjects?{__proto__:null}:{};var M=_.charAt(0)==="["&&_.charAt(_.length-1)==="]"?_.slice(1,-1):_,x=m.decodeDotInKeys?M.replace(/%2E/g,"."):M,N=parseInt(x,10);!m.parseArrays&&x===""?T={0:v}:!isNaN(N)&&_!==x&&String(N)===x&&N>=0&&m.parseArrays&&N<=m.arrayLimit?(T=[],T[N]=v):x!=="__proto__"&&(T[x]=v)}v=T}return v},c=function(d,m,g,p){if(d){var y=g.allowDots?d.replace(/\.([^.[]+)/g,"[$1]"):d,v=/(\[[^[\]]*])/,S=/(\[[^[\]]*])/g,T=g.depth>0&&v.exec(y),_=T?y.slice(0,T.index):y,M=[];if(_){if(!g.plainObjects&&t.call(Object.prototype,_)&&!g.allowPrototypes)return;M.push(_)}for(var x=0;g.depth>0&&(T=S.exec(y))!==null&&x"u"?n.charset:d.charset,g=typeof d.duplicates>"u"?n.duplicates:d.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var p=typeof d.allowDots>"u"?d.decodeDotInKeys===!0?!0:n.allowDots:!!d.allowDots;return{allowDots:p,allowEmptyArrays:typeof d.allowEmptyArrays=="boolean"?!!d.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof d.allowPrototypes=="boolean"?d.allowPrototypes:n.allowPrototypes,allowSparse:typeof d.allowSparse=="boolean"?d.allowSparse:n.allowSparse,arrayLimit:typeof d.arrayLimit=="number"?d.arrayLimit:n.arrayLimit,charset:m,charsetSentinel:typeof d.charsetSentinel=="boolean"?d.charsetSentinel:n.charsetSentinel,comma:typeof d.comma=="boolean"?d.comma:n.comma,decodeDotInKeys:typeof d.decodeDotInKeys=="boolean"?d.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof d.decoder=="function"?d.decoder:n.decoder,delimiter:typeof d.delimiter=="string"||r.isRegExp(d.delimiter)?d.delimiter:n.delimiter,depth:typeof d.depth=="number"||d.depth===!1?+d.depth:n.depth,duplicates:g,ignoreQueryPrefix:d.ignoreQueryPrefix===!0,interpretNumericEntities:typeof d.interpretNumericEntities=="boolean"?d.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof d.parameterLimit=="number"?d.parameterLimit:n.parameterLimit,parseArrays:d.parseArrays!==!1,plainObjects:typeof d.plainObjects=="boolean"?d.plainObjects:n.plainObjects,strictDepth:typeof d.strictDepth=="boolean"?!!d.strictDepth:n.strictDepth,strictNullHandling:typeof d.strictNullHandling=="boolean"?d.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:typeof d.throwOnLimitExceeded=="boolean"?d.throwOnLimitExceeded:!1}};return Dh=function(f,d){var m=h(d);if(f===""||f===null||typeof f>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof f=="string"?l(f,m):f,p=m.plainObjects?{__proto__:null}:{},y=Object.keys(g),v=0;v",'"',"`"," ","\r",` +`," "],o=["{","}","|","\\","^","`"].concat(s),a=["'"].concat(o),l=["%","/","?",";","#"].concat(a),u=["/","?","#"],c=255,h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},p=gE();function y(_,M,x){if(_&&typeof _=="object"&&_ instanceof t)return _;var N=new t;return N.parse(_,M,x),N}t.prototype.parse=function(_,M,x){if(typeof _!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof _);var N=_.indexOf("?"),D=N!==-1&&N<_.indexOf("#")?"?":"#",j=_.split(D),it=/\\/g;j[0]=j[0].replace(it,"/"),_=j.join(D);var I=_;if(I=I.trim(),!x&&_.split("#").length===1){var Q=i.exec(I);if(Q)return this.path=I,this.href=I,this.pathname=Q[1],Q[2]?(this.search=Q[2],M?this.query=p.parse(this.search.substr(1)):this.query=this.search.substr(1)):M&&(this.search="",this.query={}),this}var w=e.exec(I);if(w){w=w[0];var nt=w.toLowerCase();this.protocol=nt,I=I.substr(w.length)}if(x||w||I.match(/^\/\/[^@/]+@[^@/]+/)){var P=I.substr(0,2)==="//";P&&!(w&&m[w])&&(I=I.substr(2),this.slashes=!0)}if(!m[w]&&(P||w&&!g[w])){for(var C=-1,R=0;R127?yt+="x":yt+=et[_t];if(!yt.match(h)){var xt=$.slice(0,R),bt=$.slice(R+1),At=et.match(f);At&&(xt.push(At[1]),bt.unshift(At[2])),bt.length&&(I="/"+bt.join(".")+I),this.hostname=xt.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=r.toASCII(this.hostname));var se=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+se,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),I[0]!=="/"&&(I="/"+I))}if(!d[nt])for(var R=0,tt=a.length;R0?x.host.split("@"):!1;yt&&(x.auth=yt.shift(),x.hostname=yt.shift(),x.host=x.hostname)}return x.search=_.search,x.query=_.query,(x.pathname!==null||x.search!==null)&&(x.path=(x.pathname?x.pathname:"")+(x.search?x.search:"")),x.href=x.format(),x}if(!$.length)return x.pathname=null,x.search?x.path="/"+x.search:x.path=null,x.href=x.format(),x;for(var _t=$.slice(-1)[0],ct=(x.host||_.host||$.length>1)&&(_t==="."||_t==="..")||_t==="",xt=0,bt=$.length;bt>=0;bt--)_t=$[bt],_t==="."?$.splice(bt,1):_t===".."?($.splice(bt,1),xt++):xt&&($.splice(bt,1),xt--);if(!A&&!O)for(;xt--;xt)$.unshift("..");A&&$[0]!==""&&(!$[0]||$[0].charAt(0)!=="/")&&$.unshift(""),ct&&$.join("/").substr(-1)!=="/"&&$.push("");var At=$[0]===""||$[0]&&$[0].charAt(0)==="/";if(et){x.hostname=At?"":$.length?$.shift():"",x.host=x.hostname;var yt=x.host&&x.host.indexOf("@")>0?x.host.split("@"):!1;yt&&(x.auth=yt.shift(),x.hostname=yt.shift(),x.host=x.hostname)}return A=A||x.host&&$.length,A&&!At&&$.unshift(""),$.length>0?x.pathname=$.join("/"):(x.pathname=null,x.path=null),(x.pathname!==null||x.search!==null)&&(x.path=(x.pathname?x.pathname:"")+(x.search?x.search:"")),x.auth=_.auth||x.auth,x.slashes=x.slashes||_.slashes,x.href=x.format(),x},t.prototype.parseHost=function(){var _=this.host,M=n.exec(_);M&&(M=M[0],M!==":"&&(this.port=M.substr(1)),_=_.substr(0,_.length-M.length)),_&&(this.hostname=_)},os.parse=y,os.resolve=S,os.resolveObject=T,os.format=v,os.Url=t,os}var Bh=yE();/*! * @pixi/utils - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -21,7 +21,7 @@ var VM=Object.defineProperty;var jM=(r,t,e)=>t in r?VM(r,t,{enumerable:!0,config */var kc={parse:Bh.parse,format:Bh.format,resolve:Bh.resolve};Ct.RETINA_PREFIX=/@([0-9\.]+)x/;Ct.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Yg=!1,qg="6.5.10";function vE(r){var t;if(!Yg){if(Ct.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){var e=[` %c %c %c PixiJS `+qg+" - ✰ "+r+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ -`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=globalThis.console).log.apply(t,e)}else globalThis.console&&globalThis.console.log("PixiJS "+qg+" - "+r+" - http://www.pixijs.com/");Yg=!0}}var kh;function _E(){return typeof kh>"u"&&(kh=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:Ct.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Ct.ADAPTER.getWebGLRenderingContext())return!1;var e=Ct.ADAPTER.createCanvas(),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),i=!!(n&&n.getContextAttributes().stencil);if(n){var s=n.getExtension("WEBGL_lose_context");s&&s.loseContext()}return n=null,i}catch{return!1}}()),kh}function cn(r,t){return t===void 0&&(t=[]),t[0]=(r>>16&255)/255,t[1]=(r>>8&255)/255,t[2]=(r&255)/255,t}function bE(r){var t=r.toString(16);return t="000000".substring(0,6-t.length)+t,"#"+t}function xn(r){return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)}function xE(){for(var r=[],t=[],e=0;e<32;e++)r[e]=e,t[e]=e;r[Jt.NORMAL_NPM]=Jt.NORMAL,r[Jt.ADD_NPM]=Jt.ADD,r[Jt.SCREEN_NPM]=Jt.SCREEN,t[Jt.NORMAL]=Jt.NORMAL_NPM,t[Jt.ADD]=Jt.ADD_NPM,t[Jt.SCREEN]=Jt.SCREEN_NPM;var n=[];return n.push(t),n.push(r),n}var wE=xE();function SE(r,t){if(t===1)return(t*255<<24)+r;if(t===0)return 0;var e=r>>16&255,n=r>>8&255,i=r&255;return e=e*t+.5|0,n=n*t+.5|0,i=i*t+.5|0,(t*255<<24)+(e<<16)+(n<<8)+i}function Sx(r){if(r.BYTES_PER_ELEMENT===4)return r instanceof Float32Array?"Float32Array":r instanceof Uint32Array?"Uint32Array":"Int32Array";if(r.BYTES_PER_ELEMENT===2){if(r instanceof Uint16Array)return"Uint16Array"}else if(r.BYTES_PER_ELEMENT===1&&r instanceof Uint8Array)return"Uint8Array";return null}function Du(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Qg(r){return!(r&r-1)&&!!r}function Zg(r){var t=(r>65535?1:0)<<4;r>>>=t;var e=(r>255?1:0)<<3;return r>>>=e,t|=e,e=(r>15?1:0)<<2,r>>>=e,t|=e,e=(r>3?1:0)<<1,r>>>=e,t|=e,t|r>>1}function du(r,t,e){var n=r.length,i;if(!(t>=n||e===0)){e=t+e>n?n-t:e;var s=n-e;for(i=t;i"u"?console.warn("PixiJS Deprecation Warning: ",t+` +`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=globalThis.console).log.apply(t,e)}else globalThis.console&&globalThis.console.log("PixiJS "+qg+" - "+r+" - http://www.pixijs.com/");Yg=!0}}var kh;function _E(){return typeof kh>"u"&&(kh=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:Ct.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Ct.ADAPTER.getWebGLRenderingContext())return!1;var e=Ct.ADAPTER.createCanvas(),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),i=!!(n&&n.getContextAttributes().stencil);if(n){var s=n.getExtension("WEBGL_lose_context");s&&s.loseContext()}return n=null,i}catch{return!1}}()),kh}function cn(r,t){return t===void 0&&(t=[]),t[0]=(r>>16&255)/255,t[1]=(r>>8&255)/255,t[2]=(r&255)/255,t}function bE(r){var t=r.toString(16);return t="000000".substring(0,6-t.length)+t,"#"+t}function xn(r){return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)}function xE(){for(var r=[],t=[],e=0;e<32;e++)r[e]=e,t[e]=e;r[Jt.NORMAL_NPM]=Jt.NORMAL,r[Jt.ADD_NPM]=Jt.ADD,r[Jt.SCREEN_NPM]=Jt.SCREEN,t[Jt.NORMAL]=Jt.NORMAL_NPM,t[Jt.ADD]=Jt.ADD_NPM,t[Jt.SCREEN]=Jt.SCREEN_NPM;var n=[];return n.push(t),n.push(r),n}var wE=xE();function SE(r,t){if(t===1)return(t*255<<24)+r;if(t===0)return 0;var e=r>>16&255,n=r>>8&255,i=r&255;return e=e*t+.5|0,n=n*t+.5|0,i=i*t+.5|0,(t*255<<24)+(e<<16)+(n<<8)+i}function Sx(r){if(r.BYTES_PER_ELEMENT===4)return r instanceof Float32Array?"Float32Array":r instanceof Uint32Array?"Uint32Array":"Int32Array";if(r.BYTES_PER_ELEMENT===2){if(r instanceof Uint16Array)return"Uint16Array"}else if(r.BYTES_PER_ELEMENT===1&&r instanceof Uint8Array)return"Uint8Array";return null}function Lu(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Qg(r){return!(r&r-1)&&!!r}function Zg(r){var t=(r>65535?1:0)<<4;r>>>=t;var e=(r>255?1:0)<<3;return r>>>=e,t|=e,e=(r>15?1:0)<<2,r>>>=e,t|=e,e=(r>3?1:0)<<1,r>>>=e,t|=e,t|r>>1}function du(r,t,e){var n=r.length,i;if(!(t>=n||e===0)){e=t+e>n?n-t:e;var s=n-e;for(i=t;i"u"?console.warn("PixiJS Deprecation Warning: ",t+` Deprecated since v`+r):(n=n.split(` `).splice(e).join(` `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t+` @@ -63,7 +63,7 @@ PERFORMANCE OF THIS SOFTWARE. * * @pixi/math is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var ME=Math.PI*2,EE=180/Math.PI,Us=Math.PI/180,af;(function(r){r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC"})(af||(af={}));var De=function(){function r(t,e){t===void 0&&(t=0),e===void 0&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},r.prototype.copyTo=function(t){return t.set(this.x,this.y),t},r.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},r.prototype.set=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),this.x=t,this.y=e,this},r.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},r}(),Wl=[new De,new De,new De,new De],Xe=function(){function r(t,e,n,i){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=0),this.x=Number(t),this.y=Number(e),this.width=Number(n),this.height=Number(i),this.type=af.RECT}return Object.defineProperty(r.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(r,"EMPTY",{get:function(){return new r(0,0,0,0)},enumerable:!1,configurable:!0}),r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},r.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},r.prototype.contains=function(t,e){return this.width<=0||this.height<=0?!1:t>=this.x&&t=this.y&&et.right?t.right:this.right;if(i<=n)return!1;var s=this.yt.bottom?t.bottom:this.bottom;return o>s}var a=this.left,l=this.right,u=this.top,c=this.bottom;if(l<=a||c<=u)return!1;var h=Wl[0].set(t.left,t.top),f=Wl[1].set(t.left,t.bottom),d=Wl[2].set(t.right,t.top),m=Wl[3].set(t.right,t.bottom);if(d.x<=h.x||f.y<=h.y)return!1;var g=Math.sign(e.a*e.d-e.b*e.c);if(g===0||(e.apply(h,h),e.apply(f,f),e.apply(d,d),e.apply(m,m),Math.max(h.x,f.x,d.x,m.x)<=a||Math.min(h.x,f.x,d.x,m.x)>=l||Math.max(h.y,f.y,d.y,m.y)<=u||Math.min(h.y,f.y,d.y,m.y)>=c))return!1;var p=g*(f.y-h.y),y=g*(h.x-f.x),v=p*a+y*u,S=p*l+y*u,T=p*a+y*c,_=p*l+y*c;if(Math.max(v,S,T,_)<=p*h.x+y*h.y||Math.min(v,S,T,_)>=p*m.x+y*m.y)return!1;var M=g*(h.y-d.y),x=g*(d.x-h.x),N=M*a+x*u,L=M*l+x*u,j=M*a+x*c,it=M*l+x*c;return!(Math.max(N,L,j,it)<=M*h.x+x*h.y||Math.min(N,L,j,it)>=M*m.x+x*m.y)},r.prototype.pad=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2,this},r.prototype.fit=function(t){var e=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),s=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(n-e,0),this.y=i,this.height=Math.max(s-i,0),this},r.prototype.ceil=function(t,e){t===void 0&&(t=1),e===void 0&&(e=.001);var n=Math.ceil((this.x+this.width-e)*t)/t,i=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=n-this.x,this.height=i-this.y,this},r.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),s=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=n-e,this.y=i,this.height=s-i,this},r.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},r}(),Co=function(){function r(t,e,n,i){n===void 0&&(n=0),i===void 0&&(i=0),this._x=n,this._y=i,this.cb=t,this.scope=e}return r.prototype.clone=function(t,e){return t===void 0&&(t=this.cb),e===void 0&&(e=this.scope),new r(t,e,this._x,this._y)},r.prototype.set=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this.cb.call(this.scope)),this},r.prototype.copyFrom=function(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},r.prototype.copyTo=function(t){return t.set(this._x,this._y),t},r.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},r.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(r.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),r}(),hr=function(){function r(t,e,n,i,s,o){t===void 0&&(t=1),e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=1),s===void 0&&(s=0),o===void 0&&(o=0),this.array=null,this.a=t,this.b=e,this.c=n,this.d=i,this.tx=s,this.ty=o}return r.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},r.prototype.set=function(t,e,n,i,s,o){return this.a=t,this.b=e,this.c=n,this.d=i,this.tx=s,this.ty=o,this},r.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},r.prototype.apply=function(t,e){e=e||new De;var n=t.x,i=t.y;return e.x=this.a*n+this.c*i+this.tx,e.y=this.b*n+this.d*i+this.ty,e},r.prototype.applyInverse=function(t,e){e=e||new De;var n=1/(this.a*this.d+this.c*-this.b),i=t.x,s=t.y;return e.x=this.d*n*i+-this.c*n*s+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*s+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,e},r.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},r.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},r.prototype.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),i=this.a,s=this.c,o=this.tx;return this.a=i*e-this.b*n,this.b=i*n+this.b*e,this.c=s*e-this.d*n,this.d=s*n+this.d*e,this.tx=o*e-this.ty*n,this.ty=o*n+this.ty*e,this},r.prototype.append=function(t){var e=this.a,n=this.b,i=this.c,s=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*n+t.b*s,this.c=t.c*e+t.d*i,this.d=t.c*n+t.d*s,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*s+this.ty,this},r.prototype.setTransform=function(t,e,n,i,s,o,a,l,u){return this.a=Math.cos(a+u)*s,this.b=Math.sin(a+u)*s,this.c=-Math.sin(a-l)*o,this.d=Math.cos(a-l)*o,this.tx=t-(n*this.a+i*this.c),this.ty=e-(n*this.b+i*this.d),this},r.prototype.prepend=function(t){var e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){var n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},r.prototype.decompose=function(t){var e=this.a,n=this.b,i=this.c,s=this.d,o=t.pivot,a=-Math.atan2(-i,s),l=Math.atan2(n,e),u=Math.abs(a+l);return u<1e-5||Math.abs(ME-u)<1e-5?(t.rotation=l,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=l),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(i*i+s*s),t.position.x=this.tx+(o.x*e+o.y*i),t.position.y=this.ty+(o.x*n+o.y*s),t},r.prototype.invert=function(){var t=this.a,e=this.b,n=this.c,i=this.d,s=this.tx,o=t*i-e*n;return this.a=i/o,this.b=-e/o,this.c=-n/o,this.d=t/o,this.tx=(n*this.ty-i*s)/o,this.ty=-(t*this.ty-e*s)/o,this},r.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},r.prototype.clone=function(){var t=new r;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},r.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},r.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},r.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(r,"IDENTITY",{get:function(){return new r},enumerable:!1,configurable:!0}),Object.defineProperty(r,"TEMP_MATRIX",{get:function(){return new r},enumerable:!1,configurable:!0}),r}(),ms=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],gs=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],ys=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],vs=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],lf=[],Tx=[],Hl=Math.sign;function AE(){for(var r=0;r<16;r++){var t=[];lf.push(t);for(var e=0;e<16;e++)for(var n=Hl(ms[r]*ms[e]+ys[r]*gs[e]),i=Hl(gs[r]*ms[e]+vs[r]*gs[e]),s=Hl(ms[r]*ys[e]+ys[r]*vs[e]),o=Hl(gs[r]*ys[e]+vs[r]*vs[e]),a=0;a<16;a++)if(ms[a]===n&&gs[a]===i&&ys[a]===s&&vs[a]===o){t.push(a);break}}for(var r=0;r<16;r++){var l=new hr;l.set(ms[r],gs[r],ys[r],vs[r],0,0),Tx.push(l)}}AE();var Ne={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(r){return ms[r]},uY:function(r){return gs[r]},vX:function(r){return ys[r]},vY:function(r){return vs[r]},inv:function(r){return r&8?r&15:-r&7},add:function(r,t){return lf[r][t]},sub:function(r,t){return lf[r][Ne.inv(t)]},rotate180:function(r){return r^4},isVertical:function(r){return(r&3)===2},byDirection:function(r,t){return Math.abs(r)*2<=Math.abs(t)?t>=0?Ne.S:Ne.N:Math.abs(t)*2<=Math.abs(r)?r>0?Ne.E:Ne.W:t>0?r>0?Ne.SE:Ne.SW:r>0?Ne.NE:Ne.NW},matrixAppendRotationInv:function(r,t,e,n){e===void 0&&(e=0),n===void 0&&(n=0);var i=Tx[Ne.inv(t)];i.tx=e,i.ty=n,r.append(i)}},Ix=function(){function r(){this.worldTransform=new hr,this.localTransform=new hr,this.position=new Co(this.onChange,this,0,0),this.scale=new Co(this.onChange,this,1,1),this.pivot=new Co(this.onChange,this,0,0),this.skew=new Co(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return r.prototype.onChange=function(){this._localID++},r.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},r.prototype.toString=function(){return"[@pixi/math:Transform "+("position=("+this.position.x+", "+this.position.y+") ")+("rotation="+this.rotation+" ")+("scale=("+this.scale.x+", "+this.scale.y+") ")+("skew=("+this.skew.x+", "+this.skew.y+") ")+"]"},r.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},r.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var n=t.worldTransform,i=this.worldTransform;i.a=e.a*n.a+e.b*n.c,i.b=e.a*n.b+e.b*n.d,i.c=e.c*n.a+e.d*n.c,i.d=e.c*n.b+e.d*n.d,i.tx=e.tx*n.a+e.ty*n.c+n.tx,i.ty=e.tx*n.b+e.ty*n.d+n.ty,this._parentID=t._worldID,this._worldID++}},r.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(r.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),r.IDENTITY=new r,r}();/*! + */var ME=Math.PI*2,EE=180/Math.PI,Us=Math.PI/180,af;(function(r){r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC"})(af||(af={}));var Le=function(){function r(t,e){t===void 0&&(t=0),e===void 0&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},r.prototype.copyTo=function(t){return t.set(this.x,this.y),t},r.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},r.prototype.set=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),this.x=t,this.y=e,this},r.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},r}(),Wl=[new Le,new Le,new Le,new Le],Xe=function(){function r(t,e,n,i){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=0),this.x=Number(t),this.y=Number(e),this.width=Number(n),this.height=Number(i),this.type=af.RECT}return Object.defineProperty(r.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(r,"EMPTY",{get:function(){return new r(0,0,0,0)},enumerable:!1,configurable:!0}),r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},r.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},r.prototype.contains=function(t,e){return this.width<=0||this.height<=0?!1:t>=this.x&&t=this.y&&et.right?t.right:this.right;if(i<=n)return!1;var s=this.yt.bottom?t.bottom:this.bottom;return o>s}var a=this.left,l=this.right,u=this.top,c=this.bottom;if(l<=a||c<=u)return!1;var h=Wl[0].set(t.left,t.top),f=Wl[1].set(t.left,t.bottom),d=Wl[2].set(t.right,t.top),m=Wl[3].set(t.right,t.bottom);if(d.x<=h.x||f.y<=h.y)return!1;var g=Math.sign(e.a*e.d-e.b*e.c);if(g===0||(e.apply(h,h),e.apply(f,f),e.apply(d,d),e.apply(m,m),Math.max(h.x,f.x,d.x,m.x)<=a||Math.min(h.x,f.x,d.x,m.x)>=l||Math.max(h.y,f.y,d.y,m.y)<=u||Math.min(h.y,f.y,d.y,m.y)>=c))return!1;var p=g*(f.y-h.y),y=g*(h.x-f.x),v=p*a+y*u,S=p*l+y*u,T=p*a+y*c,_=p*l+y*c;if(Math.max(v,S,T,_)<=p*h.x+y*h.y||Math.min(v,S,T,_)>=p*m.x+y*m.y)return!1;var M=g*(h.y-d.y),x=g*(d.x-h.x),N=M*a+x*u,D=M*l+x*u,j=M*a+x*c,it=M*l+x*c;return!(Math.max(N,D,j,it)<=M*h.x+x*h.y||Math.min(N,D,j,it)>=M*m.x+x*m.y)},r.prototype.pad=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2,this},r.prototype.fit=function(t){var e=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),s=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(n-e,0),this.y=i,this.height=Math.max(s-i,0),this},r.prototype.ceil=function(t,e){t===void 0&&(t=1),e===void 0&&(e=.001);var n=Math.ceil((this.x+this.width-e)*t)/t,i=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=n-this.x,this.height=i-this.y,this},r.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),s=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=n-e,this.y=i,this.height=s-i,this},r.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},r}(),Co=function(){function r(t,e,n,i){n===void 0&&(n=0),i===void 0&&(i=0),this._x=n,this._y=i,this.cb=t,this.scope=e}return r.prototype.clone=function(t,e){return t===void 0&&(t=this.cb),e===void 0&&(e=this.scope),new r(t,e,this._x,this._y)},r.prototype.set=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this.cb.call(this.scope)),this},r.prototype.copyFrom=function(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},r.prototype.copyTo=function(t){return t.set(this._x,this._y),t},r.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},r.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(r.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),r}(),hr=function(){function r(t,e,n,i,s,o){t===void 0&&(t=1),e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=1),s===void 0&&(s=0),o===void 0&&(o=0),this.array=null,this.a=t,this.b=e,this.c=n,this.d=i,this.tx=s,this.ty=o}return r.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},r.prototype.set=function(t,e,n,i,s,o){return this.a=t,this.b=e,this.c=n,this.d=i,this.tx=s,this.ty=o,this},r.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},r.prototype.apply=function(t,e){e=e||new Le;var n=t.x,i=t.y;return e.x=this.a*n+this.c*i+this.tx,e.y=this.b*n+this.d*i+this.ty,e},r.prototype.applyInverse=function(t,e){e=e||new Le;var n=1/(this.a*this.d+this.c*-this.b),i=t.x,s=t.y;return e.x=this.d*n*i+-this.c*n*s+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*s+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,e},r.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},r.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},r.prototype.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),i=this.a,s=this.c,o=this.tx;return this.a=i*e-this.b*n,this.b=i*n+this.b*e,this.c=s*e-this.d*n,this.d=s*n+this.d*e,this.tx=o*e-this.ty*n,this.ty=o*n+this.ty*e,this},r.prototype.append=function(t){var e=this.a,n=this.b,i=this.c,s=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*n+t.b*s,this.c=t.c*e+t.d*i,this.d=t.c*n+t.d*s,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*s+this.ty,this},r.prototype.setTransform=function(t,e,n,i,s,o,a,l,u){return this.a=Math.cos(a+u)*s,this.b=Math.sin(a+u)*s,this.c=-Math.sin(a-l)*o,this.d=Math.cos(a-l)*o,this.tx=t-(n*this.a+i*this.c),this.ty=e-(n*this.b+i*this.d),this},r.prototype.prepend=function(t){var e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){var n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},r.prototype.decompose=function(t){var e=this.a,n=this.b,i=this.c,s=this.d,o=t.pivot,a=-Math.atan2(-i,s),l=Math.atan2(n,e),u=Math.abs(a+l);return u<1e-5||Math.abs(ME-u)<1e-5?(t.rotation=l,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=l),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(i*i+s*s),t.position.x=this.tx+(o.x*e+o.y*i),t.position.y=this.ty+(o.x*n+o.y*s),t},r.prototype.invert=function(){var t=this.a,e=this.b,n=this.c,i=this.d,s=this.tx,o=t*i-e*n;return this.a=i/o,this.b=-e/o,this.c=-n/o,this.d=t/o,this.tx=(n*this.ty-i*s)/o,this.ty=-(t*this.ty-e*s)/o,this},r.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},r.prototype.clone=function(){var t=new r;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},r.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},r.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},r.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(r,"IDENTITY",{get:function(){return new r},enumerable:!1,configurable:!0}),Object.defineProperty(r,"TEMP_MATRIX",{get:function(){return new r},enumerable:!1,configurable:!0}),r}(),ms=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],gs=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],ys=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],vs=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],lf=[],Tx=[],Hl=Math.sign;function AE(){for(var r=0;r<16;r++){var t=[];lf.push(t);for(var e=0;e<16;e++)for(var n=Hl(ms[r]*ms[e]+ys[r]*gs[e]),i=Hl(gs[r]*ms[e]+vs[r]*gs[e]),s=Hl(ms[r]*ys[e]+ys[r]*vs[e]),o=Hl(gs[r]*ys[e]+vs[r]*vs[e]),a=0;a<16;a++)if(ms[a]===n&&gs[a]===i&&ys[a]===s&&vs[a]===o){t.push(a);break}}for(var r=0;r<16;r++){var l=new hr;l.set(ms[r],gs[r],ys[r],vs[r],0,0),Tx.push(l)}}AE();var Ne={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(r){return ms[r]},uY:function(r){return gs[r]},vX:function(r){return ys[r]},vY:function(r){return vs[r]},inv:function(r){return r&8?r&15:-r&7},add:function(r,t){return lf[r][t]},sub:function(r,t){return lf[r][Ne.inv(t)]},rotate180:function(r){return r^4},isVertical:function(r){return(r&3)===2},byDirection:function(r,t){return Math.abs(r)*2<=Math.abs(t)?t>=0?Ne.S:Ne.N:Math.abs(t)*2<=Math.abs(r)?r>0?Ne.E:Ne.W:t>0?r>0?Ne.SE:Ne.SW:r>0?Ne.NE:Ne.NW},matrixAppendRotationInv:function(r,t,e,n){e===void 0&&(e=0),n===void 0&&(n=0);var i=Tx[Ne.inv(t)];i.tx=e,i.ty=n,r.append(i)}},Ix=function(){function r(){this.worldTransform=new hr,this.localTransform=new hr,this.position=new Co(this.onChange,this,0,0),this.scale=new Co(this.onChange,this,1,1),this.pivot=new Co(this.onChange,this,0,0),this.skew=new Co(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return r.prototype.onChange=function(){this._localID++},r.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},r.prototype.toString=function(){return"[@pixi/math:Transform "+("position=("+this.position.x+", "+this.position.y+") ")+("rotation="+this.rotation+" ")+("scale=("+this.scale.x+", "+this.scale.y+") ")+("skew=("+this.skew.x+", "+this.skew.y+") ")+"]"},r.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},r.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var n=t.worldTransform,i=this.worldTransform;i.a=e.a*n.a+e.b*n.c,i.b=e.a*n.b+e.b*n.d,i.c=e.c*n.a+e.d*n.c,i.d=e.c*n.b+e.d*n.d,i.tx=e.tx*n.a+e.ty*n.c+n.tx,i.ty=e.tx*n.b+e.ty*n.d+n.ty,this._parentID=t._worldID,this._worldID++}},r.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(r.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),r.IDENTITY=new r,r}();/*! * @pixi/core - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -82,11 +82,11 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var cf=function(r,t){return cf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])},cf(r,t)};function Fe(r,t){cf(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var hf=function(){return hf=Object.assign||function(t){for(var e=arguments,n,i=1,s=arguments.length;i0&&c>0,i.textureCacheIds=[],i.destroyed=!1,i.resource=null,i._batchEnabled=0,i._batchLocation=0,i.parentTextureArray=null,i.setResource(e),i}return Object.defineProperty(t.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mipmap",{get:function(){return this._mipmap},set:function(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(e,n){var i;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,i=!0),n!==void 0&&n!==this.mipmap&&(this.mipmap=n,i=!0),i&&this.dirtyStyleId++,this},t.prototype.setSize=function(e,n,i){return i=i||this.resolution,this.setRealSize(e*i,n*i,i)},t.prototype.setRealSize=function(e,n,i){return this.resolution=i||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(n)/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=Qg(this.realWidth)&&Qg(this.realHeight)},t.prototype.setResolution=function(e){var n=this.resolution;return n===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*n)/e,this.height=Math.round(this.height*n)/e,this.emit("update",this)),this._refreshPOT(),this)},t.prototype.setResource=function(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},t.prototype.onError=function(e){this.emit("error",this,e)},t.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete as[this.cacheId],delete si[this.cacheId],this.cacheId=null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit("dispose",this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(e,n,i){i===void 0&&(i=Ct.STRICT_TEXTURE_CACHE);var s=typeof e=="string",o=null;if(s)o=e;else{if(!e._pixiId){var a=n&&n.pixiIdPrefix||"pixiid";e._pixiId=a+"_"+rl()}o=e._pixiId}var l=as[o];if(s&&i&&!l)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return l||(l=new t(e,n),l.cacheId=o,t.addToCache(l,o)),l},t.fromBuffer=function(e,n,i,s){e=e||new Float32Array(n*i*4);var o=new Zp(e,{width:n,height:i}),a=e instanceof Float32Array?ge.FLOAT:ge.UNSIGNED_BYTE;return new t(o,Object.assign({},OE,s||{width:n,height:i,type:a}))},t.addToCache=function(e,n){n&&(e.textureCacheIds.indexOf(n)===-1&&e.textureCacheIds.push(n),as[n]&&console.warn("BaseTexture added to the cache with an id ["+n+"] that already had an entry"),as[n]=e)},t.removeFromCache=function(e){if(typeof e=="string"){var n=as[e];if(n){var i=n.textureCacheIds.indexOf(e);return i>-1&&n.textureCacheIds.splice(i,1),delete as[e],n}}else if(e&&e.textureCacheIds){for(var s=0;s0)if(e.resource)this.addResourceAt(e.resource,n);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Fs.TEXTURE_CUBE_MAP_POSITIVE_X+n,e.parentTextureArray=this.baseTexture,this.items[n]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[n]=e,this},t.prototype.upload=function(e,n,i){for(var s=this.itemDirtyIds,o=0;o)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(ji),LE=function(r){Fe(t,r);function t(e,n){var i=this;if(n=n||{},!(e instanceof HTMLVideoElement)){var s=document.createElement("video");s.setAttribute("preload","auto"),s.setAttribute("webkit-playsinline",""),s.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);var o=e[0].src||e[0];ji.crossOrigin(s,o,n.crossorigin);for(var a=0;a2},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Nn.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Nn.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);var n=this.valid;this.resize(e.videoWidth,e.videoHeight),!n&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&(Nn.shared.remove(this.update,this),this._isConnectedToTicker=!1);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),r.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Nn.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Nn.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(e){e!==this._updateFPS&&(this._updateFPS=e)},enumerable:!1,configurable:!0}),t.test=function(e,n){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||t.TYPES.indexOf(n)>-1},t.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],t.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},t}(ji),NE=function(r){Fe(t,r);function t(e){return r.call(this,e)||this}return t.test=function(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&e instanceof ImageBitmap},t}(ji);uf.push(Ax,NE,RE,LE,DE,Zp,FE,PE);var BE=function(r){Fe(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.upload=function(e,n,i){var s=e.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===Vi.UNPACK);var o=n.realWidth,a=n.realHeight;return i.width===o&&i.height===a?s.texSubImage2D(n.target,0,0,0,o,a,n.format,i.type,this.data):(i.width=o,i.height=a,s.texImage2D(n.target,0,i.internalFormat,o,a,0,n.format,i.type,this.data)),!0},t}(Zp),df=function(){function r(t,e){this.width=Math.round(t||100),this.height=Math.round(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new ar("disposeFramebuffer"),this.multisample=We.NONE}return Object.defineProperty(r.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),r.prototype.addColorTexture=function(t,e){return t===void 0&&(t=0),this.colorTextures[t]=e||new Ke(null,{scaleMode:Ur.NEAREST,resolution:1,mipmap:Xn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},r.prototype.addDepthTexture=function(t){return this.depthTexture=t||new Ke(new BE(null,{width:this.width,height:this.height}),{scaleMode:Ur.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Xn.OFF,format:Tt.DEPTH_COMPONENT,type:ge.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},r.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},r.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},r.prototype.resize=function(t,e){if(t=Math.round(t),e=Math.round(e),!(t===this.width&&e===this.height)){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&n.textureCacheIds.splice(i,1),delete si[e],n}}else if(e&&e.textureCacheIds){for(var s=0;sthis.baseTexture.width,l=i+o>this.baseTexture.height;if(a||l){var u=a&&l?"and":"or",c="X: "+n+" + "+s+" = "+(n+s)+" > "+this.baseTexture.width,h="Y: "+i+" + "+o+" = "+(i+o)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(c+" "+u+" "+h))}this.valid=s&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(t,"EMPTY",{get:function(){return t._EMPTY||(t._EMPTY=new t(new Ke),Xl(t._EMPTY),Xl(t._EMPTY.baseTexture)),t._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(t,"WHITE",{get:function(){if(!t._WHITE){var e=Ct.ADAPTER.createCanvas(16,16),n=e.getContext("2d");e.width=16,e.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),t._WHITE=new t(Ke.from(e)),Xl(t._WHITE),Xl(t._WHITE.baseTexture)}return t._WHITE},enumerable:!1,configurable:!0}),t}(Ji),Kp=function(r){Fe(t,r);function t(e,n){var i=r.call(this,e,n)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Object.defineProperty(t.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(e){this.framebuffer.multisample=e},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,n,i){i===void 0&&(i=!0);var s=this.baseTexture.resolution,o=Math.round(e*s)/s,a=Math.round(n*s)/s;this.valid=o>0&&a>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=a,i&&this.baseTexture.resize(o,a),this.updateUvs()},t.prototype.setResolution=function(e){var n=this.baseTexture;n.resolution!==e&&(n.setResolution(e),this.resize(n.width,n.height,!1))},t.create=function(e){for(var n=arguments,i=[],s=1;s>>0,i>1&&(s+=i*4294967296)):s=i>1?-i:-1,this.texturePool[s]||(this.texturePool[s]=[]);var o=this.texturePool[s].pop();return o||(o=this.createTexture(t,e,i)),o.filterPoolKey=s,o.setResolution(n),o},r.prototype.getFilterTexture=function(t,e,n){var i=this.getOptimalTexture(t.width,t.height,e||t.resolution,n||We.NONE);return i.filterFrame=t.filterFrame,i},r.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},r.prototype.returnFilterTexture=function(t){this.returnTexture(t)},r.prototype.clear=function(t){if(t=t!==!1,t)for(var e in this.texturePool){var n=this.texturePool[e];if(n)for(var i=0;i0&&t.height>0;for(var e in this.texturePool)if(Number(e)<0){var n=this.texturePool[e];if(n)for(var i=0;i1){for(var c=0;c1&&(h=this.getOptimalFilterTexture(c.width,c.height,e.resolution),h.filterFrame=c.filterFrame),n[f].apply(this,c,h,_n.CLEAR,e);var d=c;c=h,h=d}n[f].apply(this,c,u.renderTexture,_n.BLEND,e),f>1&&e.multisample>1&&this.returnFilterTexture(e.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(h)}e.clear(),this.statePool.push(e)},r.prototype.bindAndClear=function(t,e){e===void 0&&(e=_n.CLEAR);var n=this.renderer,i=n.renderTexture,s=n.state;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t&&t.filterFrame){var o=this.tempRect;o.x=0,o.y=0,o.width=t.filterFrame.width,o.height=t.filterFrame.height,i.bind(t,t.filterFrame,o)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var a=s.stateId&1||this.forceClear;(e===_n.CLEAR||e===_n.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)},r.prototype.applyFilter=function(t,e,n,i){var s=this.renderer;s.state.set(t.state),this.bindAndClear(n,i),t.uniforms.uSampler=e,t.uniforms.filterGlobals=this.globalUniforms,s.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(e._frame,e.filterFrame),s.geometry.bind(this.quadUv),s.geometry.draw(el.TRIANGLES)):(s.geometry.bind(this.quad),s.geometry.draw(el.TRIANGLE_STRIP))},r.prototype.calculateSpriteMatrix=function(t,e){var n=this.activeState,i=n.sourceFrame,s=n.destinationFrame,o=e._texture.orig,a=t.set(s.width,0,0,s.height,i.x,i.y),l=e.worldTransform.copyTo(hr.TEMP_MATRIX);return l.invert(),a.prepend(l),a.scale(1/o.width,1/o.height),a.translate(e.anchor.x,e.anchor.y),a},r.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},r.prototype.getOptimalFilterTexture=function(t,e,n,i){return n===void 0&&(n=1),i===void 0&&(i=We.NONE),this.texturePool.getOptimalTexture(t,e,n,i)},r.prototype.getFilterTexture=function(t,e,n){if(typeof t=="number"){var i=t;t=e,e=i}t=t||this.activeState.renderTexture;var s=this.texturePool.getOptimalTexture(t.width,t.height,e||t.resolution,n||We.NONE);return s.filterFrame=t.filterFrame,s},r.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},r.prototype.emptyPool=function(){this.texturePool.clear(!0)},r.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},r.prototype.transformAABB=function(t,e){var n=Yl[0],i=Yl[1],s=Yl[2],o=Yl[3];n.set(e.left,e.top),i.set(e.left,e.bottom),s.set(e.right,e.top),o.set(e.right,e.bottom),t.apply(n,n),t.apply(i,i),t.apply(s,s),t.apply(o,o);var a=Math.min(n.x,i.x,s.x,o.x),l=Math.min(n.y,i.y,s.y,o.y),u=Math.max(n.x,i.x,s.x,o.x),c=Math.max(n.y,i.y,s.y,o.y);e.x=a,e.y=l,e.width=u-a,e.height=c-l},r.prototype.roundFrame=function(t,e,n,i,s){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(s){var o=s.a,a=s.b,l=s.c,u=s.d;if((Math.abs(a)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(u)>1e-4))return}s=s?zh.copyFrom(s):zh.identity(),s.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(s,t),t.ceil(e),this.transformAABB(s.invert(),t)}},r}(),Px=function(){function r(t){this.renderer=t}return r.prototype.flush=function(){},r.prototype.destroy=function(){this.renderer=null},r.prototype.start=function(){},r.prototype.stop=function(){this.flush()},r.prototype.render=function(t){},r}(),qE=function(){function r(t){this.renderer=t,this.emptyRenderer=new Px(t),this.currentRenderer=this.emptyRenderer}return r.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},r.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},r.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},r.prototype.copyBoundTextures=function(t,e){for(var n=this.renderer.texture.boundTextures,i=e-1;i>=0;--i)t[i]=n[i]||null,t[i]&&(t[i]._batchLocation=i)},r.prototype.boundArray=function(t,e,n,i){for(var s=t.elements,o=t.ids,a=t.count,l=0,u=0;u=0&&h=yi.WEBGL2&&(n=t.getContext("webgl2",e)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},r.prototype.getExtensions=function(){var t=this.gl,e={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,e,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,e,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})},r.prototype.handleContextLost=function(t){var e=this;t.preventDefault(),setTimeout(function(){e.gl.isContextLost()&&e.extensions.loseContext&&e.extensions.loseContext.restoreContext()},0)},r.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},r.prototype.destroy=function(){var t=this.renderer.view;this.renderer=null,t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},r.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},r.prototype.validateContext=function(t){var e=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),e&&!e.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},r}(),ZE=function(){function r(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=We.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return r}(),KE=new Xe,JE=function(){function r(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new df(10,10),this.msaaSamples=null}return r.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Xe,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var e=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Ct.PREFER_ENV===yi.WEBGL_LEGACY&&(e=null,n=null),e?t.drawBuffers=function(i){return e.drawBuffersWEBGL(i)}:(this.hasMRT=!1,t.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},r.prototype.bind=function(t,e,n){n===void 0&&(n=0);var i=this.gl;if(t){var s=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,s.framebuffer)),s.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,s.mipLevel=n),s.dirtyId!==t.dirtyId&&(s.dirtyId=t.dirtyId,s.dirtyFormat!==t.dirtyFormat?(s.dirtyFormat=t.dirtyFormat,s.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):s.dirtySize!==t.dirtySize&&(s.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var o=0;o>n,u=e.height>>n,c=l/e.width;this.setViewport(e.x*c,e.y*c,l,u)}else{var l=t.width>>n,u=t.height>>n;this.setViewport(0,0,l,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},r.prototype.setViewport=function(t,e,n,i){var s=this.viewport;t=Math.round(t),e=Math.round(e),n=Math.round(n),i=Math.round(i),(s.width!==n||s.height!==i||s.x!==t||s.y!==e)&&(s.x=t,s.y=e,s.width=n,s.height=i,this.gl.viewport(t,e,n,i))},Object.defineProperty(r.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),r.prototype.clear=function(t,e,n,i,s){s===void 0&&(s=Ou.COLOR|Ou.DEPTH);var o=this.gl;o.clearColor(t,e,n,i),o.clear(s)},r.prototype.initFramebuffer=function(t){var e=this.gl,n=new ZE(e.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n},r.prototype.resizeFramebuffer=function(t){var e=this.gl,n=t.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(e.bindRenderbuffer(e.RENDERBUFFER,n.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,n.multisample,e.RGBA8,t.width,t.height)),n.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,n.stencil),n.msaaBuffer?e.renderbufferStorageMultisample(e.RENDERBUFFER,n.multisample,e.DEPTH24_STENCIL8,t.width,t.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height));var i=t.colorTextures,s=i.length;e.drawBuffers||(s=Math.min(s,1));for(var o=0;o1&&this.canMultisampleFramebuffer(t)?(i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.RGBA8,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var a=[],l=0;l1&&n.drawBuffers(a),t.depthTexture){var h=this.writeDepthTexture;if(h){var f=t.depthTexture;this.renderer.texture.bind(f,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,f._glTextures[this.CONTEXT_UID].texture,e)}}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)},r.prototype.canMultisampleFramebuffer=function(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture},r.prototype.detectSamples=function(t){var e=this.msaaSamples,n=We.NONE;if(t<=1||e===null)return n;for(var i=0;i=0&&this.managedFramebuffers.splice(s,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},r.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n0&&c>0,i.textureCacheIds=[],i.destroyed=!1,i.resource=null,i._batchEnabled=0,i._batchLocation=0,i.parentTextureArray=null,i.setResource(e),i}return Object.defineProperty(t.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mipmap",{get:function(){return this._mipmap},set:function(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(e,n){var i;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,i=!0),n!==void 0&&n!==this.mipmap&&(this.mipmap=n,i=!0),i&&this.dirtyStyleId++,this},t.prototype.setSize=function(e,n,i){return i=i||this.resolution,this.setRealSize(e*i,n*i,i)},t.prototype.setRealSize=function(e,n,i){return this.resolution=i||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(n)/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=Qg(this.realWidth)&&Qg(this.realHeight)},t.prototype.setResolution=function(e){var n=this.resolution;return n===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*n)/e,this.height=Math.round(this.height*n)/e,this.emit("update",this)),this._refreshPOT(),this)},t.prototype.setResource=function(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},t.prototype.onError=function(e){this.emit("error",this,e)},t.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete as[this.cacheId],delete si[this.cacheId],this.cacheId=null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit("dispose",this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(e,n,i){i===void 0&&(i=Ct.STRICT_TEXTURE_CACHE);var s=typeof e=="string",o=null;if(s)o=e;else{if(!e._pixiId){var a=n&&n.pixiIdPrefix||"pixiid";e._pixiId=a+"_"+rl()}o=e._pixiId}var l=as[o];if(s&&i&&!l)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return l||(l=new t(e,n),l.cacheId=o,t.addToCache(l,o)),l},t.fromBuffer=function(e,n,i,s){e=e||new Float32Array(n*i*4);var o=new Zp(e,{width:n,height:i}),a=e instanceof Float32Array?ge.FLOAT:ge.UNSIGNED_BYTE;return new t(o,Object.assign({},OE,s||{width:n,height:i,type:a}))},t.addToCache=function(e,n){n&&(e.textureCacheIds.indexOf(n)===-1&&e.textureCacheIds.push(n),as[n]&&console.warn("BaseTexture added to the cache with an id ["+n+"] that already had an entry"),as[n]=e)},t.removeFromCache=function(e){if(typeof e=="string"){var n=as[e];if(n){var i=n.textureCacheIds.indexOf(e);return i>-1&&n.textureCacheIds.splice(i,1),delete as[e],n}}else if(e&&e.textureCacheIds){for(var s=0;s0)if(e.resource)this.addResourceAt(e.resource,n);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Fs.TEXTURE_CUBE_MAP_POSITIVE_X+n,e.parentTextureArray=this.baseTexture,this.items[n]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[n]=e,this},t.prototype.upload=function(e,n,i){for(var s=this.itemDirtyIds,o=0;o)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(ji),DE=function(r){Fe(t,r);function t(e,n){var i=this;if(n=n||{},!(e instanceof HTMLVideoElement)){var s=document.createElement("video");s.setAttribute("preload","auto"),s.setAttribute("webkit-playsinline",""),s.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);var o=e[0].src||e[0];ji.crossOrigin(s,o,n.crossorigin);for(var a=0;a2},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Nn.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Nn.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);var n=this.valid;this.resize(e.videoWidth,e.videoHeight),!n&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&(Nn.shared.remove(this.update,this),this._isConnectedToTicker=!1);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),r.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Nn.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Nn.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(e){e!==this._updateFPS&&(this._updateFPS=e)},enumerable:!1,configurable:!0}),t.test=function(e,n){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||t.TYPES.indexOf(n)>-1},t.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],t.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},t}(ji),NE=function(r){Fe(t,r);function t(e){return r.call(this,e)||this}return t.test=function(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&e instanceof ImageBitmap},t}(ji);uf.push(Ax,NE,RE,DE,LE,Zp,FE,PE);var BE=function(r){Fe(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.upload=function(e,n,i){var s=e.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===Vi.UNPACK);var o=n.realWidth,a=n.realHeight;return i.width===o&&i.height===a?s.texSubImage2D(n.target,0,0,0,o,a,n.format,i.type,this.data):(i.width=o,i.height=a,s.texImage2D(n.target,0,i.internalFormat,o,a,0,n.format,i.type,this.data)),!0},t}(Zp),df=function(){function r(t,e){this.width=Math.round(t||100),this.height=Math.round(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new ar("disposeFramebuffer"),this.multisample=We.NONE}return Object.defineProperty(r.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),r.prototype.addColorTexture=function(t,e){return t===void 0&&(t=0),this.colorTextures[t]=e||new Ke(null,{scaleMode:Ur.NEAREST,resolution:1,mipmap:Xn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},r.prototype.addDepthTexture=function(t){return this.depthTexture=t||new Ke(new BE(null,{width:this.width,height:this.height}),{scaleMode:Ur.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Xn.OFF,format:Tt.DEPTH_COMPONENT,type:ge.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},r.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},r.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},r.prototype.resize=function(t,e){if(t=Math.round(t),e=Math.round(e),!(t===this.width&&e===this.height)){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&n.textureCacheIds.splice(i,1),delete si[e],n}}else if(e&&e.textureCacheIds){for(var s=0;sthis.baseTexture.width,l=i+o>this.baseTexture.height;if(a||l){var u=a&&l?"and":"or",c="X: "+n+" + "+s+" = "+(n+s)+" > "+this.baseTexture.width,h="Y: "+i+" + "+o+" = "+(i+o)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(c+" "+u+" "+h))}this.valid=s&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(t,"EMPTY",{get:function(){return t._EMPTY||(t._EMPTY=new t(new Ke),Xl(t._EMPTY),Xl(t._EMPTY.baseTexture)),t._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(t,"WHITE",{get:function(){if(!t._WHITE){var e=Ct.ADAPTER.createCanvas(16,16),n=e.getContext("2d");e.width=16,e.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),t._WHITE=new t(Ke.from(e)),Xl(t._WHITE),Xl(t._WHITE.baseTexture)}return t._WHITE},enumerable:!1,configurable:!0}),t}(Ji),Kp=function(r){Fe(t,r);function t(e,n){var i=r.call(this,e,n)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Object.defineProperty(t.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(e){this.framebuffer.multisample=e},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,n,i){i===void 0&&(i=!0);var s=this.baseTexture.resolution,o=Math.round(e*s)/s,a=Math.round(n*s)/s;this.valid=o>0&&a>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=a,i&&this.baseTexture.resize(o,a),this.updateUvs()},t.prototype.setResolution=function(e){var n=this.baseTexture;n.resolution!==e&&(n.setResolution(e),this.resize(n.width,n.height,!1))},t.create=function(e){for(var n=arguments,i=[],s=1;s>>0,i>1&&(s+=i*4294967296)):s=i>1?-i:-1,this.texturePool[s]||(this.texturePool[s]=[]);var o=this.texturePool[s].pop();return o||(o=this.createTexture(t,e,i)),o.filterPoolKey=s,o.setResolution(n),o},r.prototype.getFilterTexture=function(t,e,n){var i=this.getOptimalTexture(t.width,t.height,e||t.resolution,n||We.NONE);return i.filterFrame=t.filterFrame,i},r.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},r.prototype.returnFilterTexture=function(t){this.returnTexture(t)},r.prototype.clear=function(t){if(t=t!==!1,t)for(var e in this.texturePool){var n=this.texturePool[e];if(n)for(var i=0;i0&&t.height>0;for(var e in this.texturePool)if(Number(e)<0){var n=this.texturePool[e];if(n)for(var i=0;i1){for(var c=0;c1&&(h=this.getOptimalFilterTexture(c.width,c.height,e.resolution),h.filterFrame=c.filterFrame),n[f].apply(this,c,h,_n.CLEAR,e);var d=c;c=h,h=d}n[f].apply(this,c,u.renderTexture,_n.BLEND,e),f>1&&e.multisample>1&&this.returnFilterTexture(e.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(h)}e.clear(),this.statePool.push(e)},r.prototype.bindAndClear=function(t,e){e===void 0&&(e=_n.CLEAR);var n=this.renderer,i=n.renderTexture,s=n.state;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t&&t.filterFrame){var o=this.tempRect;o.x=0,o.y=0,o.width=t.filterFrame.width,o.height=t.filterFrame.height,i.bind(t,t.filterFrame,o)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var a=s.stateId&1||this.forceClear;(e===_n.CLEAR||e===_n.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)},r.prototype.applyFilter=function(t,e,n,i){var s=this.renderer;s.state.set(t.state),this.bindAndClear(n,i),t.uniforms.uSampler=e,t.uniforms.filterGlobals=this.globalUniforms,s.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(e._frame,e.filterFrame),s.geometry.bind(this.quadUv),s.geometry.draw(el.TRIANGLES)):(s.geometry.bind(this.quad),s.geometry.draw(el.TRIANGLE_STRIP))},r.prototype.calculateSpriteMatrix=function(t,e){var n=this.activeState,i=n.sourceFrame,s=n.destinationFrame,o=e._texture.orig,a=t.set(s.width,0,0,s.height,i.x,i.y),l=e.worldTransform.copyTo(hr.TEMP_MATRIX);return l.invert(),a.prepend(l),a.scale(1/o.width,1/o.height),a.translate(e.anchor.x,e.anchor.y),a},r.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},r.prototype.getOptimalFilterTexture=function(t,e,n,i){return n===void 0&&(n=1),i===void 0&&(i=We.NONE),this.texturePool.getOptimalTexture(t,e,n,i)},r.prototype.getFilterTexture=function(t,e,n){if(typeof t=="number"){var i=t;t=e,e=i}t=t||this.activeState.renderTexture;var s=this.texturePool.getOptimalTexture(t.width,t.height,e||t.resolution,n||We.NONE);return s.filterFrame=t.filterFrame,s},r.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},r.prototype.emptyPool=function(){this.texturePool.clear(!0)},r.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},r.prototype.transformAABB=function(t,e){var n=Yl[0],i=Yl[1],s=Yl[2],o=Yl[3];n.set(e.left,e.top),i.set(e.left,e.bottom),s.set(e.right,e.top),o.set(e.right,e.bottom),t.apply(n,n),t.apply(i,i),t.apply(s,s),t.apply(o,o);var a=Math.min(n.x,i.x,s.x,o.x),l=Math.min(n.y,i.y,s.y,o.y),u=Math.max(n.x,i.x,s.x,o.x),c=Math.max(n.y,i.y,s.y,o.y);e.x=a,e.y=l,e.width=u-a,e.height=c-l},r.prototype.roundFrame=function(t,e,n,i,s){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(s){var o=s.a,a=s.b,l=s.c,u=s.d;if((Math.abs(a)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(u)>1e-4))return}s=s?zh.copyFrom(s):zh.identity(),s.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(s,t),t.ceil(e),this.transformAABB(s.invert(),t)}},r}(),Px=function(){function r(t){this.renderer=t}return r.prototype.flush=function(){},r.prototype.destroy=function(){this.renderer=null},r.prototype.start=function(){},r.prototype.stop=function(){this.flush()},r.prototype.render=function(t){},r}(),qE=function(){function r(t){this.renderer=t,this.emptyRenderer=new Px(t),this.currentRenderer=this.emptyRenderer}return r.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},r.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},r.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},r.prototype.copyBoundTextures=function(t,e){for(var n=this.renderer.texture.boundTextures,i=e-1;i>=0;--i)t[i]=n[i]||null,t[i]&&(t[i]._batchLocation=i)},r.prototype.boundArray=function(t,e,n,i){for(var s=t.elements,o=t.ids,a=t.count,l=0,u=0;u=0&&h=yi.WEBGL2&&(n=t.getContext("webgl2",e)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},r.prototype.getExtensions=function(){var t=this.gl,e={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,e,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,e,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})},r.prototype.handleContextLost=function(t){var e=this;t.preventDefault(),setTimeout(function(){e.gl.isContextLost()&&e.extensions.loseContext&&e.extensions.loseContext.restoreContext()},0)},r.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},r.prototype.destroy=function(){var t=this.renderer.view;this.renderer=null,t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},r.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},r.prototype.validateContext=function(t){var e=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),e&&!e.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},r}(),ZE=function(){function r(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=We.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return r}(),KE=new Xe,JE=function(){function r(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new df(10,10),this.msaaSamples=null}return r.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Xe,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var e=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Ct.PREFER_ENV===yi.WEBGL_LEGACY&&(e=null,n=null),e?t.drawBuffers=function(i){return e.drawBuffersWEBGL(i)}:(this.hasMRT=!1,t.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},r.prototype.bind=function(t,e,n){n===void 0&&(n=0);var i=this.gl;if(t){var s=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,s.framebuffer)),s.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,s.mipLevel=n),s.dirtyId!==t.dirtyId&&(s.dirtyId=t.dirtyId,s.dirtyFormat!==t.dirtyFormat?(s.dirtyFormat=t.dirtyFormat,s.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):s.dirtySize!==t.dirtySize&&(s.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var o=0;o>n,u=e.height>>n,c=l/e.width;this.setViewport(e.x*c,e.y*c,l,u)}else{var l=t.width>>n,u=t.height>>n;this.setViewport(0,0,l,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},r.prototype.setViewport=function(t,e,n,i){var s=this.viewport;t=Math.round(t),e=Math.round(e),n=Math.round(n),i=Math.round(i),(s.width!==n||s.height!==i||s.x!==t||s.y!==e)&&(s.x=t,s.y=e,s.width=n,s.height=i,this.gl.viewport(t,e,n,i))},Object.defineProperty(r.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),r.prototype.clear=function(t,e,n,i,s){s===void 0&&(s=Ou.COLOR|Ou.DEPTH);var o=this.gl;o.clearColor(t,e,n,i),o.clear(s)},r.prototype.initFramebuffer=function(t){var e=this.gl,n=new ZE(e.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n},r.prototype.resizeFramebuffer=function(t){var e=this.gl,n=t.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(e.bindRenderbuffer(e.RENDERBUFFER,n.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,n.multisample,e.RGBA8,t.width,t.height)),n.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,n.stencil),n.msaaBuffer?e.renderbufferStorageMultisample(e.RENDERBUFFER,n.multisample,e.DEPTH24_STENCIL8,t.width,t.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height));var i=t.colorTextures,s=i.length;e.drawBuffers||(s=Math.min(s,1));for(var o=0;o1&&this.canMultisampleFramebuffer(t)?(i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.RGBA8,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var a=[],l=0;l1&&n.drawBuffers(a),t.depthTexture){var h=this.writeDepthTexture;if(h){var f=t.depthTexture;this.renderer.texture.bind(f,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,f._glTextures[this.CONTEXT_UID].texture,e)}}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)},r.prototype.canMultisampleFramebuffer=function(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture},r.prototype.detectSamples=function(t){var e=this.msaaSamples,n=We.NONE;if(t<=1||e===null)return n;for(var i=0;i=0&&this.managedFramebuffers.splice(s,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},r.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=yi.WEBGL2&&(t=r.getContext("webgl2",{})),t||(t=r.getContext("webgl",{})||r.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),ma=t}return ma}var ql;function iA(){if(!ql){ql=zr.MEDIUM;var r=nA();if(r&&r.getShaderPrecisionFormat){var t=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);ql=t.precision?zr.HIGH:zr.MEDIUM}}return ql}function ly(r,t,e){if(r.substring(0,9)!=="precision"){var n=t;return t===zr.HIGH&&e!==zr.HIGH&&(n=zr.MEDIUM),"precision "+n+` float; -`+r}else if(e!==zr.HIGH&&r.substring(0,15)==="precision highp")return r.replace("precision highp","precision mediump");return r}var sA={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Dx(r){return sA[r]}var Ql=null,uy={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Lx(r,t){if(!Ql){var e=Object.keys(uy);Ql={};for(var n=0;n1){var m=Dx(l.data.type),g=Math.max(kx[l.data.type]/16,1),p=m/g,y=(4-p%4)%4;o.push(` + `],a=0;a1){var m=Lx(l.data.type),g=Math.max(kx[l.data.type]/16,1),p=m/g,y=(4-p%4)%4;o.push(` cv = ud.`+c+`.value; v = uv.`+c+`; offset = `+l.offset/4+`; @@ -487,7 +487,7 @@ void main(void) `)}}return o.push(` renderer.buffer.update(buffer); `),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` -`))}}var RA=function(){function r(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return r.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},r}();function FA(r,t){for(var e={},n=t.getProgramParameter(r,t.ACTIVE_ATTRIBUTES),i=0;ih?1:-1});for(var o=0;o>1,n++;this.stateId=t.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},r.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,n=!1,i=0;ithis.maxIdle&&(t.destroyTexture(s,!0),e[i]=null,n=!0)}if(n){for(var o=0,i=0;i=0;i--)this.unload(t.children[i])},r.prototype.destroy=function(){this.renderer=null},r}();function XA(r){var t,e,n,i,s,o,a,l,u,c,h,f,d,m,g,p,y,v,S,T,_,M,x;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?x=(t={},t[ge.UNSIGNED_BYTE]=(e={},e[Tt.RGBA]=r.RGBA8,e[Tt.RGB]=r.RGB8,e[Tt.RG]=r.RG8,e[Tt.RED]=r.R8,e[Tt.RGBA_INTEGER]=r.RGBA8UI,e[Tt.RGB_INTEGER]=r.RGB8UI,e[Tt.RG_INTEGER]=r.RG8UI,e[Tt.RED_INTEGER]=r.R8UI,e[Tt.ALPHA]=r.ALPHA,e[Tt.LUMINANCE]=r.LUMINANCE,e[Tt.LUMINANCE_ALPHA]=r.LUMINANCE_ALPHA,e),t[ge.BYTE]=(n={},n[Tt.RGBA]=r.RGBA8_SNORM,n[Tt.RGB]=r.RGB8_SNORM,n[Tt.RG]=r.RG8_SNORM,n[Tt.RED]=r.R8_SNORM,n[Tt.RGBA_INTEGER]=r.RGBA8I,n[Tt.RGB_INTEGER]=r.RGB8I,n[Tt.RG_INTEGER]=r.RG8I,n[Tt.RED_INTEGER]=r.R8I,n),t[ge.UNSIGNED_SHORT]=(i={},i[Tt.RGBA_INTEGER]=r.RGBA16UI,i[Tt.RGB_INTEGER]=r.RGB16UI,i[Tt.RG_INTEGER]=r.RG16UI,i[Tt.RED_INTEGER]=r.R16UI,i[Tt.DEPTH_COMPONENT]=r.DEPTH_COMPONENT16,i),t[ge.SHORT]=(s={},s[Tt.RGBA_INTEGER]=r.RGBA16I,s[Tt.RGB_INTEGER]=r.RGB16I,s[Tt.RG_INTEGER]=r.RG16I,s[Tt.RED_INTEGER]=r.R16I,s),t[ge.UNSIGNED_INT]=(o={},o[Tt.RGBA_INTEGER]=r.RGBA32UI,o[Tt.RGB_INTEGER]=r.RGB32UI,o[Tt.RG_INTEGER]=r.RG32UI,o[Tt.RED_INTEGER]=r.R32UI,o[Tt.DEPTH_COMPONENT]=r.DEPTH_COMPONENT24,o),t[ge.INT]=(a={},a[Tt.RGBA_INTEGER]=r.RGBA32I,a[Tt.RGB_INTEGER]=r.RGB32I,a[Tt.RG_INTEGER]=r.RG32I,a[Tt.RED_INTEGER]=r.R32I,a),t[ge.FLOAT]=(l={},l[Tt.RGBA]=r.RGBA32F,l[Tt.RGB]=r.RGB32F,l[Tt.RG]=r.RG32F,l[Tt.RED]=r.R32F,l[Tt.DEPTH_COMPONENT]=r.DEPTH_COMPONENT32F,l),t[ge.HALF_FLOAT]=(u={},u[Tt.RGBA]=r.RGBA16F,u[Tt.RGB]=r.RGB16F,u[Tt.RG]=r.RG16F,u[Tt.RED]=r.R16F,u),t[ge.UNSIGNED_SHORT_5_6_5]=(c={},c[Tt.RGB]=r.RGB565,c),t[ge.UNSIGNED_SHORT_4_4_4_4]=(h={},h[Tt.RGBA]=r.RGBA4,h),t[ge.UNSIGNED_SHORT_5_5_5_1]=(f={},f[Tt.RGBA]=r.RGB5_A1,f),t[ge.UNSIGNED_INT_2_10_10_10_REV]=(d={},d[Tt.RGBA]=r.RGB10_A2,d[Tt.RGBA_INTEGER]=r.RGB10_A2UI,d),t[ge.UNSIGNED_INT_10F_11F_11F_REV]=(m={},m[Tt.RGB]=r.R11F_G11F_B10F,m),t[ge.UNSIGNED_INT_5_9_9_9_REV]=(g={},g[Tt.RGB]=r.RGB9_E5,g),t[ge.UNSIGNED_INT_24_8]=(p={},p[Tt.DEPTH_STENCIL]=r.DEPTH24_STENCIL8,p),t[ge.FLOAT_32_UNSIGNED_INT_24_8_REV]=(y={},y[Tt.DEPTH_STENCIL]=r.DEPTH32F_STENCIL8,y),t):x=(v={},v[ge.UNSIGNED_BYTE]=(S={},S[Tt.RGBA]=r.RGBA,S[Tt.RGB]=r.RGB,S[Tt.ALPHA]=r.ALPHA,S[Tt.LUMINANCE]=r.LUMINANCE,S[Tt.LUMINANCE_ALPHA]=r.LUMINANCE_ALPHA,S),v[ge.UNSIGNED_SHORT_5_6_5]=(T={},T[Tt.RGB]=r.RGB,T),v[ge.UNSIGNED_SHORT_4_4_4_4]=(_={},_[Tt.RGBA]=r.RGBA,_),v[ge.UNSIGNED_SHORT_5_5_5_1]=(M={},M[Tt.RGBA]=r.RGBA,M),v),x}var qh=function(){function r(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=ge.UNSIGNED_BYTE,this.internalFormat=Tt.RGBA,this.samplerType=0}return r}(),YA=function(){function r(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Ke,this.hasIntegerTextures=!1}return r.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=XA(t);var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var n=0;n=0;--o){var a=n[o];if(a){var l=a._glTextures[s];l.samplerType!==Pu.FLOAT&&this.renderer.texture.unbind(a)}}},r.prototype.initTexture=function(t){var e=new qh(this.gl.createTexture());return e.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=e,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),e},r.prototype.initTextureType=function(t,e){var n,i;e.internalFormat=(i=(n=this.internalFormats[t.type])===null||n===void 0?void 0:n[t.format])!==null&&i!==void 0?i:t.format,this.webGLVersion===2&&t.type===ge.HALF_FLOAT?e.type=this.gl.HALF_FLOAT:e.type=t.type},r.prototype.updateTexture=function(t){var e=t._glTextures[this.CONTEXT_UID];if(e){var n=this.renderer;if(this.initTextureType(t,e),t.resource&&t.resource.upload(n,t,e))e.samplerType!==Pu.FLOAT&&(this.hasIntegerTextures=!0);else{var i=t.realWidth,s=t.realHeight,o=n.gl;(e.width!==i||e.height!==s||e.dirtyId<0)&&(e.width=i,e.height=s,o.texImage2D(t.target,0,e.internalFormat,i,s,0,t.format,e.type,null))}t.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(t),e.dirtyId=t.dirtyId}},r.prototype.destroyTexture=function(t,e){var n=this.gl;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!e)){var i=this.managedTextures.indexOf(t);i!==-1&&du(this.managedTextures,i,1)}},r.prototype.updateTextureStyle=function(t){var e=t._glTextures[this.CONTEXT_UID];e&&((t.mipmap===Xn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?e.mipmap=!1:e.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?e.wrapMode=Ru.CLAMP:e.wrapMode=t.wrapMode,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},r.prototype.setStyle=function(t,e){var n=this.gl;if(e.mipmap&&t.mipmap!==Xn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,e.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Ur.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Ur.LINEAR){var s=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,s)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Ur.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Ur.LINEAR?n.LINEAR:n.NEAREST)},r.prototype.destroy=function(){this.renderer=null},r}(),Qh=new hr,qA=function(r){Fe(t,r);function t(e,n){e===void 0&&(e=tl.UNKNOWN);var i=r.call(this)||this;return n=Object.assign({},Ct.RENDER_OPTIONS,n),i.options=n,i.type=e,i.screen=new Xe(0,0,n.width,n.height),i.view=n.view||Ct.ADAPTER.createCanvas(),i.resolution=n.resolution||Ct.RESOLUTION,i.useContextAlpha=n.useContextAlpha,i.autoDensity=!!n.autoDensity,i.preserveDrawingBuffer=n.preserveDrawingBuffer,i.clearBeforeRender=n.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=n.backgroundColor||i._backgroundColor,i.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(Ds("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=n.transparent,i.backgroundAlpha=n.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return t.prototype.initPlugins=function(e){for(var n in e)this.plugins[n]=new e[n](this)},Object.defineProperty(t.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,n){this.view.width=Math.round(e*this.resolution),this.view.height=Math.round(n*this.resolution);var i=this.view.width/this.resolution,s=this.view.height/this.resolution;this.screen.width=i,this.screen.height=s,this.autoDensity&&(this.view.style.width=i+"px",this.view.style.height=s+"px"),this.emit("resize",i,s)},t.prototype.generateTexture=function(e,n,i,s){n===void 0&&(n={}),typeof n=="number"&&(Ds("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),n={scaleMode:n,resolution:i,region:s});var o=n.region,a=CE(n,["region"]);s=o||e.getLocalBounds(null,!0),s.width===0&&(s.width=1),s.height===0&&(s.height=1);var l=Kp.create(hf({width:s.width,height:s.height},a));return Qh.tx=-s.x,Qh.ty=-s.y,this.render(e,{renderTexture:l,clear:!1,transform:Qh,skipUpdateTransform:!!e.parent}),l},t.prototype.destroy=function(e){for(var n in this.plugins)this.plugins[n].destroy(),this.plugins[n]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var i=this;i.plugins=null,i.type=tl.UNKNOWN,i.view=null,i.screen=null,i._tempDisplayObjectParent=null,i.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=bE(e),cn(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(e){this._backgroundColorRgba[3]=e},enumerable:!1,configurable:!0}),t}(Ji),QA=function(){function r(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return r}(),ZA=function(){function r(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}return r.prototype.destroy=function(){this.renderer=null},r.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},r.prototype.bind=function(t){var e=this,n=e.gl,i=e.CONTEXT_UID,s=t._glBuffers[i]||this.createGLBuffer(t);n.bindBuffer(t.type,s.buffer)},r.prototype.bindBufferBase=function(t,e){var n=this,i=n.gl,s=n.CONTEXT_UID;if(this.boundBufferBases[e]!==t){var o=t._glBuffers[s]||this.createGLBuffer(t);this.boundBufferBases[e]=t,i.bindBufferBase(i.UNIFORM_BUFFER,e,o.buffer)}},r.prototype.bindBufferRange=function(t,e,n){var i=this,s=i.gl,o=i.CONTEXT_UID;n=n||0;var a=t._glBuffers[o]||this.createGLBuffer(t);s.bindBufferRange(s.UNIFORM_BUFFER,e||0,a.buffer,n*256,256)},r.prototype.update=function(t){var e=this,n=e.gl,i=e.CONTEXT_UID,s=t._glBuffers[i];if(t._updateID!==s.updateID)if(s.updateID=t._updateID,n.bindBuffer(t.type,s.buffer),s.byteLength>=t.data.byteLength)n.bufferSubData(t.type,0,t.data);else{var o=t.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;s.byteLength=t.data.byteLength,n.bufferData(t.type,t.data,o)}},r.prototype.dispose=function(t,e){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(e||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}},r.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedBuffers),n=0;n=We.HIGH?this.multisample=We.HIGH:n>=We.MEDIUM?this.multisample=We.MEDIUM:n>=We.LOW?this.multisample=We.LOW:this.multisample=We.NONE},t.prototype.addSystem=function(e,n){var i=new e(this);if(this[n])throw new Error('Whoops! The name "'+n+'" is already in use');this[n]=i;for(var s in this.runners)this.runners[s].add(i);return this},t.prototype.render=function(e,n){var i,s,o,a;if(n&&(n instanceof Kp?(Ds("6.0.0","Renderer#render arguments changed, use options instead."),i=n,s=arguments[2],o=arguments[3],a=arguments[4]):(i=n.renderTexture,s=n.clear,o=n.transform,a=n.skipUpdateTransform)),this.renderingToScreen=!i,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=o,!this.context.isLost){if(i||(this._lastObjectRendered=e),!a){var l=e.enableTempParent();e.updateTransform(),e.disableTempParent(l)}this.renderTexture.bind(i),this.batch.currentRenderer.start(),(s!==void 0?s:this.clearBeforeRender)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),i&&i.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},t.prototype.generateTexture=function(e,n,i,s){n===void 0&&(n={});var o=r.prototype.generateTexture.call(this,e,n,i,s);return this.framebuffer.blit(),o},t.prototype.resize=function(e,n){r.prototype.resize.call(this,e,n),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(e){this.runners.destroy.emit();for(var n in this.runners)this.runners[n].destroy();r.prototype.destroy.call(this,e),this.gl=null},Object.defineProperty(t.prototype,"extract",{get:function(){return Ds("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(e,n){Ds("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),bl.add({name:e,type:hn.RendererPlugin,ref:n})},t.__plugins={},t}(qA);bl.handleByMap(hn.RendererPlugin,Ux.__plugins);function KA(r){return Ux.create(r)}var JA=`attribute vec2 aVertexPosition; +`))}}var RA=function(){function r(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return r.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},r}();function FA(r,t){for(var e={},n=t.getProgramParameter(r,t.ACTIVE_ATTRIBUTES),i=0;ih?1:-1});for(var o=0;o>1,n++;this.stateId=t.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},r.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,n=!1,i=0;ithis.maxIdle&&(t.destroyTexture(s,!0),e[i]=null,n=!0)}if(n){for(var o=0,i=0;i=0;i--)this.unload(t.children[i])},r.prototype.destroy=function(){this.renderer=null},r}();function XA(r){var t,e,n,i,s,o,a,l,u,c,h,f,d,m,g,p,y,v,S,T,_,M,x;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?x=(t={},t[ge.UNSIGNED_BYTE]=(e={},e[Tt.RGBA]=r.RGBA8,e[Tt.RGB]=r.RGB8,e[Tt.RG]=r.RG8,e[Tt.RED]=r.R8,e[Tt.RGBA_INTEGER]=r.RGBA8UI,e[Tt.RGB_INTEGER]=r.RGB8UI,e[Tt.RG_INTEGER]=r.RG8UI,e[Tt.RED_INTEGER]=r.R8UI,e[Tt.ALPHA]=r.ALPHA,e[Tt.LUMINANCE]=r.LUMINANCE,e[Tt.LUMINANCE_ALPHA]=r.LUMINANCE_ALPHA,e),t[ge.BYTE]=(n={},n[Tt.RGBA]=r.RGBA8_SNORM,n[Tt.RGB]=r.RGB8_SNORM,n[Tt.RG]=r.RG8_SNORM,n[Tt.RED]=r.R8_SNORM,n[Tt.RGBA_INTEGER]=r.RGBA8I,n[Tt.RGB_INTEGER]=r.RGB8I,n[Tt.RG_INTEGER]=r.RG8I,n[Tt.RED_INTEGER]=r.R8I,n),t[ge.UNSIGNED_SHORT]=(i={},i[Tt.RGBA_INTEGER]=r.RGBA16UI,i[Tt.RGB_INTEGER]=r.RGB16UI,i[Tt.RG_INTEGER]=r.RG16UI,i[Tt.RED_INTEGER]=r.R16UI,i[Tt.DEPTH_COMPONENT]=r.DEPTH_COMPONENT16,i),t[ge.SHORT]=(s={},s[Tt.RGBA_INTEGER]=r.RGBA16I,s[Tt.RGB_INTEGER]=r.RGB16I,s[Tt.RG_INTEGER]=r.RG16I,s[Tt.RED_INTEGER]=r.R16I,s),t[ge.UNSIGNED_INT]=(o={},o[Tt.RGBA_INTEGER]=r.RGBA32UI,o[Tt.RGB_INTEGER]=r.RGB32UI,o[Tt.RG_INTEGER]=r.RG32UI,o[Tt.RED_INTEGER]=r.R32UI,o[Tt.DEPTH_COMPONENT]=r.DEPTH_COMPONENT24,o),t[ge.INT]=(a={},a[Tt.RGBA_INTEGER]=r.RGBA32I,a[Tt.RGB_INTEGER]=r.RGB32I,a[Tt.RG_INTEGER]=r.RG32I,a[Tt.RED_INTEGER]=r.R32I,a),t[ge.FLOAT]=(l={},l[Tt.RGBA]=r.RGBA32F,l[Tt.RGB]=r.RGB32F,l[Tt.RG]=r.RG32F,l[Tt.RED]=r.R32F,l[Tt.DEPTH_COMPONENT]=r.DEPTH_COMPONENT32F,l),t[ge.HALF_FLOAT]=(u={},u[Tt.RGBA]=r.RGBA16F,u[Tt.RGB]=r.RGB16F,u[Tt.RG]=r.RG16F,u[Tt.RED]=r.R16F,u),t[ge.UNSIGNED_SHORT_5_6_5]=(c={},c[Tt.RGB]=r.RGB565,c),t[ge.UNSIGNED_SHORT_4_4_4_4]=(h={},h[Tt.RGBA]=r.RGBA4,h),t[ge.UNSIGNED_SHORT_5_5_5_1]=(f={},f[Tt.RGBA]=r.RGB5_A1,f),t[ge.UNSIGNED_INT_2_10_10_10_REV]=(d={},d[Tt.RGBA]=r.RGB10_A2,d[Tt.RGBA_INTEGER]=r.RGB10_A2UI,d),t[ge.UNSIGNED_INT_10F_11F_11F_REV]=(m={},m[Tt.RGB]=r.R11F_G11F_B10F,m),t[ge.UNSIGNED_INT_5_9_9_9_REV]=(g={},g[Tt.RGB]=r.RGB9_E5,g),t[ge.UNSIGNED_INT_24_8]=(p={},p[Tt.DEPTH_STENCIL]=r.DEPTH24_STENCIL8,p),t[ge.FLOAT_32_UNSIGNED_INT_24_8_REV]=(y={},y[Tt.DEPTH_STENCIL]=r.DEPTH32F_STENCIL8,y),t):x=(v={},v[ge.UNSIGNED_BYTE]=(S={},S[Tt.RGBA]=r.RGBA,S[Tt.RGB]=r.RGB,S[Tt.ALPHA]=r.ALPHA,S[Tt.LUMINANCE]=r.LUMINANCE,S[Tt.LUMINANCE_ALPHA]=r.LUMINANCE_ALPHA,S),v[ge.UNSIGNED_SHORT_5_6_5]=(T={},T[Tt.RGB]=r.RGB,T),v[ge.UNSIGNED_SHORT_4_4_4_4]=(_={},_[Tt.RGBA]=r.RGBA,_),v[ge.UNSIGNED_SHORT_5_5_5_1]=(M={},M[Tt.RGBA]=r.RGBA,M),v),x}var qh=function(){function r(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=ge.UNSIGNED_BYTE,this.internalFormat=Tt.RGBA,this.samplerType=0}return r}(),YA=function(){function r(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Ke,this.hasIntegerTextures=!1}return r.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=XA(t);var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var n=0;n=0;--o){var a=n[o];if(a){var l=a._glTextures[s];l.samplerType!==Pu.FLOAT&&this.renderer.texture.unbind(a)}}},r.prototype.initTexture=function(t){var e=new qh(this.gl.createTexture());return e.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=e,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),e},r.prototype.initTextureType=function(t,e){var n,i;e.internalFormat=(i=(n=this.internalFormats[t.type])===null||n===void 0?void 0:n[t.format])!==null&&i!==void 0?i:t.format,this.webGLVersion===2&&t.type===ge.HALF_FLOAT?e.type=this.gl.HALF_FLOAT:e.type=t.type},r.prototype.updateTexture=function(t){var e=t._glTextures[this.CONTEXT_UID];if(e){var n=this.renderer;if(this.initTextureType(t,e),t.resource&&t.resource.upload(n,t,e))e.samplerType!==Pu.FLOAT&&(this.hasIntegerTextures=!0);else{var i=t.realWidth,s=t.realHeight,o=n.gl;(e.width!==i||e.height!==s||e.dirtyId<0)&&(e.width=i,e.height=s,o.texImage2D(t.target,0,e.internalFormat,i,s,0,t.format,e.type,null))}t.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(t),e.dirtyId=t.dirtyId}},r.prototype.destroyTexture=function(t,e){var n=this.gl;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!e)){var i=this.managedTextures.indexOf(t);i!==-1&&du(this.managedTextures,i,1)}},r.prototype.updateTextureStyle=function(t){var e=t._glTextures[this.CONTEXT_UID];e&&((t.mipmap===Xn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?e.mipmap=!1:e.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?e.wrapMode=Ru.CLAMP:e.wrapMode=t.wrapMode,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},r.prototype.setStyle=function(t,e){var n=this.gl;if(e.mipmap&&t.mipmap!==Xn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,e.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Ur.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Ur.LINEAR){var s=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,s)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Ur.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Ur.LINEAR?n.LINEAR:n.NEAREST)},r.prototype.destroy=function(){this.renderer=null},r}(),Qh=new hr,qA=function(r){Fe(t,r);function t(e,n){e===void 0&&(e=tl.UNKNOWN);var i=r.call(this)||this;return n=Object.assign({},Ct.RENDER_OPTIONS,n),i.options=n,i.type=e,i.screen=new Xe(0,0,n.width,n.height),i.view=n.view||Ct.ADAPTER.createCanvas(),i.resolution=n.resolution||Ct.RESOLUTION,i.useContextAlpha=n.useContextAlpha,i.autoDensity=!!n.autoDensity,i.preserveDrawingBuffer=n.preserveDrawingBuffer,i.clearBeforeRender=n.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=n.backgroundColor||i._backgroundColor,i.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(Ls("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=n.transparent,i.backgroundAlpha=n.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return t.prototype.initPlugins=function(e){for(var n in e)this.plugins[n]=new e[n](this)},Object.defineProperty(t.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,n){this.view.width=Math.round(e*this.resolution),this.view.height=Math.round(n*this.resolution);var i=this.view.width/this.resolution,s=this.view.height/this.resolution;this.screen.width=i,this.screen.height=s,this.autoDensity&&(this.view.style.width=i+"px",this.view.style.height=s+"px"),this.emit("resize",i,s)},t.prototype.generateTexture=function(e,n,i,s){n===void 0&&(n={}),typeof n=="number"&&(Ls("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),n={scaleMode:n,resolution:i,region:s});var o=n.region,a=CE(n,["region"]);s=o||e.getLocalBounds(null,!0),s.width===0&&(s.width=1),s.height===0&&(s.height=1);var l=Kp.create(hf({width:s.width,height:s.height},a));return Qh.tx=-s.x,Qh.ty=-s.y,this.render(e,{renderTexture:l,clear:!1,transform:Qh,skipUpdateTransform:!!e.parent}),l},t.prototype.destroy=function(e){for(var n in this.plugins)this.plugins[n].destroy(),this.plugins[n]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var i=this;i.plugins=null,i.type=tl.UNKNOWN,i.view=null,i.screen=null,i._tempDisplayObjectParent=null,i.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=bE(e),cn(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(e){this._backgroundColorRgba[3]=e},enumerable:!1,configurable:!0}),t}(Ji),QA=function(){function r(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return r}(),ZA=function(){function r(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}return r.prototype.destroy=function(){this.renderer=null},r.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},r.prototype.bind=function(t){var e=this,n=e.gl,i=e.CONTEXT_UID,s=t._glBuffers[i]||this.createGLBuffer(t);n.bindBuffer(t.type,s.buffer)},r.prototype.bindBufferBase=function(t,e){var n=this,i=n.gl,s=n.CONTEXT_UID;if(this.boundBufferBases[e]!==t){var o=t._glBuffers[s]||this.createGLBuffer(t);this.boundBufferBases[e]=t,i.bindBufferBase(i.UNIFORM_BUFFER,e,o.buffer)}},r.prototype.bindBufferRange=function(t,e,n){var i=this,s=i.gl,o=i.CONTEXT_UID;n=n||0;var a=t._glBuffers[o]||this.createGLBuffer(t);s.bindBufferRange(s.UNIFORM_BUFFER,e||0,a.buffer,n*256,256)},r.prototype.update=function(t){var e=this,n=e.gl,i=e.CONTEXT_UID,s=t._glBuffers[i];if(t._updateID!==s.updateID)if(s.updateID=t._updateID,n.bindBuffer(t.type,s.buffer),s.byteLength>=t.data.byteLength)n.bufferSubData(t.type,0,t.data);else{var o=t.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;s.byteLength=t.data.byteLength,n.bufferData(t.type,t.data,o)}},r.prototype.dispose=function(t,e){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(e||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}},r.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedBuffers),n=0;n=We.HIGH?this.multisample=We.HIGH:n>=We.MEDIUM?this.multisample=We.MEDIUM:n>=We.LOW?this.multisample=We.LOW:this.multisample=We.NONE},t.prototype.addSystem=function(e,n){var i=new e(this);if(this[n])throw new Error('Whoops! The name "'+n+'" is already in use');this[n]=i;for(var s in this.runners)this.runners[s].add(i);return this},t.prototype.render=function(e,n){var i,s,o,a;if(n&&(n instanceof Kp?(Ls("6.0.0","Renderer#render arguments changed, use options instead."),i=n,s=arguments[2],o=arguments[3],a=arguments[4]):(i=n.renderTexture,s=n.clear,o=n.transform,a=n.skipUpdateTransform)),this.renderingToScreen=!i,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=o,!this.context.isLost){if(i||(this._lastObjectRendered=e),!a){var l=e.enableTempParent();e.updateTransform(),e.disableTempParent(l)}this.renderTexture.bind(i),this.batch.currentRenderer.start(),(s!==void 0?s:this.clearBeforeRender)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),i&&i.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},t.prototype.generateTexture=function(e,n,i,s){n===void 0&&(n={});var o=r.prototype.generateTexture.call(this,e,n,i,s);return this.framebuffer.blit(),o},t.prototype.resize=function(e,n){r.prototype.resize.call(this,e,n),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(e){this.runners.destroy.emit();for(var n in this.runners)this.runners[n].destroy();r.prototype.destroy.call(this,e),this.gl=null},Object.defineProperty(t.prototype,"extract",{get:function(){return Ls("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(e,n){Ls("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),bl.add({name:e,type:hn.RendererPlugin,ref:n})},t.__plugins={},t}(qA);bl.handleByMap(hn.RendererPlugin,Ux.__plugins);function KA(r){return Ux.create(r)}var JA=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -498,7 +498,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,t2=JA,e2=function(){function r(){this.texArray=null,this.blend=0,this.type=el.TRIANGLES,this.start=0,this.size=0,this.data=null}return r}(),r2=function(){function r(){this.elements=[],this.ids=[],this.count=0}return r.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},t.prototype.buildTexturesAndDrawCalls=function(){var e=this,n=e._bufferedTextures,i=e.MAX_TEXTURES,s=t._textureArrayPool,o=this.renderer.batch,a=this._tempBoundTextures,l=this.renderer.textureGC.count,u=++Ke._globalBatch,c=0,h=s[0],f=0;o.copyBoundTextures(a,i);for(var d=0;d=i&&(o.boundArray(h,a,u,i),this.buildDrawCalls(h,f,d),f=d,h=s[++c],++u),m._batchEnabled=u,m.touched=l,h.elements[h.count++]=m)}h.count>0&&(o.boundArray(h,a,u,i),this.buildDrawCalls(h,f,this._bufferSize),++c,++u);for(var d=0;dthis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},t.prototype.buildTexturesAndDrawCalls=function(){var e=this,n=e._bufferedTextures,i=e.MAX_TEXTURES,s=t._textureArrayPool,o=this.renderer.batch,a=this._tempBoundTextures,l=this.renderer.textureGC.count,u=++Ke._globalBatch,c=0,h=s[0],f=0;o.copyBoundTextures(a,i);for(var d=0;d=i&&(o.boundArray(h,a,u,i),this.buildDrawCalls(h,f,d),f=d,h=s[++c],++u),m._batchEnabled=u,m.touched=l,h.elements[h.count++]=m)}h.count>0&&(o.boundArray(h,a,u,i),this.buildDrawCalls(h,f,this._bufferSize),++c,++u);for(var d=0;d0&&(e+=` else `),n1)for(var s=0;sthis.children.length)throw new Error(e+"addChildAt: The index "+n+" supplied is out of bounds "+this.children.length);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(n,0,e),this._boundsID++,this.onChildrenChange(n),e.emit("added",this),this.emit("childAdded",e,this,n),e},t.prototype.swapChildren=function(e,n){if(e!==n){var i=this.getChildIndex(e),s=this.getChildIndex(n);this.children[i]=n,this.children[s]=e,this.onChildrenChange(i=this.children.length)throw new Error("The index "+n+" supplied is out of bounds "+this.children.length);var i=this.getChildIndex(e);du(this.children,i,1),this.children.splice(n,0,e),this.onChildrenChange(n)},t.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw new Error("getChildAt: Index ("+e+") does not exist.");return this.children[e]},t.prototype.removeChild=function(){for(var e=arguments,n=[],i=0;i1)for(var s=0;s0&&o<=s){a=this.children.splice(i,o);for(var l=0;l1&&this.children.sort(u2),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var e=0,n=this.children.length;e0&&n.height>0){var i,s;if(this.cullArea?(i=this.cullArea,s=this.worldTransform):this._render!==t.prototype._render&&(i=this.getBounds(!0)),i&&n.intersects(i,s))this._render(e);else if(this.cullArea)return;for(var o=0,a=this.children.length;o1)for(var s=0;sthis.children.length)throw new Error(e+"addChildAt: The index "+n+" supplied is out of bounds "+this.children.length);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(n,0,e),this._boundsID++,this.onChildrenChange(n),e.emit("added",this),this.emit("childAdded",e,this,n),e},t.prototype.swapChildren=function(e,n){if(e!==n){var i=this.getChildIndex(e),s=this.getChildIndex(n);this.children[i]=n,this.children[s]=e,this.onChildrenChange(i=this.children.length)throw new Error("The index "+n+" supplied is out of bounds "+this.children.length);var i=this.getChildIndex(e);du(this.children,i,1),this.children.splice(n,0,e),this.onChildrenChange(n)},t.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw new Error("getChildAt: Index ("+e+") does not exist.");return this.children[e]},t.prototype.removeChild=function(){for(var e=arguments,n=[],i=0;i1)for(var s=0;s0&&o<=s){a=this.children.splice(i,o);for(var l=0;l1&&this.children.sort(u2),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var e=0,n=this.children.length;e0&&n.height>0){var i,s;if(this.cullArea?(i=this.cullArea,s=this.worldTransform):this._render!==t.prototype._render&&(i=this.getBounds(!0)),i&&n.intersects(i,s))this._render(e);else if(this.cullArea)return;for(var o=0,a=this.children.length;onew Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())});class nm{constructor(){this._breathParameters=[],this._currentTime=0}static create(){return new nm}setParameters(t){this._breathParameters=t}getParameters(){return this._breathParameters}updateParameters(t,e){this._currentTime+=e;const n=this._currentTime*2*3.14159;for(let i=0;i=1&&(n=1,this._blinkingState=Kr.EyeState_Closed,this._stateStartTimeSeconds=this._userTimeSeconds),e=1-n;break;case Kr.EyeState_Closed:n=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._closedSeconds,n>=1&&(this._blinkingState=Kr.EyeState_Opening,this._stateStartTimeSeconds=this._userTimeSeconds),e=0;break;case Kr.EyeState_Opening:n=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._openingSeconds,n>=1&&(n=1,this._blinkingState=Kr.EyeState_Interval,this._nextBlinkingTime=this.determinNextBlinkingTiming()),e=n;break;case Kr.EyeState_Interval:this._nextBlinkingTime(r[r.EyeState_First=0]="EyeState_First",r[r.EyeState_Interval=1]="EyeState_Interval",r[r.EyeState_Closing=2]="EyeState_Closing",r[r.EyeState_Closed=3]="EyeState_Closed",r[r.EyeState_Opening=4]="EyeState_Opening",r))(Kr||{});const d2=.001,gy=.5;class im{static create(t){const e=new im;typeof t.FadeInTime=="number"&&(e._fadeTimeSeconds=t.FadeInTime,e._fadeTimeSeconds<=0&&(e._fadeTimeSeconds=gy));const n=t.Groups,i=n.length;for(let s=0;sd2){if(s>=0)break;s=u,o=t.getPartOpacityByIndex(c),o+=e/this._fadeTimeSeconds,o>1&&(o=1)}}s<0&&(s=0,o=1);for(let u=n;ul&&(f=1-l/(1-o)),h>f&&(h=f),t.setPartOpacityByIndex(c,h)}}}constructor(){this._fadeTimeSeconds=gy,this._lastModel=void 0,this._partGroups=[],this._partGroupCounts=[]}}class Nu{constructor(t){this.parameterIndex=0,this.partIndex=0,this.partId="",this.link=[],t!=null&&this.assignment(t)}assignment(t){return this.partId=t.partId,this.link=t.link.map(e=>e.clone()),this}initialize(t){this.parameterIndex=t.getParameterIndex(this.partId),this.partIndex=t.getPartIndex(this.partId),t.setParameterValueByIndex(this.parameterIndex,1)}clone(){const t=new Nu;return t.partId=this.partId,t.parameterIndex=this.parameterIndex,t.partIndex=this.partIndex,t.link=this.link.map(e=>e.clone()),t}}class ie{constructor(t,e){this.x=t||0,this.y=e||0}add(t){const e=new ie(0,0);return e.x=this.x+t.x,e.y=this.y+t.y,e}substract(t){const e=new ie(0,0);return e.x=this.x-t.x,e.y=this.y-t.y,e}multiply(t){const e=new ie(0,0);return e.x=this.x*t.x,e.y=this.y*t.y,e}multiplyByScaler(t){return this.multiply(new ie(t,t))}division(t){const e=new ie(0,0);return e.x=this.x/t.x,e.y=this.y/t.y,e}divisionByScalar(t){return this.division(new ie(t,t))}getLength(){return Math.sqrt(this.x*this.x+this.y*this.y)}getDistanceWith(t){return Math.sqrt((this.x-t.x)*(this.x-t.x)+(this.y-t.y)*(this.y-t.y))}dot(t){return this.x*t.x+this.y*t.y}normalize(){const t=Math.pow(this.x*this.x+this.y*this.y,.5);this.x=this.x/t,this.y=this.y/t}isEqual(t){return this.x==t.x&&this.y==t.y}isNotEqual(t){return!this.isEqual(t)}}const fu=class{static range(r,t,e){return re&&(r=e),r}static sin(r){return Math.sin(r)}static cos(r){return Math.cos(r)}static abs(r){return Math.abs(r)}static sqrt(r){return Math.sqrt(r)}static cbrt(r){if(r===0)return r;let t=r;const e=t<0;e&&(t=-t);let n;return t===1/0?n=1/0:(n=Math.exp(Math.log(t)/3),n=(t/(n*n)+2*n)/3),e?-n:n}static getEasingSine(r){return r<0?0:r>1?1:.5-.5*this.cos(r*Math.PI)}static max(r,t){return r>t?r:t}static min(r,t){return r>t?t:r}static degreesToRadian(r){return r/180*Math.PI}static radianToDegrees(r){return r*180/Math.PI}static directionToRadian(r,t){const e=Math.atan2(t.y,t.x),n=Math.atan2(r.y,r.x);let i=e-n;for(;i<-Math.PI;)i+=Math.PI*2;for(;i>Math.PI;)i-=Math.PI*2;return i}static directionToDegrees(r,t){const e=this.directionToRadian(r,t);let n=this.radianToDegrees(e);return t.x-r.x>0&&(n=-n),n}static radianToDirection(r){const t=new ie;return t.x=this.sin(r),t.y=this.cos(r),t}static quadraticEquation(r,t,e){return this.abs(r)1&&(t=1),e<0?e=0:e>1&&(e=1),n<0?n=0:n>1&&(n=1),i<0?i=0:i>1&&(i=1),this._modelColor.R=t,this._modelColor.G=e,this._modelColor.B=n,this._modelColor.A=i}getModelColor(){return Object.assign({},this._modelColor)}setIsPremultipliedAlpha(t){this._isPremultipliedAlpha=t}isPremultipliedAlpha(){return this._isPremultipliedAlpha}setIsCulling(t){this._isCulling=t}isCulling(){return this._isCulling}setAnisotropy(t){this._anisortopy=t}getAnisotropy(){return this._anisortopy}getModel(){return this._model}constructor(){this._isCulling=!1,this._isPremultipliedAlpha=!1,this._anisortopy=0,this._modelColor=new Pa,this._mvpMatrix4x4=new ln,this._mvpMatrix4x4.loadIdentity()}}var Ui=(r=>(r[r.CubismBlendMode_Normal=0]="CubismBlendMode_Normal",r[r.CubismBlendMode_Additive=1]="CubismBlendMode_Additive",r[r.CubismBlendMode_Multiplicative=2]="CubismBlendMode_Multiplicative",r))(Ui||{});class Pa{constructor(){this.R=1,this.G=1,this.B=1,this.A=1}}let Mn=!1,no=!1,io;const Zh={vertexOffset:0,vertexStep:2};class sl{static startUp(t){if(Mn)return _a("CubismFramework.startUp() is already done."),Mn;if(Live2DCubismCore._isStarted)return Mn=!0,!0;if(Live2DCubismCore._isStarted=!0,io=t,io&&Live2DCubismCore.Logging.csmSetLogFunction(io.logFunction),Mn=!0,Mn){const e=Live2DCubismCore.Version.csmGetVersion(),n=(e&4278190080)>>24,i=(e&16711680)>>16,s=e&65535,o=e;_a("Live2D Cubism Core version: {0}.{1}.{2} ({3})",("00"+n).slice(-2),("00"+i).slice(-2),("0000"+s).slice(-4),o)}return _a("CubismFramework.startUp() is complete."),Mn}static cleanUp(){Mn=!1,no=!1,io=void 0}static initialize(){if(!Mn){Ra("CubismFramework is not started.");return}if(no){Ra("CubismFramework.initialize() skipped, already initialized.");return}no=!0,_a("CubismFramework.initialize() is complete.")}static dispose(){if(!Mn){Ra("CubismFramework is not started.");return}if(!no){Ra("CubismFramework.dispose() skipped, not initialized.");return}sm.staticRelease(),no=!1,_a("CubismFramework.dispose() is complete.")}static isStarted(){return Mn}static isInitialized(){return no}static coreLogFunction(t){Live2DCubismCore.Logging.csmGetLogFunction()&&Live2DCubismCore.Logging.csmGetLogFunction()(t)}static getLoggingLevel(){return io!=null?io.loggingLevel:Xs.LogLevel_Off}constructor(){}}var Xs=(r=>(r[r.LogLevel_Verbose=0]="LogLevel_Verbose",r[r.LogLevel_Debug=1]="LogLevel_Debug",r[r.LogLevel_Info=2]="LogLevel_Info",r[r.LogLevel_Warning=3]="LogLevel_Warning",r[r.LogLevel_Error=4]="LogLevel_Error",r[r.LogLevel_Off=5]="LogLevel_Off",r))(Xs||{});const Jl=()=>{};function yy(r,...t){Uc.print(Xs.LogLevel_Debug,"[CSM][D]"+r+` + */var c2=function(){function r(){}return r.init=function(t){var e=this;Object.defineProperty(this,"resizeTo",{set:function(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){e._resizeTo&&(e.cancelResize(),e._resizeId=requestAnimationFrame(function(){return e.resize()}))},this.cancelResize=function(){e._resizeId&&(cancelAnimationFrame(e._resizeId),e._resizeId=null)},this.resize=function(){if(e._resizeTo){e.cancelResize();var n,i;if(e._resizeTo===globalThis.window)n=globalThis.innerWidth,i=globalThis.innerHeight;else{var s=e._resizeTo,o=s.clientWidth,a=s.clientHeight;n=o,i=a}e.renderer.resize(n,i)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null},r.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},r.extension=hn.Application,r}(),h2=function(){function r(t){var e=this;this.stage=new Du,t=Object.assign({forceCanvas:!1},t),this.renderer=KA(t),r._plugins.forEach(function(n){n.init.call(e,t)})}return r.registerPlugin=function(t){Ls("6.5.0","Application.registerPlugin() is deprecated, use extensions.add()"),bl.add({type:hn.Application,ref:t})},r.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(r.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),r.prototype.destroy=function(t,e){var n=this,i=r._plugins.slice(0);i.reverse(),i.forEach(function(s){s.destroy.call(n)}),this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null},r._plugins=[],r}();bl.handleByList(hn.Application,h2._plugins);bl.add(c2);var us=Math.pow,ke=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())});class nm{constructor(){this._breathParameters=[],this._currentTime=0}static create(){return new nm}setParameters(t){this._breathParameters=t}getParameters(){return this._breathParameters}updateParameters(t,e){this._currentTime+=e;const n=this._currentTime*2*3.14159;for(let i=0;i=1&&(n=1,this._blinkingState=Kr.EyeState_Closed,this._stateStartTimeSeconds=this._userTimeSeconds),e=1-n;break;case Kr.EyeState_Closed:n=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._closedSeconds,n>=1&&(this._blinkingState=Kr.EyeState_Opening,this._stateStartTimeSeconds=this._userTimeSeconds),e=0;break;case Kr.EyeState_Opening:n=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._openingSeconds,n>=1&&(n=1,this._blinkingState=Kr.EyeState_Interval,this._nextBlinkingTime=this.determinNextBlinkingTiming()),e=n;break;case Kr.EyeState_Interval:this._nextBlinkingTime(r[r.EyeState_First=0]="EyeState_First",r[r.EyeState_Interval=1]="EyeState_Interval",r[r.EyeState_Closing=2]="EyeState_Closing",r[r.EyeState_Closed=3]="EyeState_Closed",r[r.EyeState_Opening=4]="EyeState_Opening",r))(Kr||{});const d2=.001,gy=.5;class im{static create(t){const e=new im;typeof t.FadeInTime=="number"&&(e._fadeTimeSeconds=t.FadeInTime,e._fadeTimeSeconds<=0&&(e._fadeTimeSeconds=gy));const n=t.Groups,i=n.length;for(let s=0;sd2){if(s>=0)break;s=u,o=t.getPartOpacityByIndex(c),o+=e/this._fadeTimeSeconds,o>1&&(o=1)}}s<0&&(s=0,o=1);for(let u=n;ul&&(f=1-l/(1-o)),h>f&&(h=f),t.setPartOpacityByIndex(c,h)}}}constructor(){this._fadeTimeSeconds=gy,this._lastModel=void 0,this._partGroups=[],this._partGroupCounts=[]}}class Nu{constructor(t){this.parameterIndex=0,this.partIndex=0,this.partId="",this.link=[],t!=null&&this.assignment(t)}assignment(t){return this.partId=t.partId,this.link=t.link.map(e=>e.clone()),this}initialize(t){this.parameterIndex=t.getParameterIndex(this.partId),this.partIndex=t.getPartIndex(this.partId),t.setParameterValueByIndex(this.parameterIndex,1)}clone(){const t=new Nu;return t.partId=this.partId,t.parameterIndex=this.parameterIndex,t.partIndex=this.partIndex,t.link=this.link.map(e=>e.clone()),t}}class ie{constructor(t,e){this.x=t||0,this.y=e||0}add(t){const e=new ie(0,0);return e.x=this.x+t.x,e.y=this.y+t.y,e}substract(t){const e=new ie(0,0);return e.x=this.x-t.x,e.y=this.y-t.y,e}multiply(t){const e=new ie(0,0);return e.x=this.x*t.x,e.y=this.y*t.y,e}multiplyByScaler(t){return this.multiply(new ie(t,t))}division(t){const e=new ie(0,0);return e.x=this.x/t.x,e.y=this.y/t.y,e}divisionByScalar(t){return this.division(new ie(t,t))}getLength(){return Math.sqrt(this.x*this.x+this.y*this.y)}getDistanceWith(t){return Math.sqrt((this.x-t.x)*(this.x-t.x)+(this.y-t.y)*(this.y-t.y))}dot(t){return this.x*t.x+this.y*t.y}normalize(){const t=Math.pow(this.x*this.x+this.y*this.y,.5);this.x=this.x/t,this.y=this.y/t}isEqual(t){return this.x==t.x&&this.y==t.y}isNotEqual(t){return!this.isEqual(t)}}const fu=class{static range(r,t,e){return re&&(r=e),r}static sin(r){return Math.sin(r)}static cos(r){return Math.cos(r)}static abs(r){return Math.abs(r)}static sqrt(r){return Math.sqrt(r)}static cbrt(r){if(r===0)return r;let t=r;const e=t<0;e&&(t=-t);let n;return t===1/0?n=1/0:(n=Math.exp(Math.log(t)/3),n=(t/(n*n)+2*n)/3),e?-n:n}static getEasingSine(r){return r<0?0:r>1?1:.5-.5*this.cos(r*Math.PI)}static max(r,t){return r>t?r:t}static min(r,t){return r>t?t:r}static degreesToRadian(r){return r/180*Math.PI}static radianToDegrees(r){return r*180/Math.PI}static directionToRadian(r,t){const e=Math.atan2(t.y,t.x),n=Math.atan2(r.y,r.x);let i=e-n;for(;i<-Math.PI;)i+=Math.PI*2;for(;i>Math.PI;)i-=Math.PI*2;return i}static directionToDegrees(r,t){const e=this.directionToRadian(r,t);let n=this.radianToDegrees(e);return t.x-r.x>0&&(n=-n),n}static radianToDirection(r){const t=new ie;return t.x=this.sin(r),t.y=this.cos(r),t}static quadraticEquation(r,t,e){return this.abs(r)1&&(t=1),e<0?e=0:e>1&&(e=1),n<0?n=0:n>1&&(n=1),i<0?i=0:i>1&&(i=1),this._modelColor.R=t,this._modelColor.G=e,this._modelColor.B=n,this._modelColor.A=i}getModelColor(){return Object.assign({},this._modelColor)}setIsPremultipliedAlpha(t){this._isPremultipliedAlpha=t}isPremultipliedAlpha(){return this._isPremultipliedAlpha}setIsCulling(t){this._isCulling=t}isCulling(){return this._isCulling}setAnisotropy(t){this._anisortopy=t}getAnisotropy(){return this._anisortopy}getModel(){return this._model}constructor(){this._isCulling=!1,this._isPremultipliedAlpha=!1,this._anisortopy=0,this._modelColor=new Pa,this._mvpMatrix4x4=new ln,this._mvpMatrix4x4.loadIdentity()}}var Ui=(r=>(r[r.CubismBlendMode_Normal=0]="CubismBlendMode_Normal",r[r.CubismBlendMode_Additive=1]="CubismBlendMode_Additive",r[r.CubismBlendMode_Multiplicative=2]="CubismBlendMode_Multiplicative",r))(Ui||{});class Pa{constructor(){this.R=1,this.G=1,this.B=1,this.A=1}}let Mn=!1,no=!1,io;const Zh={vertexOffset:0,vertexStep:2};class sl{static startUp(t){if(Mn)return _a("CubismFramework.startUp() is already done."),Mn;if(Live2DCubismCore._isStarted)return Mn=!0,!0;if(Live2DCubismCore._isStarted=!0,io=t,io&&Live2DCubismCore.Logging.csmSetLogFunction(io.logFunction),Mn=!0,Mn){const e=Live2DCubismCore.Version.csmGetVersion(),n=(e&4278190080)>>24,i=(e&16711680)>>16,s=e&65535,o=e;_a("Live2D Cubism Core version: {0}.{1}.{2} ({3})",("00"+n).slice(-2),("00"+i).slice(-2),("0000"+s).slice(-4),o)}return _a("CubismFramework.startUp() is complete."),Mn}static cleanUp(){Mn=!1,no=!1,io=void 0}static initialize(){if(!Mn){Ra("CubismFramework is not started.");return}if(no){Ra("CubismFramework.initialize() skipped, already initialized.");return}no=!0,_a("CubismFramework.initialize() is complete.")}static dispose(){if(!Mn){Ra("CubismFramework is not started.");return}if(!no){Ra("CubismFramework.dispose() skipped, not initialized.");return}sm.staticRelease(),no=!1,_a("CubismFramework.dispose() is complete.")}static isStarted(){return Mn}static isInitialized(){return no}static coreLogFunction(t){Live2DCubismCore.Logging.csmGetLogFunction()&&Live2DCubismCore.Logging.csmGetLogFunction()(t)}static getLoggingLevel(){return io!=null?io.loggingLevel:Xs.LogLevel_Off}constructor(){}}var Xs=(r=>(r[r.LogLevel_Verbose=0]="LogLevel_Verbose",r[r.LogLevel_Debug=1]="LogLevel_Debug",r[r.LogLevel_Info=2]="LogLevel_Info",r[r.LogLevel_Warning=3]="LogLevel_Warning",r[r.LogLevel_Error=4]="LogLevel_Error",r[r.LogLevel_Off=5]="LogLevel_Off",r))(Xs||{});const Jl=()=>{};function yy(r,...t){Uc.print(Xs.LogLevel_Debug,"[CSM][D]"+r+` `,t)}function _a(r,...t){Uc.print(Xs.LogLevel_Info,"[CSM][I]"+r+` `,t)}function Ra(r,...t){Uc.print(Xs.LogLevel_Warning,"[CSM][W]"+r+` `,t)}function ho(r,...t){Uc.print(Xs.LogLevel_Error,"[CSM][E]"+r+` `,t)}class Uc{static print(t,e,n){if(tn[a]);i(s)}static dumpBytes(t,e,n){for(let i=0;i0?this.print(t,` `):i%8==0&&i>0&&this.print(t," "),this.print(t,"{0} ",[e[i]&255]);this.print(t,` -`)}constructor(){}}class f2{update(){this._model.update(),this._model.drawables.resetDynamicFlags()}getCanvasWidth(){return this._model==null?0:this._model.canvasinfo.CanvasWidth/this._model.canvasinfo.PixelsPerUnit}getCanvasHeight(){return this._model==null?0:this._model.canvasinfo.CanvasHeight/this._model.canvasinfo.PixelsPerUnit}saveParameters(){const t=this._model.parameters.count,e=this._savedParameters.length;for(let n=0;ne&&(e=this._model.parameters.minimumValues[t]),this._parameterValues[t]=n==1?e:this._parameterValues[t]=this._parameterValues[t]*(1-n)+e*n}setParameterValueById(t,e,n=1){const i=this.getParameterIndex(t);this.setParameterValueByIndex(i,e,n)}addParameterValueByIndex(t,e,n=1){this.setParameterValueByIndex(t,this.getParameterValueByIndex(t)+e*n)}addParameterValueById(t,e,n=1){const i=this.getParameterIndex(t);this.addParameterValueByIndex(i,e,n)}multiplyParameterValueById(t,e,n=1){const i=this.getParameterIndex(t);this.multiplyParameterValueByIndex(i,e,n)}multiplyParameterValueByIndex(t,e,n=1){this.setParameterValueByIndex(t,this.getParameterValueByIndex(t)*(1+(e-1)*n))}getDrawableIds(){return this._drawableIds.slice()}getDrawableIndex(t){const e=this._model.drawables.count;for(let n=0;ne&&(t=e);for(let n=0;n0&&e.getEndTime()(r[r.ExpressionBlendType_Add=0]="ExpressionBlendType_Add",r[r.ExpressionBlendType_Multiply=1]="ExpressionBlendType_Multiply",r[r.ExpressionBlendType_Overwrite=2]="ExpressionBlendType_Overwrite",r))(_s||{}),ol;(r=>{r.supportMoreMaskDivisions=!0,r.setOpacityFromMotion=!1})(ol||(ol={}));var bs=(r=>(r[r.CubismMotionCurveTarget_Model=0]="CubismMotionCurveTarget_Model",r[r.CubismMotionCurveTarget_Parameter=1]="CubismMotionCurveTarget_Parameter",r[r.CubismMotionCurveTarget_PartOpacity=2]="CubismMotionCurveTarget_PartOpacity",r))(bs||{}),Rn=(r=>(r[r.CubismMotionSegmentType_Linear=0]="CubismMotionSegmentType_Linear",r[r.CubismMotionSegmentType_Bezier=1]="CubismMotionSegmentType_Bezier",r[r.CubismMotionSegmentType_Stepped=2]="CubismMotionSegmentType_Stepped",r[r.CubismMotionSegmentType_InverseStepped=3]="CubismMotionSegmentType_InverseStepped",r))(Rn||{});class Fi{constructor(t=0,e=0){this.time=t,this.value=e}}class p2{constructor(){this.basePointIndex=0,this.segmentType=0}}class m2{constructor(){this.id="",this.type=0,this.segmentCount=0,this.baseSegmentIndex=0,this.fadeInTime=0,this.fadeOutTime=0}}class g2{constructor(){this.fireTime=0,this.value=""}}class y2{constructor(){this.duration=0,this.loop=!1,this.curveCount=0,this.eventCount=0,this.fps=0,this.curves=[],this.segments=[],this.points=[],this.events=[]}}class $x{constructor(t){this._json=t}release(){this._json=void 0}getMotionDuration(){return this._json.Meta.Duration}isMotionLoop(){return this._json.Meta.Loop||!1}getEvaluationOptionFlag(t){return lm.EvaluationOptionFlag_AreBeziersRistricted==t?!!this._json.Meta.AreBeziersRestricted:!1}getMotionCurveCount(){return this._json.Meta.CurveCount}getMotionFps(){return this._json.Meta.Fps}getMotionTotalSegmentCount(){return this._json.Meta.TotalSegmentCount}getMotionTotalPointCount(){return this._json.Meta.TotalPointCount}getMotionFadeInTime(){return this._json.Meta.FadeInTime}getMotionFadeOutTime(){return this._json.Meta.FadeOutTime}getMotionCurveTarget(t){return this._json.Curves[t].Target}getMotionCurveId(t){return this._json.Curves[t].Id}getMotionCurveFadeInTime(t){return this._json.Curves[t].FadeInTime}getMotionCurveFadeOutTime(t){return this._json.Curves[t].FadeOutTime}getMotionCurveSegmentCount(t){return this._json.Curves[t].Segments.length}getMotionCurveSegment(t,e){return this._json.Curves[t].Segments[e]}getEventCount(){return this._json.Meta.UserDataCount||0}getTotalEventValueSize(){return this._json.Meta.TotalUserDataSize}getEventTime(t){return this._json.UserData[t].Time}getEventValue(t){return this._json.UserData[t].Value}}var lm=(r=>(r[r.EvaluationOptionFlag_AreBeziersRistricted=0]="EvaluationOptionFlag_AreBeziersRistricted",r))(lm||{});const v2="EyeBlink",_2="LipSync",b2="Model",x2="Parameter",w2="PartOpacity",S2=!1;function sn(r,t,e){const n=new Fi;return n.time=r.time+(t.time-r.time)*e,n.value=r.value+(t.value-r.value)*e,n}function T2(r,t){let e=(t-r[0].time)/(r[1].time-r[0].time);return e<0&&(e=0),r[0].value+(r[1].value-r[0].value)*e}function I2(r,t){let e=(t-r[0].time)/(r[3].time-r[0].time);e<0&&(e=0);const n=sn(r[0],r[1],e),i=sn(r[1],r[2],e),s=sn(r[2],r[3],e),o=sn(n,i,e),a=sn(i,s,e);return sn(o,a,e).value}function M2(r,t){const e=t,n=r[0].time,i=r[3].time,s=r[1].time,o=r[2].time,a=i-3*o+3*s-n,l=3*o-6*s+3*n,u=3*s-3*n,c=n-e,h=Re.cardanoAlgorithmForBezier(a,l,u,c),f=sn(r[0],r[1],h),d=sn(r[1],r[2],h),m=sn(r[2],r[3],h),g=sn(f,d,h),p=sn(d,m,h);return sn(g,p,h).value}function E2(r,t){return r[0].value}function A2(r,t){return r[1].value}function Kh(r,t,e){const n=r.curves[t];let i=-1;const s=n.baseSegmentIndex+n.segmentCount;let o=0;for(let l=n.baseSegmentIndex;le){i=l;break}if(i==-1)return r.points[o].value;const a=r.segments[i];return a.evaluate(r.points.slice(a.basePointIndex),e)}class um extends jx{constructor(){super(),this._eyeBlinkParameterIds=[],this._lipSyncParameterIds=[],this._sourceFrameRate=30,this._loopDurationSeconds=-1,this._isLoop=!1,this._isLoopFadeIn=!0,this._lastWeight=0}static create(t,e){const n=new um;return n.parse(t),n._sourceFrameRate=n._motionData.fps,n._loopDurationSeconds=n._motionData.duration,n._onFinishedMotion=e,n}doUpdateParameters(t,e,n,i){this._modelCurveIdEyeBlink==null&&(this._modelCurveIdEyeBlink=v2),this._modelCurveIdLipSync==null&&(this._modelCurveIdLipSync=_2);let s=e-i.getStartTime();s<0&&(s=0);let o=Number.MAX_VALUE,a=Number.MAX_VALUE;const l=64;let u=0,c=0;this._eyeBlinkParameterIds.length>l&&yy("too many eye blink targets : {0}",this._eyeBlinkParameterIds.length),this._lipSyncParameterIds.length>l&&yy("too many lip sync targets : {0}",this._lipSyncParameterIds.length);const h=this._fadeInSeconds<=0?1:Re.getEasingSine((e-i.getFadeInStartTime())/this._fadeInSeconds),f=this._fadeOutSeconds<=0||i.getEndTime()<0?1:Re.getEasingSine((i.getEndTime()-e)/this._fadeOutSeconds);let d,m,g,p=s;if(this._isLoop)for(;p>this._motionData.duration;)p-=this._motionData.duration;const y=this._motionData.curves;for(m=0;m>v&1)continue;const T=S+(a-S)*n;t.setParameterValueById(this._eyeBlinkParameterIds[v],T)}if(o!=Number.MAX_VALUE)for(let v=0;v>v&1)continue;const T=S+(o-S)*n;t.setParameterValueById(this._lipSyncParameterIds[v],T)}}for(;m=this._motionData.duration&&(this._isLoop?(i.setStartTime(e),this._isLoopFadeIn&&i.setFadeInStartTime(e)):(this._onFinishedMotion&&this._onFinishedMotion(this),i.setIsFinished(!0))),this._lastWeight=n}setIsLoop(t){this._isLoop=t}isLoop(){return this._isLoop}setIsLoopFadeIn(t){this._isLoopFadeIn=t}isLoopFadeIn(){return this._isLoopFadeIn}getDuration(){return this._isLoop?-1:this._loopDurationSeconds}getLoopDuration(){return this._loopDurationSeconds}setParameterFadeInTime(t,e){const n=this._motionData.curves;for(let i=0;inew m2),this._motionData.segments=Array.from({length:e.getMotionTotalSegmentCount()}).map(()=>new p2),this._motionData.events=Array.from({length:this._motionData.eventCount}).map(()=>new g2),this._motionData.points=[];let o=0,a=0;for(let l=0;lt&&this._motionData.events[n].fireTime<=e&&this._firedEventValues.push(this._motionData.events[n].value);return this._firedEventValues}}class C2{constructor(){this._autoDelete=!1,this._available=!0,this._finished=!1,this._started=!1,this._startTimeSeconds=-1,this._fadeInStartTimeSeconds=0,this._endTimeSeconds=-1,this._stateTimeSeconds=0,this._stateWeight=0,this._lastEventCheckSeconds=0,this._motionQueueEntryHandle=this,this._fadeOutSeconds=0,this._isTriggeredFadeOut=!1}release(){this._autoDelete&&this._motion&&this._motion.release()}setFadeOut(t){this._fadeOutSeconds=t,this._isTriggeredFadeOut=!0}startFadeOut(t,e){const n=e+t;this._isTriggeredFadeOut=!0,(this._endTimeSeconds<0||ne!=null&&e._motionQueueEntryHandle==t)}setEventCallback(t,e=null){this._eventCallBack=t,this._eventCustomData=e}doUpdateMotion(t,e){let n=!1,i=0;for(;i(r[r.CubismPhysicsTargetType_Parameter=0]="CubismPhysicsTargetType_Parameter",r))(mf||{}),xs=(r=>(r[r.CubismPhysicsSource_X=0]="CubismPhysicsSource_X",r[r.CubismPhysicsSource_Y=1]="CubismPhysicsSource_Y",r[r.CubismPhysicsSource_Angle=2]="CubismPhysicsSource_Angle",r))(xs||{});class P2{constructor(){this.initialPosition=new ie(0,0),this.position=new ie(0,0),this.lastPosition=new ie(0,0),this.lastGravity=new ie(0,0),this.force=new ie(0,0),this.velocity=new ie(0,0)}}class R2{constructor(){this.normalizationPosition={},this.normalizationAngle={}}}class F2{constructor(){this.source={}}}class D2{constructor(){this.destination={},this.translationScale=new ie(0,0)}}class L2{constructor(){this.settings=[],this.inputs=[],this.outputs=[],this.particles=[],this.gravity=new ie(0,0),this.wind=new ie(0,0)}}class N2{constructor(t){this._json=t}release(){this._json=void 0}getGravity(){const t=new ie(0,0);return t.x=this._json.Meta.EffectiveForces.Gravity.X,t.y=this._json.Meta.EffectiveForces.Gravity.Y,t}getWind(){const t=new ie(0,0);return t.x=this._json.Meta.EffectiveForces.Wind.X,t.y=this._json.Meta.EffectiveForces.Wind.Y,t}getSubRigCount(){return this._json.Meta.PhysicsSettingCount}getTotalInputCount(){return this._json.Meta.TotalInputCount}getTotalOutputCount(){return this._json.Meta.TotalOutputCount}getVertexCount(){return this._json.Meta.VertexCount}getNormalizationPositionMinimumValue(t){return this._json.PhysicsSettings[t].Normalization.Position.Minimum}getNormalizationPositionMaximumValue(t){return this._json.PhysicsSettings[t].Normalization.Position.Maximum}getNormalizationPositionDefaultValue(t){return this._json.PhysicsSettings[t].Normalization.Position.Default}getNormalizationAngleMinimumValue(t){return this._json.PhysicsSettings[t].Normalization.Angle.Minimum}getNormalizationAngleMaximumValue(t){return this._json.PhysicsSettings[t].Normalization.Angle.Maximum}getNormalizationAngleDefaultValue(t){return this._json.PhysicsSettings[t].Normalization.Angle.Default}getInputCount(t){return this._json.PhysicsSettings[t].Input.length}getInputWeight(t,e){return this._json.PhysicsSettings[t].Input[e].Weight}getInputReflect(t,e){return this._json.PhysicsSettings[t].Input[e].Reflect}getInputType(t,e){return this._json.PhysicsSettings[t].Input[e].Type}getInputSourceId(t,e){return this._json.PhysicsSettings[t].Input[e].Source.Id}getOutputCount(t){return this._json.PhysicsSettings[t].Output.length}getOutputVertexIndex(t,e){return this._json.PhysicsSettings[t].Output[e].VertexIndex}getOutputAngleScale(t,e){return this._json.PhysicsSettings[t].Output[e].Scale}getOutputWeight(t,e){return this._json.PhysicsSettings[t].Output[e].Weight}getOutputDestinationId(t,e){return this._json.PhysicsSettings[t].Output[e].Destination.Id}getOutputType(t,e){return this._json.PhysicsSettings[t].Output[e].Type}getOutputReflect(t,e){return this._json.PhysicsSettings[t].Output[e].Reflect}getParticleCount(t){return this._json.PhysicsSettings[t].Vertices.length}getParticleMobility(t,e){return this._json.PhysicsSettings[t].Vertices[e].Mobility}getParticleDelay(t,e){return this._json.PhysicsSettings[t].Vertices[e].Delay}getParticleAcceleration(t,e){return this._json.PhysicsSettings[t].Vertices[e].Acceleration}getParticleRadius(t,e){return this._json.PhysicsSettings[t].Vertices[e].Radius}getParticlePosition(t,e){const n=new ie(0,0);return n.x=this._json.PhysicsSettings[t].Vertices[e].Position.X,n.y=this._json.PhysicsSettings[t].Vertices[e].Position.Y,n}}const _y="X",by="Y",xy="Angle",B2=5,Wx=100,k2=.001;class cm{static create(t){const e=new cm;return e.parse(t),e._physicsRig.gravity.y=0,e}evaluate(t,e){let n,i,s,o;const a=new ie;let l,u,c,h,f,d,m,g;f=t.getModel().parameters.values,d=t.getModel().parameters.maximumValues,m=t.getModel().parameters.minimumValues,g=t.getModel().parameters.defaultValues;for(let p=0;p=l.particleCount)break;c[y].destinationParameterIndex==-1&&(c[y].destinationParameterIndex=t.getParameterIndex(c[y].destination.id));const S=new ie;S.x=h[v].position.x-h[v-1].position.x,S.y=h[v].position.y-h[v-1].position.y,o=c[y].getValue(S,h,v,c[y].reflect,this._options.gravity);const T=c[y].destinationParameterIndex,_=!Float32Array.prototype.slice&&"subarray"in Float32Array.prototype?JSON.parse(JSON.stringify(f.subarray(T))):f.slice(T);K2(_,m[T],d[T],o,c[y]);for(let M=T,x=0;M=2?i=t[e-1].position.substract(t[e-2].position):i=i.multiplyByScaler(-1),s=Re.directionToRadian(i,r),n&&(s*=-1),s}function H2(r,t){return Math.abs(Math.max(r,t)-Math.min(r,t))}function X2(r,t){return Math.min(r,t)+H2(r,t)/2}function Y2(r,t){return r.x}function q2(r,t){return r.y}function Q2(r,t){return t}function Z2(r,t,e,n,i,s,o,a){let l,u,c,h,f=new ie(0,0),d=new ie(0,0),m=new ie(0,0),g=new ie(0,0);r[0].position=new ie(e.x,e.y),l=Re.degreesToRadian(n),h=Re.radianToDirection(l),h.normalize();for(let p=1;pe&&(o>i.valueExceededMaximum&&(i.valueExceededMaximum=o),o=e),a=i.weight/Wx,a>=1||(o=r[0]*(1-a)+o*a),r[0]=o}function hm(r,t,e,n,i,s,o,a){let l=0;const u=Re.max(e,t);ur&&(r=c);const h=Re.min(i,s),f=Re.max(i,s),d=o,m=X2(c,u),g=r-m;switch(Math.sign(g)){case 1:{const p=f-d,y=u-m;y!=0&&(l=g*(p/y),l+=d);break}case-1:{const p=h-d,y=c-m;y!=0&&(l=g*(p/y),l+=d);break}case 0:{l=d;break}}return a?l:l*-1}class gf{constructor(t=0,e=0,n=0,i=0){this.x=t,this.y=e,this.width=n,this.height=i}getCenterX(){return this.x+.5*this.width}getCenterY(){return this.y+.5*this.height}getRight(){return this.x+this.width}getBottom(){return this.y+this.height}setRect(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}expand(t,e){this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2}}const Jh=4,J2=10;let cs,Fa,yf;class td{getChannelFlagAsColor(t){return this._channelColors[t]}getMaskRenderTexture(){let t=0;if(this._maskTexture&&this._maskTexture.texture!=0&&(this._maskTexture.frameNo=this._currentFrameNo,t=this._maskTexture.texture),t==0){const e=this._clippingMaskBufferSize;this._colorBuffer=this.gl.createTexture(),this.gl.bindTexture(this.gl.TEXTURE_2D,this._colorBuffer),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,e,e,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.bindTexture(this.gl.TEXTURE_2D,null),t=this.gl.createFramebuffer(),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,t),this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,this._colorBuffer,0),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,yf),this._maskTexture=new tC(this._currentFrameNo,t)}return t}setGL(t){this.gl=t}calcClippedDrawTotalBounds(t,e){let n=Number.MAX_VALUE,i=Number.MAX_VALUE,s=Number.MIN_VALUE,o=Number.MIN_VALUE;const a=e._clippedDrawableIndexList.length;for(let l=0;lm&&(m=v),Sg&&(g=S)}if(f!=Number.MAX_VALUE)if(fs&&(s=m),g>o&&(o=g),n==Number.MAX_VALUE)e._allClippedDrawRect.x=0,e._allClippedDrawRect.y=0,e._allClippedDrawRect.width=0,e._allClippedDrawRect.height=0,e._isUsing=!1;else{e._isUsing=!0;const y=s-n,v=o-i;e._allClippedDrawRect.x=n,e._allClippedDrawRect.y=i,e._allClippedDrawRect.width=y,e._allClippedDrawRect.height=v}}}constructor(){this._maskRenderTexture=null,this._colorBuffer=null,this._currentFrameNo=0,this._clippingMaskBufferSize=256,this._clippingContextListForMask=[],this._clippingContextListForDraw=[],this._channelColors=[],this._tmpBoundsOnModel=new gf,this._tmpMatrix=new ln,this._tmpMatrixForMask=new ln,this._tmpMatrixForDraw=new ln;let t=new Pa;t.R=1,t.G=0,t.B=0,t.A=0,this._channelColors.push(t),t=new Pa,t.R=0,t.G=1,t.B=0,t.A=0,this._channelColors.push(t),t=new Pa,t.R=0,t.G=0,t.B=1,t.A=0,this._channelColors.push(t),t=new Pa,t.R=0,t.G=0,t.B=0,t.A=1,this._channelColors.push(t)}release(){var t,e,n;const i=this;for(let s=0;s0){this.gl.viewport(0,0,this._clippingMaskBufferSize,this._clippingMaskBufferSize),this._maskRenderTexture=this.getMaskRenderTexture(),e.getMvpMatrix(),e.preDraw(),this.setupLayoutBounds(n),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this._maskRenderTexture),this.gl.clearColor(1,1,1,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT);for(let i=0;i(r[r.ShaderNames_SetupMask=0]="ShaderNames_SetupMask",r[r.ShaderNames_NormalPremultipliedAlpha=1]="ShaderNames_NormalPremultipliedAlpha",r[r.ShaderNames_NormalMaskedPremultipliedAlpha=2]="ShaderNames_NormalMaskedPremultipliedAlpha",r[r.ShaderNames_NomralMaskedInvertedPremultipliedAlpha=3]="ShaderNames_NomralMaskedInvertedPremultipliedAlpha",r[r.ShaderNames_AddPremultipliedAlpha=4]="ShaderNames_AddPremultipliedAlpha",r[r.ShaderNames_AddMaskedPremultipliedAlpha=5]="ShaderNames_AddMaskedPremultipliedAlpha",r[r.ShaderNames_AddMaskedPremultipliedAlphaInverted=6]="ShaderNames_AddMaskedPremultipliedAlphaInverted",r[r.ShaderNames_MultPremultipliedAlpha=7]="ShaderNames_MultPremultipliedAlpha",r[r.ShaderNames_MultMaskedPremultipliedAlpha=8]="ShaderNames_MultMaskedPremultipliedAlpha",r[r.ShaderNames_MultMaskedPremultipliedAlphaInverted=9]="ShaderNames_MultMaskedPremultipliedAlphaInverted",r))(Da||{});const rC="attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_myPos;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_clipMatrix * a_position; v_myPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}",nC="precision mediump float;varying vec2 v_texCoord;varying vec4 v_myPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;void main(){ float isInside = step(u_baseColor.x, v_myPos.x/v_myPos.w) * step(u_baseColor.y, v_myPos.y/v_myPos.w) * step(v_myPos.x/v_myPos.w, u_baseColor.z) * step(v_myPos.y/v_myPos.w, u_baseColor.w); gl_FragColor = u_channelFlag * texture2D(s_texture0, v_texCoord).a * isInside;}",iC="attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;uniform mat4 u_matrix;void main(){ gl_Position = u_matrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}",wy="attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform mat4 u_matrix;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_matrix * a_position; v_clipPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}",sC="precision mediump float;varying vec2 v_texCoord;uniform vec4 u_baseColor;uniform sampler2D s_texture0;void main(){ gl_FragColor = texture2D(s_texture0 , v_texCoord) * u_baseColor;}",oC="precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;uniform sampler2D s_texture1;void main(){ vec4 col_formask = texture2D(s_texture0 , v_texCoord) * u_baseColor; vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}",aC="precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;void main(){vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor;vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag;float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a;col_formask = col_formask * (1.0 - maskVal);gl_FragColor = col_formask;}";class Hx extends sm{constructor(){super(),this._clippingContextBufferForMask=null,this._clippingContextBufferForDraw=null,this._clippingManager=new td,this.firstDraw=!0,this._textures={},this._sortedDrawableIndexList=[],this._bufferData={vertex:null,uv:null,index:null}}initialize(t){t.isUsingMasking()&&(this._clippingManager=new td,this._clippingManager.initialize(t,t.getDrawableCount(),t.getDrawableMasks(),t.getDrawableMaskCounts()));for(let e=t.getDrawableCount()-1;e>=0;e--)this._sortedDrawableIndexList[e]=0;super.initialize(t)}bindTexture(t,e){this._textures[t]=e}getBindedTextures(){return this._textures}setClippingMaskBufferSize(t){this._clippingManager.release(),this._clippingManager=new td,this._clippingManager.setClippingMaskBufferSize(t),this._clippingManager.initialize(this.getModel(),this.getModel().getDrawableCount(),this.getModel().getDrawableMasks(),this.getModel().getDrawableMaskCounts())}getClippingMaskBufferSize(){return this._clippingManager.getClippingMaskBufferSize()}release(){var t,e,n;const i=this;this._clippingManager.release(),i._clippingManager=void 0,(t=this.gl)==null||t.deleteBuffer(this._bufferData.vertex),this._bufferData.vertex=null,(e=this.gl)==null||e.deleteBuffer(this._bufferData.uv),this._bufferData.uv=null,(n=this.gl)==null||n.deleteBuffer(this._bufferData.index),this._bufferData.index=null,i._bufferData=void 0,i._textures=void 0}doDrawModel(){this.preDraw(),this._clippingManager!=null&&this._clippingManager.setupClippingContext(this.getModel(),this);const t=this.getModel().getDrawableCount(),e=this.getModel().getDrawableRenderOrders();for(let n=0;n{Hx.doStaticRelease()};class Xx{constructor(t){this.groups=t.Groups,this.hitAreas=t.HitAreas,this.layout=t.Layout,this.moc=t.FileReferences.Moc,this.expressions=t.FileReferences.Expressions,this.motions=t.FileReferences.Motions,this.textures=t.FileReferences.Textures,this.physics=t.FileReferences.Physics,this.pose=t.FileReferences.Pose}getEyeBlinkParameters(){var t,e;return(e=(t=this.groups)==null?void 0:t.find(n=>n.Name==="EyeBlink"))==null?void 0:e.Ids}getLipSyncParameters(){var t,e;return(e=(t=this.groups)==null?void 0:t.find(n=>n.Name==="LipSync"))==null?void 0:e.Ids}}const lC="ParamAngleX",uC="ParamAngleY",cC="ParamAngleZ",hC="ParamEyeBallX",dC="ParamEyeBallY",fC="ParamBodyAngleX",pC="ParamBreath",Sy=2,Ty=2;var Nr;(r=>{r.LOG_LEVEL_VERBOSE=0,r.LOG_LEVEL_WARNING=1,r.LOG_LEVEL_ERROR=2,r.LOG_LEVEL_NONE=999,r.logLevel=r.LOG_LEVEL_WARNING,r.sound=!0,r.motionSync=!0,r.motionFadingDuration=500,r.idleMotionFadingDuration=2e3,r.expressionFadingDuration=500,r.preserveExpressionOnMotion=!0,r.cubism4=ol})(Nr||(Nr={}));const Ee={log(r,...t){Nr.logLevel<=Nr.LOG_LEVEL_VERBOSE&&console.log(`[${r}]`,...t)},warn(r,...t){Nr.logLevel<=Nr.LOG_LEVEL_WARNING&&console.warn(`[${r}]`,...t)},error(r,...t){Nr.logLevel<=Nr.LOG_LEVEL_ERROR&&console.error(`[${r}]`,...t)}};function Iy(r,t,e){return re?e:r}function Yx(r,t){t.forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(n=>{n!=="constructor"&&Object.defineProperty(r.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n))})})}function mC(r){let t=r.lastIndexOf("/");return t!=-1&&(r=r.slice(0,t)),t=r.lastIndexOf("/"),t!==-1&&(r=r.slice(t+1)),r}function gC(r,t){const e=r.indexOf(t);e!==-1&&r.splice(e,1)}class qx extends Ji{constructor(t,e){super(),this.expressions=[],this.reserveExpressionIndex=-1,this.destroyed=!1,this.settings=t,this.tag=`ExpressionManager(${t.name})`}init(){this.defaultExpression=this.createExpression({},void 0),this.currentExpression=this.defaultExpression,this.stopAllExpressions()}loadExpression(t){return ke(this,null,function*(){if(!this.definitions[t]){Ee.warn(this.tag,`Undefined expression at [${t}]`);return}if(this.expressions[t]===null){Ee.warn(this.tag,`Cannot set expression at [${t}] because it's already failed in loading.`);return}if(this.expressions[t])return this.expressions[t];const e=yield this._loadExpression(t);return this.expressions[t]=e,e})}_loadExpression(t){throw new Error("Not implemented.")}setRandomExpression(){return ke(this,null,function*(){if(this.definitions.length){const t=[];for(let e=0;e-1&&tu&&(o*=u/l,a*=u/l),this.vx+=o,this.vy+=a;const c=Math.sqrt(us(this.vx,2)+us(this.vy,2)),h=.5*(Math.sqrt(us(u,2)+8*u*i)-u);c>h&&(this.vx*=h/c,this.vy*=h/c),this.x+=this.vx,this.y+=this.vy}}class dm{constructor(t){this.json=t;let e=t.url;if(typeof e!="string")throw new TypeError("The `url` field in settings JSON must be defined as a string.");this.url=e,this.name=mC(this.url)}resolveURL(t){return kc.resolve(this.url,t)}replaceFiles(t){this.moc=t(this.moc,"moc"),this.pose!==void 0&&(this.pose=t(this.pose,"pose")),this.physics!==void 0&&(this.physics=t(this.physics,"physics"));for(let e=0;e(t.push(e),e)),t}validateFiles(t){const e=(s,o)=>{const a=this.resolveURL(s);if(!t.includes(a)){if(o)throw new Error(`File "${s}" is defined in settings, but doesn't exist in given files`);return!1}return!0};return[this.moc,...this.textures].forEach(s=>e(s,!0)),this.getDefinedFiles().filter(s=>e(s,!1))}}var vf=(r=>(r[r.NONE=0]="NONE",r[r.IDLE=1]="IDLE",r[r.NORMAL=2]="NORMAL",r[r.FORCE=3]="FORCE",r))(vf||{});class bC{constructor(){this.debug=!1,this.currentPriority=0,this.reservePriority=0}reserve(t,e,n){if(n<=0)return Ee.log(this.tag,"Cannot start a motion with MotionPriority.NONE."),!1;if(t===this.currentGroup&&e===this.currentIndex)return Ee.log(this.tag,"Motion is already playing.",this.dump(t,e)),!1;if(t===this.reservedGroup&&e===this.reservedIndex||t===this.reservedIdleGroup&&e===this.reservedIdleIndex)return Ee.log(this.tag,"Motion is already reserved.",this.dump(t,e)),!1;if(n===1){if(this.currentPriority!==0)return Ee.log(this.tag,"Cannot start idle motion because another motion is playing.",this.dump(t,e)),!1;if(this.reservedIdleGroup!==void 0)return Ee.log(this.tag,"Cannot start idle motion because another idle motion has reserved.",this.dump(t,e)),!1;this.setReservedIdle(t,e)}else{if(n<3){if(n<=this.currentPriority)return Ee.log(this.tag,"Cannot start motion because another motion is playing as an equivalent or higher priority.",this.dump(t,e)),!1;if(n<=this.reservePriority)return Ee.log(this.tag,"Cannot start motion because another motion has reserved as an equivalent or higher priority.",this.dump(t,e)),!1}this.setReserved(t,e,n)}return!0}start(t,e,n,i){if(i===1){if(this.setReservedIdle(void 0,void 0),this.currentPriority!==0)return Ee.log(this.tag,"Cannot start idle motion because another motion is playing.",this.dump(e,n)),!1}else{if(e!==this.reservedGroup||n!==this.reservedIndex)return Ee.log(this.tag,"Cannot start motion because another motion has taken the place.",this.dump(e,n)),!1;this.setReserved(void 0,void 0,0)}return t?(this.setCurrent(e,n,i),!0):!1}complete(){this.setCurrent(void 0,void 0,0)}setCurrent(t,e,n){this.currentPriority=n,this.currentGroup=t,this.currentIndex=e}setReserved(t,e,n){this.reservePriority=n,this.reservedGroup=t,this.reservedIndex=e}setReservedIdle(t,e){this.reservedIdleGroup=t,this.reservedIdleIndex=e}isActive(t,e){return t===this.currentGroup&&e===this.currentIndex||t===this.reservedGroup&&e===this.reservedIndex||t===this.reservedIdleGroup&&e===this.reservedIdleIndex}reset(){this.setCurrent(void 0,void 0,0),this.setReserved(void 0,void 0,0),this.setReservedIdle(void 0,void 0)}shouldRequestIdleMotion(){return this.currentGroup===void 0&&this.reservedIdleGroup===void 0}shouldOverrideExpression(){return!Nr.preserveExpressionOnMotion&&this.currentPriority>1}dump(t,e){if(this.debug){const n=["currentPriority","reservePriority","currentGroup","currentIndex","reservedGroup","reservedIndex","reservedIdleGroup","reservedIdleIndex"];return` +`)}constructor(){}}class f2{update(){this._model.update(),this._model.drawables.resetDynamicFlags()}getCanvasWidth(){return this._model==null?0:this._model.canvasinfo.CanvasWidth/this._model.canvasinfo.PixelsPerUnit}getCanvasHeight(){return this._model==null?0:this._model.canvasinfo.CanvasHeight/this._model.canvasinfo.PixelsPerUnit}saveParameters(){const t=this._model.parameters.count,e=this._savedParameters.length;for(let n=0;ne&&(e=this._model.parameters.minimumValues[t]),this._parameterValues[t]=n==1?e:this._parameterValues[t]=this._parameterValues[t]*(1-n)+e*n}setParameterValueById(t,e,n=1){const i=this.getParameterIndex(t);this.setParameterValueByIndex(i,e,n)}addParameterValueByIndex(t,e,n=1){this.setParameterValueByIndex(t,this.getParameterValueByIndex(t)+e*n)}addParameterValueById(t,e,n=1){const i=this.getParameterIndex(t);this.addParameterValueByIndex(i,e,n)}multiplyParameterValueById(t,e,n=1){const i=this.getParameterIndex(t);this.multiplyParameterValueByIndex(i,e,n)}multiplyParameterValueByIndex(t,e,n=1){this.setParameterValueByIndex(t,this.getParameterValueByIndex(t)*(1+(e-1)*n))}getDrawableIds(){return this._drawableIds.slice()}getDrawableIndex(t){const e=this._model.drawables.count;for(let n=0;ne&&(t=e);for(let n=0;n0&&e.getEndTime()(r[r.ExpressionBlendType_Add=0]="ExpressionBlendType_Add",r[r.ExpressionBlendType_Multiply=1]="ExpressionBlendType_Multiply",r[r.ExpressionBlendType_Overwrite=2]="ExpressionBlendType_Overwrite",r))(_s||{}),ol;(r=>{r.supportMoreMaskDivisions=!0,r.setOpacityFromMotion=!1})(ol||(ol={}));var bs=(r=>(r[r.CubismMotionCurveTarget_Model=0]="CubismMotionCurveTarget_Model",r[r.CubismMotionCurveTarget_Parameter=1]="CubismMotionCurveTarget_Parameter",r[r.CubismMotionCurveTarget_PartOpacity=2]="CubismMotionCurveTarget_PartOpacity",r))(bs||{}),Rn=(r=>(r[r.CubismMotionSegmentType_Linear=0]="CubismMotionSegmentType_Linear",r[r.CubismMotionSegmentType_Bezier=1]="CubismMotionSegmentType_Bezier",r[r.CubismMotionSegmentType_Stepped=2]="CubismMotionSegmentType_Stepped",r[r.CubismMotionSegmentType_InverseStepped=3]="CubismMotionSegmentType_InverseStepped",r))(Rn||{});class Fi{constructor(t=0,e=0){this.time=t,this.value=e}}class p2{constructor(){this.basePointIndex=0,this.segmentType=0}}class m2{constructor(){this.id="",this.type=0,this.segmentCount=0,this.baseSegmentIndex=0,this.fadeInTime=0,this.fadeOutTime=0}}class g2{constructor(){this.fireTime=0,this.value=""}}class y2{constructor(){this.duration=0,this.loop=!1,this.curveCount=0,this.eventCount=0,this.fps=0,this.curves=[],this.segments=[],this.points=[],this.events=[]}}class $x{constructor(t){this._json=t}release(){this._json=void 0}getMotionDuration(){return this._json.Meta.Duration}isMotionLoop(){return this._json.Meta.Loop||!1}getEvaluationOptionFlag(t){return lm.EvaluationOptionFlag_AreBeziersRistricted==t?!!this._json.Meta.AreBeziersRestricted:!1}getMotionCurveCount(){return this._json.Meta.CurveCount}getMotionFps(){return this._json.Meta.Fps}getMotionTotalSegmentCount(){return this._json.Meta.TotalSegmentCount}getMotionTotalPointCount(){return this._json.Meta.TotalPointCount}getMotionFadeInTime(){return this._json.Meta.FadeInTime}getMotionFadeOutTime(){return this._json.Meta.FadeOutTime}getMotionCurveTarget(t){return this._json.Curves[t].Target}getMotionCurveId(t){return this._json.Curves[t].Id}getMotionCurveFadeInTime(t){return this._json.Curves[t].FadeInTime}getMotionCurveFadeOutTime(t){return this._json.Curves[t].FadeOutTime}getMotionCurveSegmentCount(t){return this._json.Curves[t].Segments.length}getMotionCurveSegment(t,e){return this._json.Curves[t].Segments[e]}getEventCount(){return this._json.Meta.UserDataCount||0}getTotalEventValueSize(){return this._json.Meta.TotalUserDataSize}getEventTime(t){return this._json.UserData[t].Time}getEventValue(t){return this._json.UserData[t].Value}}var lm=(r=>(r[r.EvaluationOptionFlag_AreBeziersRistricted=0]="EvaluationOptionFlag_AreBeziersRistricted",r))(lm||{});const v2="EyeBlink",_2="LipSync",b2="Model",x2="Parameter",w2="PartOpacity",S2=!1;function sn(r,t,e){const n=new Fi;return n.time=r.time+(t.time-r.time)*e,n.value=r.value+(t.value-r.value)*e,n}function T2(r,t){let e=(t-r[0].time)/(r[1].time-r[0].time);return e<0&&(e=0),r[0].value+(r[1].value-r[0].value)*e}function I2(r,t){let e=(t-r[0].time)/(r[3].time-r[0].time);e<0&&(e=0);const n=sn(r[0],r[1],e),i=sn(r[1],r[2],e),s=sn(r[2],r[3],e),o=sn(n,i,e),a=sn(i,s,e);return sn(o,a,e).value}function M2(r,t){const e=t,n=r[0].time,i=r[3].time,s=r[1].time,o=r[2].time,a=i-3*o+3*s-n,l=3*o-6*s+3*n,u=3*s-3*n,c=n-e,h=Re.cardanoAlgorithmForBezier(a,l,u,c),f=sn(r[0],r[1],h),d=sn(r[1],r[2],h),m=sn(r[2],r[3],h),g=sn(f,d,h),p=sn(d,m,h);return sn(g,p,h).value}function E2(r,t){return r[0].value}function A2(r,t){return r[1].value}function Kh(r,t,e){const n=r.curves[t];let i=-1;const s=n.baseSegmentIndex+n.segmentCount;let o=0;for(let l=n.baseSegmentIndex;le){i=l;break}if(i==-1)return r.points[o].value;const a=r.segments[i];return a.evaluate(r.points.slice(a.basePointIndex),e)}class um extends jx{constructor(){super(),this._eyeBlinkParameterIds=[],this._lipSyncParameterIds=[],this._sourceFrameRate=30,this._loopDurationSeconds=-1,this._isLoop=!1,this._isLoopFadeIn=!0,this._lastWeight=0}static create(t,e){const n=new um;return n.parse(t),n._sourceFrameRate=n._motionData.fps,n._loopDurationSeconds=n._motionData.duration,n._onFinishedMotion=e,n}doUpdateParameters(t,e,n,i){this._modelCurveIdEyeBlink==null&&(this._modelCurveIdEyeBlink=v2),this._modelCurveIdLipSync==null&&(this._modelCurveIdLipSync=_2);let s=e-i.getStartTime();s<0&&(s=0);let o=Number.MAX_VALUE,a=Number.MAX_VALUE;const l=64;let u=0,c=0;this._eyeBlinkParameterIds.length>l&&yy("too many eye blink targets : {0}",this._eyeBlinkParameterIds.length),this._lipSyncParameterIds.length>l&&yy("too many lip sync targets : {0}",this._lipSyncParameterIds.length);const h=this._fadeInSeconds<=0?1:Re.getEasingSine((e-i.getFadeInStartTime())/this._fadeInSeconds),f=this._fadeOutSeconds<=0||i.getEndTime()<0?1:Re.getEasingSine((i.getEndTime()-e)/this._fadeOutSeconds);let d,m,g,p=s;if(this._isLoop)for(;p>this._motionData.duration;)p-=this._motionData.duration;const y=this._motionData.curves;for(m=0;m>v&1)continue;const T=S+(a-S)*n;t.setParameterValueById(this._eyeBlinkParameterIds[v],T)}if(o!=Number.MAX_VALUE)for(let v=0;v>v&1)continue;const T=S+(o-S)*n;t.setParameterValueById(this._lipSyncParameterIds[v],T)}}for(;m=this._motionData.duration&&(this._isLoop?(i.setStartTime(e),this._isLoopFadeIn&&i.setFadeInStartTime(e)):(this._onFinishedMotion&&this._onFinishedMotion(this),i.setIsFinished(!0))),this._lastWeight=n}setIsLoop(t){this._isLoop=t}isLoop(){return this._isLoop}setIsLoopFadeIn(t){this._isLoopFadeIn=t}isLoopFadeIn(){return this._isLoopFadeIn}getDuration(){return this._isLoop?-1:this._loopDurationSeconds}getLoopDuration(){return this._loopDurationSeconds}setParameterFadeInTime(t,e){const n=this._motionData.curves;for(let i=0;inew m2),this._motionData.segments=Array.from({length:e.getMotionTotalSegmentCount()}).map(()=>new p2),this._motionData.events=Array.from({length:this._motionData.eventCount}).map(()=>new g2),this._motionData.points=[];let o=0,a=0;for(let l=0;lt&&this._motionData.events[n].fireTime<=e&&this._firedEventValues.push(this._motionData.events[n].value);return this._firedEventValues}}class C2{constructor(){this._autoDelete=!1,this._available=!0,this._finished=!1,this._started=!1,this._startTimeSeconds=-1,this._fadeInStartTimeSeconds=0,this._endTimeSeconds=-1,this._stateTimeSeconds=0,this._stateWeight=0,this._lastEventCheckSeconds=0,this._motionQueueEntryHandle=this,this._fadeOutSeconds=0,this._isTriggeredFadeOut=!1}release(){this._autoDelete&&this._motion&&this._motion.release()}setFadeOut(t){this._fadeOutSeconds=t,this._isTriggeredFadeOut=!0}startFadeOut(t,e){const n=e+t;this._isTriggeredFadeOut=!0,(this._endTimeSeconds<0||ne!=null&&e._motionQueueEntryHandle==t)}setEventCallback(t,e=null){this._eventCallBack=t,this._eventCustomData=e}doUpdateMotion(t,e){let n=!1,i=0;for(;i(r[r.CubismPhysicsTargetType_Parameter=0]="CubismPhysicsTargetType_Parameter",r))(mf||{}),xs=(r=>(r[r.CubismPhysicsSource_X=0]="CubismPhysicsSource_X",r[r.CubismPhysicsSource_Y=1]="CubismPhysicsSource_Y",r[r.CubismPhysicsSource_Angle=2]="CubismPhysicsSource_Angle",r))(xs||{});class P2{constructor(){this.initialPosition=new ie(0,0),this.position=new ie(0,0),this.lastPosition=new ie(0,0),this.lastGravity=new ie(0,0),this.force=new ie(0,0),this.velocity=new ie(0,0)}}class R2{constructor(){this.normalizationPosition={},this.normalizationAngle={}}}class F2{constructor(){this.source={}}}class L2{constructor(){this.destination={},this.translationScale=new ie(0,0)}}class D2{constructor(){this.settings=[],this.inputs=[],this.outputs=[],this.particles=[],this.gravity=new ie(0,0),this.wind=new ie(0,0)}}class N2{constructor(t){this._json=t}release(){this._json=void 0}getGravity(){const t=new ie(0,0);return t.x=this._json.Meta.EffectiveForces.Gravity.X,t.y=this._json.Meta.EffectiveForces.Gravity.Y,t}getWind(){const t=new ie(0,0);return t.x=this._json.Meta.EffectiveForces.Wind.X,t.y=this._json.Meta.EffectiveForces.Wind.Y,t}getSubRigCount(){return this._json.Meta.PhysicsSettingCount}getTotalInputCount(){return this._json.Meta.TotalInputCount}getTotalOutputCount(){return this._json.Meta.TotalOutputCount}getVertexCount(){return this._json.Meta.VertexCount}getNormalizationPositionMinimumValue(t){return this._json.PhysicsSettings[t].Normalization.Position.Minimum}getNormalizationPositionMaximumValue(t){return this._json.PhysicsSettings[t].Normalization.Position.Maximum}getNormalizationPositionDefaultValue(t){return this._json.PhysicsSettings[t].Normalization.Position.Default}getNormalizationAngleMinimumValue(t){return this._json.PhysicsSettings[t].Normalization.Angle.Minimum}getNormalizationAngleMaximumValue(t){return this._json.PhysicsSettings[t].Normalization.Angle.Maximum}getNormalizationAngleDefaultValue(t){return this._json.PhysicsSettings[t].Normalization.Angle.Default}getInputCount(t){return this._json.PhysicsSettings[t].Input.length}getInputWeight(t,e){return this._json.PhysicsSettings[t].Input[e].Weight}getInputReflect(t,e){return this._json.PhysicsSettings[t].Input[e].Reflect}getInputType(t,e){return this._json.PhysicsSettings[t].Input[e].Type}getInputSourceId(t,e){return this._json.PhysicsSettings[t].Input[e].Source.Id}getOutputCount(t){return this._json.PhysicsSettings[t].Output.length}getOutputVertexIndex(t,e){return this._json.PhysicsSettings[t].Output[e].VertexIndex}getOutputAngleScale(t,e){return this._json.PhysicsSettings[t].Output[e].Scale}getOutputWeight(t,e){return this._json.PhysicsSettings[t].Output[e].Weight}getOutputDestinationId(t,e){return this._json.PhysicsSettings[t].Output[e].Destination.Id}getOutputType(t,e){return this._json.PhysicsSettings[t].Output[e].Type}getOutputReflect(t,e){return this._json.PhysicsSettings[t].Output[e].Reflect}getParticleCount(t){return this._json.PhysicsSettings[t].Vertices.length}getParticleMobility(t,e){return this._json.PhysicsSettings[t].Vertices[e].Mobility}getParticleDelay(t,e){return this._json.PhysicsSettings[t].Vertices[e].Delay}getParticleAcceleration(t,e){return this._json.PhysicsSettings[t].Vertices[e].Acceleration}getParticleRadius(t,e){return this._json.PhysicsSettings[t].Vertices[e].Radius}getParticlePosition(t,e){const n=new ie(0,0);return n.x=this._json.PhysicsSettings[t].Vertices[e].Position.X,n.y=this._json.PhysicsSettings[t].Vertices[e].Position.Y,n}}const _y="X",by="Y",xy="Angle",B2=5,Wx=100,k2=.001;class cm{static create(t){const e=new cm;return e.parse(t),e._physicsRig.gravity.y=0,e}evaluate(t,e){let n,i,s,o;const a=new ie;let l,u,c,h,f,d,m,g;f=t.getModel().parameters.values,d=t.getModel().parameters.maximumValues,m=t.getModel().parameters.minimumValues,g=t.getModel().parameters.defaultValues;for(let p=0;p=l.particleCount)break;c[y].destinationParameterIndex==-1&&(c[y].destinationParameterIndex=t.getParameterIndex(c[y].destination.id));const S=new ie;S.x=h[v].position.x-h[v-1].position.x,S.y=h[v].position.y-h[v-1].position.y,o=c[y].getValue(S,h,v,c[y].reflect,this._options.gravity);const T=c[y].destinationParameterIndex,_=!Float32Array.prototype.slice&&"subarray"in Float32Array.prototype?JSON.parse(JSON.stringify(f.subarray(T))):f.slice(T);K2(_,m[T],d[T],o,c[y]);for(let M=T,x=0;M=2?i=t[e-1].position.substract(t[e-2].position):i=i.multiplyByScaler(-1),s=Re.directionToRadian(i,r),n&&(s*=-1),s}function H2(r,t){return Math.abs(Math.max(r,t)-Math.min(r,t))}function X2(r,t){return Math.min(r,t)+H2(r,t)/2}function Y2(r,t){return r.x}function q2(r,t){return r.y}function Q2(r,t){return t}function Z2(r,t,e,n,i,s,o,a){let l,u,c,h,f=new ie(0,0),d=new ie(0,0),m=new ie(0,0),g=new ie(0,0);r[0].position=new ie(e.x,e.y),l=Re.degreesToRadian(n),h=Re.radianToDirection(l),h.normalize();for(let p=1;pe&&(o>i.valueExceededMaximum&&(i.valueExceededMaximum=o),o=e),a=i.weight/Wx,a>=1||(o=r[0]*(1-a)+o*a),r[0]=o}function hm(r,t,e,n,i,s,o,a){let l=0;const u=Re.max(e,t);ur&&(r=c);const h=Re.min(i,s),f=Re.max(i,s),d=o,m=X2(c,u),g=r-m;switch(Math.sign(g)){case 1:{const p=f-d,y=u-m;y!=0&&(l=g*(p/y),l+=d);break}case-1:{const p=h-d,y=c-m;y!=0&&(l=g*(p/y),l+=d);break}case 0:{l=d;break}}return a?l:l*-1}class gf{constructor(t=0,e=0,n=0,i=0){this.x=t,this.y=e,this.width=n,this.height=i}getCenterX(){return this.x+.5*this.width}getCenterY(){return this.y+.5*this.height}getRight(){return this.x+this.width}getBottom(){return this.y+this.height}setRect(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}expand(t,e){this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2}}const Jh=4,J2=10;let cs,Fa,yf;class td{getChannelFlagAsColor(t){return this._channelColors[t]}getMaskRenderTexture(){let t=0;if(this._maskTexture&&this._maskTexture.texture!=0&&(this._maskTexture.frameNo=this._currentFrameNo,t=this._maskTexture.texture),t==0){const e=this._clippingMaskBufferSize;this._colorBuffer=this.gl.createTexture(),this.gl.bindTexture(this.gl.TEXTURE_2D,this._colorBuffer),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,e,e,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.bindTexture(this.gl.TEXTURE_2D,null),t=this.gl.createFramebuffer(),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,t),this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,this._colorBuffer,0),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,yf),this._maskTexture=new tC(this._currentFrameNo,t)}return t}setGL(t){this.gl=t}calcClippedDrawTotalBounds(t,e){let n=Number.MAX_VALUE,i=Number.MAX_VALUE,s=Number.MIN_VALUE,o=Number.MIN_VALUE;const a=e._clippedDrawableIndexList.length;for(let l=0;lm&&(m=v),Sg&&(g=S)}if(f!=Number.MAX_VALUE)if(fs&&(s=m),g>o&&(o=g),n==Number.MAX_VALUE)e._allClippedDrawRect.x=0,e._allClippedDrawRect.y=0,e._allClippedDrawRect.width=0,e._allClippedDrawRect.height=0,e._isUsing=!1;else{e._isUsing=!0;const y=s-n,v=o-i;e._allClippedDrawRect.x=n,e._allClippedDrawRect.y=i,e._allClippedDrawRect.width=y,e._allClippedDrawRect.height=v}}}constructor(){this._maskRenderTexture=null,this._colorBuffer=null,this._currentFrameNo=0,this._clippingMaskBufferSize=256,this._clippingContextListForMask=[],this._clippingContextListForDraw=[],this._channelColors=[],this._tmpBoundsOnModel=new gf,this._tmpMatrix=new ln,this._tmpMatrixForMask=new ln,this._tmpMatrixForDraw=new ln;let t=new Pa;t.R=1,t.G=0,t.B=0,t.A=0,this._channelColors.push(t),t=new Pa,t.R=0,t.G=1,t.B=0,t.A=0,this._channelColors.push(t),t=new Pa,t.R=0,t.G=0,t.B=1,t.A=0,this._channelColors.push(t),t=new Pa,t.R=0,t.G=0,t.B=0,t.A=1,this._channelColors.push(t)}release(){var t,e,n;const i=this;for(let s=0;s0){this.gl.viewport(0,0,this._clippingMaskBufferSize,this._clippingMaskBufferSize),this._maskRenderTexture=this.getMaskRenderTexture(),e.getMvpMatrix(),e.preDraw(),this.setupLayoutBounds(n),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this._maskRenderTexture),this.gl.clearColor(1,1,1,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT);for(let i=0;i(r[r.ShaderNames_SetupMask=0]="ShaderNames_SetupMask",r[r.ShaderNames_NormalPremultipliedAlpha=1]="ShaderNames_NormalPremultipliedAlpha",r[r.ShaderNames_NormalMaskedPremultipliedAlpha=2]="ShaderNames_NormalMaskedPremultipliedAlpha",r[r.ShaderNames_NomralMaskedInvertedPremultipliedAlpha=3]="ShaderNames_NomralMaskedInvertedPremultipliedAlpha",r[r.ShaderNames_AddPremultipliedAlpha=4]="ShaderNames_AddPremultipliedAlpha",r[r.ShaderNames_AddMaskedPremultipliedAlpha=5]="ShaderNames_AddMaskedPremultipliedAlpha",r[r.ShaderNames_AddMaskedPremultipliedAlphaInverted=6]="ShaderNames_AddMaskedPremultipliedAlphaInverted",r[r.ShaderNames_MultPremultipliedAlpha=7]="ShaderNames_MultPremultipliedAlpha",r[r.ShaderNames_MultMaskedPremultipliedAlpha=8]="ShaderNames_MultMaskedPremultipliedAlpha",r[r.ShaderNames_MultMaskedPremultipliedAlphaInverted=9]="ShaderNames_MultMaskedPremultipliedAlphaInverted",r))(La||{});const rC="attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_myPos;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_clipMatrix * a_position; v_myPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}",nC="precision mediump float;varying vec2 v_texCoord;varying vec4 v_myPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;void main(){ float isInside = step(u_baseColor.x, v_myPos.x/v_myPos.w) * step(u_baseColor.y, v_myPos.y/v_myPos.w) * step(v_myPos.x/v_myPos.w, u_baseColor.z) * step(v_myPos.y/v_myPos.w, u_baseColor.w); gl_FragColor = u_channelFlag * texture2D(s_texture0, v_texCoord).a * isInside;}",iC="attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;uniform mat4 u_matrix;void main(){ gl_Position = u_matrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}",wy="attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform mat4 u_matrix;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_matrix * a_position; v_clipPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}",sC="precision mediump float;varying vec2 v_texCoord;uniform vec4 u_baseColor;uniform sampler2D s_texture0;void main(){ gl_FragColor = texture2D(s_texture0 , v_texCoord) * u_baseColor;}",oC="precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;uniform sampler2D s_texture1;void main(){ vec4 col_formask = texture2D(s_texture0 , v_texCoord) * u_baseColor; vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}",aC="precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;void main(){vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor;vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag;float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a;col_formask = col_formask * (1.0 - maskVal);gl_FragColor = col_formask;}";class Hx extends sm{constructor(){super(),this._clippingContextBufferForMask=null,this._clippingContextBufferForDraw=null,this._clippingManager=new td,this.firstDraw=!0,this._textures={},this._sortedDrawableIndexList=[],this._bufferData={vertex:null,uv:null,index:null}}initialize(t){t.isUsingMasking()&&(this._clippingManager=new td,this._clippingManager.initialize(t,t.getDrawableCount(),t.getDrawableMasks(),t.getDrawableMaskCounts()));for(let e=t.getDrawableCount()-1;e>=0;e--)this._sortedDrawableIndexList[e]=0;super.initialize(t)}bindTexture(t,e){this._textures[t]=e}getBindedTextures(){return this._textures}setClippingMaskBufferSize(t){this._clippingManager.release(),this._clippingManager=new td,this._clippingManager.setClippingMaskBufferSize(t),this._clippingManager.initialize(this.getModel(),this.getModel().getDrawableCount(),this.getModel().getDrawableMasks(),this.getModel().getDrawableMaskCounts())}getClippingMaskBufferSize(){return this._clippingManager.getClippingMaskBufferSize()}release(){var t,e,n;const i=this;this._clippingManager.release(),i._clippingManager=void 0,(t=this.gl)==null||t.deleteBuffer(this._bufferData.vertex),this._bufferData.vertex=null,(e=this.gl)==null||e.deleteBuffer(this._bufferData.uv),this._bufferData.uv=null,(n=this.gl)==null||n.deleteBuffer(this._bufferData.index),this._bufferData.index=null,i._bufferData=void 0,i._textures=void 0}doDrawModel(){this.preDraw(),this._clippingManager!=null&&this._clippingManager.setupClippingContext(this.getModel(),this);const t=this.getModel().getDrawableCount(),e=this.getModel().getDrawableRenderOrders();for(let n=0;n{Hx.doStaticRelease()};class Xx{constructor(t){this.groups=t.Groups,this.hitAreas=t.HitAreas,this.layout=t.Layout,this.moc=t.FileReferences.Moc,this.expressions=t.FileReferences.Expressions,this.motions=t.FileReferences.Motions,this.textures=t.FileReferences.Textures,this.physics=t.FileReferences.Physics,this.pose=t.FileReferences.Pose}getEyeBlinkParameters(){var t,e;return(e=(t=this.groups)==null?void 0:t.find(n=>n.Name==="EyeBlink"))==null?void 0:e.Ids}getLipSyncParameters(){var t,e;return(e=(t=this.groups)==null?void 0:t.find(n=>n.Name==="LipSync"))==null?void 0:e.Ids}}const lC="ParamAngleX",uC="ParamAngleY",cC="ParamAngleZ",hC="ParamEyeBallX",dC="ParamEyeBallY",fC="ParamBodyAngleX",pC="ParamBreath",Sy=2,Ty=2;var Nr;(r=>{r.LOG_LEVEL_VERBOSE=0,r.LOG_LEVEL_WARNING=1,r.LOG_LEVEL_ERROR=2,r.LOG_LEVEL_NONE=999,r.logLevel=r.LOG_LEVEL_WARNING,r.sound=!0,r.motionSync=!0,r.motionFadingDuration=500,r.idleMotionFadingDuration=2e3,r.expressionFadingDuration=500,r.preserveExpressionOnMotion=!0,r.cubism4=ol})(Nr||(Nr={}));const Ee={log(r,...t){Nr.logLevel<=Nr.LOG_LEVEL_VERBOSE&&console.log(`[${r}]`,...t)},warn(r,...t){Nr.logLevel<=Nr.LOG_LEVEL_WARNING&&console.warn(`[${r}]`,...t)},error(r,...t){Nr.logLevel<=Nr.LOG_LEVEL_ERROR&&console.error(`[${r}]`,...t)}};function Iy(r,t,e){return re?e:r}function Yx(r,t){t.forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(n=>{n!=="constructor"&&Object.defineProperty(r.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n))})})}function mC(r){let t=r.lastIndexOf("/");return t!=-1&&(r=r.slice(0,t)),t=r.lastIndexOf("/"),t!==-1&&(r=r.slice(t+1)),r}function gC(r,t){const e=r.indexOf(t);e!==-1&&r.splice(e,1)}class qx extends Ji{constructor(t,e){super(),this.expressions=[],this.reserveExpressionIndex=-1,this.destroyed=!1,this.settings=t,this.tag=`ExpressionManager(${t.name})`}init(){this.defaultExpression=this.createExpression({},void 0),this.currentExpression=this.defaultExpression,this.stopAllExpressions()}loadExpression(t){return ke(this,null,function*(){if(!this.definitions[t]){Ee.warn(this.tag,`Undefined expression at [${t}]`);return}if(this.expressions[t]===null){Ee.warn(this.tag,`Cannot set expression at [${t}] because it's already failed in loading.`);return}if(this.expressions[t])return this.expressions[t];const e=yield this._loadExpression(t);return this.expressions[t]=e,e})}_loadExpression(t){throw new Error("Not implemented.")}setRandomExpression(){return ke(this,null,function*(){if(this.definitions.length){const t=[];for(let e=0;e-1&&tu&&(o*=u/l,a*=u/l),this.vx+=o,this.vy+=a;const c=Math.sqrt(us(this.vx,2)+us(this.vy,2)),h=.5*(Math.sqrt(us(u,2)+8*u*i)-u);c>h&&(this.vx*=h/c,this.vy*=h/c),this.x+=this.vx,this.y+=this.vy}}class dm{constructor(t){this.json=t;let e=t.url;if(typeof e!="string")throw new TypeError("The `url` field in settings JSON must be defined as a string.");this.url=e,this.name=mC(this.url)}resolveURL(t){return kc.resolve(this.url,t)}replaceFiles(t){this.moc=t(this.moc,"moc"),this.pose!==void 0&&(this.pose=t(this.pose,"pose")),this.physics!==void 0&&(this.physics=t(this.physics,"physics"));for(let e=0;e(t.push(e),e)),t}validateFiles(t){const e=(s,o)=>{const a=this.resolveURL(s);if(!t.includes(a)){if(o)throw new Error(`File "${s}" is defined in settings, but doesn't exist in given files`);return!1}return!0};return[this.moc,...this.textures].forEach(s=>e(s,!0)),this.getDefinedFiles().filter(s=>e(s,!1))}}var vf=(r=>(r[r.NONE=0]="NONE",r[r.IDLE=1]="IDLE",r[r.NORMAL=2]="NORMAL",r[r.FORCE=3]="FORCE",r))(vf||{});class bC{constructor(){this.debug=!1,this.currentPriority=0,this.reservePriority=0}reserve(t,e,n){if(n<=0)return Ee.log(this.tag,"Cannot start a motion with MotionPriority.NONE."),!1;if(t===this.currentGroup&&e===this.currentIndex)return Ee.log(this.tag,"Motion is already playing.",this.dump(t,e)),!1;if(t===this.reservedGroup&&e===this.reservedIndex||t===this.reservedIdleGroup&&e===this.reservedIdleIndex)return Ee.log(this.tag,"Motion is already reserved.",this.dump(t,e)),!1;if(n===1){if(this.currentPriority!==0)return Ee.log(this.tag,"Cannot start idle motion because another motion is playing.",this.dump(t,e)),!1;if(this.reservedIdleGroup!==void 0)return Ee.log(this.tag,"Cannot start idle motion because another idle motion has reserved.",this.dump(t,e)),!1;this.setReservedIdle(t,e)}else{if(n<3){if(n<=this.currentPriority)return Ee.log(this.tag,"Cannot start motion because another motion is playing as an equivalent or higher priority.",this.dump(t,e)),!1;if(n<=this.reservePriority)return Ee.log(this.tag,"Cannot start motion because another motion has reserved as an equivalent or higher priority.",this.dump(t,e)),!1}this.setReserved(t,e,n)}return!0}start(t,e,n,i){if(i===1){if(this.setReservedIdle(void 0,void 0),this.currentPriority!==0)return Ee.log(this.tag,"Cannot start idle motion because another motion is playing.",this.dump(e,n)),!1}else{if(e!==this.reservedGroup||n!==this.reservedIndex)return Ee.log(this.tag,"Cannot start motion because another motion has taken the place.",this.dump(e,n)),!1;this.setReserved(void 0,void 0,0)}return t?(this.setCurrent(e,n,i),!0):!1}complete(){this.setCurrent(void 0,void 0,0)}setCurrent(t,e,n){this.currentPriority=n,this.currentGroup=t,this.currentIndex=e}setReserved(t,e,n){this.reservePriority=n,this.reservedGroup=t,this.reservedIndex=e}setReservedIdle(t,e){this.reservedIdleGroup=t,this.reservedIdleIndex=e}isActive(t,e){return t===this.currentGroup&&e===this.currentIndex||t===this.reservedGroup&&e===this.reservedIndex||t===this.reservedIdleGroup&&e===this.reservedIdleIndex}reset(){this.setCurrent(void 0,void 0,0),this.setReserved(void 0,void 0,0),this.setReservedIdle(void 0,void 0)}shouldRequestIdleMotion(){return this.currentGroup===void 0&&this.reservedIdleGroup===void 0}shouldOverrideExpression(){return!Nr.preserveExpressionOnMotion&&this.currentPriority>1}dump(t,e){if(this.debug){const n=["currentPriority","reservePriority","currentGroup","currentIndex","reservedGroup","reservedIndex","reservedIdleGroup","reservedIdleIndex"];return` group = "${t}", index = ${e} `+n.map(i=>"["+i+"] "+this[i]).join(` -`)}return""}}const xC="SoundManager",wC=.5;class Ms{static get volume(){return this._volume}static set volume(t){this._volume=(t>1?1:t<0?0:t)||0,this.audios.forEach(e=>e.volume=this._volume)}static add(t,e,n){const i=new Audio(t);return i.volume=this._volume,i.preload="auto",i.addEventListener("ended",()=>{this.dispose(i),e==null||e()}),i.addEventListener("error",s=>{this.dispose(i),Ee.warn(xC,`Error occurred on "${t}"`,s.error),n==null||n(s.error)}),this.audios.push(i),i}static play(t){return new Promise((e,n)=>{var i;(i=t.play())==null||i.catch(s=>{t.dispatchEvent(new ErrorEvent("error",{error:s})),n(s)}),t.readyState===t.HAVE_ENOUGH_DATA?e():t.addEventListener("canplaythrough",e)})}static dispose(t){t.pause(),t.removeAttribute("src"),gC(this.audios,t)}static destroy(){for(let t=this.audios.length-1;t>=0;t--)this.dispose(this.audios[t])}}Ms.audios=[];Ms._volume=wC;class fm extends Ji{constructor(t,e){super(),this.motionGroups={},this.state=new bC,this.playing=!1,this.destroyed=!1,this.settings=t,this.tag=`MotionManager(${t.name})`,this.state.tag=this.tag}init(t){t!=null&&t.idleMotionGroup&&(this.groups.idle=t.idleMotionGroup),this.setupMotions(t),this.stopAllMotions()}setupMotions(t){for(const n of Object.keys(this.definitions))this.motionGroups[n]=[];let e;switch(t==null?void 0:t.motionPreload){case"NONE":return;case"ALL":e=Object.keys(this.definitions);break;case"IDLE":default:e=[this.groups.idle];break}for(const n of e)if(this.definitions[n])for(let i=0;ithis.currentAudio=void 0,()=>this.currentAudio=void 0),this.currentAudio=l}catch(h){Ee.warn(this.tag,"Failed to create audio",c,h)}}const u=yield this.loadMotion(n,i);if(l){const c=Ms.play(l).catch(h=>Ee.warn(this.tag,"Failed to play audio",l.src,h));Nr.motionSync&&(yield c)}return this.state.start(u,n,i,s)?(Ee.log(this.tag,"Start motion:",this.getMotionName(a)),this.emit("motionStart",n,i,l),this.state.shouldOverrideExpression()&&this.expressionManager&&this.expressionManager.resetExpression(),this.playing=!0,this._startMotion(u),!0):(l&&(Ms.dispose(l),this.currentAudio=void 0),!1)})}startRandomMotion(t,e){return ke(this,null,function*(){const n=this.definitions[t];if(n!=null&&n.length){const i=[];for(let s=0;se.index>=0);for(const e of t)this.hitAreas[e.name]=e}hitTest(t,e){return Object.keys(this.hitAreas).filter(n=>this.isHit(n,t,e))}isHit(t,e,n){if(!this.hitAreas[t])return!1;const i=this.hitAreas[t].index,s=this.getDrawableBounds(i,SC);return s.x<=e&&e<=s.x+s.width&&s.y<=n&&n<=s.y+s.height}getDrawableBounds(t,e){const n=this.getDrawableVertices(t);let i=n[0],s=n[0],o=n[1],a=n[1];for(let l=0;l{(s.status===200||s.status===0)&&s.response?n(s.response):s.onerror()},s.onerror=()=>{Ee.warn(IC,`Failed to load resource as ${s.responseType} (Status ${s.status}): ${t}`),i(new Ey("Network error.",t,s.status))},s.onabort=()=>i(new Ey("Aborted.",t,s.status,!0)),s.onloadend=()=>{var o;_r.allXhrSet.delete(s),r&&((o=_r.xhrMap.get(r))==null||o.delete(s))},s}static cancelXHRs(){var r;(r=_r.xhrMap.get(this))==null||r.forEach(t=>{t.abort(),_r.allXhrSet.delete(t)}),_r.xhrMap.delete(this)}static release(){_r.allXhrSet.forEach(r=>r.abort()),_r.allXhrSet.clear(),_r.xhrMap=new WeakMap}};let zc=_r;zc.xhrMap=new WeakMap;zc.allXhrSet=new Set;zc.loader=(r,t)=>new Promise((e,n)=>{_r.createXHR(r.target,r.settings?r.settings.resolveURL(r.url):r.url,r.type,s=>{r.result=s,e()},n).send()});function Qx(r,t){let e=-1;return n(0);function n(i,s){if(s)return Promise.reject(s);if(i<=e)return Promise.reject(new Error("next() called multiple times"));e=i;const o=r[i];if(!o)return Promise.resolve();try{return Promise.resolve(o(t,n.bind(null,i+1)))}catch(a){return Promise.reject(a)}}}class $i{static load(t){return Qx(this.middlewares,t).then(()=>t.result)}}$i.middlewares=[zc.loader];function MC(r,t={}){var e;const n={resourceOptions:{crossorigin:t.crossOrigin}};if(Ls.fromURL)return Ls.fromURL(r,n).catch(o=>{if(o instanceof Error)throw o;const a=new Error("Texture loading error");throw a.event=o,a});n.resourceOptions.autoLoad=!1;const i=Ls.from(r,n);if(i.baseTexture.valid)return Promise.resolve(i);const s=i.baseTexture.resource;return(e=s._live2d_load)!=null||(s._live2d_load=new Promise((o,a)=>{const l=u=>{s.source.removeEventListener("error",l);const c=new Error("Texture loading error");c.event=u,a(c)};s.source.addEventListener("error",l),s.load().then(()=>o(i)).catch(l)})),s._live2d_load}const Ay="Live2DFactory",Zx=(r,t)=>ke(void 0,null,function*(){if(typeof r.source=="string"){const e=yield $i.load({url:r.source,type:"json",target:r.live2dModel});e.url=r.source,r.source=e,r.live2dModel.emit("settingsJSONLoaded",e)}return t()}),Kx=(r,t)=>ke(void 0,null,function*(){if(r.source instanceof dm)return r.settings=r.source,t();if(typeof r.source=="object"){const e=je.findRuntime(r.source);if(e){const n=e.createModelSettings(r.source);return r.settings=n,r.live2dModel.emit("settingsLoaded",n),t()}}throw new TypeError("Unknown settings format.")}),Jx=(r,t)=>{if(r.settings){const e=je.findRuntime(r.settings);if(e)return e.ready().then(t)}return t()},tw=(r,t)=>ke(void 0,null,function*(){yield t();const e=r.internalModel;if(e){const n=r.settings,i=je.findRuntime(n);if(i){const s=[];n.pose&&s.push($i.load({settings:n,url:n.pose,type:"json",target:e}).then(o=>{e.pose=i.createPose(e.coreModel,o),r.live2dModel.emit("poseLoaded",e.pose)}).catch(o=>{r.live2dModel.emit("poseLoadError",o),Ee.warn(Ay,"Failed to load pose.",o)})),n.physics&&s.push($i.load({settings:n,url:n.physics,type:"json",target:e}).then(o=>{e.physics=i.createPhysics(e.coreModel,o),r.live2dModel.emit("physicsLoaded",e.physics)}).catch(o=>{r.live2dModel.emit("physicsLoadError",o),Ee.warn(Ay,"Failed to load physics.",o)})),s.length&&(yield Promise.all(s))}}}),ew=(r,t)=>ke(void 0,null,function*(){if(r.settings){const e=r.live2dModel,n=r.settings.textures.map(i=>{const s=r.settings.resolveURL(i);return MC(s,{crossOrigin:r.options.crossOrigin})});if(yield t(),r.internalModel)e.internalModel=r.internalModel,e.emit("modelLoaded",r.internalModel);else throw new TypeError("Missing internal model.");e.textures=yield Promise.all(n),e.emit("textureLoaded",e.textures)}else throw new TypeError("Missing settings.")}),rw=(r,t)=>ke(void 0,null,function*(){const e=r.settings;if(e instanceof dm){const n=je.findRuntime(e);if(!n)throw new TypeError("Unknown model settings.");const i=yield $i.load({settings:e,url:e.moc,type:"arraybuffer",target:r.live2dModel});if(!n.isValidMoc(i))throw new Error("Invalid moc data");const s=n.createCoreModel(i);return r.internalModel=n.createInternalModel(s,e,r.options),t()}throw new TypeError("Missing settings.")}),or=class{static registerRuntime(r){or.runtimes.push(r),or.runtimes.sort((t,e)=>e.version-t.version)}static findRuntime(r){for(const t of or.runtimes)if(t.test(r))return t}static setupLive2DModel(r,t,e){return ke(this,null,function*(){const n=new Promise(o=>r.once("textureLoaded",o)),i=new Promise(o=>r.once("modelLoaded",o)),s=Promise.all([n,i]).then(()=>r.emit("ready"));yield Qx(or.live2DModelMiddlewares,{live2dModel:r,source:t,options:e||{}}),yield s,r.emit("load")})}static loadMotion(r,t,e){var n,i;const s=o=>r.emit("motionLoadError",t,e,o);try{const o=(n=r.definitions[t])==null?void 0:n[e];if(!o)return Promise.resolve(void 0);r.listeners("destroy").includes(or.releaseTasks)||r.once("destroy",or.releaseTasks);let a=or.motionTasksMap.get(r);a||(a={},or.motionTasksMap.set(r,a));let l=a[t];l||(l=[],a[t]=l);const u=r.getMotionFile(o);return(i=l[e])!=null||(l[e]=$i.load({url:u,settings:r.settings,type:r.motionDataType,target:r}).then(c=>{var h;const f=(h=or.motionTasksMap.get(r))==null?void 0:h[t];f&&delete f[e];const d=r.createMotion(c,t,o);return r.emit("motionLoaded",t,e,d),d}).catch(c=>{Ee.warn(r.tag,`Failed to load motion: ${u} +`)}return""}}const xC="SoundManager",wC=.5;class Ms{static get volume(){return this._volume}static set volume(t){this._volume=(t>1?1:t<0?0:t)||0,this.audios.forEach(e=>e.volume=this._volume)}static add(t,e,n){const i=new Audio(t);return i.volume=this._volume,i.preload="auto",i.addEventListener("ended",()=>{this.dispose(i),e==null||e()}),i.addEventListener("error",s=>{this.dispose(i),Ee.warn(xC,`Error occurred on "${t}"`,s.error),n==null||n(s.error)}),this.audios.push(i),i}static play(t){return new Promise((e,n)=>{var i;(i=t.play())==null||i.catch(s=>{t.dispatchEvent(new ErrorEvent("error",{error:s})),n(s)}),t.readyState===t.HAVE_ENOUGH_DATA?e():t.addEventListener("canplaythrough",e)})}static dispose(t){t.pause(),t.removeAttribute("src"),gC(this.audios,t)}static destroy(){for(let t=this.audios.length-1;t>=0;t--)this.dispose(this.audios[t])}}Ms.audios=[];Ms._volume=wC;class fm extends Ji{constructor(t,e){super(),this.motionGroups={},this.state=new bC,this.playing=!1,this.destroyed=!1,this.settings=t,this.tag=`MotionManager(${t.name})`,this.state.tag=this.tag}init(t){t!=null&&t.idleMotionGroup&&(this.groups.idle=t.idleMotionGroup),this.setupMotions(t),this.stopAllMotions()}setupMotions(t){for(const n of Object.keys(this.definitions))this.motionGroups[n]=[];let e;switch(t==null?void 0:t.motionPreload){case"NONE":return;case"ALL":e=Object.keys(this.definitions);break;case"IDLE":default:e=[this.groups.idle];break}for(const n of e)if(this.definitions[n])for(let i=0;ithis.currentAudio=void 0,()=>this.currentAudio=void 0),this.currentAudio=l}catch(h){Ee.warn(this.tag,"Failed to create audio",c,h)}}const u=yield this.loadMotion(n,i);if(l){const c=Ms.play(l).catch(h=>Ee.warn(this.tag,"Failed to play audio",l.src,h));Nr.motionSync&&(yield c)}return this.state.start(u,n,i,s)?(Ee.log(this.tag,"Start motion:",this.getMotionName(a)),this.emit("motionStart",n,i,l),this.state.shouldOverrideExpression()&&this.expressionManager&&this.expressionManager.resetExpression(),this.playing=!0,this._startMotion(u),!0):(l&&(Ms.dispose(l),this.currentAudio=void 0),!1)})}startRandomMotion(t,e){return ke(this,null,function*(){const n=this.definitions[t];if(n!=null&&n.length){const i=[];for(let s=0;se.index>=0);for(const e of t)this.hitAreas[e.name]=e}hitTest(t,e){return Object.keys(this.hitAreas).filter(n=>this.isHit(n,t,e))}isHit(t,e,n){if(!this.hitAreas[t])return!1;const i=this.hitAreas[t].index,s=this.getDrawableBounds(i,SC);return s.x<=e&&e<=s.x+s.width&&s.y<=n&&n<=s.y+s.height}getDrawableBounds(t,e){const n=this.getDrawableVertices(t);let i=n[0],s=n[0],o=n[1],a=n[1];for(let l=0;l{(s.status===200||s.status===0)&&s.response?n(s.response):s.onerror()},s.onerror=()=>{Ee.warn(IC,`Failed to load resource as ${s.responseType} (Status ${s.status}): ${t}`),i(new Ey("Network error.",t,s.status))},s.onabort=()=>i(new Ey("Aborted.",t,s.status,!0)),s.onloadend=()=>{var o;_r.allXhrSet.delete(s),r&&((o=_r.xhrMap.get(r))==null||o.delete(s))},s}static cancelXHRs(){var r;(r=_r.xhrMap.get(this))==null||r.forEach(t=>{t.abort(),_r.allXhrSet.delete(t)}),_r.xhrMap.delete(this)}static release(){_r.allXhrSet.forEach(r=>r.abort()),_r.allXhrSet.clear(),_r.xhrMap=new WeakMap}};let zc=_r;zc.xhrMap=new WeakMap;zc.allXhrSet=new Set;zc.loader=(r,t)=>new Promise((e,n)=>{_r.createXHR(r.target,r.settings?r.settings.resolveURL(r.url):r.url,r.type,s=>{r.result=s,e()},n).send()});function Qx(r,t){let e=-1;return n(0);function n(i,s){if(s)return Promise.reject(s);if(i<=e)return Promise.reject(new Error("next() called multiple times"));e=i;const o=r[i];if(!o)return Promise.resolve();try{return Promise.resolve(o(t,n.bind(null,i+1)))}catch(a){return Promise.reject(a)}}}class $i{static load(t){return Qx(this.middlewares,t).then(()=>t.result)}}$i.middlewares=[zc.loader];function MC(r,t={}){var e;const n={resourceOptions:{crossorigin:t.crossOrigin}};if(Ds.fromURL)return Ds.fromURL(r,n).catch(o=>{if(o instanceof Error)throw o;const a=new Error("Texture loading error");throw a.event=o,a});n.resourceOptions.autoLoad=!1;const i=Ds.from(r,n);if(i.baseTexture.valid)return Promise.resolve(i);const s=i.baseTexture.resource;return(e=s._live2d_load)!=null||(s._live2d_load=new Promise((o,a)=>{const l=u=>{s.source.removeEventListener("error",l);const c=new Error("Texture loading error");c.event=u,a(c)};s.source.addEventListener("error",l),s.load().then(()=>o(i)).catch(l)})),s._live2d_load}const Ay="Live2DFactory",Zx=(r,t)=>ke(void 0,null,function*(){if(typeof r.source=="string"){const e=yield $i.load({url:r.source,type:"json",target:r.live2dModel});e.url=r.source,r.source=e,r.live2dModel.emit("settingsJSONLoaded",e)}return t()}),Kx=(r,t)=>ke(void 0,null,function*(){if(r.source instanceof dm)return r.settings=r.source,t();if(typeof r.source=="object"){const e=je.findRuntime(r.source);if(e){const n=e.createModelSettings(r.source);return r.settings=n,r.live2dModel.emit("settingsLoaded",n),t()}}throw new TypeError("Unknown settings format.")}),Jx=(r,t)=>{if(r.settings){const e=je.findRuntime(r.settings);if(e)return e.ready().then(t)}return t()},tw=(r,t)=>ke(void 0,null,function*(){yield t();const e=r.internalModel;if(e){const n=r.settings,i=je.findRuntime(n);if(i){const s=[];n.pose&&s.push($i.load({settings:n,url:n.pose,type:"json",target:e}).then(o=>{e.pose=i.createPose(e.coreModel,o),r.live2dModel.emit("poseLoaded",e.pose)}).catch(o=>{r.live2dModel.emit("poseLoadError",o),Ee.warn(Ay,"Failed to load pose.",o)})),n.physics&&s.push($i.load({settings:n,url:n.physics,type:"json",target:e}).then(o=>{e.physics=i.createPhysics(e.coreModel,o),r.live2dModel.emit("physicsLoaded",e.physics)}).catch(o=>{r.live2dModel.emit("physicsLoadError",o),Ee.warn(Ay,"Failed to load physics.",o)})),s.length&&(yield Promise.all(s))}}}),ew=(r,t)=>ke(void 0,null,function*(){if(r.settings){const e=r.live2dModel,n=r.settings.textures.map(i=>{const s=r.settings.resolveURL(i);return MC(s,{crossOrigin:r.options.crossOrigin})});if(yield t(),r.internalModel)e.internalModel=r.internalModel,e.emit("modelLoaded",r.internalModel);else throw new TypeError("Missing internal model.");e.textures=yield Promise.all(n),e.emit("textureLoaded",e.textures)}else throw new TypeError("Missing settings.")}),rw=(r,t)=>ke(void 0,null,function*(){const e=r.settings;if(e instanceof dm){const n=je.findRuntime(e);if(!n)throw new TypeError("Unknown model settings.");const i=yield $i.load({settings:e,url:e.moc,type:"arraybuffer",target:r.live2dModel});if(!n.isValidMoc(i))throw new Error("Invalid moc data");const s=n.createCoreModel(i);return r.internalModel=n.createInternalModel(s,e,r.options),t()}throw new TypeError("Missing settings.")}),or=class{static registerRuntime(r){or.runtimes.push(r),or.runtimes.sort((t,e)=>e.version-t.version)}static findRuntime(r){for(const t of or.runtimes)if(t.test(r))return t}static setupLive2DModel(r,t,e){return ke(this,null,function*(){const n=new Promise(o=>r.once("textureLoaded",o)),i=new Promise(o=>r.once("modelLoaded",o)),s=Promise.all([n,i]).then(()=>r.emit("ready"));yield Qx(or.live2DModelMiddlewares,{live2dModel:r,source:t,options:e||{}}),yield s,r.emit("load")})}static loadMotion(r,t,e){var n,i;const s=o=>r.emit("motionLoadError",t,e,o);try{const o=(n=r.definitions[t])==null?void 0:n[e];if(!o)return Promise.resolve(void 0);r.listeners("destroy").includes(or.releaseTasks)||r.once("destroy",or.releaseTasks);let a=or.motionTasksMap.get(r);a||(a={},or.motionTasksMap.set(r,a));let l=a[t];l||(l=[],a[t]=l);const u=r.getMotionFile(o);return(i=l[e])!=null||(l[e]=$i.load({url:u,settings:r.settings,type:r.motionDataType,target:r}).then(c=>{var h;const f=(h=or.motionTasksMap.get(r))==null?void 0:h[t];f&&delete f[e];const d=r.createMotion(c,t,o);return r.emit("motionLoaded",t,e,d),d}).catch(c=>{Ee.warn(r.tag,`Failed to load motion: ${u} `,c),s(c)})),l[e]}catch(o){Ee.warn(r.tag,`Failed to load motion at "${t}"[${e}] `,o),s(o)}return Promise.resolve(void 0)}static loadExpression(r,t){var e;const n=i=>r.emit("expressionLoadError",t,i);try{const i=r.definitions[t];if(!i)return Promise.resolve(void 0);r.listeners("destroy").includes(or.releaseTasks)||r.once("destroy",or.releaseTasks);let s=or.expressionTasksMap.get(r);s||(s=[],or.expressionTasksMap.set(r,s));const o=r.getExpressionFile(i);return(e=s[t])!=null||(s[t]=$i.load({url:o,settings:r.settings,type:"json",target:r}).then(a=>{const l=or.expressionTasksMap.get(r);l&&delete l[t];const u=r.createExpression(a,i);return r.emit("expressionLoaded",t,u),u}).catch(a=>{Ee.warn(r.tag,`Failed to load expression: ${o} `,a),n(a)})),s[t]}catch(i){Ee.warn(r.tag,`Failed to load expression at [${t}] -`,i),n(i)}return Promise.resolve(void 0)}static releaseTasks(){this instanceof fm?or.motionTasksMap.delete(this):or.expressionTasksMap.delete(this)}};let je=or;je.runtimes=[];je.urlToJSON=Zx;je.jsonToSettings=Kx;je.waitUntilReady=Jx;je.setupOptionals=tw;je.setupEssentials=ew;je.createInternalModel=rw;je.live2DModelMiddlewares=[Zx,Kx,Jx,tw,ew,rw];je.motionTasksMap=new WeakMap;je.expressionTasksMap=new WeakMap;fm.prototype._loadMotion=function(r,t){return je.loadMotion(this,r,t)};qx.prototype._loadExpression=function(r){return je.loadExpression(this,r)};class EC{constructor(){this._autoInteract=!1}get autoInteract(){return this._autoInteract}set autoInteract(t){t!==this._autoInteract&&(t?this.on("pointertap",Cy,this):this.off("pointertap",Cy,this),this._autoInteract=t)}registerInteraction(t){t!==this.interactionManager&&(this.unregisterInteraction(),this._autoInteract&&t&&(this.interactionManager=t,t.on("pointermove",Oy,this)))}unregisterInteraction(){var t;this.interactionManager&&((t=this.interactionManager)==null||t.off("pointermove",Oy,this),this.interactionManager=void 0)}}function Cy(r){this.tap(r.data.global.x,r.data.global.y)}function Oy(r){this.focus(r.data.global.x,r.data.global.y)}class AC extends Ix{}const Qr=new De,CC=new hr;let Ci;class OC extends Lu{constructor(t){super(),this.tag="Live2DModel(uninitialized)",this.textures=[],this.transform=new AC,this.anchor=new Co(this.onAnchorChange,this,0,0),this.glContextID=-1,this.elapsedTime=performance.now(),this.deltaTime=0,this._autoUpdate=!1,this.once("modelLoaded",()=>this.init(t))}static from(t,e){const n=new this(e);return je.setupLive2DModel(n,t,e).then(()=>n)}static fromSync(t,e){const n=new this(e);return je.setupLive2DModel(n,t,e).then(e==null?void 0:e.onLoad).catch(e==null?void 0:e.onError),n}static registerTicker(t){Ci=t}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){var e;Ci||(Ci=(e=window.PIXI)==null?void 0:e.Ticker),t?this._destroyed||(Ci?(Ci.shared.add(this.onTickerUpdate,this),this._autoUpdate=!0):Ee.warn(this.tag,"No Ticker registered, please call Live2DModel.registerTicker(Ticker).")):(Ci==null||Ci.shared.remove(this.onTickerUpdate,this),this._autoUpdate=!1)}init(t){this.tag=`Live2DModel(${this.internalModel.settings.name})`;const e=Object.assign({autoUpdate:!0,autoInteract:!0},t);e.autoInteract&&(this.interactive=!0),this.autoInteract=e.autoInteract,this.autoUpdate=e.autoUpdate}onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width,this.anchor.y*this.internalModel.height)}motion(t,e,n){return e===void 0?this.internalModel.motionManager.startRandomMotion(t,n):this.internalModel.motionManager.startMotion(t,e,n)}expression(t){return this.internalModel.motionManager.expressionManager?t===void 0?this.internalModel.motionManager.expressionManager.setRandomExpression():this.internalModel.motionManager.expressionManager.setExpression(t):Promise.resolve(!1)}focus(t,e,n=!1){Qr.x=t,Qr.y=e,this.toModelPosition(Qr,Qr,!0);let i=Qr.x/this.internalModel.originalWidth*2-1,s=Qr.y/this.internalModel.originalHeight*2-1,o=Math.atan2(s,i);this.internalModel.focusController.focus(Math.cos(o),-Math.sin(o),n)}tap(t,e){const n=this.hitTest(t,e);n.length&&(Ee.log(this.tag,"Hit",n),this.emit("hit",n))}hitTest(t,e){return Qr.x=t,Qr.y=e,this.toModelPosition(Qr,Qr),this.internalModel.hitTest(Qr.x,Qr.y)}toModelPosition(t,e=t.clone(),n){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.transform.worldTransform.applyInverse(t,e),this.internalModel.localTransform.applyInverse(e,e),e}containsPoint(t){return this.getBounds(!0).contains(t.x,t.y)}_calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.internalModel.width,this.internalModel.height)}onTickerUpdate(){this.update(Ci.shared.deltaMS)}update(t){this.deltaTime+=t,this.elapsedTime+=t}_render(t){this.registerInteraction(t.plugins.interaction),t.batch.reset(),t.geometry.reset(),t.shader.reset(),t.state.reset();let e=!1;this.glContextID!==t.CONTEXT_UID&&(this.glContextID=t.CONTEXT_UID,this.internalModel.updateWebGLContext(t.gl,this.glContextID),e=!0);for(let s=0;se.destroy(t.baseTexture)),this.internalModel.destroy(),super.destroy(t)}}Yx(OC,[EC]);const Bn=class{static resolveURL(r,t){var e;const n=(e=Bn.filesMap[r])==null?void 0:e[t];if(n===void 0)throw new Error("Cannot find this file from uploaded files: "+t);return n}static upload(r,t){return ke(this,null,function*(){const e={};for(const n of t.getDefinedFiles()){const i=decodeURI(kc.resolve(t.url,n)),s=r.find(o=>o.webkitRelativePath===i);s&&(e[n]=URL.createObjectURL(s))}Bn.filesMap[t._objectURL]=e})}static createSettings(r){return ke(this,null,function*(){const t=r.find(o=>o.name.endsWith("model.json")||o.name.endsWith("model3.json"));if(!t)throw new TypeError("Settings file not found");const e=yield Bn.readText(t),n=JSON.parse(e);n.url=t.webkitRelativePath;const i=je.findRuntime(n);if(!i)throw new Error("Unknown settings JSON");const s=i.createModelSettings(n);return s._objectURL=URL.createObjectURL(t),s})}static readText(r){return ke(this,null,function*(){return new Promise((t,e)=>{const n=new FileReader;n.onload=()=>t(n.result),n.onerror=e,n.readAsText(r,"utf8")})})}};let pm=Bn;pm.filesMap={};pm.factory=(r,t)=>ke(void 0,null,function*(){if(Array.isArray(r.source)&&r.source[0]instanceof File){const e=r.source;let n=e.settings;if(!n)n=yield Bn.createSettings(e);else if(!n._objectURL)throw new Error('"_objectURL" must be specified in ModelSettings');n.validateFiles(e.map(i=>encodeURI(i.webkitRelativePath))),yield Bn.upload(e,n),n.resolveURL=function(i){return Bn.resolveURL(this._objectURL,i)},r.source=n,r.live2dModel.once("modelLoaded",i=>{i.once("destroy",function(){const s=this.settings._objectURL;if(URL.revokeObjectURL(s),Bn.filesMap[s])for(const o of Object.values(Bn.filesMap[s]))URL.revokeObjectURL(o);delete Bn.filesMap[s]})})}return t()});je.live2DModelMiddlewares.unshift(pm.factory);const Ir=class{static unzip(r,t){return ke(this,null,function*(){const e=yield Ir.getFilePaths(r),n=[];for(const s of t.getDefinedFiles()){const o=decodeURI(kc.resolve(t.url,s));e.includes(o)&&n.push(o)}const i=yield Ir.getFiles(r,n);for(let s=0;so.endsWith("model.json")||o.endsWith("model3.json"));if(!e)throw new Error("Settings file not found");const n=yield Ir.readText(r,e);if(!n)throw new Error("Empty settings file: "+e);const i=JSON.parse(n);i.url=e;const s=je.findRuntime(i);if(!s)throw new Error("Unknown settings JSON");return s.createModelSettings(i)})}static zipReader(r,t){return ke(this,null,function*(){throw new Error("Not implemented")})}static getFilePaths(r){return ke(this,null,function*(){throw new Error("Not implemented")})}static getFiles(r,t){return ke(this,null,function*(){throw new Error("Not implemented")})}static readText(r,t){return ke(this,null,function*(){throw new Error("Not implemented")})}static releaseReader(r){}};let ei=Ir;ei.ZIP_PROTOCOL="zip://";ei.uid=0;ei.factory=(r,t)=>ke(void 0,null,function*(){const e=r.source;let n,i,s;if(typeof e=="string"&&(e.endsWith(".zip")||e.startsWith(Ir.ZIP_PROTOCOL))?(e.startsWith(Ir.ZIP_PROTOCOL)?n=e.slice(Ir.ZIP_PROTOCOL.length):n=e,i=yield $i.load({url:n,type:"blob",target:r.live2dModel})):Array.isArray(e)&&e.length===1&&e[0]instanceof File&&e[0].name.endsWith(".zip")&&(i=e[0],n=URL.createObjectURL(i),s=e.settings),i){if(!i.size)throw new Error("Empty zip file");const o=yield Ir.zipReader(i,n);s||(s=yield Ir.createSettings(o)),s._objectURL=Ir.ZIP_PROTOCOL+Ir.uid+"/"+s.url;const a=yield Ir.unzip(o,s);a.settings=s,r.source=a,n.startsWith("blob:")&&r.live2dModel.once("modelLoaded",l=>{l.once("destroy",function(){URL.revokeObjectURL(n)})}),Ir.releaseReader(o)}return t()});je.live2DModelMiddlewares.unshift(ei.factory);if(!window.Live2DCubismCore)throw new Error("Could not find Cubism 4 runtime. This plugin requires live2dcubismcore.js to be loaded.");class PC extends qx{constructor(t,e){var n;super(t,e),this.queueManager=new Gx,this.definitions=(n=t.expressions)!=null?n:[],this.init()}isFinished(){return this.queueManager.isFinished()}getExpressionIndex(t){return this.definitions.findIndex(e=>e.Name===t)}getExpressionFile(t){return t.File}createExpression(t,e){return am.create(t)}_setExpression(t){return this.queueManager.startMotion(t,!1,performance.now())}stopAllExpressions(){this.queueManager.stopAllMotions()}updateParameters(t,e){return this.queueManager.doUpdateMotion(t,e)}}class Ns extends dm{constructor(t){if(super(t),!Ns.isValidJSON(t))throw new TypeError("Invalid JSON.");Object.assign(this,new Xx(t))}static isValidJSON(t){var e;return!!(t!=null&&t.FileReferences)&&typeof t.FileReferences.Moc=="string"&&((e=t.FileReferences.Textures)==null?void 0:e.length)>0&&t.FileReferences.Textures.every(n=>typeof n=="string")}replaceFiles(t){if(super.replaceFiles(t),this.motions)for(const[e,n]of Object.entries(this.motions))for(let i=0;i{this.emit("motion:"+n)})}isFinished(){return this.queueManager.isFinished()}_startMotion(t,e){return t.setFinishedMotionHandler(e),this.queueManager.stopAllMotions(),this.queueManager.startMotion(t,!1,performance.now())}_stopAllMotions(){this.queueManager.stopAllMotions()}createMotion(t,e,n){const i=um.create(t),s=new $x(t),o=(e===this.groups.idle?Nr.idleMotionFadingDuration:Nr.motionFadingDuration)/1e3;return s.getMotionFadeInTime()===void 0&&i.setFadeInTime(n.FadeInTime>0?n.FadeInTime:o),s.getMotionFadeOutTime()===void 0&&i.setFadeOutTime(n.FadeOutTime>0?n.FadeOutTime:o),i.setEffectIds(this.eyeBlinkIds,this.lipSyncIds),i}getMotionFile(t){return t.File}getMotionName(t){return t.File}getSoundFile(t){return t.Sound}updateParameters(t,e){return this.queueManager.doUpdateMotion(t,e)}destroy(){super.destroy(),this.queueManager.release(),this.queueManager=void 0}}const Py=new ln;class FC extends TC{constructor(t,e,n){super(),this.lipSync=!0,this.breath=nm.create(),this.renderer=new Hx,this.idParamAngleX=lC,this.idParamAngleY=uC,this.idParamAngleZ=cC,this.idParamEyeBallX=hC,this.idParamEyeBallY=dC,this.idParamBodyAngleX=fC,this.idParamBreath=pC,this.pixelsPerUnit=1,this.centeringTransform=new hr,this.coreModel=t,this.settings=e,this.motionManager=new RC(e,n),this.init()}init(){var t;super.init(),((t=this.settings.getEyeBlinkParameters())==null?void 0:t.length)>0&&(this.eyeBlink=Vx.create(this.settings)),this.breath.setParameters([new va(this.idParamAngleX,0,15,6.5345,.5),new va(this.idParamAngleY,0,8,3.5345,.5),new va(this.idParamAngleZ,0,10,5.5345,.5),new va(this.idParamBodyAngleX,0,4,15.5345,.5),new va(this.idParamBreath,0,.5,3.2345,.5)]),this.renderer.initialize(this.coreModel),this.renderer.setIsPremultipliedAlpha(!0)}getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this.coreModel.getModel().canvasinfo.CanvasHeight]}getLayout(){const t={};if(this.settings.layout)for(const e of Object.keys(this.settings.layout)){const n=e.charAt(0).toLowerCase()+e.slice(1);t[n]=this.settings.layout[e]}return t}setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.getModel().canvasinfo.PixelsPerUnit,this.centeringTransform.scale(this.pixelsPerUnit,this.pixelsPerUnit).translate(this.originalWidth/2,this.originalHeight/2)}updateWebGLContext(t,e){this.renderer.firstDraw=!0,this.renderer._bufferData={vertex:null,uv:null,index:null},this.renderer.startUp(t),this.renderer._clippingManager._currentFrameNo=e,this.renderer._clippingManager._maskTexture=void 0,Do.getInstance()._shaderSets=[]}bindTexture(t,e){this.renderer.bindTexture(t,e)}getHitAreaDefs(){var t,e;return(e=(t=this.settings.hitAreas)==null?void 0:t.map(n=>({id:n.Id,name:n.Name,index:this.coreModel.getDrawableIndex(n.Id)})))!=null?e:[]}getDrawableIDs(){return this.coreModel.getDrawableIds()}getDrawableIndex(t){return this.coreModel.getDrawableIndex(t)}getDrawableVertices(t){if(typeof t=="string"&&(t=this.coreModel.getDrawableIndex(t),t===-1))throw new TypeError("Unable to find drawable ID: "+t);const e=this.coreModel.getDrawableVertices(t).slice();for(let n=0;n{function e(){try{LC(),r()}catch(n){if(Ry--,Ry<0){const i=new Error("Failed to start up Cubism 4 framework.");i.cause=n,t(i);return}Ee.log("Cubism4","Startup failed, retrying 10ms later..."),setTimeout(e,10)}}e()})),tu)}function LC(r){r=Object.assign({logFunction:console.log,loggingLevel:Xs.LogLevel_Verbose},r),sl.startUp(r),sl.initialize()}je.registerRuntime({version:4,ready:DC,test(r){return r instanceof Ns||Ns.isValidJSON(r)},isValidMoc(r){if(r.byteLength<4)return!1;const t=new Int8Array(r,0,4);return String.fromCharCode(...t)==="MOC3"},createModelSettings(r){return new Ns(r)},createCoreModel(r){const t=om.create(r);try{const e=t.createModel();return e.__moc=t,e}catch(e){try{t.release()}catch{}throw e}},createInternalModel(r,t,e){const n=new FC(r,t,e),i=r;return i.__moc&&(n.__moc=i.__moc,delete i.__moc,n.once("destroy",NC)),n},createPhysics(r,t){return cm.create(t)},createPose(r,t){return im.create(t)}});function NC(){var r;(r=this.__moc)==null||r.release()}/*! +`,i),n(i)}return Promise.resolve(void 0)}static releaseTasks(){this instanceof fm?or.motionTasksMap.delete(this):or.expressionTasksMap.delete(this)}};let je=or;je.runtimes=[];je.urlToJSON=Zx;je.jsonToSettings=Kx;je.waitUntilReady=Jx;je.setupOptionals=tw;je.setupEssentials=ew;je.createInternalModel=rw;je.live2DModelMiddlewares=[Zx,Kx,Jx,tw,ew,rw];je.motionTasksMap=new WeakMap;je.expressionTasksMap=new WeakMap;fm.prototype._loadMotion=function(r,t){return je.loadMotion(this,r,t)};qx.prototype._loadExpression=function(r){return je.loadExpression(this,r)};class EC{constructor(){this._autoInteract=!1}get autoInteract(){return this._autoInteract}set autoInteract(t){t!==this._autoInteract&&(t?this.on("pointertap",Cy,this):this.off("pointertap",Cy,this),this._autoInteract=t)}registerInteraction(t){t!==this.interactionManager&&(this.unregisterInteraction(),this._autoInteract&&t&&(this.interactionManager=t,t.on("pointermove",Oy,this)))}unregisterInteraction(){var t;this.interactionManager&&((t=this.interactionManager)==null||t.off("pointermove",Oy,this),this.interactionManager=void 0)}}function Cy(r){this.tap(r.data.global.x,r.data.global.y)}function Oy(r){this.focus(r.data.global.x,r.data.global.y)}class AC extends Ix{}const Qr=new Le,CC=new hr;let Ci;class OC extends Du{constructor(t){super(),this.tag="Live2DModel(uninitialized)",this.textures=[],this.transform=new AC,this.anchor=new Co(this.onAnchorChange,this,0,0),this.glContextID=-1,this.elapsedTime=performance.now(),this.deltaTime=0,this._autoUpdate=!1,this.once("modelLoaded",()=>this.init(t))}static from(t,e){const n=new this(e);return je.setupLive2DModel(n,t,e).then(()=>n)}static fromSync(t,e){const n=new this(e);return je.setupLive2DModel(n,t,e).then(e==null?void 0:e.onLoad).catch(e==null?void 0:e.onError),n}static registerTicker(t){Ci=t}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){var e;Ci||(Ci=(e=window.PIXI)==null?void 0:e.Ticker),t?this._destroyed||(Ci?(Ci.shared.add(this.onTickerUpdate,this),this._autoUpdate=!0):Ee.warn(this.tag,"No Ticker registered, please call Live2DModel.registerTicker(Ticker).")):(Ci==null||Ci.shared.remove(this.onTickerUpdate,this),this._autoUpdate=!1)}init(t){this.tag=`Live2DModel(${this.internalModel.settings.name})`;const e=Object.assign({autoUpdate:!0,autoInteract:!0},t);e.autoInteract&&(this.interactive=!0),this.autoInteract=e.autoInteract,this.autoUpdate=e.autoUpdate}onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width,this.anchor.y*this.internalModel.height)}motion(t,e,n){return e===void 0?this.internalModel.motionManager.startRandomMotion(t,n):this.internalModel.motionManager.startMotion(t,e,n)}expression(t){return this.internalModel.motionManager.expressionManager?t===void 0?this.internalModel.motionManager.expressionManager.setRandomExpression():this.internalModel.motionManager.expressionManager.setExpression(t):Promise.resolve(!1)}focus(t,e,n=!1){Qr.x=t,Qr.y=e,this.toModelPosition(Qr,Qr,!0);let i=Qr.x/this.internalModel.originalWidth*2-1,s=Qr.y/this.internalModel.originalHeight*2-1,o=Math.atan2(s,i);this.internalModel.focusController.focus(Math.cos(o),-Math.sin(o),n)}tap(t,e){const n=this.hitTest(t,e);n.length&&(Ee.log(this.tag,"Hit",n),this.emit("hit",n))}hitTest(t,e){return Qr.x=t,Qr.y=e,this.toModelPosition(Qr,Qr),this.internalModel.hitTest(Qr.x,Qr.y)}toModelPosition(t,e=t.clone(),n){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.transform.worldTransform.applyInverse(t,e),this.internalModel.localTransform.applyInverse(e,e),e}containsPoint(t){return this.getBounds(!0).contains(t.x,t.y)}_calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.internalModel.width,this.internalModel.height)}onTickerUpdate(){this.update(Ci.shared.deltaMS)}update(t){this.deltaTime+=t,this.elapsedTime+=t}_render(t){this.registerInteraction(t.plugins.interaction),t.batch.reset(),t.geometry.reset(),t.shader.reset(),t.state.reset();let e=!1;this.glContextID!==t.CONTEXT_UID&&(this.glContextID=t.CONTEXT_UID,this.internalModel.updateWebGLContext(t.gl,this.glContextID),e=!0);for(let s=0;se.destroy(t.baseTexture)),this.internalModel.destroy(),super.destroy(t)}}Yx(OC,[EC]);const Bn=class{static resolveURL(r,t){var e;const n=(e=Bn.filesMap[r])==null?void 0:e[t];if(n===void 0)throw new Error("Cannot find this file from uploaded files: "+t);return n}static upload(r,t){return ke(this,null,function*(){const e={};for(const n of t.getDefinedFiles()){const i=decodeURI(kc.resolve(t.url,n)),s=r.find(o=>o.webkitRelativePath===i);s&&(e[n]=URL.createObjectURL(s))}Bn.filesMap[t._objectURL]=e})}static createSettings(r){return ke(this,null,function*(){const t=r.find(o=>o.name.endsWith("model.json")||o.name.endsWith("model3.json"));if(!t)throw new TypeError("Settings file not found");const e=yield Bn.readText(t),n=JSON.parse(e);n.url=t.webkitRelativePath;const i=je.findRuntime(n);if(!i)throw new Error("Unknown settings JSON");const s=i.createModelSettings(n);return s._objectURL=URL.createObjectURL(t),s})}static readText(r){return ke(this,null,function*(){return new Promise((t,e)=>{const n=new FileReader;n.onload=()=>t(n.result),n.onerror=e,n.readAsText(r,"utf8")})})}};let pm=Bn;pm.filesMap={};pm.factory=(r,t)=>ke(void 0,null,function*(){if(Array.isArray(r.source)&&r.source[0]instanceof File){const e=r.source;let n=e.settings;if(!n)n=yield Bn.createSettings(e);else if(!n._objectURL)throw new Error('"_objectURL" must be specified in ModelSettings');n.validateFiles(e.map(i=>encodeURI(i.webkitRelativePath))),yield Bn.upload(e,n),n.resolveURL=function(i){return Bn.resolveURL(this._objectURL,i)},r.source=n,r.live2dModel.once("modelLoaded",i=>{i.once("destroy",function(){const s=this.settings._objectURL;if(URL.revokeObjectURL(s),Bn.filesMap[s])for(const o of Object.values(Bn.filesMap[s]))URL.revokeObjectURL(o);delete Bn.filesMap[s]})})}return t()});je.live2DModelMiddlewares.unshift(pm.factory);const Ir=class{static unzip(r,t){return ke(this,null,function*(){const e=yield Ir.getFilePaths(r),n=[];for(const s of t.getDefinedFiles()){const o=decodeURI(kc.resolve(t.url,s));e.includes(o)&&n.push(o)}const i=yield Ir.getFiles(r,n);for(let s=0;so.endsWith("model.json")||o.endsWith("model3.json"));if(!e)throw new Error("Settings file not found");const n=yield Ir.readText(r,e);if(!n)throw new Error("Empty settings file: "+e);const i=JSON.parse(n);i.url=e;const s=je.findRuntime(i);if(!s)throw new Error("Unknown settings JSON");return s.createModelSettings(i)})}static zipReader(r,t){return ke(this,null,function*(){throw new Error("Not implemented")})}static getFilePaths(r){return ke(this,null,function*(){throw new Error("Not implemented")})}static getFiles(r,t){return ke(this,null,function*(){throw new Error("Not implemented")})}static readText(r,t){return ke(this,null,function*(){throw new Error("Not implemented")})}static releaseReader(r){}};let ei=Ir;ei.ZIP_PROTOCOL="zip://";ei.uid=0;ei.factory=(r,t)=>ke(void 0,null,function*(){const e=r.source;let n,i,s;if(typeof e=="string"&&(e.endsWith(".zip")||e.startsWith(Ir.ZIP_PROTOCOL))?(e.startsWith(Ir.ZIP_PROTOCOL)?n=e.slice(Ir.ZIP_PROTOCOL.length):n=e,i=yield $i.load({url:n,type:"blob",target:r.live2dModel})):Array.isArray(e)&&e.length===1&&e[0]instanceof File&&e[0].name.endsWith(".zip")&&(i=e[0],n=URL.createObjectURL(i),s=e.settings),i){if(!i.size)throw new Error("Empty zip file");const o=yield Ir.zipReader(i,n);s||(s=yield Ir.createSettings(o)),s._objectURL=Ir.ZIP_PROTOCOL+Ir.uid+"/"+s.url;const a=yield Ir.unzip(o,s);a.settings=s,r.source=a,n.startsWith("blob:")&&r.live2dModel.once("modelLoaded",l=>{l.once("destroy",function(){URL.revokeObjectURL(n)})}),Ir.releaseReader(o)}return t()});je.live2DModelMiddlewares.unshift(ei.factory);if(!window.Live2DCubismCore)throw new Error("Could not find Cubism 4 runtime. This plugin requires live2dcubismcore.js to be loaded.");class PC extends qx{constructor(t,e){var n;super(t,e),this.queueManager=new Gx,this.definitions=(n=t.expressions)!=null?n:[],this.init()}isFinished(){return this.queueManager.isFinished()}getExpressionIndex(t){return this.definitions.findIndex(e=>e.Name===t)}getExpressionFile(t){return t.File}createExpression(t,e){return am.create(t)}_setExpression(t){return this.queueManager.startMotion(t,!1,performance.now())}stopAllExpressions(){this.queueManager.stopAllMotions()}updateParameters(t,e){return this.queueManager.doUpdateMotion(t,e)}}class Ns extends dm{constructor(t){if(super(t),!Ns.isValidJSON(t))throw new TypeError("Invalid JSON.");Object.assign(this,new Xx(t))}static isValidJSON(t){var e;return!!(t!=null&&t.FileReferences)&&typeof t.FileReferences.Moc=="string"&&((e=t.FileReferences.Textures)==null?void 0:e.length)>0&&t.FileReferences.Textures.every(n=>typeof n=="string")}replaceFiles(t){if(super.replaceFiles(t),this.motions)for(const[e,n]of Object.entries(this.motions))for(let i=0;i{this.emit("motion:"+n)})}isFinished(){return this.queueManager.isFinished()}_startMotion(t,e){return t.setFinishedMotionHandler(e),this.queueManager.stopAllMotions(),this.queueManager.startMotion(t,!1,performance.now())}_stopAllMotions(){this.queueManager.stopAllMotions()}createMotion(t,e,n){const i=um.create(t),s=new $x(t),o=(e===this.groups.idle?Nr.idleMotionFadingDuration:Nr.motionFadingDuration)/1e3;return s.getMotionFadeInTime()===void 0&&i.setFadeInTime(n.FadeInTime>0?n.FadeInTime:o),s.getMotionFadeOutTime()===void 0&&i.setFadeOutTime(n.FadeOutTime>0?n.FadeOutTime:o),i.setEffectIds(this.eyeBlinkIds,this.lipSyncIds),i}getMotionFile(t){return t.File}getMotionName(t){return t.File}getSoundFile(t){return t.Sound}updateParameters(t,e){return this.queueManager.doUpdateMotion(t,e)}destroy(){super.destroy(),this.queueManager.release(),this.queueManager=void 0}}const Py=new ln;class FC extends TC{constructor(t,e,n){super(),this.lipSync=!0,this.breath=nm.create(),this.renderer=new Hx,this.idParamAngleX=lC,this.idParamAngleY=uC,this.idParamAngleZ=cC,this.idParamEyeBallX=hC,this.idParamEyeBallY=dC,this.idParamBodyAngleX=fC,this.idParamBreath=pC,this.pixelsPerUnit=1,this.centeringTransform=new hr,this.coreModel=t,this.settings=e,this.motionManager=new RC(e,n),this.init()}init(){var t;super.init(),((t=this.settings.getEyeBlinkParameters())==null?void 0:t.length)>0&&(this.eyeBlink=Vx.create(this.settings)),this.breath.setParameters([new va(this.idParamAngleX,0,15,6.5345,.5),new va(this.idParamAngleY,0,8,3.5345,.5),new va(this.idParamAngleZ,0,10,5.5345,.5),new va(this.idParamBodyAngleX,0,4,15.5345,.5),new va(this.idParamBreath,0,.5,3.2345,.5)]),this.renderer.initialize(this.coreModel),this.renderer.setIsPremultipliedAlpha(!0)}getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this.coreModel.getModel().canvasinfo.CanvasHeight]}getLayout(){const t={};if(this.settings.layout)for(const e of Object.keys(this.settings.layout)){const n=e.charAt(0).toLowerCase()+e.slice(1);t[n]=this.settings.layout[e]}return t}setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.getModel().canvasinfo.PixelsPerUnit,this.centeringTransform.scale(this.pixelsPerUnit,this.pixelsPerUnit).translate(this.originalWidth/2,this.originalHeight/2)}updateWebGLContext(t,e){this.renderer.firstDraw=!0,this.renderer._bufferData={vertex:null,uv:null,index:null},this.renderer.startUp(t),this.renderer._clippingManager._currentFrameNo=e,this.renderer._clippingManager._maskTexture=void 0,Lo.getInstance()._shaderSets=[]}bindTexture(t,e){this.renderer.bindTexture(t,e)}getHitAreaDefs(){var t,e;return(e=(t=this.settings.hitAreas)==null?void 0:t.map(n=>({id:n.Id,name:n.Name,index:this.coreModel.getDrawableIndex(n.Id)})))!=null?e:[]}getDrawableIDs(){return this.coreModel.getDrawableIds()}getDrawableIndex(t){return this.coreModel.getDrawableIndex(t)}getDrawableVertices(t){if(typeof t=="string"&&(t=this.coreModel.getDrawableIndex(t),t===-1))throw new TypeError("Unable to find drawable ID: "+t);const e=this.coreModel.getDrawableVertices(t).slice();for(let n=0;n{function e(){try{DC(),r()}catch(n){if(Ry--,Ry<0){const i=new Error("Failed to start up Cubism 4 framework.");i.cause=n,t(i);return}Ee.log("Cubism4","Startup failed, retrying 10ms later..."),setTimeout(e,10)}}e()})),tu)}function DC(r){r=Object.assign({logFunction:console.log,loggingLevel:Xs.LogLevel_Verbose},r),sl.startUp(r),sl.initialize()}je.registerRuntime({version:4,ready:LC,test(r){return r instanceof Ns||Ns.isValidJSON(r)},isValidMoc(r){if(r.byteLength<4)return!1;const t=new Int8Array(r,0,4);return String.fromCharCode(...t)==="MOC3"},createModelSettings(r){return new Ns(r)},createCoreModel(r){const t=om.create(r);try{const e=t.createModel();return e.__moc=t,e}catch(e){try{t.release()}catch{}throw e}},createInternalModel(r,t,e){const n=new FC(r,t,e),i=r;return i.__moc&&(n.__moc=i.__moc,delete i.__moc,n.once("destroy",NC)),n},createPhysics(r,t){return cm.create(t)},createPose(r,t){return im.create(t)}});function NC(){var r;(r=this.__moc)==null||r.release()}/*! * @pixi/interaction - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/interaction is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var Fy=function(){function r(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new De,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(r.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),r.prototype.getLocalPosition=function(t,e,n){return t.worldTransform.applyInverse(n||this.global,e)},r.prototype.copyEvent=function(t){"isPrimary"in t&&t.isPrimary&&(this.isPrimary=!0),this.button="button"in t&&t.button;var e="buttons"in t&&t.buttons;this.buttons=Number.isInteger(e)?e:"which"in t&&t.which,this.width="width"in t&&t.width,this.height="height"in t&&t.height,this.tiltX="tiltX"in t&&t.tiltX,this.tiltY="tiltY"in t&&t.tiltY,this.pointerType="pointerType"in t&&t.pointerType,this.pressure="pressure"in t&&t.pressure,this.rotationAngle="rotationAngle"in t&&t.rotationAngle,this.twist="twist"in t&&t.twist||0,this.tangentialPressure="tangentialPressure"in t&&t.tangentialPressure||0},r.prototype.reset=function(){this.isPrimary=!1},r}();/*! ***************************************************************************** + */var Fy=function(){function r(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new Le,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(r.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),r.prototype.getLocalPosition=function(t,e,n){return t.worldTransform.applyInverse(n||this.global,e)},r.prototype.copyEvent=function(t){"isPrimary"in t&&t.isPrimary&&(this.isPrimary=!0),this.button="button"in t&&t.button;var e="buttons"in t&&t.buttons;this.buttons=Number.isInteger(e)?e:"which"in t&&t.which,this.width="width"in t&&t.width,this.height="height"in t&&t.height,this.tiltX="tiltX"in t&&t.tiltX,this.tiltY="tiltY"in t&&t.tiltY,this.pointerType="pointerType"in t&&t.pointerType,this.pressure="pressure"in t&&t.pressure,this.rotationAngle="rotationAngle"in t&&t.rotationAngle,this.twist="twist"in t&&t.twist||0,this.tangentialPressure="tangentialPressure"in t&&t.tangentialPressure||0},r.prototype.reset=function(){this.isPrimary=!1},r}();/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -594,15 +594,15 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var _f=function(r,t){return _f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])},_f(r,t)};function BC(r,t){_f(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var kC=function(){function r(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return r.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},r.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},r}(),ed=function(){function r(t){this._pointerId=t,this._flags=r.FLAGS.NONE}return r.prototype._doSet=function(t,e){e?this._flags=this._flags|t:this._flags=this._flags&~t},Object.defineProperty(r.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"flags",{get:function(){return this._flags},set:function(t){this._flags=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"none",{get:function(){return this._flags===r.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"over",{get:function(){return(this._flags&r.FLAGS.OVER)!==0},set:function(t){this._doSet(r.FLAGS.OVER,t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rightDown",{get:function(){return(this._flags&r.FLAGS.RIGHT_DOWN)!==0},set:function(t){this._doSet(r.FLAGS.RIGHT_DOWN,t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"leftDown",{get:function(){return(this._flags&r.FLAGS.LEFT_DOWN)!==0},set:function(t){this._doSet(r.FLAGS.LEFT_DOWN,t)},enumerable:!1,configurable:!0}),r.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),r}(),UC=function(){function r(){this._tempPoint=new De}return r.prototype.recursiveFindHit=function(t,e,n,i,s){var o;if(!e||!e.visible)return!1;var a=t.data.global;s=e.interactive||s;var l=!1,u=s,c=!0;if(e.hitArea)i&&(e.worldTransform.applyInverse(a,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?l=!0:(i=!1,c=!1)),u=!1;else if(e._mask&&i){var h=e._mask.isMaskData?e._mask.maskObject:e._mask;h&&!(!((o=h.containsPoint)===null||o===void 0)&&o.call(h,a))&&(i=!1)}if(c&&e.interactiveChildren&&e.children)for(var f=e.children,d=f.length-1;d>=0;d--){var m=f[d],g=this.recursiveFindHit(t,m,n,i,u);if(g){if(!m.parent)continue;u=!1,g&&(t.target&&(i=!1),l=!0)}}return s&&(i&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(a)&&(l=!0),e.interactive&&(l&&!t.target&&(t.target=e),n&&n(t,e,!!l))),l},r.prototype.findHit=function(t,e,n,i){this.recursiveFindHit(t,e,n,i,!1)},r}(),zC={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor==="pointer"},set buttonMode(r){r?this.cursor="pointer":this.cursor==="pointer"&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};il.mixin(zC);var eu=1,ru={target:null,data:{global:null}},n8=function(r){BC(t,r);function t(e,n){var i=r.call(this)||this;return n=n||{},i.renderer=e,i.autoPreventDefault=n.autoPreventDefault!==void 0?n.autoPreventDefault:!0,i.interactionFrequency=n.interactionFrequency||10,i.mouse=new Fy,i.mouse.identifier=eu,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[eu]=i.mouse,i.interactionDataPool=[],i.eventData=new kC,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!("PointerEvent"in globalThis),i.supportsTouchEvents="ontouchstart"in globalThis,i.supportsPointerEvents=!!globalThis.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new UC,i._tempDisplayObject=new zx,i._eventListenerOptions={capture:!0,passive:!1},i._useSystemTicker=n.useSystemTicker!==void 0?n.useSystemTicker:!0,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return Object.defineProperty(t.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(e){this._useSystemTicker=e,e?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(e,n){return ru.target=null,ru.data.global=e,n||(n=this.lastObjectRendered),this.processInteractive(ru,n,null,!0),ru.target},t.prototype.setTargetElement=function(e,n){n===void 0&&(n=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=e,this.resolution=n,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(Nn.system.add(this.tickerUpdate,this,Wo.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(Nn.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none"),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(e){this._deltaTime+=e,!(this._deltaTime0&&(a=e.composedPath()[0]);for(var l=a!==this.interactionDOMElement?"outside":"",u=0;u"u"&&(o.button=e.touches.length?1:0),typeof o.buttons>"u"&&(o.buttons=e.touches.length?1:0),typeof o.isPrimary>"u"&&(o.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof o.width>"u"&&(o.width=o.radiusX||1),typeof o.height>"u"&&(o.height=o.radiusY||1),typeof o.tiltX>"u"&&(o.tiltX=0),typeof o.tiltY>"u"&&(o.tiltY=0),typeof o.pointerType>"u"&&(o.pointerType="touch"),typeof o.pointerId>"u"&&(o.pointerId=o.identifier||0),typeof o.pressure>"u"&&(o.pressure=o.force||.5),typeof o.twist>"u"&&(o.twist=0),typeof o.tangentialPressure>"u"&&(o.tangentialPressure=0),typeof o.layerX>"u"&&(o.layerX=o.offsetX=o.clientX),typeof o.layerY>"u"&&(o.layerY=o.offsetY=o.clientY),o.isNormalized=!0,n.push(o)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){var a=e;typeof a.isPrimary>"u"&&(a.isPrimary=!0),typeof a.width>"u"&&(a.width=1),typeof a.height>"u"&&(a.height=1),typeof a.tiltX>"u"&&(a.tiltX=0),typeof a.tiltY>"u"&&(a.tiltY=0),typeof a.pointerType>"u"&&(a.pointerType="mouse"),typeof a.pointerId>"u"&&(a.pointerId=eu),typeof a.pressure>"u"&&(a.pressure=.5),typeof a.twist>"u"&&(a.twist=0),typeof a.tangentialPressure>"u"&&(a.tangentialPressure=0),a.isNormalized=!0,n.push(a)}else n.push(e);return n},t.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},t.extension={name:"interaction",type:[hn.RendererPlugin,hn.CanvasRendererPlugin]},t}(Ji);const nw=(r,t)=>{if(typeof r=="number"){if(t===3)return{mode:"rgb",r:(r>>8&15|r>>4&240)/255,g:(r>>4&15|r&240)/255,b:(r&15|r<<4&240)/255};if(t===4)return{mode:"rgb",r:(r>>12&15|r>>8&240)/255,g:(r>>8&15|r>>4&240)/255,b:(r>>4&15|r&240)/255,alpha:(r&15|r<<4&240)/255};if(t===6)return{mode:"rgb",r:(r>>16&255)/255,g:(r>>8&255)/255,b:(r&255)/255};if(t===8)return{mode:"rgb",r:(r>>24&255)/255,g:(r>>16&255)/255,b:(r>>8&255)/255,alpha:(r&255)/255}}},VC={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},jC=r=>nw(VC[r.toLowerCase()],6),$C=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,GC=r=>{let t;return(t=r.match($C))?nw(parseInt(t[1],16),t[1].length):void 0},zi="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Ha=`${zi}%`,mm=`(?:${zi}%|${zi})`,WC=`(?:${zi}(deg|grad|rad|turn)|${zi})`,Ho="\\s*,\\s*",HC=new RegExp(`^rgba?\\(\\s*${zi}${Ho}${zi}${Ho}${zi}\\s*(?:,\\s*${mm}\\s*)?\\)$`),XC=new RegExp(`^rgba?\\(\\s*${Ha}${Ho}${Ha}${Ho}${Ha}\\s*(?:,\\s*${mm}\\s*)?\\)$`),YC=r=>{let t={mode:"rgb"},e;if(e=r.match(HC))e[1]!==void 0&&(t.r=e[1]/255),e[2]!==void 0&&(t.g=e[2]/255),e[3]!==void 0&&(t.b=e[3]/255);else if(e=r.match(XC))e[1]!==void 0&&(t.r=e[1]/100),e[2]!==void 0&&(t.g=e[2]/100),e[3]!==void 0&&(t.b=e[3]/100);else return;return e[4]!==void 0?t.alpha=Math.max(0,Math.min(1,e[4]/100)):e[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+e[5]))),t},qC=(r,t)=>r===void 0?void 0:typeof r!="object"?oO(r):r.mode!==void 0?r:t?{...r,mode:t}:void 0,QC=(r="rgb")=>t=>(t=qC(t,r))!==void 0?t.mode===r?t:kn[t.mode][r]?kn[t.mode][r](t):r==="rgb"?kn[t.mode].rgb(t):kn.rgb[r](kn[t.mode].rgb(t)):void 0,kn={},iw={},Bu=[],sw={},ZC=r=>r,we=r=>(kn[r.mode]={...kn[r.mode],...r.toMode},Object.keys(r.fromMode||{}).forEach(t=>{kn[t]||(kn[t]={}),kn[t][r.mode]=r.fromMode[t]}),r.ranges||(r.ranges={}),r.difference||(r.difference={}),r.channels.forEach(t=>{if(r.ranges[t]===void 0&&(r.ranges[t]=[0,1]),!r.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof r.interpolate[t]=="function"&&(r.interpolate[t]={use:r.interpolate[t]}),r.interpolate[t].fixup||(r.interpolate[t].fixup=ZC)}),iw[r.mode]=r,(r.parse||[]).forEach(t=>{JC(t,r.mode)}),QC(r.mode)),KC=r=>iw[r],JC=(r,t)=>{if(typeof r=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");sw[r]=t}else typeof r=="function"&&Bu.indexOf(r)<0&&Bu.push(r)},bf=/[^\x00-\x7F]|[a-zA-Z_]/,tO=/[^\x00-\x7F]|[-\w]/,dt={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Qt=0;function nu(r){let t=r[Qt],e=r[Qt+1];return t==="-"||t==="+"?/\d/.test(e)||e==="."&&/\d/.test(r[Qt+2]):t==="."?/\d/.test(e):/\d/.test(t)}function xf(r){if(Qt>=r.length)return!1;let t=r[Qt];if(bf.test(t))return!0;if(t==="-"){if(r.length-Qt<2)return!1;let e=r[Qt+1];return!!(e==="-"||bf.test(e))}return!1}const eO={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ba(r){let t="";if((r[Qt]==="-"||r[Qt]==="+")&&(t+=r[Qt++]),t+=iu(r),r[Qt]==="."&&/\d/.test(r[Qt+1])&&(t+=r[Qt++]+iu(r)),(r[Qt]==="e"||r[Qt]==="E")&&((r[Qt+1]==="-"||r[Qt+1]==="+")&&/\d/.test(r[Qt+2])?t+=r[Qt++]+r[Qt++]+iu(r):/\d/.test(r[Qt+1])&&(t+=r[Qt++]+iu(r))),xf(r)){let e=ku(r);return e==="deg"||e==="rad"||e==="turn"||e==="grad"?{type:dt.Hue,value:t*eO[e]}:void 0}return r[Qt]==="%"?(Qt++,{type:dt.Percentage,value:+t}):{type:dt.Number,value:+t}}function iu(r){let t="";for(;/\d/.test(r[Qt]);)t+=r[Qt++];return t}function ku(r){let t="";for(;Qt=0;d--){var m=f[d],g=this.recursiveFindHit(t,m,n,i,u);if(g){if(!m.parent)continue;u=!1,g&&(t.target&&(i=!1),l=!0)}}return s&&(i&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(a)&&(l=!0),e.interactive&&(l&&!t.target&&(t.target=e),n&&n(t,e,!!l))),l},r.prototype.findHit=function(t,e,n,i){this.recursiveFindHit(t,e,n,i,!1)},r}(),zC={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor==="pointer"},set buttonMode(r){r?this.cursor="pointer":this.cursor==="pointer"&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};il.mixin(zC);var eu=1,ru={target:null,data:{global:null}},n8=function(r){BC(t,r);function t(e,n){var i=r.call(this)||this;return n=n||{},i.renderer=e,i.autoPreventDefault=n.autoPreventDefault!==void 0?n.autoPreventDefault:!0,i.interactionFrequency=n.interactionFrequency||10,i.mouse=new Fy,i.mouse.identifier=eu,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[eu]=i.mouse,i.interactionDataPool=[],i.eventData=new kC,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!("PointerEvent"in globalThis),i.supportsTouchEvents="ontouchstart"in globalThis,i.supportsPointerEvents=!!globalThis.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new UC,i._tempDisplayObject=new zx,i._eventListenerOptions={capture:!0,passive:!1},i._useSystemTicker=n.useSystemTicker!==void 0?n.useSystemTicker:!0,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return Object.defineProperty(t.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(e){this._useSystemTicker=e,e?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(e,n){return ru.target=null,ru.data.global=e,n||(n=this.lastObjectRendered),this.processInteractive(ru,n,null,!0),ru.target},t.prototype.setTargetElement=function(e,n){n===void 0&&(n=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=e,this.resolution=n,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(Nn.system.add(this.tickerUpdate,this,Wo.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(Nn.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none"),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(e){this._deltaTime+=e,!(this._deltaTime0&&(a=e.composedPath()[0]);for(var l=a!==this.interactionDOMElement?"outside":"",u=0;u"u"&&(o.button=e.touches.length?1:0),typeof o.buttons>"u"&&(o.buttons=e.touches.length?1:0),typeof o.isPrimary>"u"&&(o.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof o.width>"u"&&(o.width=o.radiusX||1),typeof o.height>"u"&&(o.height=o.radiusY||1),typeof o.tiltX>"u"&&(o.tiltX=0),typeof o.tiltY>"u"&&(o.tiltY=0),typeof o.pointerType>"u"&&(o.pointerType="touch"),typeof o.pointerId>"u"&&(o.pointerId=o.identifier||0),typeof o.pressure>"u"&&(o.pressure=o.force||.5),typeof o.twist>"u"&&(o.twist=0),typeof o.tangentialPressure>"u"&&(o.tangentialPressure=0),typeof o.layerX>"u"&&(o.layerX=o.offsetX=o.clientX),typeof o.layerY>"u"&&(o.layerY=o.offsetY=o.clientY),o.isNormalized=!0,n.push(o)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){var a=e;typeof a.isPrimary>"u"&&(a.isPrimary=!0),typeof a.width>"u"&&(a.width=1),typeof a.height>"u"&&(a.height=1),typeof a.tiltX>"u"&&(a.tiltX=0),typeof a.tiltY>"u"&&(a.tiltY=0),typeof a.pointerType>"u"&&(a.pointerType="mouse"),typeof a.pointerId>"u"&&(a.pointerId=eu),typeof a.pressure>"u"&&(a.pressure=.5),typeof a.twist>"u"&&(a.twist=0),typeof a.tangentialPressure>"u"&&(a.tangentialPressure=0),a.isNormalized=!0,n.push(a)}else n.push(e);return n},t.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},t.extension={name:"interaction",type:[hn.RendererPlugin,hn.CanvasRendererPlugin]},t}(Ji);const nw=(r,t)=>{if(typeof r=="number"){if(t===3)return{mode:"rgb",r:(r>>8&15|r>>4&240)/255,g:(r>>4&15|r&240)/255,b:(r&15|r<<4&240)/255};if(t===4)return{mode:"rgb",r:(r>>12&15|r>>8&240)/255,g:(r>>8&15|r>>4&240)/255,b:(r>>4&15|r&240)/255,alpha:(r&15|r<<4&240)/255};if(t===6)return{mode:"rgb",r:(r>>16&255)/255,g:(r>>8&255)/255,b:(r&255)/255};if(t===8)return{mode:"rgb",r:(r>>24&255)/255,g:(r>>16&255)/255,b:(r>>8&255)/255,alpha:(r&255)/255}}},VC={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},jC=r=>nw(VC[r.toLowerCase()],6),$C=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,GC=r=>{let t;return(t=r.match($C))?nw(parseInt(t[1],16),t[1].length):void 0},zi="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Ha=`${zi}%`,mm=`(?:${zi}%|${zi})`,WC=`(?:${zi}(deg|grad|rad|turn)|${zi})`,Ho="\\s*,\\s*",HC=new RegExp(`^rgba?\\(\\s*${zi}${Ho}${zi}${Ho}${zi}\\s*(?:,\\s*${mm}\\s*)?\\)$`),XC=new RegExp(`^rgba?\\(\\s*${Ha}${Ho}${Ha}${Ho}${Ha}\\s*(?:,\\s*${mm}\\s*)?\\)$`),YC=r=>{let t={mode:"rgb"},e;if(e=r.match(HC))e[1]!==void 0&&(t.r=e[1]/255),e[2]!==void 0&&(t.g=e[2]/255),e[3]!==void 0&&(t.b=e[3]/255);else if(e=r.match(XC))e[1]!==void 0&&(t.r=e[1]/100),e[2]!==void 0&&(t.g=e[2]/100),e[3]!==void 0&&(t.b=e[3]/100);else return;return e[4]!==void 0?t.alpha=Math.max(0,Math.min(1,e[4]/100)):e[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+e[5]))),t},qC=(r,t)=>r===void 0?void 0:typeof r!="object"?oO(r):r.mode!==void 0?r:t?{...r,mode:t}:void 0,QC=(r="rgb")=>t=>(t=qC(t,r))!==void 0?t.mode===r?t:kn[t.mode][r]?kn[t.mode][r](t):r==="rgb"?kn[t.mode].rgb(t):kn.rgb[r](kn[t.mode].rgb(t)):void 0,kn={},iw={},Bu=[],sw={},ZC=r=>r,we=r=>(kn[r.mode]={...kn[r.mode],...r.toMode},Object.keys(r.fromMode||{}).forEach(t=>{kn[t]||(kn[t]={}),kn[t][r.mode]=r.fromMode[t]}),r.ranges||(r.ranges={}),r.difference||(r.difference={}),r.channels.forEach(t=>{if(r.ranges[t]===void 0&&(r.ranges[t]=[0,1]),!r.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof r.interpolate[t]=="function"&&(r.interpolate[t]={use:r.interpolate[t]}),r.interpolate[t].fixup||(r.interpolate[t].fixup=ZC)}),iw[r.mode]=r,(r.parse||[]).forEach(t=>{JC(t,r.mode)}),QC(r.mode)),KC=r=>iw[r],JC=(r,t)=>{if(typeof r=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");sw[r]=t}else typeof r=="function"&&Bu.indexOf(r)<0&&Bu.push(r)},bf=/[^\x00-\x7F]|[a-zA-Z_]/,tO=/[^\x00-\x7F]|[-\w]/,dt={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Qt=0;function nu(r){let t=r[Qt],e=r[Qt+1];return t==="-"||t==="+"?/\d/.test(e)||e==="."&&/\d/.test(r[Qt+2]):t==="."?/\d/.test(e):/\d/.test(t)}function xf(r){if(Qt>=r.length)return!1;let t=r[Qt];if(bf.test(t))return!0;if(t==="-"){if(r.length-Qt<2)return!1;let e=r[Qt+1];return!!(e==="-"||bf.test(e))}return!1}const eO={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ba(r){let t="";if((r[Qt]==="-"||r[Qt]==="+")&&(t+=r[Qt++]),t+=iu(r),r[Qt]==="."&&/\d/.test(r[Qt+1])&&(t+=r[Qt++]+iu(r)),(r[Qt]==="e"||r[Qt]==="E")&&((r[Qt+1]==="-"||r[Qt+1]==="+")&&/\d/.test(r[Qt+2])?t+=r[Qt++]+r[Qt++]+iu(r):/\d/.test(r[Qt+1])&&(t+=r[Qt++]+iu(r))),xf(r)){let e=ku(r);return e==="deg"||e==="rad"||e==="turn"||e==="grad"?{type:dt.Hue,value:t*eO[e]}:void 0}return r[Qt]==="%"?(Qt++,{type:dt.Percentage,value:+t}):{type:dt.Number,value:+t}}function iu(r){let t="";for(;/\d/.test(r[Qt]);)t+=r[Qt++];return t}function ku(r){let t="";for(;Qt4)){if(e.length===4){if(e[3].type!==dt.Alpha)return;e[3]=e[3].value}return e.length===3&&e.push({type:dt.None,value:void 0}),e.every(i=>i.type!==dt.Alpha)?e:void 0}}function sO(r,t){r._i=0;let e=r[r._i++];if(!e||e.type!==dt.Function)return;let n=ow(r,t);if(n)return n.unshift(e.value),n}const oO=r=>{if(typeof r!="string")return;const t=nO(r),e=t?sO(t,!0):void 0;let n,i=0,s=Bu.length;for(;ir==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,uO=(r,t,e)=>r+e*(t-r),cO=r=>{let t=[];for(let e=0;et=>{let e=cO(t);return n=>{let i=n*e.length,s=n>=1?e.length-1:Math.max(Math.floor(i),0),o=e[s];return o===void 0?void 0:r(o[0],o[1],i-s)}},wt=hO(uO),rr=r=>{let t=!1,e=r.map(n=>n!==void 0?(t=!0,n):1);return t?e:r},ra={mode:"rgb",channels:["r","g","b","alpha"],parse:[aO,GC,YC,jC,lO,"srgb"],serialize:"srgb",interpolate:{r:wt,g:wt,b:wt,alpha:{use:wt,fixup:rr}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},rd=(r=0)=>Math.pow(Math.abs(r),563/256)*Math.sign(r),Dy=r=>{let t=rd(r.r),e=rd(r.g),n=rd(r.b),i={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*e+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*e+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*e+.9913375368376386*n};return r.alpha!==void 0&&(i.alpha=r.alpha),i},nd=r=>Math.pow(Math.abs(r),256/563)*Math.sign(r),Ly=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i={mode:"a98",r:nd(r*2.0415879038107465-t*.5650069742788597-.3447313507783297*e),g:nd(r*-.9692436362808798+t*1.8759675015077206+.0415550574071756*e),b:nd(r*.0134442806320312-t*.1183623922310184+1.0151749943912058*e)};return n!==void 0&&(i.alpha=n),i},id=(r=0)=>{const t=Math.abs(r);return t<=.04045?r/12.92:(Math.sign(r)||1)*Math.pow((t+.055)/1.055,2.4)},na=({r,g:t,b:e,alpha:n})=>{let i={mode:"lrgb",r:id(r),g:id(t),b:id(e)};return n!==void 0&&(i.alpha=n),i},Ys=r=>{let{r:t,g:e,b:n,alpha:i}=na(r),s={mode:"xyz65",x:.4123907992659593*t+.357584339383878*e+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*e+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*e+.9505321522496607*n};return i!==void 0&&(s.alpha=i),s},sd=(r=0)=>{const t=Math.abs(r);return t>.0031308?(Math.sign(r)||1)*(1.055*Math.pow(t,1/2.4)-.055):r*12.92},ia=({r,g:t,b:e,alpha:n},i="rgb")=>{let s={mode:i,r:sd(r),g:sd(t),b:sd(e)};return n!==void 0&&(s.alpha=n),s},qs=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=ia({r:r*3.2409699419045226-t*1.537383177570094-.4986107602930034*e,g:r*-.9692436362808796+t*1.8759675015077204+.0415550574071756*e,b:r*.0556300796969936-t*.2039769588889765+1.0569715142428784*e});return n!==void 0&&(i.alpha=n),i},dO={...ra,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:r=>Ly(Ys(r)),xyz65:Ly},toMode:{rgb:r=>qs(Dy(r)),xyz65:Dy}},dr=r=>(r=r%360)<0?r+360:r,fO=(r,t)=>r.map((e,n,i)=>{if(e===void 0)return e;let s=dr(e);return n===0||r[n-1]===void 0?s:t(s-dr(i[n-1]))}).reduce((e,n)=>!e.length||n===void 0||e[e.length-1]===void 0?(e.push(n),e):(e.push(n+e[e.length-1]),e),[]),bi=r=>fO(r,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),ir=[-.14861,1.78277,-.29227,-.90649,1.97294,0],pO=Math.PI/180,mO=180/Math.PI;let Ny=ir[3]*ir[4],By=ir[1]*ir[4],ky=ir[1]*ir[2]-ir[0]*ir[3];const gO=({r,g:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=(ky*e+r*Ny-t*By)/(ky+Ny-By),s=e-i,o=(ir[4]*(t-i)-ir[2]*s)/ir[3],a={mode:"cubehelix",l:i,s:i===0||i===1?void 0:Math.sqrt(s*s+o*o)/(ir[4]*i*(1-i))};return a.s&&(a.h=Math.atan2(o,s)*mO-120),n!==void 0&&(a.alpha=n),a},yO=({h:r,s:t,l:e,alpha:n})=>{let i={mode:"rgb"};r=(r===void 0?0:r+120)*pO,e===void 0&&(e=0);let s=t===void 0?0:t*e*(1-e),o=Math.cos(r),a=Math.sin(r);return i.r=e+s*(ir[0]*o+ir[1]*a),i.g=e+s*(ir[2]*o+ir[3]*a),i.b=e+s*(ir[4]*o+ir[5]*a),n!==void 0&&(i.alpha=n),i},Vc=(r,t)=>{if(r.h===void 0||t.h===void 0||!r.s||!t.s)return 0;let e=dr(r.h),n=dr(t.h),i=Math.sin((n-e+360)/2*Math.PI/180);return 2*Math.sqrt(r.s*t.s)*i},vO=(r,t)=>{if(r.h===void 0||t.h===void 0)return 0;let e=dr(r.h),n=dr(t.h);return Math.abs(n-e)>180?e-(n-360*Math.sign(n-e)):n-e},jc=(r,t)=>{if(r.h===void 0||t.h===void 0||!r.c||!t.c)return 0;let e=dr(r.h),n=dr(t.h),i=Math.sin((n-e+360)/2*Math.PI/180);return 2*Math.sqrt(r.c*t.c)*i},xi=r=>{let t=r.reduce((n,i)=>{if(i!==void 0){let s=i*Math.PI/180;n.sin+=Math.sin(s),n.cos+=Math.cos(s)}return n},{sin:0,cos:0}),e=Math.atan2(t.sin,t.cos)*180/Math.PI;return e<0?360+e:e},_O={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:gO},toMode:{rgb:yO},interpolate:{h:{use:wt,fixup:bi},s:wt,l:wt,alpha:{use:wt,fixup:rr}},difference:{h:Vc},average:{h:xi}},Gi=({l:r,a:t,b:e,alpha:n},i="lch")=>{t===void 0&&(t=0),e===void 0&&(e=0);let s=Math.sqrt(t*t+e*e),o={mode:i,l:r,c:s};return s&&(o.h=dr(Math.atan2(e,t)*180/Math.PI)),n!==void 0&&(o.alpha=n),o},Wi=({l:r,c:t,h:e,alpha:n},i="lab")=>{e===void 0&&(e=0);let s={mode:i,l:r,a:t?t*Math.cos(e/180*Math.PI):0,b:t?t*Math.sin(e/180*Math.PI):0};return n!==void 0&&(s.alpha=n),s},aw=Math.pow(29,3)/Math.pow(3,3),lw=Math.pow(6,3)/Math.pow(29,3),Ze={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Lo={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let od=r=>Math.pow(r,3)>lw?Math.pow(r,3):(116*r-16)/aw;const uw=({l:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=(r+16)/116,s=t/500+i,o=i-e/200,a={mode:"xyz65",x:od(s)*Lo.X,y:od(i)*Lo.Y,z:od(o)*Lo.Z};return n!==void 0&&(a.alpha=n),a},$c=r=>qs(uw(r)),ad=r=>r>lw?Math.cbrt(r):(aw*r+16)/116,cw=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=ad(r/Lo.X),s=ad(t/Lo.Y),o=ad(e/Lo.Z),a={mode:"lab65",l:116*s-16,a:500*(i-s),b:200*(s-o)};return n!==void 0&&(a.alpha=n),a},Gc=r=>{let t=cw(Ys(r));return r.r===r.b&&r.b===r.g&&(t.a=t.b=0),t},Uu=1,hw=1,al=26/180*Math.PI,zu=Math.cos(al),Vu=Math.sin(al),dw=100/Math.log(139/100),wf=({l:r,c:t,h:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i={mode:"lab65",l:(Math.exp(r*Uu/dw)-1)/.0039},s=(Math.exp(.0435*t*hw*Uu)-1)/.075,o=s*Math.cos(e/180*Math.PI-al),a=s*Math.sin(e/180*Math.PI-al);return i.a=o*zu-a/.83*Vu,i.b=o*Vu+a/.83*zu,n!==void 0&&(i.alpha=n),i},Sf=({l:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=t*zu+e*Vu,s=.83*(e*zu-t*Vu),o=Math.sqrt(i*i+s*s),a={mode:"dlch",l:dw/Uu*Math.log(1+.0039*r),c:Math.log(1+.075*o)/(.0435*hw*Uu)};return a.c&&(a.h=dr((Math.atan2(s,i)+al)/Math.PI*180)),n!==void 0&&(a.alpha=n),a},Uy=r=>wf(Gi(r,"dlch")),zy=r=>Wi(Sf(r),"dlab"),bO={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Uy,rgb:r=>$c(Uy(r))},fromMode:{lab65:zy,rgb:r=>zy(Gc(r))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:wt,a:wt,b:wt,alpha:{use:wt,fixup:rr}}},xO={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:wf,dlab:r=>Wi(r,"dlab"),rgb:r=>$c(wf(r))},fromMode:{lab65:Sf,dlab:r=>Gi(r,"dlch"),rgb:r=>Sf(Gc(r))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:wt,c:wt,h:{use:wt,fixup:bi},alpha:{use:wt,fixup:rr}},difference:{h:jc},average:{h:xi}};function wO({h:r,s:t,i:e,alpha:n}){r=dr(r!==void 0?r:0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.abs(r/60%2-1),s;switch(Math.floor(r/60)){case 0:s={r:e*(1+t*(3/(2-i)-1)),g:e*(1+t*(3*(1-i)/(2-i)-1)),b:e*(1-t)};break;case 1:s={r:e*(1+t*(3*(1-i)/(2-i)-1)),g:e*(1+t*(3/(2-i)-1)),b:e*(1-t)};break;case 2:s={r:e*(1-t),g:e*(1+t*(3/(2-i)-1)),b:e*(1+t*(3*(1-i)/(2-i)-1))};break;case 3:s={r:e*(1-t),g:e*(1+t*(3*(1-i)/(2-i)-1)),b:e*(1+t*(3/(2-i)-1))};break;case 4:s={r:e*(1+t*(3*(1-i)/(2-i)-1)),g:e*(1-t),b:e*(1+t*(3/(2-i)-1))};break;case 5:s={r:e*(1+t*(3/(2-i)-1)),g:e*(1-t),b:e*(1+t*(3*(1-i)/(2-i)-1))};break;default:s={r:e*(1-t),g:e*(1-t),b:e*(1-t)}}return s.mode="rgb",n!==void 0&&(s.alpha=n),s}function SO({r,g:t,b:e,alpha:n}){r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.max(r,t,e),s=Math.min(r,t,e),o={mode:"hsi",s:r+t+e===0?0:1-3*s/(r+t+e),i:(r+t+e)/3};return i-s!==0&&(o.h=(i===r?(t-e)/(i-s)+(t{switch(t){case"deg":return+r;case"rad":return r/Math.PI*180;case"grad":return r/10*9;case"turn":return r*360}},AO=new RegExp(`^hsla?\\(\\s*${WC}${Ho}${Ha}${Ho}${Ha}\\s*(?:,\\s*${mm}\\s*)?\\)$`),CO=r=>{let t=r.match(AO);if(!t)return;let e={mode:"hsl"};return t[3]!==void 0?e.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(e.h=EO(t[1],t[2])),t[4]!==void 0&&(e.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(e.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?e.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+t[7]))),e};function OO(r,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const e={mode:"hsl"},[,n,i,s,o]=t;if(n.type!==dt.None){if(n.type===dt.Percentage)return;e.h=n.value}if(i.type!==dt.None){if(i.type===dt.Hue)return;e.s=i.value/100}if(s.type!==dt.None){if(s.type===dt.Hue)return;e.l=s.value/100}return o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const fw={mode:"hsl",toMode:{rgb:IO},fromMode:{rgb:MO},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[OO,CO],serialize:r=>`hsl(${r.h!==void 0?r.h:"none"} ${r.s!==void 0?r.s*100+"%":"none"} ${r.l!==void 0?r.l*100+"%":"none"}${r.alpha<1?` / ${r.alpha}`:""})`,interpolate:{h:{use:wt,fixup:bi},s:wt,l:wt,alpha:{use:wt,fixup:rr}},difference:{h:Vc},average:{h:xi}};function pw({h:r,s:t,v:e,alpha:n}){r=dr(r!==void 0?r:0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.abs(r/60%2-1),s;switch(Math.floor(r/60)){case 0:s={r:e,g:e*(1-t*i),b:e*(1-t)};break;case 1:s={r:e*(1-t*i),g:e,b:e*(1-t)};break;case 2:s={r:e*(1-t),g:e,b:e*(1-t*i)};break;case 3:s={r:e*(1-t),g:e*(1-t*i),b:e};break;case 4:s={r:e*(1-t*i),g:e*(1-t),b:e};break;case 5:s={r:e,g:e*(1-t),b:e*(1-t*i)};break;default:s={r:e*(1-t),g:e*(1-t),b:e*(1-t)}}return s.mode="rgb",n!==void 0&&(s.alpha=n),s}function mw({r,g:t,b:e,alpha:n}){r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.max(r,t,e),s=Math.min(r,t,e),o={mode:"hsv",s:i===0?0:1-s/i,v:i};return i-s!==0&&(o.h=(i===r?(t-e)/(i-s)+(t1){let i=t+e;t/=i,e/=i}return pw({h:r,s:e===1?1:1-t/(1-e),v:1-e,alpha:n})}function RO(r){let t=mw(r);if(t===void 0)return;let e=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,i={mode:"hwb",w:(1-e)*n,b:1-n};return t.h!==void 0&&(i.h=t.h),t.alpha!==void 0&&(i.alpha=t.alpha),i}function FO(r,t){if(!t||t[0]!=="hwb")return;const e={mode:"hwb"},[,n,i,s,o]=t;if(n.type!==dt.None){if(n.type===dt.Percentage)return;e.h=n.value}if(i.type!==dt.None){if(i.type===dt.Hue)return;e.w=i.value/100}if(s.type!==dt.None){if(s.type===dt.Hue)return;e.b=s.value/100}return o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const DO={mode:"hwb",toMode:{rgb:PO},fromMode:{rgb:RO},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[FO],serialize:r=>`hwb(${r.h!==void 0?r.h:"none"} ${r.w!==void 0?r.w*100+"%":"none"} ${r.b!==void 0?r.b*100+"%":"none"}${r.alpha<1?` / ${r.alpha}`:""})`,interpolate:{h:{use:wt,fixup:bi},w:wt,b:wt,alpha:{use:wt,fixup:rr}},difference:{h:vO},average:{h:xi}},yw=203,Wc=.1593017578125,vw=78.84375,Hc=.8359375,Xc=18.8515625,Yc=18.6875;function ld(r){if(r<0)return 0;const t=Math.pow(r,1/vw);return 1e4*Math.pow(Math.max(0,t-Hc)/(Xc-Yc*t),1/Wc)}function ud(r){if(r<0)return 0;const t=Math.pow(r/1e4,Wc);return Math.pow((Hc+Xc*t)/(1+Yc*t),vw)}const cd=r=>Math.max(r/yw,0),Vy=({i:r,t,p:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);const i=ld(r+.008609037037932761*t+.11102962500302593*e),s=ld(r-.00860903703793275*t-.11102962500302599*e),o=ld(r+.5600313357106791*t-.32062717498731885*e),a={mode:"xyz65",x:cd(2.070152218389422*i-1.3263473389671556*s+.2066510476294051*o),y:cd(.3647385209748074*i+.680566024947227*s-.0453045459220346*o),z:cd(-.049747207535812*i-.0492609666966138*s+1.1880659249923042*o)};return n!==void 0&&(a.alpha=n),a},hd=(r=0)=>Math.max(r*yw,0),jy=({x:r,y:t,z:e,alpha:n})=>{const i=hd(r),s=hd(t),o=hd(e),a=ud(.3592832590121217*i+.6976051147779502*s-.0358915932320289*o),l=ud(-.1920808463704995*i+1.1004767970374323*s+.0753748658519118*o),u=ud(.0070797844607477*i+.0748396662186366*s+.8433265453898765*o),c=.5*a+.5*l,h=1.61376953125*a-3.323486328125*l+1.709716796875*u,f=4.378173828125*a-4.24560546875*l-.132568359375*u,d={mode:"itp",i:c,t:h,p:f};return n!==void 0&&(d.alpha=n),d},LO={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Vy,rgb:r=>qs(Vy(r))},fromMode:{xyz65:jy,rgb:r=>jy(Ys(r))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:wt,t:wt,p:wt,alpha:{use:wt,fixup:rr}}},NO=134.03437499999998,BO=16295499532821565e-27,dd=r=>{if(r<0)return 0;let t=Math.pow(r/1e4,Wc);return Math.pow((Hc+Xc*t)/(1+Yc*t),NO)},fd=(r=0)=>Math.max(r*203,0),_w=({x:r,y:t,z:e,alpha:n})=>{r=fd(r),t=fd(t),e=fd(e);let i=1.15*r-.15*e,s=.66*t+.34*r,o=dd(.41478972*i+.579999*s+.014648*e),a=dd(-.20151*i+1.120649*s+.0531008*e),l=dd(-.0166008*i+.2648*s+.6684799*e),u=(o+a)/2,c={mode:"jab",j:.44*u/(1-.56*u)-BO,a:3.524*o-4.066708*a+.542708*l,b:.199076*o+1.096799*a-1.295875*l};return n!==void 0&&(c.alpha=n),c},kO=134.03437499999998,$y=16295499532821565e-27,pd=r=>{if(r<0)return 0;let t=Math.pow(r,1/kO);return 1e4*Math.pow((Hc-t)/(Yc*t-Xc),1/Wc)},md=r=>r/203,bw=({j:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=(r+$y)/(.44+.56*(r+$y)),s=pd(i+.13860504*t+.058047316*e),o=pd(i-.13860504*t-.058047316*e),a=pd(i-.096019242*t-.8118919*e),l={mode:"xyz65",x:md(1.661373024652174*s-.914523081304348*o+.23136208173913045*a),y:md(-.3250758611844533*s+1.571847026732543*o-.21825383453227928*a),z:md(-.090982811*s-.31272829*o+1.5227666*a)};return n!==void 0&&(l.alpha=n),l},xw=r=>{let t=_w(Ys(r));return r.r===r.b&&r.b===r.g&&(t.a=t.b=0),t},ww=r=>qs(bw(r)),UO={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:xw,xyz65:_w},toMode:{rgb:ww,xyz65:bw},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:wt,a:wt,b:wt,alpha:{use:wt,fixup:rr}}},Gy=({j:r,a:t,b:e,alpha:n})=>{t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.sqrt(t*t+e*e),s={mode:"jch",j:r,c:i};return i&&(s.h=dr(Math.atan2(e,t)*180/Math.PI)),n!==void 0&&(s.alpha=n),s},Wy=({j:r,c:t,h:e,alpha:n})=>{e===void 0&&(e=0);let i={mode:"jab",j:r,a:t?t*Math.cos(e/180*Math.PI):0,b:t?t*Math.sin(e/180*Math.PI):0};return n!==void 0&&(i.alpha=n),i},zO={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Wy,rgb:r=>ww(Wy(r))},fromMode:{rgb:r=>Gy(xw(r)),jab:Gy},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:wt,fixup:bi},c:wt,j:wt,alpha:{use:wt,fixup:rr}},difference:{h:jc},average:{h:xi}},qc=Math.pow(29,3)/Math.pow(3,3),gm=Math.pow(6,3)/Math.pow(29,3);let gd=r=>Math.pow(r,3)>gm?Math.pow(r,3):(116*r-16)/qc;const ym=({l:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=(r+16)/116,s=t/500+i,o=i-e/200,a={mode:"xyz50",x:gd(s)*Ze.X,y:gd(i)*Ze.Y,z:gd(o)*Ze.Z};return n!==void 0&&(a.alpha=n),a},xl=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=ia({r:r*3.1341359569958707-t*1.6173863321612538-.4906619460083532*e,g:r*-.978795502912089+t*1.916254567259524+.03344273116131949*e,b:r*.07195537988411677-t*.2289768264158322+1.405386058324125*e});return n!==void 0&&(i.alpha=n),i},Sw=r=>xl(ym(r)),wl=r=>{let{r:t,g:e,b:n,alpha:i}=na(r),s={mode:"xyz50",x:.436065742824811*t+.3851514688337912*e+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*e+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*e+.7140993584005155*n};return i!==void 0&&(s.alpha=i),s},yd=r=>r>gm?Math.cbrt(r):(qc*r+16)/116,vm=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=yd(r/Ze.X),s=yd(t/Ze.Y),o=yd(e/Ze.Z),a={mode:"lab",l:116*s-16,a:500*(i-s),b:200*(s-o)};return n!==void 0&&(a.alpha=n),a},Tw=r=>{let t=vm(wl(r));return r.r===r.b&&r.b===r.g&&(t.a=t.b=0),t};function VO(r,t){if(!t||t[0]!=="lab")return;const e={mode:"lab"},[,n,i,s,o]=t;if(!(n.type===dt.Hue||i.type===dt.Hue||s.type===dt.Hue))return n.type!==dt.None&&(e.l=Math.min(Math.max(0,n.value),100)),i.type!==dt.None&&(e.a=i.type===dt.Number?i.value:i.value*125/100),s.type!==dt.None&&(e.b=s.type===dt.Number?s.value:s.value*125/100),o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const _m={mode:"lab",toMode:{xyz50:ym,rgb:Sw},fromMode:{xyz50:vm,rgb:Tw},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[VO],serialize:r=>`lab(${r.l!==void 0?r.l:"none"} ${r.a!==void 0?r.a:"none"} ${r.b!==void 0?r.b:"none"}${r.alpha<1?` / ${r.alpha}`:""})`,interpolate:{l:wt,a:wt,b:wt,alpha:{use:wt,fixup:rr}}},jO={..._m,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:uw,rgb:$c},fromMode:{xyz65:cw,rgb:Gc},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function $O(r,t){if(!t||t[0]!=="lch")return;const e={mode:"lch"},[,n,i,s,o]=t;if(n.type!==dt.None){if(n.type===dt.Hue)return;e.l=Math.min(Math.max(0,n.value),100)}if(i.type!==dt.None&&(e.c=Math.max(0,i.type===dt.Number?i.value:i.value*150/100)),s.type!==dt.None){if(s.type===dt.Percentage)return;e.h=s.value}return o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const bm={mode:"lch",toMode:{lab:Wi,rgb:r=>Sw(Wi(r))},fromMode:{rgb:r=>Gi(Tw(r)),lab:Gi},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$O],serialize:r=>`lch(${r.l!==void 0?r.l:"none"} ${r.c!==void 0?r.c:"none"} ${r.h!==void 0?r.h:"none"}${r.alpha<1?` / ${r.alpha}`:""})`,interpolate:{h:{use:wt,fixup:bi},c:wt,l:wt,alpha:{use:wt,fixup:rr}},difference:{h:jc},average:{h:xi}},GO={...bm,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:r=>Wi(r,"lab65"),rgb:r=>$c(Wi(r,"lab65"))},fromMode:{rgb:r=>Gi(Gc(r),"lch65"),lab65:r=>Gi(r,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},Iw=({l:r,u:t,v:e,alpha:n})=>{t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.sqrt(t*t+e*e),s={mode:"lchuv",l:r,c:i};return i&&(s.h=dr(Math.atan2(e,t)*180/Math.PI)),n!==void 0&&(s.alpha=n),s},Mw=({l:r,c:t,h:e,alpha:n})=>{e===void 0&&(e=0);let i={mode:"luv",l:r,u:t?t*Math.cos(e/180*Math.PI):0,v:t?t*Math.sin(e/180*Math.PI):0};return n!==void 0&&(i.alpha=n),i},Ew=(r,t,e)=>4*r/(r+15*t+3*e),Aw=(r,t,e)=>9*t/(r+15*t+3*e),WO=Ew(Ze.X,Ze.Y,Ze.Z),HO=Aw(Ze.X,Ze.Y,Ze.Z),XO=r=>r<=gm?qc*r:116*Math.cbrt(r)-16,Tf=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=XO(t/Ze.Y),s=Ew(r,t,e),o=Aw(r,t,e);!isFinite(s)||!isFinite(o)?i=s=o=0:(s=13*i*(s-WO),o=13*i*(o-HO));let a={mode:"luv",l:i,u:s,v:o};return n!==void 0&&(a.alpha=n),a},YO=(r,t,e)=>4*r/(r+15*t+3*e),qO=(r,t,e)=>9*t/(r+15*t+3*e),QO=YO(Ze.X,Ze.Y,Ze.Z),ZO=qO(Ze.X,Ze.Y,Ze.Z),If=({l:r,u:t,v:e,alpha:n})=>{if(r===void 0&&(r=0),r===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),e===void 0&&(e=0);let i=t/(13*r)+QO,s=e/(13*r)+ZO,o=Ze.Y*(r<=8?r/qc:Math.pow((r+16)/116,3)),a=o*(9*i)/(4*s),l=o*(12-3*i-20*s)/(4*s),u={mode:"xyz50",x:a,y:o,z:l};return n!==void 0&&(u.alpha=n),u},KO=r=>Iw(Tf(wl(r))),JO=r=>xl(If(Mw(r))),tP={mode:"lchuv",toMode:{luv:Mw,rgb:JO},fromMode:{rgb:KO,luv:Iw},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:wt,fixup:bi},c:wt,l:wt,alpha:{use:wt,fixup:rr}},difference:{h:jc},average:{h:xi}},eP={...ra,mode:"lrgb",toMode:{rgb:ia},fromMode:{rgb:na},parse:["srgb-linear"],serialize:"srgb-linear"},rP={mode:"luv",toMode:{xyz50:If,rgb:r=>xl(If(r))},fromMode:{xyz50:Tf,rgb:r=>Tf(wl(r))},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:wt,u:wt,v:wt,alpha:{use:wt,fixup:rr}}},Cw=({r,g:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.cbrt(.41222147079999993*r+.5363325363*t+.0514459929*e),s=Math.cbrt(.2119034981999999*r+.6806995450999999*t+.1073969566*e),o=Math.cbrt(.08830246189999998*r+.2817188376*t+.6299787005000002*e),a={mode:"oklab",l:.2104542553*i+.793617785*s-.0040720468*o,a:1.9779984951*i-2.428592205*s+.4505937099*o,b:.0259040371*i+.7827717662*s-.808675766*o};return n!==void 0&&(a.alpha=n),a},Qc=r=>{let t=Cw(na(r));return r.r===r.b&&r.b===r.g&&(t.a=t.b=0),t},Sl=({l:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.pow(r*.9999999984505198+.39633779217376786*t+.2158037580607588*e,3),s=Math.pow(r*1.0000000088817609-.10556134232365635*t-.06385417477170591*e,3),o=Math.pow(r*1.0000000546724108-.08948418209496575*t-1.2914855378640917*e,3),a={mode:"lrgb",r:4.076741661347994*i-3.307711590408193*s+.230969928729428*o,g:-1.2684380040921763*i+2.6097574006633715*s-.3413193963102197*o,b:-.004196086541837188*i-.7034186144594493*s+1.7076147009309444*o};return n!==void 0&&(a.alpha=n),a},Zc=r=>ia(Sl(r));function Mf(r){const n=1.170873786407767;return .5*(n*r-.206+Math.sqrt((n*r-.206)*(n*r-.206)+4*.03*n*r))}function ju(r){return(r*r+.206*r)/(1.170873786407767*(r+.03))}function nP(r,t){let e,n,i,s,o,a,l,u;-1.88170328*r-.80936493*t>1?(e=1.19086277,n=1.76576728,i=.59662641,s=.75515197,o=.56771245,a=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*r-1.19445276*t>1?(e=.73956515,n=-.45954404,i=.08285427,s=.1254107,o=.14503204,a=-1.2684380046,l=2.6097574011,u=-.3413193965):(e=1.35733652,n=-.00915799,i=-1.1513021,s=-.50559606,o=.00692167,a=-.0041960863,l=-.7034186147,u=1.707614701);let c=e+n*r+i*t+s*r*r+o*r*t,h=.3963377774*r+.2158037573*t,f=-.1055613458*r-.0638541728*t,d=-.0894841775*r-1.291485548*t;{let m=1+c*h,g=1+c*f,p=1+c*d,y=m*m*m,v=g*g*g,S=p*p*p,T=3*h*m*m,_=3*f*g*g,M=3*d*p*p,x=6*h*h*m,N=6*f*f*g,L=6*d*d*p,j=a*y+l*v+u*S,it=a*T+l*_+u*M,I=a*x+l*N+u*L;c=c-j*it/(it*it-.5*j*I)}return c}function xm(r,t){let e=nP(r,t),n=Sl({l:1,a:e*r,b:e*t}),i=Math.cbrt(1/Math.max(n.r,n.g,n.b)),s=i*e;return[i,s]}function iP(r,t,e,n,i,s=null){s||(s=xm(r,t));let o;if((e-i)*s[1]-(s[0]-i)*n<=0)o=s[1]*i/(n*s[0]+s[1]*(i-e));else{o=s[1]*(i-1)/(n*(s[0]-1)+s[1]*(i-e));{let a=e-i,l=n,u=.3963377774*r+.2158037573*t,c=-.1055613458*r-.0638541728*t,h=-.0894841775*r-1.291485548*t,f=a+l*u,d=a+l*c,m=a+l*h;{let g=i*(1-o)+o*e,p=o*n,y=g+p*u,v=g+p*c,S=g+p*h,T=y*y*y,_=v*v*v,M=S*S*S,x=3*f*y*y,N=3*d*v*v,L=3*m*S*S,j=6*f*f*y,it=6*d*d*v,I=6*m*m*S,Q=4.0767416621*T-3.3077115913*_+.2309699292*M-1,w=4.0767416621*x-3.3077115913*N+.2309699292*L,nt=4.0767416621*j-3.3077115913*it+.2309699292*I,P=w/(w*w-.5*Q*nt),C=-Q*P,R=-1.2684380046*T+2.6097574011*_-.3413193965*M-1,U=-1.2684380046*x+2.6097574011*N-.3413193965*L,k=-1.2684380046*j+2.6097574011*it-.3413193965*I,A=U/(U*U-.5*R*k),O=-R*A,$=-.0041960863*T-.7034186147*_+1.707614701*M-1,tt=-.0041960863*x-.7034186147*N+1.707614701*L,et=-.0041960863*j-.7034186147*it+1.707614701*I,yt=tt/(tt*tt-.5*$*et),_t=-$*yt;C=P>=0?C:1e6,O=A>=0?O:1e6,_t=yt>=0?_t:1e6,o+=Math.min(C,Math.min(O,_t))}}}return o}function wm(r,t,e=null){e||(e=xm(r,t));let n=e[0],i=e[1];return[i/n,i/(1-n)]}function Ow(r,t,e){let n=xm(t,e),i=iP(t,e,r,1,r,n),s=wm(t,e,n),o=.11516993+1/(7.4477897+4.1590124*e+t*(-2.19557347+1.75198401*e+t*(-2.13704948-10.02301043*e+t*(-4.24894561+5.38770819*e+4.69891013*t)))),a=.11239642+1/(1.6132032-.68124379*e+t*(.40370612+.90148123*e+t*(-.27087943+.6122399*e+t*(.00299215-.45399568*e-.14661872*t)))),l=i/Math.min(r*s[0],(1-r)*s[1]),u=r*o,c=(1-r)*a,h=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=r*.4,c=(1-r)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),h,i]}function Hy(r){const t=r.l!==void 0?r.l:0,e=r.a!==void 0?r.a:0,n=r.b!==void 0?r.b:0,i={mode:"okhsl",l:Mf(t)};r.alpha!==void 0&&(i.alpha=r.alpha);let s=Math.sqrt(e*e+n*n);if(!s)return i.s=0,i;let[o,a,l]=Ow(t,e/s,n/s),u;if(sHy(Qc(r))},toMode:{oklab:Xy,rgb:r=>Zc(Xy(r))}};function Yy(r){let t=r.l!==void 0?r.l:0,e=r.a!==void 0?r.a:0,n=r.b!==void 0?r.b:0,i=Math.sqrt(e*e+n*n),s=i?e/i:1,o=i?n/i:1,[a,l]=wm(s,o),u=.5,c=1-u/a,h=l/(i+t*l),f=h*t,d=h*i,m=ju(f),g=d*m/f,p=Sl({l:m,a:s*g,b:o*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0));t=t/y,i=i/y*Mf(t)/t,t=Mf(t);const v={mode:"okhsv",s:i?(u+l)*d/(l*u+l*c*d):0,v:t?t/f:0};return v.s&&(v.h=dr(Math.atan2(n,e)*180/Math.PI)),r.alpha!==void 0&&(v.alpha=r.alpha),v}function qy(r){const t={mode:"oklab"};r.alpha!==void 0&&(t.alpha=r.alpha);const e=r.h!==void 0?r.h:0,n=r.s!==void 0?r.s:0,i=r.v!==void 0?r.v:0,s=Math.cos(e/180*Math.PI),o=Math.sin(e/180*Math.PI),[a,l]=wm(s,o),u=.5,c=1-u/a,h=1-n*u/(u+l-l*c*n),f=n*l*u/(u+l-l*c*n),d=ju(h),m=f*d/h,g=Sl({l:d,a:s*m,b:o*m}),p=Math.cbrt(1/Math.max(g.r,g.g,g.b,0)),y=ju(i*h),v=f*y/h;return t.l=y*p,t.a=v*s*p,t.b=v*o*p,t}const oP={...gw,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Yy,rgb:r=>Yy(Qc(r))},toMode:{oklab:qy,rgb:r=>Zc(qy(r))}};function aP(r,t){if(!t||t[0]!=="oklab")return;const e={mode:"oklab"},[,n,i,s,o]=t;if(!(n.type===dt.Hue||i.type===dt.Hue||s.type===dt.Hue))return n.type!==dt.None&&(e.l=Math.min(Math.max(0,n.type===dt.Number?n.value:n.value/100),1)),i.type!==dt.None&&(e.a=i.type===dt.Number?i.value:i.value*.4/100),s.type!==dt.None&&(e.b=s.type===dt.Number?s.value:s.value*.4/100),o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const lP={..._m,mode:"oklab",toMode:{lrgb:Sl,rgb:Zc},fromMode:{lrgb:Cw,rgb:Qc},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[aP],serialize:r=>`oklab(${r.l!==void 0?r.l:"none"} ${r.a!==void 0?r.a:"none"} ${r.b!==void 0?r.b:"none"}${r.alpha<1?` / ${r.alpha}`:""})`};function uP(r,t){if(!t||t[0]!=="oklch")return;const e={mode:"oklch"},[,n,i,s,o]=t;if(n.type!==dt.None){if(n.type===dt.Hue)return;e.l=Math.min(Math.max(0,n.type===dt.Number?n.value:n.value/100),1)}if(i.type!==dt.None&&(e.c=Math.max(0,i.type===dt.Number?i.value:i.value*.4/100)),s.type!==dt.None){if(s.type===dt.Percentage)return;e.h=s.value}return o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const cP={...bm,mode:"oklch",toMode:{oklab:r=>Wi(r,"oklab"),rgb:r=>Zc(Wi(r,"oklab"))},fromMode:{rgb:r=>Gi(Qc(r),"oklch"),oklab:r=>Gi(r,"oklch")},parse:[uP],serialize:r=>`oklch(${r.l!==void 0?r.l:"none"} ${r.c!==void 0?r.c:"none"} ${r.h!==void 0?r.h:"none"}${r.alpha<1?` / ${r.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Qy=r=>{let{r:t,g:e,b:n,alpha:i}=na(r),s={mode:"xyz65",x:.486570948648216*t+.265667693169093*e+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*e+.079286914093745*n,z:0*t+.0451133818589026*e+1.043944368900976*n};return i!==void 0&&(s.alpha=i),s},Zy=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=ia({r:r*2.4934969119414263-t*.9313836179191242-.402710784450717*e,g:r*-.8294889695615749+t*1.7626640603183465+.0236246858419436*e,b:r*.0358458302437845-t*.0761723892680418+.9568845240076871*e},"p3");return n!==void 0&&(i.alpha=n),i},hP={...ra,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:r=>Zy(Ys(r)),xyz65:Zy},toMode:{rgb:r=>qs(Qy(r)),xyz65:Qy}},vd=r=>{let t=Math.abs(r);return t>=1/512?Math.sign(r)*Math.pow(t,1/1.8):16*r},Ky=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i={mode:"prophoto",r:vd(r*1.3457868816471585-t*.2555720873797946-.0511018649755453*e),g:vd(r*-.5446307051249019+t*1.5082477428451466+.0205274474364214*e),b:vd(r*0+t*0+1.2119675456389452*e)};return n!==void 0&&(i.alpha=n),i},_d=(r=0)=>{let t=Math.abs(r);return t>=16/512?Math.sign(r)*Math.pow(t,1.8):r/16},Jy=r=>{let t=_d(r.r),e=_d(r.g),n=_d(r.b),i={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*e+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*e+899369387256e-16*n,z:0*t+0*e+.8251046025104602*n};return r.alpha!==void 0&&(i.alpha=r.alpha),i},dP={...ra,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Ky,rgb:r=>Ky(wl(r))},toMode:{xyz50:Jy,rgb:r=>xl(Jy(r))}},tv=1.09929682680944,fP=.018053968510807,bd=r=>{const t=Math.abs(r);return t>fP?(Math.sign(r)||1)*(tv*Math.pow(t,.45)-(tv-1)):4.5*r},ev=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i={mode:"rec2020",r:bd(r*1.7166511879712683-t*.3556707837763925-.2533662813736599*e),g:bd(r*-.6666843518324893+t*1.6164812366349395+.0157685458139111*e),b:bd(r*.0176398574453108-t*.0427706132578085+.9421031212354739*e)};return n!==void 0&&(i.alpha=n),i},rv=1.09929682680944,pP=.018053968510807,xd=(r=0)=>{let t=Math.abs(r);return t{let t=xd(r.r),e=xd(r.g),n=xd(r.b),i={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*e+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*e+.059301716469862*n,z:0*t+.0280726930490874*e+1.0609850577107909*n};return r.alpha!==void 0&&(i.alpha=r.alpha),i},mP={...ra,mode:"rec2020",fromMode:{xyz65:ev,rgb:r=>ev(Ys(r))},toMode:{xyz65:nv,rgb:r=>qs(nv(r))},parse:["rec2020"],serialize:"rec2020"},Bs=.0037930732552754493,Pw=Math.cbrt(Bs),wd=r=>Math.cbrt(r)-Pw,gP=r=>{const{r:t,g:e,b:n,alpha:i}=na(r),s=wd(.3*t+.622*e+.078*n+Bs),o=wd(.23*t+.692*e+.078*n+Bs),a=wd(.2434226892454782*t+.2047674442449682*e+.5518098665095535*n+Bs),l={mode:"xyb",x:(s-o)/2,y:(s+o)/2,b:a-(s+o)/2};return i!==void 0&&(l.alpha=i),l},Sd=r=>Math.pow(r+Pw,3),yP=({x:r,y:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);const i=Sd(r+t)-Bs,s=Sd(t-r)-Bs,o=Sd(e+t)-Bs,a=ia({r:11.031566904639861*i-9.866943908131562*s-.16462299650829934*o,g:-3.2541473810744237*i+4.418770377582723*s-.16462299650829934*o,b:-3.6588512867136815*i+2.7129230459360922*s+1.9459282407775895*o});return n!==void 0&&(a.alpha=n),a},vP={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:yP},fromMode:{rgb:gP},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:wt,y:wt,b:wt,alpha:{use:wt,fixup:rr}}},_P={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:xl,lab:vm},fromMode:{rgb:wl,lab:ym},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:wt,y:wt,z:wt,alpha:{use:wt,fixup:rr}}},bP=r=>{let{x:t,y:e,z:n,alpha:i}=r;t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let s={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*e-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*e-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*e+.7518742899580008*n};return i!==void 0&&(s.alpha=i),s},xP=r=>{let{x:t,y:e,z:n,alpha:i}=r;t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let s={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*e+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*e+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*e+1.3303659366080753*n};return i!==void 0&&(s.alpha=i),s},wP={mode:"xyz65",toMode:{rgb:qs,xyz50:bP},fromMode:{rgb:Ys,xyz50:xP},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:wt,y:wt,z:wt,alpha:{use:wt,fixup:rr}}},SP=({r,g:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);const i={mode:"yiq",y:.29889531*r+.58662247*t+.11448223*e,i:.59597799*r-.2741761*t-.32180189*e,q:.21147017*r-.52261711*t+.31114694*e};return n!==void 0&&(i.alpha=n),i},TP=({y:r,i:t,q:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);const i={mode:"rgb",r:r+.95608445*t+.6208885*e,g:r-.27137664*t-.6486059*e,b:r-1.10561724*t+1.70250126*e};return n!==void 0&&(i.alpha=n),i},IP={mode:"yiq",toMode:{rgb:TP},fromMode:{rgb:SP},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:wt,i:wt,q:wt,alpha:{use:wt,fixup:rr}}};we(dO);we(_O);we(bO);we(xO);we(TO);we(fw);we(gw);we(DO);we(LO);we(UO);we(zO);we(_m);we(jO);we(bm);we(GO);we(tP);we(eP);we(rP);we(sP);we(oP);we(lP);we(cP);we(hP);we(dP);we(mP);we(ra);we(vP);we(_P);we(wP);we(IP);function ki(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Td={exports:{}};/*! +`||t[Qt]===" "||t[Qt]===" ");)Qt++;let i;if(nu(t)&&(i=ba(t),i.type!==dt.Hue)){e.push({type:dt.Alpha,value:i});continue}if(xf(t)&&ku(t)==="none"){e.push({type:dt.Alpha,value:{type:dt.None,value:void 0}});continue}return}if(/\d/.test(n)){Qt--,e.push(ba(t));continue}if(bf.test(n)){Qt--,e.push(rO(t));continue}return}return e}function iO(r){r._i=0;let t=r[r._i++];if(!t||t.type!==dt.Function||t.value!=="color"||(t=r[r._i++],t.type!==dt.Ident))return;const e=sw[t.value];if(!e)return;const n={mode:e},i=ow(r,!1);if(!i)return;const s=KC(e).channels;for(let o=0,a,l;o4)){if(e.length===4){if(e[3].type!==dt.Alpha)return;e[3]=e[3].value}return e.length===3&&e.push({type:dt.None,value:void 0}),e.every(i=>i.type!==dt.Alpha)?e:void 0}}function sO(r,t){r._i=0;let e=r[r._i++];if(!e||e.type!==dt.Function)return;let n=ow(r,t);if(n)return n.unshift(e.value),n}const oO=r=>{if(typeof r!="string")return;const t=nO(r),e=t?sO(t,!0):void 0;let n,i=0,s=Bu.length;for(;ir==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,uO=(r,t,e)=>r+e*(t-r),cO=r=>{let t=[];for(let e=0;et=>{let e=cO(t);return n=>{let i=n*e.length,s=n>=1?e.length-1:Math.max(Math.floor(i),0),o=e[s];return o===void 0?void 0:r(o[0],o[1],i-s)}},wt=hO(uO),rr=r=>{let t=!1,e=r.map(n=>n!==void 0?(t=!0,n):1);return t?e:r},ra={mode:"rgb",channels:["r","g","b","alpha"],parse:[aO,GC,YC,jC,lO,"srgb"],serialize:"srgb",interpolate:{r:wt,g:wt,b:wt,alpha:{use:wt,fixup:rr}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},rd=(r=0)=>Math.pow(Math.abs(r),563/256)*Math.sign(r),Ly=r=>{let t=rd(r.r),e=rd(r.g),n=rd(r.b),i={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*e+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*e+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*e+.9913375368376386*n};return r.alpha!==void 0&&(i.alpha=r.alpha),i},nd=r=>Math.pow(Math.abs(r),256/563)*Math.sign(r),Dy=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i={mode:"a98",r:nd(r*2.0415879038107465-t*.5650069742788597-.3447313507783297*e),g:nd(r*-.9692436362808798+t*1.8759675015077206+.0415550574071756*e),b:nd(r*.0134442806320312-t*.1183623922310184+1.0151749943912058*e)};return n!==void 0&&(i.alpha=n),i},id=(r=0)=>{const t=Math.abs(r);return t<=.04045?r/12.92:(Math.sign(r)||1)*Math.pow((t+.055)/1.055,2.4)},na=({r,g:t,b:e,alpha:n})=>{let i={mode:"lrgb",r:id(r),g:id(t),b:id(e)};return n!==void 0&&(i.alpha=n),i},Ys=r=>{let{r:t,g:e,b:n,alpha:i}=na(r),s={mode:"xyz65",x:.4123907992659593*t+.357584339383878*e+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*e+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*e+.9505321522496607*n};return i!==void 0&&(s.alpha=i),s},sd=(r=0)=>{const t=Math.abs(r);return t>.0031308?(Math.sign(r)||1)*(1.055*Math.pow(t,1/2.4)-.055):r*12.92},ia=({r,g:t,b:e,alpha:n},i="rgb")=>{let s={mode:i,r:sd(r),g:sd(t),b:sd(e)};return n!==void 0&&(s.alpha=n),s},qs=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=ia({r:r*3.2409699419045226-t*1.537383177570094-.4986107602930034*e,g:r*-.9692436362808796+t*1.8759675015077204+.0415550574071756*e,b:r*.0556300796969936-t*.2039769588889765+1.0569715142428784*e});return n!==void 0&&(i.alpha=n),i},dO={...ra,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:r=>Dy(Ys(r)),xyz65:Dy},toMode:{rgb:r=>qs(Ly(r)),xyz65:Ly}},dr=r=>(r=r%360)<0?r+360:r,fO=(r,t)=>r.map((e,n,i)=>{if(e===void 0)return e;let s=dr(e);return n===0||r[n-1]===void 0?s:t(s-dr(i[n-1]))}).reduce((e,n)=>!e.length||n===void 0||e[e.length-1]===void 0?(e.push(n),e):(e.push(n+e[e.length-1]),e),[]),bi=r=>fO(r,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),ir=[-.14861,1.78277,-.29227,-.90649,1.97294,0],pO=Math.PI/180,mO=180/Math.PI;let Ny=ir[3]*ir[4],By=ir[1]*ir[4],ky=ir[1]*ir[2]-ir[0]*ir[3];const gO=({r,g:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=(ky*e+r*Ny-t*By)/(ky+Ny-By),s=e-i,o=(ir[4]*(t-i)-ir[2]*s)/ir[3],a={mode:"cubehelix",l:i,s:i===0||i===1?void 0:Math.sqrt(s*s+o*o)/(ir[4]*i*(1-i))};return a.s&&(a.h=Math.atan2(o,s)*mO-120),n!==void 0&&(a.alpha=n),a},yO=({h:r,s:t,l:e,alpha:n})=>{let i={mode:"rgb"};r=(r===void 0?0:r+120)*pO,e===void 0&&(e=0);let s=t===void 0?0:t*e*(1-e),o=Math.cos(r),a=Math.sin(r);return i.r=e+s*(ir[0]*o+ir[1]*a),i.g=e+s*(ir[2]*o+ir[3]*a),i.b=e+s*(ir[4]*o+ir[5]*a),n!==void 0&&(i.alpha=n),i},Vc=(r,t)=>{if(r.h===void 0||t.h===void 0||!r.s||!t.s)return 0;let e=dr(r.h),n=dr(t.h),i=Math.sin((n-e+360)/2*Math.PI/180);return 2*Math.sqrt(r.s*t.s)*i},vO=(r,t)=>{if(r.h===void 0||t.h===void 0)return 0;let e=dr(r.h),n=dr(t.h);return Math.abs(n-e)>180?e-(n-360*Math.sign(n-e)):n-e},jc=(r,t)=>{if(r.h===void 0||t.h===void 0||!r.c||!t.c)return 0;let e=dr(r.h),n=dr(t.h),i=Math.sin((n-e+360)/2*Math.PI/180);return 2*Math.sqrt(r.c*t.c)*i},xi=r=>{let t=r.reduce((n,i)=>{if(i!==void 0){let s=i*Math.PI/180;n.sin+=Math.sin(s),n.cos+=Math.cos(s)}return n},{sin:0,cos:0}),e=Math.atan2(t.sin,t.cos)*180/Math.PI;return e<0?360+e:e},_O={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:gO},toMode:{rgb:yO},interpolate:{h:{use:wt,fixup:bi},s:wt,l:wt,alpha:{use:wt,fixup:rr}},difference:{h:Vc},average:{h:xi}},Gi=({l:r,a:t,b:e,alpha:n},i="lch")=>{t===void 0&&(t=0),e===void 0&&(e=0);let s=Math.sqrt(t*t+e*e),o={mode:i,l:r,c:s};return s&&(o.h=dr(Math.atan2(e,t)*180/Math.PI)),n!==void 0&&(o.alpha=n),o},Wi=({l:r,c:t,h:e,alpha:n},i="lab")=>{e===void 0&&(e=0);let s={mode:i,l:r,a:t?t*Math.cos(e/180*Math.PI):0,b:t?t*Math.sin(e/180*Math.PI):0};return n!==void 0&&(s.alpha=n),s},aw=Math.pow(29,3)/Math.pow(3,3),lw=Math.pow(6,3)/Math.pow(29,3),Ze={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Do={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let od=r=>Math.pow(r,3)>lw?Math.pow(r,3):(116*r-16)/aw;const uw=({l:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=(r+16)/116,s=t/500+i,o=i-e/200,a={mode:"xyz65",x:od(s)*Do.X,y:od(i)*Do.Y,z:od(o)*Do.Z};return n!==void 0&&(a.alpha=n),a},$c=r=>qs(uw(r)),ad=r=>r>lw?Math.cbrt(r):(aw*r+16)/116,cw=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=ad(r/Do.X),s=ad(t/Do.Y),o=ad(e/Do.Z),a={mode:"lab65",l:116*s-16,a:500*(i-s),b:200*(s-o)};return n!==void 0&&(a.alpha=n),a},Gc=r=>{let t=cw(Ys(r));return r.r===r.b&&r.b===r.g&&(t.a=t.b=0),t},Uu=1,hw=1,al=26/180*Math.PI,zu=Math.cos(al),Vu=Math.sin(al),dw=100/Math.log(139/100),wf=({l:r,c:t,h:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i={mode:"lab65",l:(Math.exp(r*Uu/dw)-1)/.0039},s=(Math.exp(.0435*t*hw*Uu)-1)/.075,o=s*Math.cos(e/180*Math.PI-al),a=s*Math.sin(e/180*Math.PI-al);return i.a=o*zu-a/.83*Vu,i.b=o*Vu+a/.83*zu,n!==void 0&&(i.alpha=n),i},Sf=({l:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=t*zu+e*Vu,s=.83*(e*zu-t*Vu),o=Math.sqrt(i*i+s*s),a={mode:"dlch",l:dw/Uu*Math.log(1+.0039*r),c:Math.log(1+.075*o)/(.0435*hw*Uu)};return a.c&&(a.h=dr((Math.atan2(s,i)+al)/Math.PI*180)),n!==void 0&&(a.alpha=n),a},Uy=r=>wf(Gi(r,"dlch")),zy=r=>Wi(Sf(r),"dlab"),bO={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Uy,rgb:r=>$c(Uy(r))},fromMode:{lab65:zy,rgb:r=>zy(Gc(r))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:wt,a:wt,b:wt,alpha:{use:wt,fixup:rr}}},xO={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:wf,dlab:r=>Wi(r,"dlab"),rgb:r=>$c(wf(r))},fromMode:{lab65:Sf,dlab:r=>Gi(r,"dlch"),rgb:r=>Sf(Gc(r))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:wt,c:wt,h:{use:wt,fixup:bi},alpha:{use:wt,fixup:rr}},difference:{h:jc},average:{h:xi}};function wO({h:r,s:t,i:e,alpha:n}){r=dr(r!==void 0?r:0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.abs(r/60%2-1),s;switch(Math.floor(r/60)){case 0:s={r:e*(1+t*(3/(2-i)-1)),g:e*(1+t*(3*(1-i)/(2-i)-1)),b:e*(1-t)};break;case 1:s={r:e*(1+t*(3*(1-i)/(2-i)-1)),g:e*(1+t*(3/(2-i)-1)),b:e*(1-t)};break;case 2:s={r:e*(1-t),g:e*(1+t*(3/(2-i)-1)),b:e*(1+t*(3*(1-i)/(2-i)-1))};break;case 3:s={r:e*(1-t),g:e*(1+t*(3*(1-i)/(2-i)-1)),b:e*(1+t*(3/(2-i)-1))};break;case 4:s={r:e*(1+t*(3*(1-i)/(2-i)-1)),g:e*(1-t),b:e*(1+t*(3/(2-i)-1))};break;case 5:s={r:e*(1+t*(3/(2-i)-1)),g:e*(1-t),b:e*(1+t*(3*(1-i)/(2-i)-1))};break;default:s={r:e*(1-t),g:e*(1-t),b:e*(1-t)}}return s.mode="rgb",n!==void 0&&(s.alpha=n),s}function SO({r,g:t,b:e,alpha:n}){r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.max(r,t,e),s=Math.min(r,t,e),o={mode:"hsi",s:r+t+e===0?0:1-3*s/(r+t+e),i:(r+t+e)/3};return i-s!==0&&(o.h=(i===r?(t-e)/(i-s)+(t{switch(t){case"deg":return+r;case"rad":return r/Math.PI*180;case"grad":return r/10*9;case"turn":return r*360}},AO=new RegExp(`^hsla?\\(\\s*${WC}${Ho}${Ha}${Ho}${Ha}\\s*(?:,\\s*${mm}\\s*)?\\)$`),CO=r=>{let t=r.match(AO);if(!t)return;let e={mode:"hsl"};return t[3]!==void 0?e.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(e.h=EO(t[1],t[2])),t[4]!==void 0&&(e.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(e.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?e.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+t[7]))),e};function OO(r,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const e={mode:"hsl"},[,n,i,s,o]=t;if(n.type!==dt.None){if(n.type===dt.Percentage)return;e.h=n.value}if(i.type!==dt.None){if(i.type===dt.Hue)return;e.s=i.value/100}if(s.type!==dt.None){if(s.type===dt.Hue)return;e.l=s.value/100}return o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const fw={mode:"hsl",toMode:{rgb:IO},fromMode:{rgb:MO},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[OO,CO],serialize:r=>`hsl(${r.h!==void 0?r.h:"none"} ${r.s!==void 0?r.s*100+"%":"none"} ${r.l!==void 0?r.l*100+"%":"none"}${r.alpha<1?` / ${r.alpha}`:""})`,interpolate:{h:{use:wt,fixup:bi},s:wt,l:wt,alpha:{use:wt,fixup:rr}},difference:{h:Vc},average:{h:xi}};function pw({h:r,s:t,v:e,alpha:n}){r=dr(r!==void 0?r:0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.abs(r/60%2-1),s;switch(Math.floor(r/60)){case 0:s={r:e,g:e*(1-t*i),b:e*(1-t)};break;case 1:s={r:e*(1-t*i),g:e,b:e*(1-t)};break;case 2:s={r:e*(1-t),g:e,b:e*(1-t*i)};break;case 3:s={r:e*(1-t),g:e*(1-t*i),b:e};break;case 4:s={r:e*(1-t*i),g:e*(1-t),b:e};break;case 5:s={r:e,g:e*(1-t),b:e*(1-t*i)};break;default:s={r:e*(1-t),g:e*(1-t),b:e*(1-t)}}return s.mode="rgb",n!==void 0&&(s.alpha=n),s}function mw({r,g:t,b:e,alpha:n}){r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.max(r,t,e),s=Math.min(r,t,e),o={mode:"hsv",s:i===0?0:1-s/i,v:i};return i-s!==0&&(o.h=(i===r?(t-e)/(i-s)+(t1){let i=t+e;t/=i,e/=i}return pw({h:r,s:e===1?1:1-t/(1-e),v:1-e,alpha:n})}function RO(r){let t=mw(r);if(t===void 0)return;let e=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,i={mode:"hwb",w:(1-e)*n,b:1-n};return t.h!==void 0&&(i.h=t.h),t.alpha!==void 0&&(i.alpha=t.alpha),i}function FO(r,t){if(!t||t[0]!=="hwb")return;const e={mode:"hwb"},[,n,i,s,o]=t;if(n.type!==dt.None){if(n.type===dt.Percentage)return;e.h=n.value}if(i.type!==dt.None){if(i.type===dt.Hue)return;e.w=i.value/100}if(s.type!==dt.None){if(s.type===dt.Hue)return;e.b=s.value/100}return o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const LO={mode:"hwb",toMode:{rgb:PO},fromMode:{rgb:RO},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[FO],serialize:r=>`hwb(${r.h!==void 0?r.h:"none"} ${r.w!==void 0?r.w*100+"%":"none"} ${r.b!==void 0?r.b*100+"%":"none"}${r.alpha<1?` / ${r.alpha}`:""})`,interpolate:{h:{use:wt,fixup:bi},w:wt,b:wt,alpha:{use:wt,fixup:rr}},difference:{h:vO},average:{h:xi}},yw=203,Wc=.1593017578125,vw=78.84375,Hc=.8359375,Xc=18.8515625,Yc=18.6875;function ld(r){if(r<0)return 0;const t=Math.pow(r,1/vw);return 1e4*Math.pow(Math.max(0,t-Hc)/(Xc-Yc*t),1/Wc)}function ud(r){if(r<0)return 0;const t=Math.pow(r/1e4,Wc);return Math.pow((Hc+Xc*t)/(1+Yc*t),vw)}const cd=r=>Math.max(r/yw,0),Vy=({i:r,t,p:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);const i=ld(r+.008609037037932761*t+.11102962500302593*e),s=ld(r-.00860903703793275*t-.11102962500302599*e),o=ld(r+.5600313357106791*t-.32062717498731885*e),a={mode:"xyz65",x:cd(2.070152218389422*i-1.3263473389671556*s+.2066510476294051*o),y:cd(.3647385209748074*i+.680566024947227*s-.0453045459220346*o),z:cd(-.049747207535812*i-.0492609666966138*s+1.1880659249923042*o)};return n!==void 0&&(a.alpha=n),a},hd=(r=0)=>Math.max(r*yw,0),jy=({x:r,y:t,z:e,alpha:n})=>{const i=hd(r),s=hd(t),o=hd(e),a=ud(.3592832590121217*i+.6976051147779502*s-.0358915932320289*o),l=ud(-.1920808463704995*i+1.1004767970374323*s+.0753748658519118*o),u=ud(.0070797844607477*i+.0748396662186366*s+.8433265453898765*o),c=.5*a+.5*l,h=1.61376953125*a-3.323486328125*l+1.709716796875*u,f=4.378173828125*a-4.24560546875*l-.132568359375*u,d={mode:"itp",i:c,t:h,p:f};return n!==void 0&&(d.alpha=n),d},DO={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Vy,rgb:r=>qs(Vy(r))},fromMode:{xyz65:jy,rgb:r=>jy(Ys(r))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:wt,t:wt,p:wt,alpha:{use:wt,fixup:rr}}},NO=134.03437499999998,BO=16295499532821565e-27,dd=r=>{if(r<0)return 0;let t=Math.pow(r/1e4,Wc);return Math.pow((Hc+Xc*t)/(1+Yc*t),NO)},fd=(r=0)=>Math.max(r*203,0),_w=({x:r,y:t,z:e,alpha:n})=>{r=fd(r),t=fd(t),e=fd(e);let i=1.15*r-.15*e,s=.66*t+.34*r,o=dd(.41478972*i+.579999*s+.014648*e),a=dd(-.20151*i+1.120649*s+.0531008*e),l=dd(-.0166008*i+.2648*s+.6684799*e),u=(o+a)/2,c={mode:"jab",j:.44*u/(1-.56*u)-BO,a:3.524*o-4.066708*a+.542708*l,b:.199076*o+1.096799*a-1.295875*l};return n!==void 0&&(c.alpha=n),c},kO=134.03437499999998,$y=16295499532821565e-27,pd=r=>{if(r<0)return 0;let t=Math.pow(r,1/kO);return 1e4*Math.pow((Hc-t)/(Yc*t-Xc),1/Wc)},md=r=>r/203,bw=({j:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=(r+$y)/(.44+.56*(r+$y)),s=pd(i+.13860504*t+.058047316*e),o=pd(i-.13860504*t-.058047316*e),a=pd(i-.096019242*t-.8118919*e),l={mode:"xyz65",x:md(1.661373024652174*s-.914523081304348*o+.23136208173913045*a),y:md(-.3250758611844533*s+1.571847026732543*o-.21825383453227928*a),z:md(-.090982811*s-.31272829*o+1.5227666*a)};return n!==void 0&&(l.alpha=n),l},xw=r=>{let t=_w(Ys(r));return r.r===r.b&&r.b===r.g&&(t.a=t.b=0),t},ww=r=>qs(bw(r)),UO={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:xw,xyz65:_w},toMode:{rgb:ww,xyz65:bw},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:wt,a:wt,b:wt,alpha:{use:wt,fixup:rr}}},Gy=({j:r,a:t,b:e,alpha:n})=>{t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.sqrt(t*t+e*e),s={mode:"jch",j:r,c:i};return i&&(s.h=dr(Math.atan2(e,t)*180/Math.PI)),n!==void 0&&(s.alpha=n),s},Wy=({j:r,c:t,h:e,alpha:n})=>{e===void 0&&(e=0);let i={mode:"jab",j:r,a:t?t*Math.cos(e/180*Math.PI):0,b:t?t*Math.sin(e/180*Math.PI):0};return n!==void 0&&(i.alpha=n),i},zO={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Wy,rgb:r=>ww(Wy(r))},fromMode:{rgb:r=>Gy(xw(r)),jab:Gy},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:wt,fixup:bi},c:wt,j:wt,alpha:{use:wt,fixup:rr}},difference:{h:jc},average:{h:xi}},qc=Math.pow(29,3)/Math.pow(3,3),gm=Math.pow(6,3)/Math.pow(29,3);let gd=r=>Math.pow(r,3)>gm?Math.pow(r,3):(116*r-16)/qc;const ym=({l:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=(r+16)/116,s=t/500+i,o=i-e/200,a={mode:"xyz50",x:gd(s)*Ze.X,y:gd(i)*Ze.Y,z:gd(o)*Ze.Z};return n!==void 0&&(a.alpha=n),a},xl=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=ia({r:r*3.1341359569958707-t*1.6173863321612538-.4906619460083532*e,g:r*-.978795502912089+t*1.916254567259524+.03344273116131949*e,b:r*.07195537988411677-t*.2289768264158322+1.405386058324125*e});return n!==void 0&&(i.alpha=n),i},Sw=r=>xl(ym(r)),wl=r=>{let{r:t,g:e,b:n,alpha:i}=na(r),s={mode:"xyz50",x:.436065742824811*t+.3851514688337912*e+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*e+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*e+.7140993584005155*n};return i!==void 0&&(s.alpha=i),s},yd=r=>r>gm?Math.cbrt(r):(qc*r+16)/116,vm=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=yd(r/Ze.X),s=yd(t/Ze.Y),o=yd(e/Ze.Z),a={mode:"lab",l:116*s-16,a:500*(i-s),b:200*(s-o)};return n!==void 0&&(a.alpha=n),a},Tw=r=>{let t=vm(wl(r));return r.r===r.b&&r.b===r.g&&(t.a=t.b=0),t};function VO(r,t){if(!t||t[0]!=="lab")return;const e={mode:"lab"},[,n,i,s,o]=t;if(!(n.type===dt.Hue||i.type===dt.Hue||s.type===dt.Hue))return n.type!==dt.None&&(e.l=Math.min(Math.max(0,n.value),100)),i.type!==dt.None&&(e.a=i.type===dt.Number?i.value:i.value*125/100),s.type!==dt.None&&(e.b=s.type===dt.Number?s.value:s.value*125/100),o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const _m={mode:"lab",toMode:{xyz50:ym,rgb:Sw},fromMode:{xyz50:vm,rgb:Tw},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[VO],serialize:r=>`lab(${r.l!==void 0?r.l:"none"} ${r.a!==void 0?r.a:"none"} ${r.b!==void 0?r.b:"none"}${r.alpha<1?` / ${r.alpha}`:""})`,interpolate:{l:wt,a:wt,b:wt,alpha:{use:wt,fixup:rr}}},jO={..._m,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:uw,rgb:$c},fromMode:{xyz65:cw,rgb:Gc},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function $O(r,t){if(!t||t[0]!=="lch")return;const e={mode:"lch"},[,n,i,s,o]=t;if(n.type!==dt.None){if(n.type===dt.Hue)return;e.l=Math.min(Math.max(0,n.value),100)}if(i.type!==dt.None&&(e.c=Math.max(0,i.type===dt.Number?i.value:i.value*150/100)),s.type!==dt.None){if(s.type===dt.Percentage)return;e.h=s.value}return o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const bm={mode:"lch",toMode:{lab:Wi,rgb:r=>Sw(Wi(r))},fromMode:{rgb:r=>Gi(Tw(r)),lab:Gi},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$O],serialize:r=>`lch(${r.l!==void 0?r.l:"none"} ${r.c!==void 0?r.c:"none"} ${r.h!==void 0?r.h:"none"}${r.alpha<1?` / ${r.alpha}`:""})`,interpolate:{h:{use:wt,fixup:bi},c:wt,l:wt,alpha:{use:wt,fixup:rr}},difference:{h:jc},average:{h:xi}},GO={...bm,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:r=>Wi(r,"lab65"),rgb:r=>$c(Wi(r,"lab65"))},fromMode:{rgb:r=>Gi(Gc(r),"lch65"),lab65:r=>Gi(r,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},Iw=({l:r,u:t,v:e,alpha:n})=>{t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.sqrt(t*t+e*e),s={mode:"lchuv",l:r,c:i};return i&&(s.h=dr(Math.atan2(e,t)*180/Math.PI)),n!==void 0&&(s.alpha=n),s},Mw=({l:r,c:t,h:e,alpha:n})=>{e===void 0&&(e=0);let i={mode:"luv",l:r,u:t?t*Math.cos(e/180*Math.PI):0,v:t?t*Math.sin(e/180*Math.PI):0};return n!==void 0&&(i.alpha=n),i},Ew=(r,t,e)=>4*r/(r+15*t+3*e),Aw=(r,t,e)=>9*t/(r+15*t+3*e),WO=Ew(Ze.X,Ze.Y,Ze.Z),HO=Aw(Ze.X,Ze.Y,Ze.Z),XO=r=>r<=gm?qc*r:116*Math.cbrt(r)-16,Tf=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=XO(t/Ze.Y),s=Ew(r,t,e),o=Aw(r,t,e);!isFinite(s)||!isFinite(o)?i=s=o=0:(s=13*i*(s-WO),o=13*i*(o-HO));let a={mode:"luv",l:i,u:s,v:o};return n!==void 0&&(a.alpha=n),a},YO=(r,t,e)=>4*r/(r+15*t+3*e),qO=(r,t,e)=>9*t/(r+15*t+3*e),QO=YO(Ze.X,Ze.Y,Ze.Z),ZO=qO(Ze.X,Ze.Y,Ze.Z),If=({l:r,u:t,v:e,alpha:n})=>{if(r===void 0&&(r=0),r===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),e===void 0&&(e=0);let i=t/(13*r)+QO,s=e/(13*r)+ZO,o=Ze.Y*(r<=8?r/qc:Math.pow((r+16)/116,3)),a=o*(9*i)/(4*s),l=o*(12-3*i-20*s)/(4*s),u={mode:"xyz50",x:a,y:o,z:l};return n!==void 0&&(u.alpha=n),u},KO=r=>Iw(Tf(wl(r))),JO=r=>xl(If(Mw(r))),tP={mode:"lchuv",toMode:{luv:Mw,rgb:JO},fromMode:{rgb:KO,luv:Iw},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:wt,fixup:bi},c:wt,l:wt,alpha:{use:wt,fixup:rr}},difference:{h:jc},average:{h:xi}},eP={...ra,mode:"lrgb",toMode:{rgb:ia},fromMode:{rgb:na},parse:["srgb-linear"],serialize:"srgb-linear"},rP={mode:"luv",toMode:{xyz50:If,rgb:r=>xl(If(r))},fromMode:{xyz50:Tf,rgb:r=>Tf(wl(r))},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:wt,u:wt,v:wt,alpha:{use:wt,fixup:rr}}},Cw=({r,g:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.cbrt(.41222147079999993*r+.5363325363*t+.0514459929*e),s=Math.cbrt(.2119034981999999*r+.6806995450999999*t+.1073969566*e),o=Math.cbrt(.08830246189999998*r+.2817188376*t+.6299787005000002*e),a={mode:"oklab",l:.2104542553*i+.793617785*s-.0040720468*o,a:1.9779984951*i-2.428592205*s+.4505937099*o,b:.0259040371*i+.7827717662*s-.808675766*o};return n!==void 0&&(a.alpha=n),a},Qc=r=>{let t=Cw(na(r));return r.r===r.b&&r.b===r.g&&(t.a=t.b=0),t},Sl=({l:r,a:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=Math.pow(r*.9999999984505198+.39633779217376786*t+.2158037580607588*e,3),s=Math.pow(r*1.0000000088817609-.10556134232365635*t-.06385417477170591*e,3),o=Math.pow(r*1.0000000546724108-.08948418209496575*t-1.2914855378640917*e,3),a={mode:"lrgb",r:4.076741661347994*i-3.307711590408193*s+.230969928729428*o,g:-1.2684380040921763*i+2.6097574006633715*s-.3413193963102197*o,b:-.004196086541837188*i-.7034186144594493*s+1.7076147009309444*o};return n!==void 0&&(a.alpha=n),a},Zc=r=>ia(Sl(r));function Mf(r){const n=1.170873786407767;return .5*(n*r-.206+Math.sqrt((n*r-.206)*(n*r-.206)+4*.03*n*r))}function ju(r){return(r*r+.206*r)/(1.170873786407767*(r+.03))}function nP(r,t){let e,n,i,s,o,a,l,u;-1.88170328*r-.80936493*t>1?(e=1.19086277,n=1.76576728,i=.59662641,s=.75515197,o=.56771245,a=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*r-1.19445276*t>1?(e=.73956515,n=-.45954404,i=.08285427,s=.1254107,o=.14503204,a=-1.2684380046,l=2.6097574011,u=-.3413193965):(e=1.35733652,n=-.00915799,i=-1.1513021,s=-.50559606,o=.00692167,a=-.0041960863,l=-.7034186147,u=1.707614701);let c=e+n*r+i*t+s*r*r+o*r*t,h=.3963377774*r+.2158037573*t,f=-.1055613458*r-.0638541728*t,d=-.0894841775*r-1.291485548*t;{let m=1+c*h,g=1+c*f,p=1+c*d,y=m*m*m,v=g*g*g,S=p*p*p,T=3*h*m*m,_=3*f*g*g,M=3*d*p*p,x=6*h*h*m,N=6*f*f*g,D=6*d*d*p,j=a*y+l*v+u*S,it=a*T+l*_+u*M,I=a*x+l*N+u*D;c=c-j*it/(it*it-.5*j*I)}return c}function xm(r,t){let e=nP(r,t),n=Sl({l:1,a:e*r,b:e*t}),i=Math.cbrt(1/Math.max(n.r,n.g,n.b)),s=i*e;return[i,s]}function iP(r,t,e,n,i,s=null){s||(s=xm(r,t));let o;if((e-i)*s[1]-(s[0]-i)*n<=0)o=s[1]*i/(n*s[0]+s[1]*(i-e));else{o=s[1]*(i-1)/(n*(s[0]-1)+s[1]*(i-e));{let a=e-i,l=n,u=.3963377774*r+.2158037573*t,c=-.1055613458*r-.0638541728*t,h=-.0894841775*r-1.291485548*t,f=a+l*u,d=a+l*c,m=a+l*h;{let g=i*(1-o)+o*e,p=o*n,y=g+p*u,v=g+p*c,S=g+p*h,T=y*y*y,_=v*v*v,M=S*S*S,x=3*f*y*y,N=3*d*v*v,D=3*m*S*S,j=6*f*f*y,it=6*d*d*v,I=6*m*m*S,Q=4.0767416621*T-3.3077115913*_+.2309699292*M-1,w=4.0767416621*x-3.3077115913*N+.2309699292*D,nt=4.0767416621*j-3.3077115913*it+.2309699292*I,P=w/(w*w-.5*Q*nt),C=-Q*P,R=-1.2684380046*T+2.6097574011*_-.3413193965*M-1,U=-1.2684380046*x+2.6097574011*N-.3413193965*D,k=-1.2684380046*j+2.6097574011*it-.3413193965*I,A=U/(U*U-.5*R*k),O=-R*A,$=-.0041960863*T-.7034186147*_+1.707614701*M-1,tt=-.0041960863*x-.7034186147*N+1.707614701*D,et=-.0041960863*j-.7034186147*it+1.707614701*I,yt=tt/(tt*tt-.5*$*et),_t=-$*yt;C=P>=0?C:1e6,O=A>=0?O:1e6,_t=yt>=0?_t:1e6,o+=Math.min(C,Math.min(O,_t))}}}return o}function wm(r,t,e=null){e||(e=xm(r,t));let n=e[0],i=e[1];return[i/n,i/(1-n)]}function Ow(r,t,e){let n=xm(t,e),i=iP(t,e,r,1,r,n),s=wm(t,e,n),o=.11516993+1/(7.4477897+4.1590124*e+t*(-2.19557347+1.75198401*e+t*(-2.13704948-10.02301043*e+t*(-4.24894561+5.38770819*e+4.69891013*t)))),a=.11239642+1/(1.6132032-.68124379*e+t*(.40370612+.90148123*e+t*(-.27087943+.6122399*e+t*(.00299215-.45399568*e-.14661872*t)))),l=i/Math.min(r*s[0],(1-r)*s[1]),u=r*o,c=(1-r)*a,h=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=r*.4,c=(1-r)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),h,i]}function Hy(r){const t=r.l!==void 0?r.l:0,e=r.a!==void 0?r.a:0,n=r.b!==void 0?r.b:0,i={mode:"okhsl",l:Mf(t)};r.alpha!==void 0&&(i.alpha=r.alpha);let s=Math.sqrt(e*e+n*n);if(!s)return i.s=0,i;let[o,a,l]=Ow(t,e/s,n/s),u;if(sHy(Qc(r))},toMode:{oklab:Xy,rgb:r=>Zc(Xy(r))}};function Yy(r){let t=r.l!==void 0?r.l:0,e=r.a!==void 0?r.a:0,n=r.b!==void 0?r.b:0,i=Math.sqrt(e*e+n*n),s=i?e/i:1,o=i?n/i:1,[a,l]=wm(s,o),u=.5,c=1-u/a,h=l/(i+t*l),f=h*t,d=h*i,m=ju(f),g=d*m/f,p=Sl({l:m,a:s*g,b:o*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0));t=t/y,i=i/y*Mf(t)/t,t=Mf(t);const v={mode:"okhsv",s:i?(u+l)*d/(l*u+l*c*d):0,v:t?t/f:0};return v.s&&(v.h=dr(Math.atan2(n,e)*180/Math.PI)),r.alpha!==void 0&&(v.alpha=r.alpha),v}function qy(r){const t={mode:"oklab"};r.alpha!==void 0&&(t.alpha=r.alpha);const e=r.h!==void 0?r.h:0,n=r.s!==void 0?r.s:0,i=r.v!==void 0?r.v:0,s=Math.cos(e/180*Math.PI),o=Math.sin(e/180*Math.PI),[a,l]=wm(s,o),u=.5,c=1-u/a,h=1-n*u/(u+l-l*c*n),f=n*l*u/(u+l-l*c*n),d=ju(h),m=f*d/h,g=Sl({l:d,a:s*m,b:o*m}),p=Math.cbrt(1/Math.max(g.r,g.g,g.b,0)),y=ju(i*h),v=f*y/h;return t.l=y*p,t.a=v*s*p,t.b=v*o*p,t}const oP={...gw,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Yy,rgb:r=>Yy(Qc(r))},toMode:{oklab:qy,rgb:r=>Zc(qy(r))}};function aP(r,t){if(!t||t[0]!=="oklab")return;const e={mode:"oklab"},[,n,i,s,o]=t;if(!(n.type===dt.Hue||i.type===dt.Hue||s.type===dt.Hue))return n.type!==dt.None&&(e.l=Math.min(Math.max(0,n.type===dt.Number?n.value:n.value/100),1)),i.type!==dt.None&&(e.a=i.type===dt.Number?i.value:i.value*.4/100),s.type!==dt.None&&(e.b=s.type===dt.Number?s.value:s.value*.4/100),o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const lP={..._m,mode:"oklab",toMode:{lrgb:Sl,rgb:Zc},fromMode:{lrgb:Cw,rgb:Qc},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[aP],serialize:r=>`oklab(${r.l!==void 0?r.l:"none"} ${r.a!==void 0?r.a:"none"} ${r.b!==void 0?r.b:"none"}${r.alpha<1?` / ${r.alpha}`:""})`};function uP(r,t){if(!t||t[0]!=="oklch")return;const e={mode:"oklch"},[,n,i,s,o]=t;if(n.type!==dt.None){if(n.type===dt.Hue)return;e.l=Math.min(Math.max(0,n.type===dt.Number?n.value:n.value/100),1)}if(i.type!==dt.None&&(e.c=Math.max(0,i.type===dt.Number?i.value:i.value*.4/100)),s.type!==dt.None){if(s.type===dt.Percentage)return;e.h=s.value}return o.type!==dt.None&&(e.alpha=Math.min(1,Math.max(0,o.type===dt.Number?o.value:o.value/100))),e}const cP={...bm,mode:"oklch",toMode:{oklab:r=>Wi(r,"oklab"),rgb:r=>Zc(Wi(r,"oklab"))},fromMode:{rgb:r=>Gi(Qc(r),"oklch"),oklab:r=>Gi(r,"oklch")},parse:[uP],serialize:r=>`oklch(${r.l!==void 0?r.l:"none"} ${r.c!==void 0?r.c:"none"} ${r.h!==void 0?r.h:"none"}${r.alpha<1?` / ${r.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Qy=r=>{let{r:t,g:e,b:n,alpha:i}=na(r),s={mode:"xyz65",x:.486570948648216*t+.265667693169093*e+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*e+.079286914093745*n,z:0*t+.0451133818589026*e+1.043944368900976*n};return i!==void 0&&(s.alpha=i),s},Zy=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i=ia({r:r*2.4934969119414263-t*.9313836179191242-.402710784450717*e,g:r*-.8294889695615749+t*1.7626640603183465+.0236246858419436*e,b:r*.0358458302437845-t*.0761723892680418+.9568845240076871*e},"p3");return n!==void 0&&(i.alpha=n),i},hP={...ra,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:r=>Zy(Ys(r)),xyz65:Zy},toMode:{rgb:r=>qs(Qy(r)),xyz65:Qy}},vd=r=>{let t=Math.abs(r);return t>=1/512?Math.sign(r)*Math.pow(t,1/1.8):16*r},Ky=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i={mode:"prophoto",r:vd(r*1.3457868816471585-t*.2555720873797946-.0511018649755453*e),g:vd(r*-.5446307051249019+t*1.5082477428451466+.0205274474364214*e),b:vd(r*0+t*0+1.2119675456389452*e)};return n!==void 0&&(i.alpha=n),i},_d=(r=0)=>{let t=Math.abs(r);return t>=16/512?Math.sign(r)*Math.pow(t,1.8):r/16},Jy=r=>{let t=_d(r.r),e=_d(r.g),n=_d(r.b),i={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*e+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*e+899369387256e-16*n,z:0*t+0*e+.8251046025104602*n};return r.alpha!==void 0&&(i.alpha=r.alpha),i},dP={...ra,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Ky,rgb:r=>Ky(wl(r))},toMode:{xyz50:Jy,rgb:r=>xl(Jy(r))}},tv=1.09929682680944,fP=.018053968510807,bd=r=>{const t=Math.abs(r);return t>fP?(Math.sign(r)||1)*(tv*Math.pow(t,.45)-(tv-1)):4.5*r},ev=({x:r,y:t,z:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);let i={mode:"rec2020",r:bd(r*1.7166511879712683-t*.3556707837763925-.2533662813736599*e),g:bd(r*-.6666843518324893+t*1.6164812366349395+.0157685458139111*e),b:bd(r*.0176398574453108-t*.0427706132578085+.9421031212354739*e)};return n!==void 0&&(i.alpha=n),i},rv=1.09929682680944,pP=.018053968510807,xd=(r=0)=>{let t=Math.abs(r);return t{let t=xd(r.r),e=xd(r.g),n=xd(r.b),i={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*e+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*e+.059301716469862*n,z:0*t+.0280726930490874*e+1.0609850577107909*n};return r.alpha!==void 0&&(i.alpha=r.alpha),i},mP={...ra,mode:"rec2020",fromMode:{xyz65:ev,rgb:r=>ev(Ys(r))},toMode:{xyz65:nv,rgb:r=>qs(nv(r))},parse:["rec2020"],serialize:"rec2020"},Bs=.0037930732552754493,Pw=Math.cbrt(Bs),wd=r=>Math.cbrt(r)-Pw,gP=r=>{const{r:t,g:e,b:n,alpha:i}=na(r),s=wd(.3*t+.622*e+.078*n+Bs),o=wd(.23*t+.692*e+.078*n+Bs),a=wd(.2434226892454782*t+.2047674442449682*e+.5518098665095535*n+Bs),l={mode:"xyb",x:(s-o)/2,y:(s+o)/2,b:a-(s+o)/2};return i!==void 0&&(l.alpha=i),l},Sd=r=>Math.pow(r+Pw,3),yP=({x:r,y:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);const i=Sd(r+t)-Bs,s=Sd(t-r)-Bs,o=Sd(e+t)-Bs,a=ia({r:11.031566904639861*i-9.866943908131562*s-.16462299650829934*o,g:-3.2541473810744237*i+4.418770377582723*s-.16462299650829934*o,b:-3.6588512867136815*i+2.7129230459360922*s+1.9459282407775895*o});return n!==void 0&&(a.alpha=n),a},vP={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:yP},fromMode:{rgb:gP},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:wt,y:wt,b:wt,alpha:{use:wt,fixup:rr}}},_P={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:xl,lab:vm},fromMode:{rgb:wl,lab:ym},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:wt,y:wt,z:wt,alpha:{use:wt,fixup:rr}}},bP=r=>{let{x:t,y:e,z:n,alpha:i}=r;t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let s={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*e-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*e-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*e+.7518742899580008*n};return i!==void 0&&(s.alpha=i),s},xP=r=>{let{x:t,y:e,z:n,alpha:i}=r;t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let s={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*e+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*e+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*e+1.3303659366080753*n};return i!==void 0&&(s.alpha=i),s},wP={mode:"xyz65",toMode:{rgb:qs,xyz50:bP},fromMode:{rgb:Ys,xyz50:xP},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:wt,y:wt,z:wt,alpha:{use:wt,fixup:rr}}},SP=({r,g:t,b:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);const i={mode:"yiq",y:.29889531*r+.58662247*t+.11448223*e,i:.59597799*r-.2741761*t-.32180189*e,q:.21147017*r-.52261711*t+.31114694*e};return n!==void 0&&(i.alpha=n),i},TP=({y:r,i:t,q:e,alpha:n})=>{r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0);const i={mode:"rgb",r:r+.95608445*t+.6208885*e,g:r-.27137664*t-.6486059*e,b:r-1.10561724*t+1.70250126*e};return n!==void 0&&(i.alpha=n),i},IP={mode:"yiq",toMode:{rgb:TP},fromMode:{rgb:SP},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:wt,i:wt,q:wt,alpha:{use:wt,fixup:rr}}};we(dO);we(_O);we(bO);we(xO);we(TO);we(fw);we(gw);we(LO);we(DO);we(UO);we(zO);we(_m);we(jO);we(bm);we(GO);we(tP);we(eP);we(rP);we(sP);we(oP);we(lP);we(cP);we(hP);we(dP);we(mP);we(ra);we(vP);we(_P);we(wP);we(IP);function ki(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Td={exports:{}};/*! localForage -- Offline Storage, Improved Version 1.10.0 https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 -*/var iv;function MP(){return iv||(iv=1,function(r,t){(function(e){r.exports=e()})(function(){return function e(n,i,s){function o(u,c){if(!i[u]){if(!n[u]){var h=typeof ki=="function"&&ki;if(!c&&h)return h(u,!0);if(a)return a(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var d=i[u]={exports:{}};n[u][0].call(d.exports,function(m){var g=n[u][1][m];return o(g||m)},d,d.exports,e,n,i,s)}return i[u].exports}for(var a=typeof ki=="function"&&ki,l=0;l"u"&&e(3);var h=Promise;function f(E,V){V&&E.then(function(F){V(null,F)},function(F){V(F)})}function d(E,V,F){typeof V=="function"&&E.then(V),typeof F=="function"&&E.catch(F)}function m(E){return typeof E!="string"&&(console.warn(E+" used as a key, but it is not a string."),E=String(E)),E}function g(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var p="local-forage-detect-blob-support",y=void 0,v={},S=Object.prototype.toString,T="readonly",_="readwrite";function M(E){for(var V=E.length,F=new ArrayBuffer(V),X=new Uint8Array(F),J=0;J=43)}}).catch(function(){return!1})}function N(E){return typeof y=="boolean"?h.resolve(y):x(E).then(function(V){return y=V,y})}function L(E){var V=v[E.name],F={};F.promise=new h(function(X,J){F.resolve=X,F.reject=J}),V.deferredOperations.push(F),V.dbReady?V.dbReady=V.dbReady.then(function(){return F.promise}):V.dbReady=F.promise}function j(E){var V=v[E.name],F=V.deferredOperations.pop();if(F)return F.resolve(),F.promise}function it(E,V){var F=v[E.name],X=F.deferredOperations.pop();if(X)return X.reject(V),X.promise}function I(E,V){return new h(function(F,X){if(v[E.name]=v[E.name]||O(),E.db)if(V)L(E),E.db.close();else return F(E.db);var J=[E.name];V&&J.push(E.version);var G=l.open.apply(l,J);V&&(G.onupgradeneeded=function(st){var ut=G.result;try{ut.createObjectStore(E.storeName),st.oldVersion<=1&&ut.createObjectStore(p)}catch(ft){if(ft.name==="ConstraintError")console.warn('The database "'+E.name+'" has been upgraded from version '+st.oldVersion+" to version "+st.newVersion+', but the storage "'+E.storeName+'" already exists.');else throw ft}}),G.onerror=function(st){st.preventDefault(),X(G.error)},G.onsuccess=function(){var st=G.result;st.onversionchange=function(ut){ut.target.close()},F(st),j(E)}})}function Q(E){return I(E,!1)}function w(E){return I(E,!0)}function nt(E,V){if(!E.db)return!0;var F=!E.db.objectStoreNames.contains(E.storeName),X=E.versionE.db.version;if(X&&(E.version!==V&&console.warn('The database "'+E.name+`" can't be downgraded from version `+E.db.version+" to version "+E.version+"."),E.version=E.db.version),J||F){if(F){var G=E.db.version+1;G>E.version&&(E.version=G)}return!0}return!1}function P(E){return new h(function(V,F){var X=new FileReader;X.onerror=F,X.onloadend=function(J){var G=btoa(J.target.result||"");V({__local_forage_encoded_blob:!0,data:G,type:E.type})},X.readAsBinaryString(E)})}function C(E){var V=M(atob(E.data));return c([V],{type:E.type})}function R(E){return E&&E.__local_forage_encoded_blob}function U(E){var V=this,F=V._initReady().then(function(){var X=v[V._dbInfo.name];if(X&&X.dbReady)return X.dbReady});return d(F,E,E),F}function k(E){L(E);for(var V=v[E.name],F=V.forages,X=0;X0&&(!E.db||G.name==="InvalidStateError"||G.name==="NotFoundError"))return h.resolve().then(function(){if(!E.db||G.name==="NotFoundError"&&!E.db.objectStoreNames.contains(E.storeName)&&E.version<=E.db.version)return E.db&&(E.version=E.db.version+1),w(E)}).then(function(){return k(E).then(function(){A(E,V,F,X-1)})}).catch(F);F(G)}}function O(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function $(E){var V=this,F={db:null};if(E)for(var X in E)F[X]=E[X];var J=v[F.name];J||(J=O(),v[F.name]=J),J.forages.push(V),V._initReady||(V._initReady=V.ready,V.ready=U);var G=[];function st(){return h.resolve()}for(var ut=0;ut>4,vt[J++]=(st&15)<<4|ut>>2,vt[J++]=(ut&3)<<6|ft&63;return mt}function In(E){var V=new Uint8Array(E),F="",X;for(X=0;X>2],F+=K[(V[X]&3)<<4|V[X+1]>>4],F+=K[(V[X+1]&15)<<2|V[X+2]>>6],F+=K[V[X+2]&63];return V.length%3===2?F=F.substring(0,F.length-1)+"=":V.length%3===1&&(F=F.substring(0,F.length-2)+"=="),F}function Ei(E,V){var F="";if(E&&(F=gn.call(E)),E&&(F==="[object ArrayBuffer]"||E.buffer&&gn.call(E.buffer)==="[object ArrayBuffer]")){var X,J=D;E instanceof ArrayBuffer?(X=E,J+=ot):(X=E.buffer,F==="[object Int8Array]"?J+=rt:F==="[object Uint8Array]"?J+=ht:F==="[object Uint8ClampedArray]"?J+=St:F==="[object Int16Array]"?J+=pt:F==="[object Uint16Array]"?J+=_e:F==="[object Int32Array]"?J+=Ot:F==="[object Uint32Array]"?J+=ue:F==="[object Float32Array]"?J+=sr:F==="[object Float64Array]"?J+=fr:V(new Error("Failed to get type for BinaryArray"))),V(J+In(X))}else if(F==="[object Blob]"){var G=new FileReader;G.onload=function(){var st=Z+E.type+"~"+In(this.result);V(D+at+st)},G.readAsArrayBuffer(E)}else try{V(JSON.stringify(E))}catch(st){console.error("Couldn't convert value into a JSON string: ",E),V(null,st)}}function Fr(E){if(E.substring(0,q)!==D)return JSON.parse(E);var V=E.substring(vr),F=E.substring(q,vr),X;if(F===at&&B.test(V)){var J=V.match(B);X=J[1],V=V.substring(J[0].length)}var G=Ce(V);switch(F){case ot:return G;case at:return c([G],{type:X});case rt:return new Int8Array(G);case ht:return new Uint8Array(G);case St:return new Uint8ClampedArray(G);case pt:return new Int16Array(G);case _e:return new Uint16Array(G);case Ot:return new Int32Array(G);case ue:return new Uint32Array(G);case sr:return new Float32Array(G);case fr:return new Float64Array(G);default:throw new Error("Unkown type: "+F)}}var Ai={serialize:Ei,deserialize:Fr,stringToBuffer:Ce,bufferToString:In};function is(E,V,F,X){E.executeSql("CREATE TABLE IF NOT EXISTS "+V.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],F,X)}function ua(E){var V=this,F={db:null};if(E)for(var X in E)F[X]=typeof E[X]!="string"?E[X].toString():E[X];var J=new h(function(G,st){try{F.db=openDatabase(F.name,String(F.version),F.description,F.size)}catch(ut){return st(ut)}F.db.transaction(function(ut){is(ut,F,function(){V._dbInfo=F,G()},function(ft,mt){st(mt)})},st)});return F.serializer=Ai,J}function Xr(E,V,F,X,J,G){E.executeSql(F,X,J,function(st,ut){ut.code===ut.SYNTAX_ERR?st.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[V.storeName],function(ft,mt){mt.rows.length?G(ft,ut):is(ft,V,function(){ft.executeSql(F,X,J,G)},G)},G):G(st,ut)},G)}function ss(E,V){var F=this;E=m(E);var X=new h(function(J,G){F.ready().then(function(){var st=F._dbInfo;st.db.transaction(function(ut){Xr(ut,st,"SELECT * FROM "+st.storeName+" WHERE key = ? LIMIT 1",[E],function(ft,mt){var vt=mt.rows.length?mt.rows.item(0).value:null;vt&&(vt=st.serializer.deserialize(vt)),J(vt)},function(ft,mt){G(mt)})})}).catch(G)});return f(X,V),X}function ni(E,V){var F=this,X=new h(function(J,G){F.ready().then(function(){var st=F._dbInfo;st.db.transaction(function(ut){Xr(ut,st,"SELECT * FROM "+st.storeName,[],function(ft,mt){for(var vt=mt.rows,Et=vt.length,ce=0;ce0){st(Yr.apply(J,[E,ft,F,X-1]));return}ut(ce)}})})}).catch(ut)});return f(G,F),G}function Js(E,V,F){return Yr.apply(this,[E,V,F,1])}function Fl(E,V){var F=this;E=m(E);var X=new h(function(J,G){F.ready().then(function(){var st=F._dbInfo;st.db.transaction(function(ut){Xr(ut,st,"DELETE FROM "+st.storeName+" WHERE key = ?",[E],function(){J()},function(ft,mt){G(mt)})})}).catch(G)});return f(X,V),X}function ch(E){var V=this,F=new h(function(X,J){V.ready().then(function(){var G=V._dbInfo;G.db.transaction(function(st){Xr(st,G,"DELETE FROM "+G.storeName,[],function(){X()},function(ut,ft){J(ft)})})}).catch(J)});return f(F,E),F}function ca(E){var V=this,F=new h(function(X,J){V.ready().then(function(){var G=V._dbInfo;G.db.transaction(function(st){Xr(st,G,"SELECT COUNT(key) as c FROM "+G.storeName,[],function(ut,ft){var mt=ft.rows.item(0).c;X(mt)},function(ut,ft){J(ft)})})}).catch(J)});return f(F,E),F}function hh(E,V){var F=this,X=new h(function(J,G){F.ready().then(function(){var st=F._dbInfo;st.db.transaction(function(ut){Xr(ut,st,"SELECT key FROM "+st.storeName+" WHERE id = ? LIMIT 1",[E+1],function(ft,mt){var vt=mt.rows.length?mt.rows.item(0).key:null;J(vt)},function(ft,mt){G(mt)})})}).catch(G)});return f(X,V),X}function dh(E){var V=this,F=new h(function(X,J){V.ready().then(function(){var G=V._dbInfo;G.db.transaction(function(st){Xr(st,G,"SELECT key FROM "+G.storeName,[],function(ut,ft){for(var mt=[],vt=0;vt '__WebKitDatabaseInfoTable__'",[],function(J,G){for(var st=[],ut=0;ut0}function ha(E){var V=this,F={};if(E)for(var X in E)F[X]=E[X];return F.keyPrefix=Ll(E,V._defaultConfig),yh()?(V._dbInfo=F,F.serializer=Ai,h.resolve()):h.reject()}function Nl(E){var V=this,F=V.ready().then(function(){for(var X=V._dbInfo.keyPrefix,J=localStorage.length-1;J>=0;J--){var G=localStorage.key(J);G.indexOf(X)===0&&localStorage.removeItem(G)}});return f(F,E),F}function vh(E,V){var F=this;E=m(E);var X=F.ready().then(function(){var J=F._dbInfo,G=localStorage.getItem(J.keyPrefix+E);return G&&(G=J.serializer.deserialize(G)),G});return f(X,V),X}function _h(E,V){var F=this,X=F.ready().then(function(){for(var J=F._dbInfo,G=J.keyPrefix,st=G.length,ut=localStorage.length,ft=1,mt=0;mt=0;st--){var ut=localStorage.key(st);ut.indexOf(G)===0&&localStorage.removeItem(ut)}}):J=h.reject("Invalid arguments"),f(J,V),J}var Sh={_driver:"localStorageWrapper",_initStorage:ha,_support:mh(),iterate:_h,getItem:vh,setItem:wh,removeItem:xh,clear:Nl,length:Bl,key:_g,keys:bh,dropInstance:to},Th=function(V,F){return V===F||typeof V=="number"&&typeof F=="number"&&isNaN(V)&&isNaN(F)},kl=function(V,F){for(var X=V.length,J=0;J"u"?"undefined":s(F))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var X in F){if(X==="storeName"&&(F[X]=F[X].replace(/\W/g,"_")),X==="version"&&typeof F[X]!="number")return new Error("Database version must be a number.");this._config[X]=F[X]}return"driver"in F&&F.driver?this.setDriver(this._config.driver):!0}else return typeof F=="string"?this._config[F]:this._config},E.prototype.defineDriver=function(F,X,J){var G=new h(function(st,ut){try{var ft=F._driver,mt=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!F._driver){ut(mt);return}for(var vt=Ih.concat("_initStorage"),Et=0,ce=vt.length;Et"u"&&e(3);var h=Promise;function f(E,V){V&&E.then(function(F){V(null,F)},function(F){V(F)})}function d(E,V,F){typeof V=="function"&&E.then(V),typeof F=="function"&&E.catch(F)}function m(E){return typeof E!="string"&&(console.warn(E+" used as a key, but it is not a string."),E=String(E)),E}function g(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var p="local-forage-detect-blob-support",y=void 0,v={},S=Object.prototype.toString,T="readonly",_="readwrite";function M(E){for(var V=E.length,F=new ArrayBuffer(V),X=new Uint8Array(F),J=0;J=43)}}).catch(function(){return!1})}function N(E){return typeof y=="boolean"?h.resolve(y):x(E).then(function(V){return y=V,y})}function D(E){var V=v[E.name],F={};F.promise=new h(function(X,J){F.resolve=X,F.reject=J}),V.deferredOperations.push(F),V.dbReady?V.dbReady=V.dbReady.then(function(){return F.promise}):V.dbReady=F.promise}function j(E){var V=v[E.name],F=V.deferredOperations.pop();if(F)return F.resolve(),F.promise}function it(E,V){var F=v[E.name],X=F.deferredOperations.pop();if(X)return X.reject(V),X.promise}function I(E,V){return new h(function(F,X){if(v[E.name]=v[E.name]||O(),E.db)if(V)D(E),E.db.close();else return F(E.db);var J=[E.name];V&&J.push(E.version);var G=l.open.apply(l,J);V&&(G.onupgradeneeded=function(st){var ut=G.result;try{ut.createObjectStore(E.storeName),st.oldVersion<=1&&ut.createObjectStore(p)}catch(ft){if(ft.name==="ConstraintError")console.warn('The database "'+E.name+'" has been upgraded from version '+st.oldVersion+" to version "+st.newVersion+', but the storage "'+E.storeName+'" already exists.');else throw ft}}),G.onerror=function(st){st.preventDefault(),X(G.error)},G.onsuccess=function(){var st=G.result;st.onversionchange=function(ut){ut.target.close()},F(st),j(E)}})}function Q(E){return I(E,!1)}function w(E){return I(E,!0)}function nt(E,V){if(!E.db)return!0;var F=!E.db.objectStoreNames.contains(E.storeName),X=E.versionE.db.version;if(X&&(E.version!==V&&console.warn('The database "'+E.name+`" can't be downgraded from version `+E.db.version+" to version "+E.version+"."),E.version=E.db.version),J||F){if(F){var G=E.db.version+1;G>E.version&&(E.version=G)}return!0}return!1}function P(E){return new h(function(V,F){var X=new FileReader;X.onerror=F,X.onloadend=function(J){var G=btoa(J.target.result||"");V({__local_forage_encoded_blob:!0,data:G,type:E.type})},X.readAsBinaryString(E)})}function C(E){var V=M(atob(E.data));return c([V],{type:E.type})}function R(E){return E&&E.__local_forage_encoded_blob}function U(E){var V=this,F=V._initReady().then(function(){var X=v[V._dbInfo.name];if(X&&X.dbReady)return X.dbReady});return d(F,E,E),F}function k(E){D(E);for(var V=v[E.name],F=V.forages,X=0;X0&&(!E.db||G.name==="InvalidStateError"||G.name==="NotFoundError"))return h.resolve().then(function(){if(!E.db||G.name==="NotFoundError"&&!E.db.objectStoreNames.contains(E.storeName)&&E.version<=E.db.version)return E.db&&(E.version=E.db.version+1),w(E)}).then(function(){return k(E).then(function(){A(E,V,F,X-1)})}).catch(F);F(G)}}function O(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function $(E){var V=this,F={db:null};if(E)for(var X in E)F[X]=E[X];var J=v[F.name];J||(J=O(),v[F.name]=J),J.forages.push(V),V._initReady||(V._initReady=V.ready,V.ready=U);var G=[];function st(){return h.resolve()}for(var ut=0;ut>4,vt[J++]=(st&15)<<4|ut>>2,vt[J++]=(ut&3)<<6|ft&63;return mt}function In(E){var V=new Uint8Array(E),F="",X;for(X=0;X>2],F+=K[(V[X]&3)<<4|V[X+1]>>4],F+=K[(V[X+1]&15)<<2|V[X+2]>>6],F+=K[V[X+2]&63];return V.length%3===2?F=F.substring(0,F.length-1)+"=":V.length%3===1&&(F=F.substring(0,F.length-2)+"=="),F}function Ei(E,V){var F="";if(E&&(F=gn.call(E)),E&&(F==="[object ArrayBuffer]"||E.buffer&&gn.call(E.buffer)==="[object ArrayBuffer]")){var X,J=L;E instanceof ArrayBuffer?(X=E,J+=ot):(X=E.buffer,F==="[object Int8Array]"?J+=rt:F==="[object Uint8Array]"?J+=ht:F==="[object Uint8ClampedArray]"?J+=St:F==="[object Int16Array]"?J+=pt:F==="[object Uint16Array]"?J+=_e:F==="[object Int32Array]"?J+=Ot:F==="[object Uint32Array]"?J+=ue:F==="[object Float32Array]"?J+=sr:F==="[object Float64Array]"?J+=fr:V(new Error("Failed to get type for BinaryArray"))),V(J+In(X))}else if(F==="[object Blob]"){var G=new FileReader;G.onload=function(){var st=Z+E.type+"~"+In(this.result);V(L+at+st)},G.readAsArrayBuffer(E)}else try{V(JSON.stringify(E))}catch(st){console.error("Couldn't convert value into a JSON string: ",E),V(null,st)}}function Fr(E){if(E.substring(0,q)!==L)return JSON.parse(E);var V=E.substring(vr),F=E.substring(q,vr),X;if(F===at&&B.test(V)){var J=V.match(B);X=J[1],V=V.substring(J[0].length)}var G=Ce(V);switch(F){case ot:return G;case at:return c([G],{type:X});case rt:return new Int8Array(G);case ht:return new Uint8Array(G);case St:return new Uint8ClampedArray(G);case pt:return new Int16Array(G);case _e:return new Uint16Array(G);case Ot:return new Int32Array(G);case ue:return new Uint32Array(G);case sr:return new Float32Array(G);case fr:return new Float64Array(G);default:throw new Error("Unkown type: "+F)}}var Ai={serialize:Ei,deserialize:Fr,stringToBuffer:Ce,bufferToString:In};function is(E,V,F,X){E.executeSql("CREATE TABLE IF NOT EXISTS "+V.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],F,X)}function ua(E){var V=this,F={db:null};if(E)for(var X in E)F[X]=typeof E[X]!="string"?E[X].toString():E[X];var J=new h(function(G,st){try{F.db=openDatabase(F.name,String(F.version),F.description,F.size)}catch(ut){return st(ut)}F.db.transaction(function(ut){is(ut,F,function(){V._dbInfo=F,G()},function(ft,mt){st(mt)})},st)});return F.serializer=Ai,J}function Xr(E,V,F,X,J,G){E.executeSql(F,X,J,function(st,ut){ut.code===ut.SYNTAX_ERR?st.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[V.storeName],function(ft,mt){mt.rows.length?G(ft,ut):is(ft,V,function(){ft.executeSql(F,X,J,G)},G)},G):G(st,ut)},G)}function ss(E,V){var F=this;E=m(E);var X=new h(function(J,G){F.ready().then(function(){var st=F._dbInfo;st.db.transaction(function(ut){Xr(ut,st,"SELECT * FROM "+st.storeName+" WHERE key = ? LIMIT 1",[E],function(ft,mt){var vt=mt.rows.length?mt.rows.item(0).value:null;vt&&(vt=st.serializer.deserialize(vt)),J(vt)},function(ft,mt){G(mt)})})}).catch(G)});return f(X,V),X}function ni(E,V){var F=this,X=new h(function(J,G){F.ready().then(function(){var st=F._dbInfo;st.db.transaction(function(ut){Xr(ut,st,"SELECT * FROM "+st.storeName,[],function(ft,mt){for(var vt=mt.rows,Et=vt.length,ce=0;ce0){st(Yr.apply(J,[E,ft,F,X-1]));return}ut(ce)}})})}).catch(ut)});return f(G,F),G}function Js(E,V,F){return Yr.apply(this,[E,V,F,1])}function Fl(E,V){var F=this;E=m(E);var X=new h(function(J,G){F.ready().then(function(){var st=F._dbInfo;st.db.transaction(function(ut){Xr(ut,st,"DELETE FROM "+st.storeName+" WHERE key = ?",[E],function(){J()},function(ft,mt){G(mt)})})}).catch(G)});return f(X,V),X}function ch(E){var V=this,F=new h(function(X,J){V.ready().then(function(){var G=V._dbInfo;G.db.transaction(function(st){Xr(st,G,"DELETE FROM "+G.storeName,[],function(){X()},function(ut,ft){J(ft)})})}).catch(J)});return f(F,E),F}function ca(E){var V=this,F=new h(function(X,J){V.ready().then(function(){var G=V._dbInfo;G.db.transaction(function(st){Xr(st,G,"SELECT COUNT(key) as c FROM "+G.storeName,[],function(ut,ft){var mt=ft.rows.item(0).c;X(mt)},function(ut,ft){J(ft)})})}).catch(J)});return f(F,E),F}function hh(E,V){var F=this,X=new h(function(J,G){F.ready().then(function(){var st=F._dbInfo;st.db.transaction(function(ut){Xr(ut,st,"SELECT key FROM "+st.storeName+" WHERE id = ? LIMIT 1",[E+1],function(ft,mt){var vt=mt.rows.length?mt.rows.item(0).key:null;J(vt)},function(ft,mt){G(mt)})})}).catch(G)});return f(X,V),X}function dh(E){var V=this,F=new h(function(X,J){V.ready().then(function(){var G=V._dbInfo;G.db.transaction(function(st){Xr(st,G,"SELECT key FROM "+G.storeName,[],function(ut,ft){for(var mt=[],vt=0;vt '__WebKitDatabaseInfoTable__'",[],function(J,G){for(var st=[],ut=0;ut0}function ha(E){var V=this,F={};if(E)for(var X in E)F[X]=E[X];return F.keyPrefix=Dl(E,V._defaultConfig),yh()?(V._dbInfo=F,F.serializer=Ai,h.resolve()):h.reject()}function Nl(E){var V=this,F=V.ready().then(function(){for(var X=V._dbInfo.keyPrefix,J=localStorage.length-1;J>=0;J--){var G=localStorage.key(J);G.indexOf(X)===0&&localStorage.removeItem(G)}});return f(F,E),F}function vh(E,V){var F=this;E=m(E);var X=F.ready().then(function(){var J=F._dbInfo,G=localStorage.getItem(J.keyPrefix+E);return G&&(G=J.serializer.deserialize(G)),G});return f(X,V),X}function _h(E,V){var F=this,X=F.ready().then(function(){for(var J=F._dbInfo,G=J.keyPrefix,st=G.length,ut=localStorage.length,ft=1,mt=0;mt=0;st--){var ut=localStorage.key(st);ut.indexOf(G)===0&&localStorage.removeItem(ut)}}):J=h.reject("Invalid arguments"),f(J,V),J}var Sh={_driver:"localStorageWrapper",_initStorage:ha,_support:mh(),iterate:_h,getItem:vh,setItem:wh,removeItem:xh,clear:Nl,length:Bl,key:_g,keys:bh,dropInstance:to},Th=function(V,F){return V===F||typeof V=="number"&&typeof F=="number"&&isNaN(V)&&isNaN(F)},kl=function(V,F){for(var X=V.length,J=0;J"u"?"undefined":s(F))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var X in F){if(X==="storeName"&&(F[X]=F[X].replace(/\W/g,"_")),X==="version"&&typeof F[X]!="number")return new Error("Database version must be a number.");this._config[X]=F[X]}return"driver"in F&&F.driver?this.setDriver(this._config.driver):!0}else return typeof F=="string"?this._config[F]:this._config},E.prototype.defineDriver=function(F,X,J){var G=new h(function(st,ut){try{var ft=F._driver,mt=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!F._driver){ut(mt);return}for(var vt=Ih.concat("_initStorage"),Et=0,ce=vt.length;Et0)for(var s=e,o=e/n,a=1;a0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clamp",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(e){typeof e=="number"?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof De?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blur",{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),t}(ae);/*! +`,$u=function(r){PP(t,r);function t(e,n,i){e===void 0&&(e=4),n===void 0&&(n=3),i===void 0&&(i=!1);var s=r.call(this,RP,i?LP:FP)||this;return s._kernels=[],s._blur=4,s._quality=3,s.uniforms.uOffset=new Float32Array(2),s._pixelSize=new Le,s.pixelSize=1,s._clamp=i,Array.isArray(e)?s.kernels=e:(s._blur=e,s.quality=n),s}return t.prototype.apply=function(e,n,i,s){var o=this._pixelSize.x/n._frame.width,a=this._pixelSize.y/n._frame.height,l;if(this._quality===1||this._blur===0)l=this._kernels[0]+.5,this.uniforms.uOffset[0]=l*o,this.uniforms.uOffset[1]=l*a,e.applyFilter(this,n,i,s);else{for(var u=e.getFilterTexture(),c=n,h=u,f=void 0,d=this._quality-1,m=0;m0)for(var s=e,o=e/n,a=1;a0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clamp",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(e){typeof e=="number"?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof Le?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blur",{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),t}(ae);/*! * @pixi/filter-advanced-bloom - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -777,7 +777,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,LP=` +}`,DP=` uniform sampler2D uSampler; varying vec2 vTextureCoord; @@ -798,7 +798,7 @@ void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } } -`,NP=function(r){Rw(t,r);function t(e){e===void 0&&(e=.5);var n=r.call(this,Fw,LP)||this;return n.threshold=e,n}return Object.defineProperty(t.prototype,"threshold",{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),t}(ae),BP=`uniform sampler2D uSampler; +`,NP=function(r){Rw(t,r);function t(e){e===void 0&&(e=.5);var n=r.call(this,Fw,DP)||this;return n.threshold=e,n}return Object.defineProperty(t.prototype,"threshold",{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),t}(ae),BP=`uniform sampler2D uSampler; varying vec2 vTextureCoord; uniform sampler2D bloomTexture; @@ -1016,7 +1016,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Ff=function(r,t){return Ff=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])},Ff(r,t)};function Dw(r,t){Ff(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var XP=` +***************************************************************************** */var Ff=function(r,t){return Ff=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])},Ff(r,t)};function Lw(r,t){Ff(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var XP=` attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -1049,7 +1049,7 @@ PERFORMANCE OF THIS SOFTWARE. }`;function YP(r,t){var e=Math.ceil(r/2),n=XP,i="",s;t?s="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":s="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(var o=0;o=e&&(o=r-a-1),l=l.replace("%value%",t[o].toString()),i+=l,i+=` -`}return n=n.replace("%blur%",i),n=n.replace("%size%",r.toString()),n}var Gu=function(r){Dw(t,r);function t(e,n,i,s,o){n===void 0&&(n=8),i===void 0&&(i=4),s===void 0&&(s=Ct.FILTER_RESOLUTION),o===void 0&&(o=5);var a=this,l=YP(o,e),u=ZP(o);return a=r.call(this,l,u)||this,a.horizontal=e,a.resolution=s,a._quality=0,a.quality=i,a.blur=n,a}return t.prototype.apply=function(e,n,i,s){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/n.width):this.uniforms.strength=1/i.height*(i.height/n.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/n.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/n.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,n,i,s);else{var o=e.getFilterTexture(),a=e.renderer,l=n,u=o;this.state.blend=!1,e.applyFilter(this,l,u,_n.CLEAR);for(var c=1;c0;i--){var s=Math.random()*i>>0,o=e[i];e[i]=e[s],e[s]=o}},t.prototype._randomizeOffsets=function(){for(var e=0;e0?s:0,c=s<0?-s:0;i.fillStyle="rgba("+u+", "+c+", 0, 1)",i.fillRect(0,o>>0,e,l+1>>0),o+=l}n.baseTexture.update(),this.uniforms.displacementMap=n},Object.defineProperty(t.prototype,"sizes",{get:function(){return this._sizes},set:function(e){for(var n=Math.min(this._slices,e.length),i=0;i0;i--){var s=Math.random()*i>>0,o=e[i];e[i]=e[s],e[s]=o}},t.prototype._randomizeOffsets=function(){for(var e=0;e0?s:0,c=s<0?-s:0;i.fillStyle="rgba("+u+", "+c+", 0, 1)",i.fillRect(0,o>>0,e,l+1>>0),o+=l}n.baseTexture.update(),this.uniforms.displacementMap=n},Object.defineProperty(t.prototype,"sizes",{get:function(){return this._sizes},set:function(e){for(var n=Math.min(this._slices,e.length),i=0;inew Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),ye=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),sv=class extends Ja{constructor(r){super(),this.weight=0,this.isBinary=!1,this.overrideBlink="none",this.overrideLookAt="none",this.overrideMouth="none",this._binds=[],this.name=`VRMExpression_${r}`,this.expressionName=r,this.type="VRMExpression",this.visible=!1}get binds(){return this._binds}get overrideBlinkAmount(){return this.overrideBlink==="block"?0.5?1:0:this.weight}addBind(r){this._binds.push(r)}deleteBind(r){const t=this._binds.indexOf(r);t>=0&&this._binds.splice(t,1)}applyWeight(r){var t;let e=this.outputWeight;e*=(t=r==null?void 0:r.multiplier)!=null?t:1,this.isBinary&&e<1&&(e=0),this._binds.forEach(n=>n.applyWeight(e))}clearAppliedWeight(){this._binds.forEach(r=>r.clearAppliedWeight())}};function Nw(r,t,e){var n,i;const s=r.parser.json,o=(n=s.nodes)==null?void 0:n[t];if(o==null)return console.warn(`extractPrimitivesInternal: Attempt to use nodes[${t}] of glTF but the node doesn't exist`),null;const a=o.mesh;if(a==null)return null;const l=(i=s.meshes)==null?void 0:i[a];if(l==null)return console.warn(`extractPrimitivesInternal: Attempt to use meshes[${a}] of glTF but the mesh doesn't exist`),null;const u=l.primitives.length,c=[];return e.traverse(h=>{c.length{const s=Nw(r,i,n);s!=null&&e.set(i,s)}),e})}var lp={Aa:"aa",Ih:"ih",Ou:"ou",Ee:"ee",Oh:"oh",Blink:"blink",Happy:"happy",Angry:"angry",Sad:"sad",Relaxed:"relaxed",LookUp:"lookUp",Surprised:"surprised",LookDown:"lookDown",LookLeft:"lookLeft",LookRight:"lookRight",BlinkLeft:"blinkLeft",BlinkRight:"blinkRight",Neutral:"neutral"};function Bw(r){return Math.max(Math.min(r,1),0)}var lv=class kw{constructor(){this.blinkExpressionNames=["blink","blinkLeft","blinkRight"],this.lookAtExpressionNames=["lookLeft","lookRight","lookUp","lookDown"],this.mouthExpressionNames=["aa","ee","ih","oh","ou"],this._expressions=[],this._expressionMap={}}get expressions(){return this._expressions.concat()}get expressionMap(){return Object.assign({},this._expressionMap)}get presetExpressionMap(){const t={},e=new Set(Object.values(lp));return Object.entries(this._expressionMap).forEach(([n,i])=>{e.has(n)&&(t[n]=i)}),t}get customExpressionMap(){const t={},e=new Set(Object.values(lp));return Object.entries(this._expressionMap).forEach(([n,i])=>{e.has(n)||(t[n]=i)}),t}copy(t){return this._expressions.concat().forEach(n=>{this.unregisterExpression(n)}),t._expressions.forEach(n=>{this.registerExpression(n)}),this.blinkExpressionNames=t.blinkExpressionNames.concat(),this.lookAtExpressionNames=t.lookAtExpressionNames.concat(),this.mouthExpressionNames=t.mouthExpressionNames.concat(),this}clone(){return new kw().copy(this)}getExpression(t){var e;return(e=this._expressionMap[t])!=null?e:null}registerExpression(t){this._expressions.push(t),this._expressionMap[t.expressionName]=t}unregisterExpression(t){const e=this._expressions.indexOf(t);e===-1&&console.warn("VRMExpressionManager: The specified expressions is not registered"),this._expressions.splice(e,1),delete this._expressionMap[t.expressionName]}getValue(t){var e;const n=this.getExpression(t);return(e=n==null?void 0:n.weight)!=null?e:null}setValue(t,e){const n=this.getExpression(t);n&&(n.weight=Bw(e))}resetValues(){this._expressions.forEach(t=>{t.weight=0})}getExpressionTrackName(t){const e=this.getExpression(t);return e?`${e.name}.weight`:null}update(){const t=this._calculateWeightMultipliers();this._expressions.forEach(e=>{e.clearAppliedWeight()}),this._expressions.forEach(e=>{let n=1;const i=e.expressionName;this.blinkExpressionNames.indexOf(i)!==-1&&(n*=t.blink),this.lookAtExpressionNames.indexOf(i)!==-1&&(n*=t.lookAt),this.mouthExpressionNames.indexOf(i)!==-1&&(n*=t.mouth),e.applyWeight({multiplier:n})})}_calculateWeightMultipliers(){let t=1,e=1,n=1;return this._expressions.forEach(i=>{t-=i.overrideBlinkAmount,e-=i.overrideLookAtAmount,n-=i.overrideMouthAmount}),t=Math.max(0,t),e=Math.max(0,e),n=Math.max(0,n),{blink:t,lookAt:e,mouth:n}}},xa={Color:"color",EmissionColor:"emissionColor",ShadeColor:"shadeColor",RimColor:"rimColor",OutlineColor:"outlineColor"},MF={_Color:xa.Color,_EmissionColor:xa.EmissionColor,_ShadeColor:xa.ShadeColor,_RimColor:xa.RimColor,_OutlineColor:xa.OutlineColor},EF=new nn,Uw=class zw{constructor({material:t,type:e,targetValue:n,targetAlpha:i}){this.material=t,this.type=e,this.targetValue=n,this.targetAlpha=i??1;const s=this._initColorBindState(),o=this._initAlphaBindState();this._state={color:s,alpha:o}}applyWeight(t){const{color:e,alpha:n}=this._state;if(e!=null){const{propertyName:i,deltaValue:s}=e,o=this.material[i];o!=null&&o.add(EF.copy(s).multiplyScalar(t))}if(n!=null){const{propertyName:i,deltaValue:s}=n;this.material[i]!=null&&(this.material[i]+=s*t)}}clearAppliedWeight(){const{color:t,alpha:e}=this._state;if(t!=null){const{propertyName:n,initialValue:i}=t,s=this.material[n];s!=null&&s.copy(i)}if(e!=null){const{propertyName:n,initialValue:i}=e;this.material[n]!=null&&(this.material[n]=i)}}_initColorBindState(){var t,e,n;const{material:i,type:s,targetValue:o}=this,a=this._getPropertyNameMap(),l=(e=(t=a==null?void 0:a[s])==null?void 0:t[0])!=null?e:null;if(l==null)return console.warn(`Tried to add a material color bind to the material ${(n=i.name)!=null?n:"(no name)"}, the type ${s} but the material or the type is not supported.`),null;const c=i[l].clone(),h=new nn(o.r-c.r,o.g-c.g,o.b-c.b);return{propertyName:l,initialValue:c,deltaValue:h}}_initAlphaBindState(){var t,e,n;const{material:i,type:s,targetAlpha:o}=this,a=this._getPropertyNameMap(),l=(e=(t=a==null?void 0:a[s])==null?void 0:t[1])!=null?e:null;if(l==null&&o!==1)return console.warn(`Tried to add a material alpha bind to the material ${(n=i.name)!=null?n:"(no name)"}, the type ${s} but the material or the type does not support alpha.`),null;if(l==null)return null;const u=i[l],c=o-u;return{propertyName:l,initialValue:u,deltaValue:c}}_getPropertyNameMap(){var t,e;return(e=(t=Object.entries(zw._propertyNameMapMap).find(([n])=>this.material[n]===!0))==null?void 0:t[1])!=null?e:null}};Uw._propertyNameMapMap={isMeshStandardMaterial:{color:["color","opacity"],emissionColor:["emissive",null]},isMeshBasicMaterial:{color:["color","opacity"]},isMToonMaterial:{color:["color","opacity"],emissionColor:["emissive",null],outlineColor:["outlineColorFactor",null],matcapColor:["matcapFactor",null],rimColor:["parametricRimColorFactor",null],shadeColor:["shadeColorFactor",null]}};var uv=Uw,Hu=class{constructor({primitives:r,index:t,weight:e}){this.primitives=r,this.index=t,this.weight=e}applyWeight(r){this.primitives.forEach(t=>{var e;((e=t.morphTargetInfluences)==null?void 0:e[this.index])!=null&&(t.morphTargetInfluences[this.index]+=this.weight*r)})}clearAppliedWeight(){this.primitives.forEach(r=>{var t;((t=r.morphTargetInfluences)==null?void 0:t[this.index])!=null&&(r.morphTargetInfluences[this.index]=0)})}},cv=new Ao,Vw=class jw{constructor({material:t,scale:e,offset:n}){var i,s;this.material=t,this.scale=e,this.offset=n;const o=(i=Object.entries(jw._propertyNamesMap).find(([a])=>t[a]===!0))==null?void 0:i[1];o==null?(console.warn(`Tried to add a texture transform bind to the material ${(s=t.name)!=null?s:"(no name)"} but the material is not supported.`),this._properties=[]):(this._properties=[],o.forEach(a=>{var l;const u=(l=t[a])==null?void 0:l.clone();if(!u)return null;t[a]=u;const c=u.offset.clone(),h=u.repeat.clone(),f=n.clone().sub(c),d=e.clone().sub(h);this._properties.push({name:a,initialOffset:c,deltaOffset:f,initialScale:h,deltaScale:d})}))}applyWeight(t){this._properties.forEach(e=>{const n=this.material[e.name];n!==void 0&&(n.offset.add(cv.copy(e.deltaOffset).multiplyScalar(t)),n.repeat.add(cv.copy(e.deltaScale).multiplyScalar(t)))})}clearAppliedWeight(){this._properties.forEach(t=>{const e=this.material[t.name];e!==void 0&&(e.offset.copy(t.initialOffset),e.repeat.copy(t.initialScale))})}};Vw._propertyNamesMap={isMeshStandardMaterial:["map","emissiveMap","bumpMap","normalMap","displacementMap","roughnessMap","metalnessMap","alphaMap"],isMeshBasicMaterial:["map","specularMap","alphaMap"],isMToonMaterial:["map","normalMap","emissiveMap","shadeMultiplyTexture","rimMultiplyTexture","outlineWidthMultiplyTexture","uvAnimationMaskTexture"]};var hv=Vw,AF=new Set(["1.0","1.0-beta"]),$w=class Gw{get name(){return"VRMExpressionLoaderPlugin"}constructor(t){this.parser=t}afterRoot(t){return ye(this,null,function*(){t.userData.vrmExpressionManager=yield this._import(t)})}_import(t){return ye(this,null,function*(){const e=yield this._v1Import(t);if(e)return e;const n=yield this._v0Import(t);return n||null})}_v1Import(t){return ye(this,null,function*(){var e,n;const i=this.parser.json;if(!(((e=i.extensionsUsed)==null?void 0:e.indexOf("VRMC_vrm"))!==-1))return null;const o=(n=i.extensions)==null?void 0:n.VRMC_vrm;if(!o)return null;const a=o.specVersion;if(!AF.has(a))return console.warn(`VRMExpressionLoaderPlugin: Unknown VRMC_vrm specVersion "${a}"`),null;const l=o.expressions;if(!l)return null;const u=new Set(Object.values(lp)),c=new Map;l.preset!=null&&Object.entries(l.preset).forEach(([f,d])=>{if(d!=null){if(!u.has(f)){console.warn(`VRMExpressionLoaderPlugin: Unknown preset name "${f}" detected. Ignoring the expression`);return}c.set(f,d)}}),l.custom!=null&&Object.entries(l.custom).forEach(([f,d])=>{if(u.has(f)){console.warn(`VRMExpressionLoaderPlugin: Custom expression cannot have preset name "${f}". Ignoring the expression`);return}c.set(f,d)});const h=new lv;return yield Promise.all(Array.from(c.entries()).map(f=>ye(this,[f],function*([d,m]){var g,p,y,v,S,T,_;const M=new sv(d);if(t.scene.add(M),M.isBinary=(g=m.isBinary)!=null?g:!1,M.overrideBlink=(p=m.overrideBlink)!=null?p:"none",M.overrideLookAt=(y=m.overrideLookAt)!=null?y:"none",M.overrideMouth=(v=m.overrideMouth)!=null?v:"none",(S=m.morphTargetBinds)==null||S.forEach(x=>ye(this,null,function*(){var N;if(x.node===void 0||x.index===void 0)return;const L=yield ov(t,x.node),j=x.index;if(!L.every(it=>Array.isArray(it.morphTargetInfluences)&&j{const L=N.material;L&&(Array.isArray(L)?x.push(...L):x.push(L))}),(T=m.materialColorBinds)==null||T.forEach(N=>ye(this,null,function*(){x.filter(j=>{var it;const I=(it=this.parser.associations.get(j))==null?void 0:it.materials;return N.material===I}).forEach(j=>{M.addBind(new uv({material:j,type:N.type,targetValue:new nn().fromArray(N.targetValue),targetAlpha:N.targetValue[3]}))})})),(_=m.textureTransformBinds)==null||_.forEach(N=>ye(this,null,function*(){x.filter(j=>{var it;const I=(it=this.parser.associations.get(j))==null?void 0:it.materials;return N.material===I}).forEach(j=>{var it,I;M.addBind(new hv({material:j,offset:new Ao().fromArray((it=N.offset)!=null?it:[0,0]),scale:new Ao().fromArray((I=N.scale)!=null?I:[1,1])}))})}))}h.registerExpression(M)}))),h})}_v0Import(t){return ye(this,null,function*(){var e;const n=this.parser.json,i=(e=n.extensions)==null?void 0:e.VRM;if(!i)return null;const s=i.blendShapeMaster;if(!s)return null;const o=new lv,a=s.blendShapeGroups;if(!a)return o;const l=new Set;return yield Promise.all(a.map(u=>ye(this,null,function*(){var c;const h=u.presetName,f=h!=null&&Gw.v0v1PresetNameMap[h]||null,d=f??u.name;if(d==null){console.warn("VRMExpressionLoaderPlugin: One of custom expressions has no name. Ignoring the expression");return}if(l.has(d)){console.warn(`VRMExpressionLoaderPlugin: An expression preset ${h} has duplicated entries. Ignoring the expression`);return}l.add(d);const m=new sv(d);t.scene.add(m),m.isBinary=(c=u.isBinary)!=null?c:!1,u.binds&&u.binds.forEach(p=>ye(this,null,function*(){var y;if(p.mesh===void 0||p.index===void 0)return;const v=[];(y=n.nodes)==null||y.forEach((T,_)=>{T.mesh===p.mesh&&v.push(_)});const S=p.index;yield Promise.all(v.map(T=>ye(this,null,function*(){var _;const M=yield ov(t,T);if(!M.every(x=>Array.isArray(x.morphTargetInfluences)&&S{if(p.materialName===void 0||p.propertyName===void 0||p.targetValue===void 0)return;const y=[];t.scene.traverse(S=>{if(S.material){const T=S.material;Array.isArray(T)?y.push(...T.filter(_=>(_.name===p.materialName||_.name===p.materialName+" (Outline)")&&y.indexOf(_)===-1)):T.name===p.materialName&&y.indexOf(T)===-1&&y.push(T)}});const v=p.propertyName;y.forEach(S=>{if(v==="_MainTex_ST"){const _=new Ao(p.targetValue[0],p.targetValue[1]),M=new Ao(p.targetValue[2],p.targetValue[3]);M.y=1-M.y-_.y,m.addBind(new hv({material:S,scale:_,offset:M}));return}const T=MF[v];if(T){m.addBind(new uv({material:S,type:T,targetValue:new nn().fromArray(p.targetValue),targetAlpha:p.targetValue[3]}));return}console.warn(v+" is not supported")})}),o.registerExpression(m)}))),o})}};$w.v0v1PresetNameMap={a:"aa",e:"ee",i:"ih",o:"oh",u:"ou",blink:"blink",joy:"happy",angry:"angry",sorrow:"sad",fun:"relaxed",lookup:"lookUp",lookdown:"lookDown",lookleft:"lookLeft",lookright:"lookRight",blink_l:"blinkLeft",blink_r:"blinkRight",neutral:"neutral"};var CF=$w,Sm=class fo{constructor(t,e){this._firstPersonOnlyLayer=fo.DEFAULT_FIRSTPERSON_ONLY_LAYER,this._thirdPersonOnlyLayer=fo.DEFAULT_THIRDPERSON_ONLY_LAYER,this._initializedLayers=!1,this.humanoid=t,this.meshAnnotations=e}copy(t){if(this.humanoid!==t.humanoid)throw new Error("VRMFirstPerson: humanoid must be same in order to copy");return this.meshAnnotations=t.meshAnnotations.map(e=>({meshes:e.meshes.concat(),type:e.type})),this}clone(){return new fo(this.humanoid,this.meshAnnotations).copy(this)}get firstPersonOnlyLayer(){return this._firstPersonOnlyLayer}get thirdPersonOnlyLayer(){return this._thirdPersonOnlyLayer}setup({firstPersonOnlyLayer:t=fo.DEFAULT_FIRSTPERSON_ONLY_LAYER,thirdPersonOnlyLayer:e=fo.DEFAULT_THIRDPERSON_ONLY_LAYER}={}){this._initializedLayers||(this._firstPersonOnlyLayer=t,this._thirdPersonOnlyLayer=e,this.meshAnnotations.forEach(n=>{n.meshes.forEach(i=>{n.type==="firstPersonOnly"?(i.layers.set(this._firstPersonOnlyLayer),i.traverse(s=>s.layers.set(this._firstPersonOnlyLayer))):n.type==="thirdPersonOnly"?(i.layers.set(this._thirdPersonOnlyLayer),i.traverse(s=>s.layers.set(this._thirdPersonOnlyLayer))):n.type==="auto"&&this._createHeadlessModel(i)})}),this._initializedLayers=!0)}_excludeTriangles(t,e,n,i){let s=0;if(e!=null&&e.length>0)for(let o=0;o0&&i.includes(h[0])||c[1]>0&&i.includes(h[1])||c[2]>0&&i.includes(h[2])||c[3]>0&&i.includes(h[3]))continue;const f=e[l],d=n[l];if(f[0]>0&&i.includes(d[0])||f[1]>0&&i.includes(d[1])||f[2]>0&&i.includes(d[2])||f[3]>0&&i.includes(d[3]))continue;const m=e[u],g=n[u];m[0]>0&&i.includes(g[0])||m[1]>0&&i.includes(g[1])||m[2]>0&&i.includes(g[2])||m[3]>0&&i.includes(g[3])||(t[s++]=a,t[s++]=l,t[s++]=u)}return s}_createErasedMesh(t,e){const n=new ZM(t.geometry.clone(),t.material);n.name=`${t.name}(erase)`,n.frustumCulled=t.frustumCulled,n.layers.set(this._firstPersonOnlyLayer);const i=n.geometry,s=i.getAttribute("skinIndex"),o=s instanceof Ig?[]:s.array,a=[];for(let g=0;g{this._isEraseTarget(s)&&n.push(o)}),!n.length){e.layers.enable(this._thirdPersonOnlyLayer),e.layers.enable(this._firstPersonOnlyLayer);return}e.layers.set(this._thirdPersonOnlyLayer);const i=this._createErasedMesh(e,n);t.add(i)}_createHeadlessModel(t){if(t.type==="Group")if(t.layers.set(this._thirdPersonOnlyLayer),this._isEraseTarget(t))t.traverse(e=>e.layers.set(this._thirdPersonOnlyLayer));else{const e=new ea;e.name=`_headless_${t.name}`,e.layers.set(this._firstPersonOnlyLayer),t.parent.add(e),t.children.filter(n=>n.type==="SkinnedMesh").forEach(n=>{const i=n;this._createHeadlessModelForSkinnedMesh(e,i)})}else if(t.type==="SkinnedMesh"){const e=t;this._createHeadlessModelForSkinnedMesh(t.parent,e)}else this._isEraseTarget(t)&&(t.layers.set(this._thirdPersonOnlyLayer),t.traverse(e=>e.layers.set(this._thirdPersonOnlyLayer)))}_isEraseTarget(t){return t===this.humanoid.getRawBoneNode("head")?!0:t.parent?this._isEraseTarget(t.parent):!1}};Sm.DEFAULT_FIRSTPERSON_ONLY_LAYER=9;Sm.DEFAULT_THIRDPERSON_ONLY_LAYER=10;var dv=Sm,OF=new Set(["1.0","1.0-beta"]),PF=class{get name(){return"VRMFirstPersonLoaderPlugin"}constructor(r){this.parser=r}afterRoot(r){return ye(this,null,function*(){const t=r.userData.vrmHumanoid;if(t!==null){if(t===void 0)throw new Error("VRMFirstPersonLoaderPlugin: vrmHumanoid is undefined. VRMHumanoidLoaderPlugin have to be used first");r.userData.vrmFirstPerson=yield this._import(r,t)}})}_import(r,t){return ye(this,null,function*(){if(t==null)return null;const e=yield this._v1Import(r,t);if(e)return e;const n=yield this._v0Import(r,t);return n||null})}_v1Import(r,t){return ye(this,null,function*(){var e,n;const i=this.parser.json;if(!(((e=i.extensionsUsed)==null?void 0:e.indexOf("VRMC_vrm"))!==-1))return null;const o=(n=i.extensions)==null?void 0:n.VRMC_vrm;if(!o)return null;const a=o.specVersion;if(!OF.has(a))return console.warn(`VRMFirstPersonLoaderPlugin: Unknown VRMC_vrm specVersion "${a}"`),null;const l=o.firstPerson,u=[],c=yield av(r);return Array.from(c.entries()).forEach(([h,f])=>{var d,m;const g=(d=l==null?void 0:l.meshAnnotations)==null?void 0:d.find(p=>p.node===h);u.push({meshes:f,type:(m=g==null?void 0:g.type)!=null?m:"auto"})}),new dv(t,u)})}_v0Import(r,t){return ye(this,null,function*(){var e;const n=this.parser.json,i=(e=n.extensions)==null?void 0:e.VRM;if(!i)return null;const s=i.firstPerson;if(!s)return null;const o=[],a=yield av(r);return Array.from(a.entries()).forEach(([l,u])=>{const c=n.nodes[l],h=s.meshAnnotations?s.meshAnnotations.find(f=>f.mesh===c.mesh):void 0;o.push({meshes:u,type:this._convertV0FlagToV1Type(h==null?void 0:h.firstPersonFlag)})}),new dv(t,o)})}_convertV0FlagToV1Type(r){return r==="FirstPersonOnly"?"firstPersonOnly":r==="ThirdPersonOnly"?"thirdPersonOnly":r==="Both"?"both":"auto"}},fv=new gt,pv=new gt,RF=new oe,mv=class extends ea{constructor(r){super(),this.vrmHumanoid=r,this._boneAxesMap=new Map,Object.values(r.humanBones).forEach(t=>{const e=new KM(1);e.matrixAutoUpdate=!1,e.material.depthTest=!1,e.material.depthWrite=!1,this.add(e),this._boneAxesMap.set(t,e)})}dispose(){Array.from(this._boneAxesMap.values()).forEach(r=>{r.geometry.dispose(),r.material.dispose()})}updateMatrixWorld(r){Array.from(this._boneAxesMap.entries()).forEach(([t,e])=>{t.node.updateWorldMatrix(!0,!1),t.node.matrixWorld.decompose(fv,RF,pv);const n=fv.set(.1,.1,.1).divide(pv);e.matrix.copy(t.node.matrixWorld).scale(n)}),super.updateMatrixWorld(r)}},Id=["hips","spine","chest","upperChest","neck","head","leftEye","rightEye","jaw","leftUpperLeg","leftLowerLeg","leftFoot","leftToes","rightUpperLeg","rightLowerLeg","rightFoot","rightToes","leftShoulder","leftUpperArm","leftLowerArm","leftHand","rightShoulder","rightUpperArm","rightLowerArm","rightHand","leftThumbMetacarpal","leftThumbProximal","leftThumbDistal","leftIndexProximal","leftIndexIntermediate","leftIndexDistal","leftMiddleProximal","leftMiddleIntermediate","leftMiddleDistal","leftRingProximal","leftRingIntermediate","leftRingDistal","leftLittleProximal","leftLittleIntermediate","leftLittleDistal","rightThumbMetacarpal","rightThumbProximal","rightThumbDistal","rightIndexProximal","rightIndexIntermediate","rightIndexDistal","rightMiddleProximal","rightMiddleIntermediate","rightMiddleDistal","rightRingProximal","rightRingIntermediate","rightRingDistal","rightLittleProximal","rightLittleIntermediate","rightLittleDistal"],FF={hips:null,spine:"hips",chest:"spine",upperChest:"chest",neck:"upperChest",head:"neck",leftEye:"head",rightEye:"head",jaw:"head",leftUpperLeg:"hips",leftLowerLeg:"leftUpperLeg",leftFoot:"leftLowerLeg",leftToes:"leftFoot",rightUpperLeg:"hips",rightLowerLeg:"rightUpperLeg",rightFoot:"rightLowerLeg",rightToes:"rightFoot",leftShoulder:"upperChest",leftUpperArm:"leftShoulder",leftLowerArm:"leftUpperArm",leftHand:"leftLowerArm",rightShoulder:"upperChest",rightUpperArm:"rightShoulder",rightLowerArm:"rightUpperArm",rightHand:"rightLowerArm",leftThumbMetacarpal:"leftHand",leftThumbProximal:"leftThumbMetacarpal",leftThumbDistal:"leftThumbProximal",leftIndexProximal:"leftHand",leftIndexIntermediate:"leftIndexProximal",leftIndexDistal:"leftIndexIntermediate",leftMiddleProximal:"leftHand",leftMiddleIntermediate:"leftMiddleProximal",leftMiddleDistal:"leftMiddleIntermediate",leftRingProximal:"leftHand",leftRingIntermediate:"leftRingProximal",leftRingDistal:"leftRingIntermediate",leftLittleProximal:"leftHand",leftLittleIntermediate:"leftLittleProximal",leftLittleDistal:"leftLittleIntermediate",rightThumbMetacarpal:"rightHand",rightThumbProximal:"rightThumbMetacarpal",rightThumbDistal:"rightThumbProximal",rightIndexProximal:"rightHand",rightIndexIntermediate:"rightIndexProximal",rightIndexDistal:"rightIndexIntermediate",rightMiddleProximal:"rightHand",rightMiddleIntermediate:"rightMiddleProximal",rightMiddleDistal:"rightMiddleIntermediate",rightRingProximal:"rightHand",rightRingIntermediate:"rightRingProximal",rightRingDistal:"rightRingIntermediate",rightLittleProximal:"rightHand",rightLittleIntermediate:"rightLittleProximal",rightLittleDistal:"rightLittleIntermediate"};function Ww(r){return r.invert?r.invert():r.inverse(),r}var hs=new gt,ds=new oe,up=class{constructor(r){this.humanBones=r,this.restPose=this.getAbsolutePose()}getAbsolutePose(){const r={};return Object.keys(this.humanBones).forEach(t=>{const e=t,n=this.getBoneNode(e);n&&(hs.copy(n.position),ds.copy(n.quaternion),r[e]={position:hs.toArray(),rotation:ds.toArray()})}),r}getPose(){const r={};return Object.keys(this.humanBones).forEach(t=>{const e=t,n=this.getBoneNode(e);if(!n)return;hs.set(0,0,0),ds.identity();const i=this.restPose[e];i!=null&&i.position&&hs.fromArray(i.position).negate(),i!=null&&i.rotation&&Ww(ds.fromArray(i.rotation)),hs.add(n.position),ds.premultiply(n.quaternion),r[e]={position:hs.toArray(),rotation:ds.toArray()}}),r}setPose(r){Object.entries(r).forEach(([t,e])=>{const n=t,i=this.getBoneNode(n);if(!i)return;const s=this.restPose[n];s&&(e!=null&&e.position&&(i.position.fromArray(e.position),s.position&&i.position.add(hs.fromArray(s.position))),e!=null&&e.rotation&&(i.quaternion.fromArray(e.rotation),s.rotation&&i.quaternion.multiply(ds.fromArray(s.rotation))))})}resetPose(){Object.entries(this.restPose).forEach(([r,t])=>{const e=this.getBoneNode(r);e&&(t!=null&&t.position&&e.position.fromArray(t.position),t!=null&&t.rotation&&e.quaternion.fromArray(t.rotation))})}getBone(r){var t;return(t=this.humanBones[r])!=null?t:void 0}getBoneNode(r){var t,e;return(e=(t=this.humanBones[r])==null?void 0:t.node)!=null?e:null}},Md=new gt,DF=new oe,LF=new gt,gv=class Hw extends up{static _setupTransforms(t){const e=new Ja;e.name="VRMHumanoidRig";const n={},i={},s={};Id.forEach(a=>{var l;const u=t.getBoneNode(a);if(u){const c=new gt,h=new oe;u.updateWorldMatrix(!0,!1),u.matrixWorld.decompose(c,h,Md),n[a]=c,i[a]=u.quaternion.clone();const f=new oe;(l=u.parent)==null||l.matrixWorld.decompose(Md,f,Md),s[a]=f}});const o={};return Id.forEach(a=>{var l;const u=t.getBoneNode(a);if(u){const c=n[a];let h=a,f;for(;f==null&&(h=FF[h],h!=null);)f=n[h];const d=new Ja;d.name="Normalized_"+u.name,(h?(l=o[h])==null?void 0:l.node:e).add(d),d.position.copy(c),f&&d.position.sub(f),o[a]={node:d}}}),{rigBones:o,root:e,parentWorldRotations:s,boneRotations:i}}constructor(t){const{rigBones:e,root:n,parentWorldRotations:i,boneRotations:s}=Hw._setupTransforms(t);super(e),this.original=t,this.root=n,this._parentWorldRotations=i,this._boneRotations=s}update(){Id.forEach(t=>{const e=this.original.getBoneNode(t);if(e!=null){const n=this.getBoneNode(t),i=this._parentWorldRotations[t],s=DF.copy(i).invert(),o=this._boneRotations[t];if(e.quaternion.copy(n.quaternion).multiply(i).premultiply(s).multiply(o),t==="hips"){const a=n.getWorldPosition(LF);e.parent.updateWorldMatrix(!0,!1);const l=e.parent.matrixWorld,u=a.applyMatrix4(l.invert());e.position.copy(u)}}})}},yv=class Xw{get restPose(){return console.warn("VRMHumanoid: restPose is deprecated. Use either rawRestPose or normalizedRestPose instead."),this.rawRestPose}get rawRestPose(){return this._rawHumanBones.restPose}get normalizedRestPose(){return this._normalizedHumanBones.restPose}get humanBones(){return this._rawHumanBones.humanBones}get rawHumanBones(){return this._rawHumanBones.humanBones}get normalizedHumanBones(){return this._normalizedHumanBones.humanBones}get normalizedHumanBonesRoot(){return this._normalizedHumanBones.root}constructor(t,e){var n;this.autoUpdateHumanBones=(n=e==null?void 0:e.autoUpdateHumanBones)!=null?n:!0,this._rawHumanBones=new up(t),this._normalizedHumanBones=new gv(this._rawHumanBones)}copy(t){return this.autoUpdateHumanBones=t.autoUpdateHumanBones,this._rawHumanBones=new up(t.humanBones),this._normalizedHumanBones=new gv(this._rawHumanBones),this}clone(){return new Xw(this.humanBones,{autoUpdateHumanBones:this.autoUpdateHumanBones}).copy(this)}getAbsolutePose(){return console.warn("VRMHumanoid: getAbsolutePose() is deprecated. Use either getRawAbsolutePose() or getNormalizedAbsolutePose() instead."),this.getRawAbsolutePose()}getRawAbsolutePose(){return this._rawHumanBones.getAbsolutePose()}getNormalizedAbsolutePose(){return this._normalizedHumanBones.getAbsolutePose()}getPose(){return console.warn("VRMHumanoid: getPose() is deprecated. Use either getRawPose() or getNormalizedPose() instead."),this.getRawPose()}getRawPose(){return this._rawHumanBones.getPose()}getNormalizedPose(){return this._normalizedHumanBones.getPose()}setPose(t){return console.warn("VRMHumanoid: setPose() is deprecated. Use either setRawPose() or setNormalizedPose() instead."),this.setRawPose(t)}setRawPose(t){return this._rawHumanBones.setPose(t)}setNormalizedPose(t){return this._normalizedHumanBones.setPose(t)}resetPose(){return console.warn("VRMHumanoid: resetPose() is deprecated. Use either resetRawPose() or resetNormalizedPose() instead."),this.resetRawPose()}resetRawPose(){return this._rawHumanBones.resetPose()}resetNormalizedPose(){return this._normalizedHumanBones.resetPose()}getBone(t){return console.warn("VRMHumanoid: getBone() is deprecated. Use either getRawBone() or getNormalizedBone() instead."),this.getRawBone(t)}getRawBone(t){return this._rawHumanBones.getBone(t)}getNormalizedBone(t){return this._normalizedHumanBones.getBone(t)}getBoneNode(t){return console.warn("VRMHumanoid: getBoneNode() is deprecated. Use either getRawBoneNode() or getNormalizedBoneNode() instead."),this.getRawBoneNode(t)}getRawBoneNode(t){return this._rawHumanBones.getBoneNode(t)}getNormalizedBoneNode(t){return this._normalizedHumanBones.getBoneNode(t)}update(){this.autoUpdateHumanBones&&this._normalizedHumanBones.update()}},NF={Hips:"hips",Spine:"spine",Head:"head",LeftUpperLeg:"leftUpperLeg",LeftLowerLeg:"leftLowerLeg",LeftFoot:"leftFoot",RightUpperLeg:"rightUpperLeg",RightLowerLeg:"rightLowerLeg",RightFoot:"rightFoot",LeftUpperArm:"leftUpperArm",LeftLowerArm:"leftLowerArm",LeftHand:"leftHand",RightUpperArm:"rightUpperArm",RightLowerArm:"rightLowerArm",RightHand:"rightHand"},BF=new Set(["1.0","1.0-beta"]),vv={leftThumbProximal:"leftThumbMetacarpal",leftThumbIntermediate:"leftThumbProximal",rightThumbProximal:"rightThumbMetacarpal",rightThumbIntermediate:"rightThumbProximal"},kF=class{get name(){return"VRMHumanoidLoaderPlugin"}constructor(r,t){this.parser=r,this.helperRoot=t==null?void 0:t.helperRoot,this.autoUpdateHumanBones=t==null?void 0:t.autoUpdateHumanBones}afterRoot(r){return ye(this,null,function*(){r.userData.vrmHumanoid=yield this._import(r)})}_import(r){return ye(this,null,function*(){const t=yield this._v1Import(r);if(t)return t;const e=yield this._v0Import(r);return e||null})}_v1Import(r){return ye(this,null,function*(){var t,e;const n=this.parser.json;if(!(((t=n.extensionsUsed)==null?void 0:t.indexOf("VRMC_vrm"))!==-1))return null;const s=(e=n.extensions)==null?void 0:e.VRMC_vrm;if(!s)return null;const o=s.specVersion;if(!BF.has(o))return console.warn(`VRMHumanoidLoaderPlugin: Unknown VRMC_vrm specVersion "${o}"`),null;const a=s.humanoid;if(!a)return null;const l=a.humanBones.leftThumbIntermediate!=null||a.humanBones.rightThumbIntermediate!=null,u={};a.humanBones!=null&&(yield Promise.all(Object.entries(a.humanBones).map(h=>ye(this,[h],function*([f,d]){let m=f;const g=d.node;if(l){const y=vv[m];y!=null&&(m=y)}const p=yield this.parser.getDependency("node",g);if(p==null){console.warn(`A glTF node bound to the humanoid bone ${m} (index = ${g}) does not exist`);return}u[m]={node:p}}))));const c=new yv(this._ensureRequiredBonesExist(u),{autoUpdateHumanBones:this.autoUpdateHumanBones});if(r.scene.add(c.normalizedHumanBonesRoot),this.helperRoot){const h=new mv(c);this.helperRoot.add(h),h.renderOrder=this.helperRoot.renderOrder}return c})}_v0Import(r){return ye(this,null,function*(){var t;const n=(t=this.parser.json.extensions)==null?void 0:t.VRM;if(!n)return null;const i=n.humanoid;if(!i)return null;const s={};i.humanBones!=null&&(yield Promise.all(i.humanBones.map(a=>ye(this,null,function*(){const l=a.bone,u=a.node;if(l==null||u==null)return;const c=yield this.parser.getDependency("node",u);if(c==null){console.warn(`A glTF node bound to the humanoid bone ${l} (index = ${u}) does not exist`);return}const h=vv[l],f=h??l;if(s[f]!=null){console.warn(`Multiple bone entries for ${f} detected (index = ${u}), ignoring duplicated entries.`);return}s[f]={node:c}}))));const o=new yv(this._ensureRequiredBonesExist(s),{autoUpdateHumanBones:this.autoUpdateHumanBones});if(r.scene.add(o.normalizedHumanBonesRoot),this.helperRoot){const a=new mv(o);this.helperRoot.add(a),a.renderOrder=this.helperRoot.renderOrder}return o})}_ensureRequiredBonesExist(r){const t=Object.values(NF).filter(e=>r[e]==null);if(t.length>0)throw new Error(`VRMHumanoidLoaderPlugin: These humanoid bones are required but not exist: ${t.join(", ")}`);return r}},_v=class extends Ki{constructor(){super(),this._currentTheta=0,this._currentRadius=0,this.theta=0,this.radius=0,this._currentTheta=0,this._currentRadius=0,this._attrPos=new cr(new Float32Array(65*3),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(3*63),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;this._currentTheta!==this.theta&&(this._currentTheta=this.theta,r=!0),this._currentRadius!==this.radius&&(this._currentRadius=this.radius,r=!0),r&&this._buildPosition()}_buildPosition(){this._attrPos.setXYZ(0,0,0,0);for(let r=0;r<64;r++){const t=r/63*this._currentTheta;this._attrPos.setXYZ(r+1,this._currentRadius*Math.sin(t),0,this._currentRadius*Math.cos(t))}this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<63;r++)this._attrIndex.setXYZ(r*3,0,r+1,r+2);this._attrIndex.needsUpdate=!0}},UF=class extends Ki{constructor(){super(),this.radius=0,this._currentRadius=0,this.tail=new gt,this._currentTail=new gt,this._attrPos=new cr(new Float32Array(294),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(194),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;this._currentRadius!==this.radius&&(this._currentRadius=this.radius,r=!0),this._currentTail.equals(this.tail)||(this._currentTail.copy(this.tail),r=!0),r&&this._buildPosition()}_buildPosition(){for(let r=0;r<32;r++){const t=r/16*Math.PI;this._attrPos.setXYZ(r,Math.cos(t),Math.sin(t),0),this._attrPos.setXYZ(32+r,0,Math.cos(t),Math.sin(t)),this._attrPos.setXYZ(64+r,Math.sin(t),0,Math.cos(t))}this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.setXYZ(96,0,0,0),this._attrPos.setXYZ(97,this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<32;r++){const t=(r+1)%32;this._attrIndex.setXY(r*2,r,t),this._attrIndex.setXY(64+r*2,32+r,32+t),this._attrIndex.setXY(128+r*2,64+r,64+t)}this._attrIndex.setXY(192,96,97),this._attrIndex.needsUpdate=!0}},ou=new oe,bv=new oe,wa=new gt,xv=new gt,wv=Math.sqrt(2)/2,zF=new oe(0,0,-wv,wv),VF=new gt(0,1,0),jF=class extends ea{constructor(r){super(),this.matrixAutoUpdate=!1,this.vrmLookAt=r;{const t=new _v;t.radius=.5;const e=new wg({color:65280,transparent:!0,opacity:.5,side:Sg,depthTest:!1,depthWrite:!1});this._meshPitch=new Tg(t,e),this.add(this._meshPitch)}{const t=new _v;t.radius=.5;const e=new wg({color:16711680,transparent:!0,opacity:.5,side:Sg,depthTest:!1,depthWrite:!1});this._meshYaw=new Tg(t,e),this.add(this._meshYaw)}{const t=new UF;t.radius=.1;const e=new Bc({color:16777215,depthTest:!1,depthWrite:!1});this._lineTarget=new Yp(t,e),this._lineTarget.frustumCulled=!1,this.add(this._lineTarget)}}dispose(){this._meshYaw.geometry.dispose(),this._meshYaw.material.dispose(),this._meshPitch.geometry.dispose(),this._meshPitch.material.dispose(),this._lineTarget.geometry.dispose(),this._lineTarget.material.dispose()}updateMatrixWorld(r){const t=Be.DEG2RAD*this.vrmLookAt.yaw;this._meshYaw.geometry.theta=t,this._meshYaw.geometry.update();const e=Be.DEG2RAD*this.vrmLookAt.pitch;this._meshPitch.geometry.theta=e,this._meshPitch.geometry.update(),this.vrmLookAt.getLookAtWorldPosition(wa),this.vrmLookAt.getLookAtWorldQuaternion(ou),ou.multiply(this.vrmLookAt.getFaceFrontQuaternion(bv)),this._meshYaw.position.copy(wa),this._meshYaw.quaternion.copy(ou),this._meshPitch.position.copy(wa),this._meshPitch.quaternion.copy(ou),this._meshPitch.quaternion.multiply(bv.setFromAxisAngle(VF,t)),this._meshPitch.quaternion.multiply(zF);const{target:n,autoUpdate:i}=this.vrmLookAt;n!=null&&i&&(n.getWorldPosition(xv).sub(wa),this._lineTarget.geometry.tail.copy(xv),this._lineTarget.geometry.update(),this._lineTarget.position.copy(wa)),super.updateMatrixWorld(r)}},$F=new gt,GF=new gt;function cp(r,t){return r.matrixWorld.decompose($F,t,GF),t}function pu(r){return[Math.atan2(-r.z,r.x),Math.atan2(r.y,Math.sqrt(r.x*r.x+r.z*r.z))]}function Sv(r){const t=Math.round(r/2/Math.PI);return r-2*Math.PI*t}var Tv=new gt(0,0,1),WF=new gt,HF=new gt,XF=new gt,YF=new oe,Ed=new oe,Iv=new oe,qF=new oe,Ad=new Hs,Yw=class qw{constructor(t,e){this.offsetFromHeadBone=new gt,this.autoUpdate=!0,this.faceFront=new gt(0,0,1),this.humanoid=t,this.applier=e,this._yaw=0,this._pitch=0,this._needsUpdate=!0,this._restHeadWorldQuaternion=this.getLookAtWorldQuaternion(new oe)}get yaw(){return this._yaw}set yaw(t){this._yaw=t,this._needsUpdate=!0}get pitch(){return this._pitch}set pitch(t){this._pitch=t,this._needsUpdate=!0}get euler(){return console.warn("VRMLookAt: euler is deprecated. use getEuler() instead."),this.getEuler(new Hs)}getEuler(t){return t.set(Be.DEG2RAD*this._pitch,Be.DEG2RAD*this._yaw,0,"YXZ")}copy(t){if(this.humanoid!==t.humanoid)throw new Error("VRMLookAt: humanoid must be same in order to copy");return this.offsetFromHeadBone.copy(t.offsetFromHeadBone),this.applier=t.applier,this.autoUpdate=t.autoUpdate,this.target=t.target,this.faceFront.copy(t.faceFront),this}clone(){return new qw(this.humanoid,this.applier).copy(this)}reset(){this._yaw=0,this._pitch=0,this._needsUpdate=!0}getLookAtWorldPosition(t){const e=this.humanoid.getRawBoneNode("head");return t.copy(this.offsetFromHeadBone).applyMatrix4(e.matrixWorld)}getLookAtWorldQuaternion(t){const e=this.humanoid.getRawBoneNode("head");return cp(e,t)}getFaceFrontQuaternion(t){if(this.faceFront.distanceToSquared(Tv)<.01)return t.copy(this._restHeadWorldQuaternion).invert();const[e,n]=pu(this.faceFront);return Ad.set(0,.5*Math.PI+e,n,"YZX"),t.setFromEuler(Ad).premultiply(qF.copy(this._restHeadWorldQuaternion).invert())}getLookAtWorldDirection(t){return this.getLookAtWorldQuaternion(Ed),this.getFaceFrontQuaternion(Iv),t.copy(Tv).applyQuaternion(Ed).applyQuaternion(Iv).applyEuler(this.getEuler(Ad))}lookAt(t){const e=YF.copy(this._restHeadWorldQuaternion).multiply(Ww(this.getLookAtWorldQuaternion(Ed))),n=this.getLookAtWorldPosition(HF),i=XF.copy(t).sub(n).applyQuaternion(e).normalize(),[s,o]=pu(this.faceFront),[a,l]=pu(i),u=Sv(a-s),c=Sv(o-l);this._yaw=Be.RAD2DEG*u,this._pitch=Be.RAD2DEG*c,this._needsUpdate=!0}update(t){this.target!=null&&this.autoUpdate&&this.lookAt(this.target.getWorldPosition(WF)),this._needsUpdate&&(this._needsUpdate=!1,this.applier.applyYawPitch(this._yaw,this._pitch))}};Yw.EULER_ORDER="YXZ";var QF=Yw,ZF=new gt(0,0,1),En=new oe,so=new oe,Zr=new Hs(0,0,0,"YXZ"),mu=class{constructor(r,t,e,n,i){this.humanoid=r,this.rangeMapHorizontalInner=t,this.rangeMapHorizontalOuter=e,this.rangeMapVerticalDown=n,this.rangeMapVerticalUp=i,this.faceFront=new gt(0,0,1),this._restQuatLeftEye=new oe,this._restQuatRightEye=new oe,this._restLeftEyeParentWorldQuat=new oe,this._restRightEyeParentWorldQuat=new oe;const s=this.humanoid.getRawBoneNode("leftEye"),o=this.humanoid.getRawBoneNode("rightEye");s&&(this._restQuatLeftEye.copy(s.quaternion),cp(s.parent,this._restLeftEyeParentWorldQuat)),o&&(this._restQuatRightEye.copy(o.quaternion),cp(o.parent,this._restRightEyeParentWorldQuat))}applyYawPitch(r,t){const e=this.humanoid.getRawBoneNode("leftEye"),n=this.humanoid.getRawBoneNode("rightEye"),i=this.humanoid.getNormalizedBoneNode("leftEye"),s=this.humanoid.getNormalizedBoneNode("rightEye");e&&(t<0?Zr.x=-Be.DEG2RAD*this.rangeMapVerticalDown.map(-t):Zr.x=Be.DEG2RAD*this.rangeMapVerticalUp.map(t),r<0?Zr.y=-Be.DEG2RAD*this.rangeMapHorizontalInner.map(-r):Zr.y=Be.DEG2RAD*this.rangeMapHorizontalOuter.map(r),En.setFromEuler(Zr),this._getWorldFaceFrontQuat(so),i.quaternion.copy(so).multiply(En).multiply(so.invert()),En.copy(this._restLeftEyeParentWorldQuat),e.quaternion.copy(i.quaternion).multiply(En).premultiply(En.invert()).multiply(this._restQuatLeftEye)),n&&(t<0?Zr.x=-Be.DEG2RAD*this.rangeMapVerticalDown.map(-t):Zr.x=Be.DEG2RAD*this.rangeMapVerticalUp.map(t),r<0?Zr.y=-Be.DEG2RAD*this.rangeMapHorizontalOuter.map(-r):Zr.y=Be.DEG2RAD*this.rangeMapHorizontalInner.map(r),En.setFromEuler(Zr),this._getWorldFaceFrontQuat(so),s.quaternion.copy(so).multiply(En).multiply(so.invert()),En.copy(this._restRightEyeParentWorldQuat),n.quaternion.copy(s.quaternion).multiply(En).premultiply(En.invert()).multiply(this._restQuatRightEye))}lookAt(r){console.warn("VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.");const t=Be.RAD2DEG*r.y,e=Be.RAD2DEG*r.x;this.applyYawPitch(t,e)}_getWorldFaceFrontQuat(r){if(this.faceFront.distanceToSquared(ZF)<.01)return r.identity();const[t,e]=pu(this.faceFront);return Zr.set(0,.5*Math.PI+t,e,"YZX"),r.setFromEuler(Zr)}};mu.type="bone";var hp=class{constructor(r,t,e,n,i){this.expressions=r,this.rangeMapHorizontalInner=t,this.rangeMapHorizontalOuter=e,this.rangeMapVerticalDown=n,this.rangeMapVerticalUp=i}applyYawPitch(r,t){t<0?(this.expressions.setValue("lookDown",0),this.expressions.setValue("lookUp",this.rangeMapVerticalUp.map(-t))):(this.expressions.setValue("lookUp",0),this.expressions.setValue("lookDown",this.rangeMapVerticalDown.map(t))),r<0?(this.expressions.setValue("lookLeft",0),this.expressions.setValue("lookRight",this.rangeMapHorizontalOuter.map(-r))):(this.expressions.setValue("lookRight",0),this.expressions.setValue("lookLeft",this.rangeMapHorizontalOuter.map(r)))}lookAt(r){console.warn("VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.");const t=Be.RAD2DEG*r.y,e=Be.RAD2DEG*r.x;this.applyYawPitch(t,e)}};hp.type="expression";var Mv=class{constructor(r,t){this.inputMaxValue=r,this.outputScale=t}map(r){return this.outputScale*Bw(r/this.inputMaxValue)}},KF=new Set(["1.0","1.0-beta"]),au=.01,JF=class{get name(){return"VRMLookAtLoaderPlugin"}constructor(r,t){this.parser=r,this.helperRoot=t==null?void 0:t.helperRoot}afterRoot(r){return ye(this,null,function*(){const t=r.userData.vrmHumanoid;if(t===null)return;if(t===void 0)throw new Error("VRMLookAtLoaderPlugin: vrmHumanoid is undefined. VRMHumanoidLoaderPlugin have to be used first");const e=r.userData.vrmExpressionManager;if(e!==null){if(e===void 0)throw new Error("VRMLookAtLoaderPlugin: vrmExpressionManager is undefined. VRMExpressionLoaderPlugin have to be used first");r.userData.vrmLookAt=yield this._import(r,t,e)}})}_import(r,t,e){return ye(this,null,function*(){if(t==null||e==null)return null;const n=yield this._v1Import(r,t,e);if(n)return n;const i=yield this._v0Import(r,t,e);return i||null})}_v1Import(r,t,e){return ye(this,null,function*(){var n,i,s;const o=this.parser.json;if(!(((n=o.extensionsUsed)==null?void 0:n.indexOf("VRMC_vrm"))!==-1))return null;const l=(i=o.extensions)==null?void 0:i.VRMC_vrm;if(!l)return null;const u=l.specVersion;if(!KF.has(u))return console.warn(`VRMLookAtLoaderPlugin: Unknown VRMC_vrm specVersion "${u}"`),null;const c=l.lookAt;if(!c)return null;const h=c.type==="expression"?1:10,f=this._v1ImportRangeMap(c.rangeMapHorizontalInner,h),d=this._v1ImportRangeMap(c.rangeMapHorizontalOuter,h),m=this._v1ImportRangeMap(c.rangeMapVerticalDown,h),g=this._v1ImportRangeMap(c.rangeMapVerticalUp,h);let p;c.type==="expression"?p=new hp(e,f,d,m,g):p=new mu(t,f,d,m,g);const y=this._importLookAt(t,p);return y.offsetFromHeadBone.fromArray((s=c.offsetFromHeadBone)!=null?s:[0,.06,0]),y})}_v1ImportRangeMap(r,t){var e,n;let i=(e=r==null?void 0:r.inputMaxValue)!=null?e:90;const s=(n=r==null?void 0:r.outputScale)!=null?n:t;return i(console.error(o),console.warn("VRMMetaLoaderPlugin: Failed to load a thumbnail image"),null))})}},nD=class{constructor(r){this.scene=r.scene,this.meta=r.meta,this.humanoid=r.humanoid,this.expressionManager=r.expressionManager,this.firstPerson=r.firstPerson,this.lookAt=r.lookAt}update(r){this.humanoid.update(),this.lookAt&&this.lookAt.update(r),this.expressionManager&&this.expressionManager.update()}},iD=class extends nD{constructor(r){super(r),this.materials=r.materials,this.springBoneManager=r.springBoneManager,this.nodeConstraintManager=r.nodeConstraintManager}update(r){super.update(r),this.nodeConstraintManager&&this.nodeConstraintManager.update(),this.springBoneManager&&this.springBoneManager.update(r),this.materials&&this.materials.forEach(t=>{t.update&&t.update(r)})}},sD=Object.defineProperty,Ev=Object.getOwnPropertySymbols,oD=Object.prototype.hasOwnProperty,aD=Object.prototype.propertyIsEnumerable,Av=(r,t,e)=>t in r?sD(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Cv=(r,t)=>{for(var e in t||(t={}))oD.call(t,e)&&Av(r,e,t[e]);if(Ev)for(var e of Ev(t))aD.call(t,e)&&Av(r,e,t[e]);return r},Os=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),lD={"":3e3,srgb:3001};function uD(r,t){parseInt(Cu,10)>=152?r.colorSpace=t:r.encoding=lD[t]}var cD=class{get pending(){return Promise.all(this._pendings)}constructor(r,t){this._parser=r,this._materialParams=t,this._pendings=[]}assignPrimitive(r,t){t!=null&&(this._materialParams[r]=t)}assignColor(r,t,e){t!=null&&(this._materialParams[r]=new nn().fromArray(t),e&&this._materialParams[r].convertSRGBToLinear())}assignTexture(r,t,e){return Os(this,null,function*(){const n=Os(this,null,function*(){t!=null&&(yield this._parser.assignTexture(this._materialParams,r,t),e&&uD(this._materialParams[r],"srgb"))});return this._pendings.push(n),n})}assignTextureByIndex(r,t,e){return Os(this,null,function*(){return this.assignTexture(r,t!=null?{index:t}:void 0,e)})}},hD=`// #define PHONG + */var su=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),ye=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),sv=class extends Ja{constructor(r){super(),this.weight=0,this.isBinary=!1,this.overrideBlink="none",this.overrideLookAt="none",this.overrideMouth="none",this._binds=[],this.name=`VRMExpression_${r}`,this.expressionName=r,this.type="VRMExpression",this.visible=!1}get binds(){return this._binds}get overrideBlinkAmount(){return this.overrideBlink==="block"?0.5?1:0:this.weight}addBind(r){this._binds.push(r)}deleteBind(r){const t=this._binds.indexOf(r);t>=0&&this._binds.splice(t,1)}applyWeight(r){var t;let e=this.outputWeight;e*=(t=r==null?void 0:r.multiplier)!=null?t:1,this.isBinary&&e<1&&(e=0),this._binds.forEach(n=>n.applyWeight(e))}clearAppliedWeight(){this._binds.forEach(r=>r.clearAppliedWeight())}};function Nw(r,t,e){var n,i;const s=r.parser.json,o=(n=s.nodes)==null?void 0:n[t];if(o==null)return console.warn(`extractPrimitivesInternal: Attempt to use nodes[${t}] of glTF but the node doesn't exist`),null;const a=o.mesh;if(a==null)return null;const l=(i=s.meshes)==null?void 0:i[a];if(l==null)return console.warn(`extractPrimitivesInternal: Attempt to use meshes[${a}] of glTF but the mesh doesn't exist`),null;const u=l.primitives.length,c=[];return e.traverse(h=>{c.length{const s=Nw(r,i,n);s!=null&&e.set(i,s)}),e})}var lp={Aa:"aa",Ih:"ih",Ou:"ou",Ee:"ee",Oh:"oh",Blink:"blink",Happy:"happy",Angry:"angry",Sad:"sad",Relaxed:"relaxed",LookUp:"lookUp",Surprised:"surprised",LookDown:"lookDown",LookLeft:"lookLeft",LookRight:"lookRight",BlinkLeft:"blinkLeft",BlinkRight:"blinkRight",Neutral:"neutral"};function Bw(r){return Math.max(Math.min(r,1),0)}var lv=class kw{constructor(){this.blinkExpressionNames=["blink","blinkLeft","blinkRight"],this.lookAtExpressionNames=["lookLeft","lookRight","lookUp","lookDown"],this.mouthExpressionNames=["aa","ee","ih","oh","ou"],this._expressions=[],this._expressionMap={}}get expressions(){return this._expressions.concat()}get expressionMap(){return Object.assign({},this._expressionMap)}get presetExpressionMap(){const t={},e=new Set(Object.values(lp));return Object.entries(this._expressionMap).forEach(([n,i])=>{e.has(n)&&(t[n]=i)}),t}get customExpressionMap(){const t={},e=new Set(Object.values(lp));return Object.entries(this._expressionMap).forEach(([n,i])=>{e.has(n)||(t[n]=i)}),t}copy(t){return this._expressions.concat().forEach(n=>{this.unregisterExpression(n)}),t._expressions.forEach(n=>{this.registerExpression(n)}),this.blinkExpressionNames=t.blinkExpressionNames.concat(),this.lookAtExpressionNames=t.lookAtExpressionNames.concat(),this.mouthExpressionNames=t.mouthExpressionNames.concat(),this}clone(){return new kw().copy(this)}getExpression(t){var e;return(e=this._expressionMap[t])!=null?e:null}registerExpression(t){this._expressions.push(t),this._expressionMap[t.expressionName]=t}unregisterExpression(t){const e=this._expressions.indexOf(t);e===-1&&console.warn("VRMExpressionManager: The specified expressions is not registered"),this._expressions.splice(e,1),delete this._expressionMap[t.expressionName]}getValue(t){var e;const n=this.getExpression(t);return(e=n==null?void 0:n.weight)!=null?e:null}setValue(t,e){const n=this.getExpression(t);n&&(n.weight=Bw(e))}resetValues(){this._expressions.forEach(t=>{t.weight=0})}getExpressionTrackName(t){const e=this.getExpression(t);return e?`${e.name}.weight`:null}update(){const t=this._calculateWeightMultipliers();this._expressions.forEach(e=>{e.clearAppliedWeight()}),this._expressions.forEach(e=>{let n=1;const i=e.expressionName;this.blinkExpressionNames.indexOf(i)!==-1&&(n*=t.blink),this.lookAtExpressionNames.indexOf(i)!==-1&&(n*=t.lookAt),this.mouthExpressionNames.indexOf(i)!==-1&&(n*=t.mouth),e.applyWeight({multiplier:n})})}_calculateWeightMultipliers(){let t=1,e=1,n=1;return this._expressions.forEach(i=>{t-=i.overrideBlinkAmount,e-=i.overrideLookAtAmount,n-=i.overrideMouthAmount}),t=Math.max(0,t),e=Math.max(0,e),n=Math.max(0,n),{blink:t,lookAt:e,mouth:n}}},xa={Color:"color",EmissionColor:"emissionColor",ShadeColor:"shadeColor",RimColor:"rimColor",OutlineColor:"outlineColor"},MF={_Color:xa.Color,_EmissionColor:xa.EmissionColor,_ShadeColor:xa.ShadeColor,_RimColor:xa.RimColor,_OutlineColor:xa.OutlineColor},EF=new nn,Uw=class zw{constructor({material:t,type:e,targetValue:n,targetAlpha:i}){this.material=t,this.type=e,this.targetValue=n,this.targetAlpha=i??1;const s=this._initColorBindState(),o=this._initAlphaBindState();this._state={color:s,alpha:o}}applyWeight(t){const{color:e,alpha:n}=this._state;if(e!=null){const{propertyName:i,deltaValue:s}=e,o=this.material[i];o!=null&&o.add(EF.copy(s).multiplyScalar(t))}if(n!=null){const{propertyName:i,deltaValue:s}=n;this.material[i]!=null&&(this.material[i]+=s*t)}}clearAppliedWeight(){const{color:t,alpha:e}=this._state;if(t!=null){const{propertyName:n,initialValue:i}=t,s=this.material[n];s!=null&&s.copy(i)}if(e!=null){const{propertyName:n,initialValue:i}=e;this.material[n]!=null&&(this.material[n]=i)}}_initColorBindState(){var t,e,n;const{material:i,type:s,targetValue:o}=this,a=this._getPropertyNameMap(),l=(e=(t=a==null?void 0:a[s])==null?void 0:t[0])!=null?e:null;if(l==null)return console.warn(`Tried to add a material color bind to the material ${(n=i.name)!=null?n:"(no name)"}, the type ${s} but the material or the type is not supported.`),null;const c=i[l].clone(),h=new nn(o.r-c.r,o.g-c.g,o.b-c.b);return{propertyName:l,initialValue:c,deltaValue:h}}_initAlphaBindState(){var t,e,n;const{material:i,type:s,targetAlpha:o}=this,a=this._getPropertyNameMap(),l=(e=(t=a==null?void 0:a[s])==null?void 0:t[1])!=null?e:null;if(l==null&&o!==1)return console.warn(`Tried to add a material alpha bind to the material ${(n=i.name)!=null?n:"(no name)"}, the type ${s} but the material or the type does not support alpha.`),null;if(l==null)return null;const u=i[l],c=o-u;return{propertyName:l,initialValue:u,deltaValue:c}}_getPropertyNameMap(){var t,e;return(e=(t=Object.entries(zw._propertyNameMapMap).find(([n])=>this.material[n]===!0))==null?void 0:t[1])!=null?e:null}};Uw._propertyNameMapMap={isMeshStandardMaterial:{color:["color","opacity"],emissionColor:["emissive",null]},isMeshBasicMaterial:{color:["color","opacity"]},isMToonMaterial:{color:["color","opacity"],emissionColor:["emissive",null],outlineColor:["outlineColorFactor",null],matcapColor:["matcapFactor",null],rimColor:["parametricRimColorFactor",null],shadeColor:["shadeColorFactor",null]}};var uv=Uw,Hu=class{constructor({primitives:r,index:t,weight:e}){this.primitives=r,this.index=t,this.weight=e}applyWeight(r){this.primitives.forEach(t=>{var e;((e=t.morphTargetInfluences)==null?void 0:e[this.index])!=null&&(t.morphTargetInfluences[this.index]+=this.weight*r)})}clearAppliedWeight(){this.primitives.forEach(r=>{var t;((t=r.morphTargetInfluences)==null?void 0:t[this.index])!=null&&(r.morphTargetInfluences[this.index]=0)})}},cv=new Ao,Vw=class jw{constructor({material:t,scale:e,offset:n}){var i,s;this.material=t,this.scale=e,this.offset=n;const o=(i=Object.entries(jw._propertyNamesMap).find(([a])=>t[a]===!0))==null?void 0:i[1];o==null?(console.warn(`Tried to add a texture transform bind to the material ${(s=t.name)!=null?s:"(no name)"} but the material is not supported.`),this._properties=[]):(this._properties=[],o.forEach(a=>{var l;const u=(l=t[a])==null?void 0:l.clone();if(!u)return null;t[a]=u;const c=u.offset.clone(),h=u.repeat.clone(),f=n.clone().sub(c),d=e.clone().sub(h);this._properties.push({name:a,initialOffset:c,deltaOffset:f,initialScale:h,deltaScale:d})}))}applyWeight(t){this._properties.forEach(e=>{const n=this.material[e.name];n!==void 0&&(n.offset.add(cv.copy(e.deltaOffset).multiplyScalar(t)),n.repeat.add(cv.copy(e.deltaScale).multiplyScalar(t)))})}clearAppliedWeight(){this._properties.forEach(t=>{const e=this.material[t.name];e!==void 0&&(e.offset.copy(t.initialOffset),e.repeat.copy(t.initialScale))})}};Vw._propertyNamesMap={isMeshStandardMaterial:["map","emissiveMap","bumpMap","normalMap","displacementMap","roughnessMap","metalnessMap","alphaMap"],isMeshBasicMaterial:["map","specularMap","alphaMap"],isMToonMaterial:["map","normalMap","emissiveMap","shadeMultiplyTexture","rimMultiplyTexture","outlineWidthMultiplyTexture","uvAnimationMaskTexture"]};var hv=Vw,AF=new Set(["1.0","1.0-beta"]),$w=class Gw{get name(){return"VRMExpressionLoaderPlugin"}constructor(t){this.parser=t}afterRoot(t){return ye(this,null,function*(){t.userData.vrmExpressionManager=yield this._import(t)})}_import(t){return ye(this,null,function*(){const e=yield this._v1Import(t);if(e)return e;const n=yield this._v0Import(t);return n||null})}_v1Import(t){return ye(this,null,function*(){var e,n;const i=this.parser.json;if(!(((e=i.extensionsUsed)==null?void 0:e.indexOf("VRMC_vrm"))!==-1))return null;const o=(n=i.extensions)==null?void 0:n.VRMC_vrm;if(!o)return null;const a=o.specVersion;if(!AF.has(a))return console.warn(`VRMExpressionLoaderPlugin: Unknown VRMC_vrm specVersion "${a}"`),null;const l=o.expressions;if(!l)return null;const u=new Set(Object.values(lp)),c=new Map;l.preset!=null&&Object.entries(l.preset).forEach(([f,d])=>{if(d!=null){if(!u.has(f)){console.warn(`VRMExpressionLoaderPlugin: Unknown preset name "${f}" detected. Ignoring the expression`);return}c.set(f,d)}}),l.custom!=null&&Object.entries(l.custom).forEach(([f,d])=>{if(u.has(f)){console.warn(`VRMExpressionLoaderPlugin: Custom expression cannot have preset name "${f}". Ignoring the expression`);return}c.set(f,d)});const h=new lv;return yield Promise.all(Array.from(c.entries()).map(f=>ye(this,[f],function*([d,m]){var g,p,y,v,S,T,_;const M=new sv(d);if(t.scene.add(M),M.isBinary=(g=m.isBinary)!=null?g:!1,M.overrideBlink=(p=m.overrideBlink)!=null?p:"none",M.overrideLookAt=(y=m.overrideLookAt)!=null?y:"none",M.overrideMouth=(v=m.overrideMouth)!=null?v:"none",(S=m.morphTargetBinds)==null||S.forEach(x=>ye(this,null,function*(){var N;if(x.node===void 0||x.index===void 0)return;const D=yield ov(t,x.node),j=x.index;if(!D.every(it=>Array.isArray(it.morphTargetInfluences)&&j{const D=N.material;D&&(Array.isArray(D)?x.push(...D):x.push(D))}),(T=m.materialColorBinds)==null||T.forEach(N=>ye(this,null,function*(){x.filter(j=>{var it;const I=(it=this.parser.associations.get(j))==null?void 0:it.materials;return N.material===I}).forEach(j=>{M.addBind(new uv({material:j,type:N.type,targetValue:new nn().fromArray(N.targetValue),targetAlpha:N.targetValue[3]}))})})),(_=m.textureTransformBinds)==null||_.forEach(N=>ye(this,null,function*(){x.filter(j=>{var it;const I=(it=this.parser.associations.get(j))==null?void 0:it.materials;return N.material===I}).forEach(j=>{var it,I;M.addBind(new hv({material:j,offset:new Ao().fromArray((it=N.offset)!=null?it:[0,0]),scale:new Ao().fromArray((I=N.scale)!=null?I:[1,1])}))})}))}h.registerExpression(M)}))),h})}_v0Import(t){return ye(this,null,function*(){var e;const n=this.parser.json,i=(e=n.extensions)==null?void 0:e.VRM;if(!i)return null;const s=i.blendShapeMaster;if(!s)return null;const o=new lv,a=s.blendShapeGroups;if(!a)return o;const l=new Set;return yield Promise.all(a.map(u=>ye(this,null,function*(){var c;const h=u.presetName,f=h!=null&&Gw.v0v1PresetNameMap[h]||null,d=f??u.name;if(d==null){console.warn("VRMExpressionLoaderPlugin: One of custom expressions has no name. Ignoring the expression");return}if(l.has(d)){console.warn(`VRMExpressionLoaderPlugin: An expression preset ${h} has duplicated entries. Ignoring the expression`);return}l.add(d);const m=new sv(d);t.scene.add(m),m.isBinary=(c=u.isBinary)!=null?c:!1,u.binds&&u.binds.forEach(p=>ye(this,null,function*(){var y;if(p.mesh===void 0||p.index===void 0)return;const v=[];(y=n.nodes)==null||y.forEach((T,_)=>{T.mesh===p.mesh&&v.push(_)});const S=p.index;yield Promise.all(v.map(T=>ye(this,null,function*(){var _;const M=yield ov(t,T);if(!M.every(x=>Array.isArray(x.morphTargetInfluences)&&S{if(p.materialName===void 0||p.propertyName===void 0||p.targetValue===void 0)return;const y=[];t.scene.traverse(S=>{if(S.material){const T=S.material;Array.isArray(T)?y.push(...T.filter(_=>(_.name===p.materialName||_.name===p.materialName+" (Outline)")&&y.indexOf(_)===-1)):T.name===p.materialName&&y.indexOf(T)===-1&&y.push(T)}});const v=p.propertyName;y.forEach(S=>{if(v==="_MainTex_ST"){const _=new Ao(p.targetValue[0],p.targetValue[1]),M=new Ao(p.targetValue[2],p.targetValue[3]);M.y=1-M.y-_.y,m.addBind(new hv({material:S,scale:_,offset:M}));return}const T=MF[v];if(T){m.addBind(new uv({material:S,type:T,targetValue:new nn().fromArray(p.targetValue),targetAlpha:p.targetValue[3]}));return}console.warn(v+" is not supported")})}),o.registerExpression(m)}))),o})}};$w.v0v1PresetNameMap={a:"aa",e:"ee",i:"ih",o:"oh",u:"ou",blink:"blink",joy:"happy",angry:"angry",sorrow:"sad",fun:"relaxed",lookup:"lookUp",lookdown:"lookDown",lookleft:"lookLeft",lookright:"lookRight",blink_l:"blinkLeft",blink_r:"blinkRight",neutral:"neutral"};var CF=$w,Sm=class fo{constructor(t,e){this._firstPersonOnlyLayer=fo.DEFAULT_FIRSTPERSON_ONLY_LAYER,this._thirdPersonOnlyLayer=fo.DEFAULT_THIRDPERSON_ONLY_LAYER,this._initializedLayers=!1,this.humanoid=t,this.meshAnnotations=e}copy(t){if(this.humanoid!==t.humanoid)throw new Error("VRMFirstPerson: humanoid must be same in order to copy");return this.meshAnnotations=t.meshAnnotations.map(e=>({meshes:e.meshes.concat(),type:e.type})),this}clone(){return new fo(this.humanoid,this.meshAnnotations).copy(this)}get firstPersonOnlyLayer(){return this._firstPersonOnlyLayer}get thirdPersonOnlyLayer(){return this._thirdPersonOnlyLayer}setup({firstPersonOnlyLayer:t=fo.DEFAULT_FIRSTPERSON_ONLY_LAYER,thirdPersonOnlyLayer:e=fo.DEFAULT_THIRDPERSON_ONLY_LAYER}={}){this._initializedLayers||(this._firstPersonOnlyLayer=t,this._thirdPersonOnlyLayer=e,this.meshAnnotations.forEach(n=>{n.meshes.forEach(i=>{n.type==="firstPersonOnly"?(i.layers.set(this._firstPersonOnlyLayer),i.traverse(s=>s.layers.set(this._firstPersonOnlyLayer))):n.type==="thirdPersonOnly"?(i.layers.set(this._thirdPersonOnlyLayer),i.traverse(s=>s.layers.set(this._thirdPersonOnlyLayer))):n.type==="auto"&&this._createHeadlessModel(i)})}),this._initializedLayers=!0)}_excludeTriangles(t,e,n,i){let s=0;if(e!=null&&e.length>0)for(let o=0;o0&&i.includes(h[0])||c[1]>0&&i.includes(h[1])||c[2]>0&&i.includes(h[2])||c[3]>0&&i.includes(h[3]))continue;const f=e[l],d=n[l];if(f[0]>0&&i.includes(d[0])||f[1]>0&&i.includes(d[1])||f[2]>0&&i.includes(d[2])||f[3]>0&&i.includes(d[3]))continue;const m=e[u],g=n[u];m[0]>0&&i.includes(g[0])||m[1]>0&&i.includes(g[1])||m[2]>0&&i.includes(g[2])||m[3]>0&&i.includes(g[3])||(t[s++]=a,t[s++]=l,t[s++]=u)}return s}_createErasedMesh(t,e){const n=new ZM(t.geometry.clone(),t.material);n.name=`${t.name}(erase)`,n.frustumCulled=t.frustumCulled,n.layers.set(this._firstPersonOnlyLayer);const i=n.geometry,s=i.getAttribute("skinIndex"),o=s instanceof Ig?[]:s.array,a=[];for(let g=0;g{this._isEraseTarget(s)&&n.push(o)}),!n.length){e.layers.enable(this._thirdPersonOnlyLayer),e.layers.enable(this._firstPersonOnlyLayer);return}e.layers.set(this._thirdPersonOnlyLayer);const i=this._createErasedMesh(e,n);t.add(i)}_createHeadlessModel(t){if(t.type==="Group")if(t.layers.set(this._thirdPersonOnlyLayer),this._isEraseTarget(t))t.traverse(e=>e.layers.set(this._thirdPersonOnlyLayer));else{const e=new ea;e.name=`_headless_${t.name}`,e.layers.set(this._firstPersonOnlyLayer),t.parent.add(e),t.children.filter(n=>n.type==="SkinnedMesh").forEach(n=>{const i=n;this._createHeadlessModelForSkinnedMesh(e,i)})}else if(t.type==="SkinnedMesh"){const e=t;this._createHeadlessModelForSkinnedMesh(t.parent,e)}else this._isEraseTarget(t)&&(t.layers.set(this._thirdPersonOnlyLayer),t.traverse(e=>e.layers.set(this._thirdPersonOnlyLayer)))}_isEraseTarget(t){return t===this.humanoid.getRawBoneNode("head")?!0:t.parent?this._isEraseTarget(t.parent):!1}};Sm.DEFAULT_FIRSTPERSON_ONLY_LAYER=9;Sm.DEFAULT_THIRDPERSON_ONLY_LAYER=10;var dv=Sm,OF=new Set(["1.0","1.0-beta"]),PF=class{get name(){return"VRMFirstPersonLoaderPlugin"}constructor(r){this.parser=r}afterRoot(r){return ye(this,null,function*(){const t=r.userData.vrmHumanoid;if(t!==null){if(t===void 0)throw new Error("VRMFirstPersonLoaderPlugin: vrmHumanoid is undefined. VRMHumanoidLoaderPlugin have to be used first");r.userData.vrmFirstPerson=yield this._import(r,t)}})}_import(r,t){return ye(this,null,function*(){if(t==null)return null;const e=yield this._v1Import(r,t);if(e)return e;const n=yield this._v0Import(r,t);return n||null})}_v1Import(r,t){return ye(this,null,function*(){var e,n;const i=this.parser.json;if(!(((e=i.extensionsUsed)==null?void 0:e.indexOf("VRMC_vrm"))!==-1))return null;const o=(n=i.extensions)==null?void 0:n.VRMC_vrm;if(!o)return null;const a=o.specVersion;if(!OF.has(a))return console.warn(`VRMFirstPersonLoaderPlugin: Unknown VRMC_vrm specVersion "${a}"`),null;const l=o.firstPerson,u=[],c=yield av(r);return Array.from(c.entries()).forEach(([h,f])=>{var d,m;const g=(d=l==null?void 0:l.meshAnnotations)==null?void 0:d.find(p=>p.node===h);u.push({meshes:f,type:(m=g==null?void 0:g.type)!=null?m:"auto"})}),new dv(t,u)})}_v0Import(r,t){return ye(this,null,function*(){var e;const n=this.parser.json,i=(e=n.extensions)==null?void 0:e.VRM;if(!i)return null;const s=i.firstPerson;if(!s)return null;const o=[],a=yield av(r);return Array.from(a.entries()).forEach(([l,u])=>{const c=n.nodes[l],h=s.meshAnnotations?s.meshAnnotations.find(f=>f.mesh===c.mesh):void 0;o.push({meshes:u,type:this._convertV0FlagToV1Type(h==null?void 0:h.firstPersonFlag)})}),new dv(t,o)})}_convertV0FlagToV1Type(r){return r==="FirstPersonOnly"?"firstPersonOnly":r==="ThirdPersonOnly"?"thirdPersonOnly":r==="Both"?"both":"auto"}},fv=new gt,pv=new gt,RF=new oe,mv=class extends ea{constructor(r){super(),this.vrmHumanoid=r,this._boneAxesMap=new Map,Object.values(r.humanBones).forEach(t=>{const e=new KM(1);e.matrixAutoUpdate=!1,e.material.depthTest=!1,e.material.depthWrite=!1,this.add(e),this._boneAxesMap.set(t,e)})}dispose(){Array.from(this._boneAxesMap.values()).forEach(r=>{r.geometry.dispose(),r.material.dispose()})}updateMatrixWorld(r){Array.from(this._boneAxesMap.entries()).forEach(([t,e])=>{t.node.updateWorldMatrix(!0,!1),t.node.matrixWorld.decompose(fv,RF,pv);const n=fv.set(.1,.1,.1).divide(pv);e.matrix.copy(t.node.matrixWorld).scale(n)}),super.updateMatrixWorld(r)}},Id=["hips","spine","chest","upperChest","neck","head","leftEye","rightEye","jaw","leftUpperLeg","leftLowerLeg","leftFoot","leftToes","rightUpperLeg","rightLowerLeg","rightFoot","rightToes","leftShoulder","leftUpperArm","leftLowerArm","leftHand","rightShoulder","rightUpperArm","rightLowerArm","rightHand","leftThumbMetacarpal","leftThumbProximal","leftThumbDistal","leftIndexProximal","leftIndexIntermediate","leftIndexDistal","leftMiddleProximal","leftMiddleIntermediate","leftMiddleDistal","leftRingProximal","leftRingIntermediate","leftRingDistal","leftLittleProximal","leftLittleIntermediate","leftLittleDistal","rightThumbMetacarpal","rightThumbProximal","rightThumbDistal","rightIndexProximal","rightIndexIntermediate","rightIndexDistal","rightMiddleProximal","rightMiddleIntermediate","rightMiddleDistal","rightRingProximal","rightRingIntermediate","rightRingDistal","rightLittleProximal","rightLittleIntermediate","rightLittleDistal"],FF={hips:null,spine:"hips",chest:"spine",upperChest:"chest",neck:"upperChest",head:"neck",leftEye:"head",rightEye:"head",jaw:"head",leftUpperLeg:"hips",leftLowerLeg:"leftUpperLeg",leftFoot:"leftLowerLeg",leftToes:"leftFoot",rightUpperLeg:"hips",rightLowerLeg:"rightUpperLeg",rightFoot:"rightLowerLeg",rightToes:"rightFoot",leftShoulder:"upperChest",leftUpperArm:"leftShoulder",leftLowerArm:"leftUpperArm",leftHand:"leftLowerArm",rightShoulder:"upperChest",rightUpperArm:"rightShoulder",rightLowerArm:"rightUpperArm",rightHand:"rightLowerArm",leftThumbMetacarpal:"leftHand",leftThumbProximal:"leftThumbMetacarpal",leftThumbDistal:"leftThumbProximal",leftIndexProximal:"leftHand",leftIndexIntermediate:"leftIndexProximal",leftIndexDistal:"leftIndexIntermediate",leftMiddleProximal:"leftHand",leftMiddleIntermediate:"leftMiddleProximal",leftMiddleDistal:"leftMiddleIntermediate",leftRingProximal:"leftHand",leftRingIntermediate:"leftRingProximal",leftRingDistal:"leftRingIntermediate",leftLittleProximal:"leftHand",leftLittleIntermediate:"leftLittleProximal",leftLittleDistal:"leftLittleIntermediate",rightThumbMetacarpal:"rightHand",rightThumbProximal:"rightThumbMetacarpal",rightThumbDistal:"rightThumbProximal",rightIndexProximal:"rightHand",rightIndexIntermediate:"rightIndexProximal",rightIndexDistal:"rightIndexIntermediate",rightMiddleProximal:"rightHand",rightMiddleIntermediate:"rightMiddleProximal",rightMiddleDistal:"rightMiddleIntermediate",rightRingProximal:"rightHand",rightRingIntermediate:"rightRingProximal",rightRingDistal:"rightRingIntermediate",rightLittleProximal:"rightHand",rightLittleIntermediate:"rightLittleProximal",rightLittleDistal:"rightLittleIntermediate"};function Ww(r){return r.invert?r.invert():r.inverse(),r}var hs=new gt,ds=new oe,up=class{constructor(r){this.humanBones=r,this.restPose=this.getAbsolutePose()}getAbsolutePose(){const r={};return Object.keys(this.humanBones).forEach(t=>{const e=t,n=this.getBoneNode(e);n&&(hs.copy(n.position),ds.copy(n.quaternion),r[e]={position:hs.toArray(),rotation:ds.toArray()})}),r}getPose(){const r={};return Object.keys(this.humanBones).forEach(t=>{const e=t,n=this.getBoneNode(e);if(!n)return;hs.set(0,0,0),ds.identity();const i=this.restPose[e];i!=null&&i.position&&hs.fromArray(i.position).negate(),i!=null&&i.rotation&&Ww(ds.fromArray(i.rotation)),hs.add(n.position),ds.premultiply(n.quaternion),r[e]={position:hs.toArray(),rotation:ds.toArray()}}),r}setPose(r){Object.entries(r).forEach(([t,e])=>{const n=t,i=this.getBoneNode(n);if(!i)return;const s=this.restPose[n];s&&(e!=null&&e.position&&(i.position.fromArray(e.position),s.position&&i.position.add(hs.fromArray(s.position))),e!=null&&e.rotation&&(i.quaternion.fromArray(e.rotation),s.rotation&&i.quaternion.multiply(ds.fromArray(s.rotation))))})}resetPose(){Object.entries(this.restPose).forEach(([r,t])=>{const e=this.getBoneNode(r);e&&(t!=null&&t.position&&e.position.fromArray(t.position),t!=null&&t.rotation&&e.quaternion.fromArray(t.rotation))})}getBone(r){var t;return(t=this.humanBones[r])!=null?t:void 0}getBoneNode(r){var t,e;return(e=(t=this.humanBones[r])==null?void 0:t.node)!=null?e:null}},Md=new gt,LF=new oe,DF=new gt,gv=class Hw extends up{static _setupTransforms(t){const e=new Ja;e.name="VRMHumanoidRig";const n={},i={},s={};Id.forEach(a=>{var l;const u=t.getBoneNode(a);if(u){const c=new gt,h=new oe;u.updateWorldMatrix(!0,!1),u.matrixWorld.decompose(c,h,Md),n[a]=c,i[a]=u.quaternion.clone();const f=new oe;(l=u.parent)==null||l.matrixWorld.decompose(Md,f,Md),s[a]=f}});const o={};return Id.forEach(a=>{var l;const u=t.getBoneNode(a);if(u){const c=n[a];let h=a,f;for(;f==null&&(h=FF[h],h!=null);)f=n[h];const d=new Ja;d.name="Normalized_"+u.name,(h?(l=o[h])==null?void 0:l.node:e).add(d),d.position.copy(c),f&&d.position.sub(f),o[a]={node:d}}}),{rigBones:o,root:e,parentWorldRotations:s,boneRotations:i}}constructor(t){const{rigBones:e,root:n,parentWorldRotations:i,boneRotations:s}=Hw._setupTransforms(t);super(e),this.original=t,this.root=n,this._parentWorldRotations=i,this._boneRotations=s}update(){Id.forEach(t=>{const e=this.original.getBoneNode(t);if(e!=null){const n=this.getBoneNode(t),i=this._parentWorldRotations[t],s=LF.copy(i).invert(),o=this._boneRotations[t];if(e.quaternion.copy(n.quaternion).multiply(i).premultiply(s).multiply(o),t==="hips"){const a=n.getWorldPosition(DF);e.parent.updateWorldMatrix(!0,!1);const l=e.parent.matrixWorld,u=a.applyMatrix4(l.invert());e.position.copy(u)}}})}},yv=class Xw{get restPose(){return console.warn("VRMHumanoid: restPose is deprecated. Use either rawRestPose or normalizedRestPose instead."),this.rawRestPose}get rawRestPose(){return this._rawHumanBones.restPose}get normalizedRestPose(){return this._normalizedHumanBones.restPose}get humanBones(){return this._rawHumanBones.humanBones}get rawHumanBones(){return this._rawHumanBones.humanBones}get normalizedHumanBones(){return this._normalizedHumanBones.humanBones}get normalizedHumanBonesRoot(){return this._normalizedHumanBones.root}constructor(t,e){var n;this.autoUpdateHumanBones=(n=e==null?void 0:e.autoUpdateHumanBones)!=null?n:!0,this._rawHumanBones=new up(t),this._normalizedHumanBones=new gv(this._rawHumanBones)}copy(t){return this.autoUpdateHumanBones=t.autoUpdateHumanBones,this._rawHumanBones=new up(t.humanBones),this._normalizedHumanBones=new gv(this._rawHumanBones),this}clone(){return new Xw(this.humanBones,{autoUpdateHumanBones:this.autoUpdateHumanBones}).copy(this)}getAbsolutePose(){return console.warn("VRMHumanoid: getAbsolutePose() is deprecated. Use either getRawAbsolutePose() or getNormalizedAbsolutePose() instead."),this.getRawAbsolutePose()}getRawAbsolutePose(){return this._rawHumanBones.getAbsolutePose()}getNormalizedAbsolutePose(){return this._normalizedHumanBones.getAbsolutePose()}getPose(){return console.warn("VRMHumanoid: getPose() is deprecated. Use either getRawPose() or getNormalizedPose() instead."),this.getRawPose()}getRawPose(){return this._rawHumanBones.getPose()}getNormalizedPose(){return this._normalizedHumanBones.getPose()}setPose(t){return console.warn("VRMHumanoid: setPose() is deprecated. Use either setRawPose() or setNormalizedPose() instead."),this.setRawPose(t)}setRawPose(t){return this._rawHumanBones.setPose(t)}setNormalizedPose(t){return this._normalizedHumanBones.setPose(t)}resetPose(){return console.warn("VRMHumanoid: resetPose() is deprecated. Use either resetRawPose() or resetNormalizedPose() instead."),this.resetRawPose()}resetRawPose(){return this._rawHumanBones.resetPose()}resetNormalizedPose(){return this._normalizedHumanBones.resetPose()}getBone(t){return console.warn("VRMHumanoid: getBone() is deprecated. Use either getRawBone() or getNormalizedBone() instead."),this.getRawBone(t)}getRawBone(t){return this._rawHumanBones.getBone(t)}getNormalizedBone(t){return this._normalizedHumanBones.getBone(t)}getBoneNode(t){return console.warn("VRMHumanoid: getBoneNode() is deprecated. Use either getRawBoneNode() or getNormalizedBoneNode() instead."),this.getRawBoneNode(t)}getRawBoneNode(t){return this._rawHumanBones.getBoneNode(t)}getNormalizedBoneNode(t){return this._normalizedHumanBones.getBoneNode(t)}update(){this.autoUpdateHumanBones&&this._normalizedHumanBones.update()}},NF={Hips:"hips",Spine:"spine",Head:"head",LeftUpperLeg:"leftUpperLeg",LeftLowerLeg:"leftLowerLeg",LeftFoot:"leftFoot",RightUpperLeg:"rightUpperLeg",RightLowerLeg:"rightLowerLeg",RightFoot:"rightFoot",LeftUpperArm:"leftUpperArm",LeftLowerArm:"leftLowerArm",LeftHand:"leftHand",RightUpperArm:"rightUpperArm",RightLowerArm:"rightLowerArm",RightHand:"rightHand"},BF=new Set(["1.0","1.0-beta"]),vv={leftThumbProximal:"leftThumbMetacarpal",leftThumbIntermediate:"leftThumbProximal",rightThumbProximal:"rightThumbMetacarpal",rightThumbIntermediate:"rightThumbProximal"},kF=class{get name(){return"VRMHumanoidLoaderPlugin"}constructor(r,t){this.parser=r,this.helperRoot=t==null?void 0:t.helperRoot,this.autoUpdateHumanBones=t==null?void 0:t.autoUpdateHumanBones}afterRoot(r){return ye(this,null,function*(){r.userData.vrmHumanoid=yield this._import(r)})}_import(r){return ye(this,null,function*(){const t=yield this._v1Import(r);if(t)return t;const e=yield this._v0Import(r);return e||null})}_v1Import(r){return ye(this,null,function*(){var t,e;const n=this.parser.json;if(!(((t=n.extensionsUsed)==null?void 0:t.indexOf("VRMC_vrm"))!==-1))return null;const s=(e=n.extensions)==null?void 0:e.VRMC_vrm;if(!s)return null;const o=s.specVersion;if(!BF.has(o))return console.warn(`VRMHumanoidLoaderPlugin: Unknown VRMC_vrm specVersion "${o}"`),null;const a=s.humanoid;if(!a)return null;const l=a.humanBones.leftThumbIntermediate!=null||a.humanBones.rightThumbIntermediate!=null,u={};a.humanBones!=null&&(yield Promise.all(Object.entries(a.humanBones).map(h=>ye(this,[h],function*([f,d]){let m=f;const g=d.node;if(l){const y=vv[m];y!=null&&(m=y)}const p=yield this.parser.getDependency("node",g);if(p==null){console.warn(`A glTF node bound to the humanoid bone ${m} (index = ${g}) does not exist`);return}u[m]={node:p}}))));const c=new yv(this._ensureRequiredBonesExist(u),{autoUpdateHumanBones:this.autoUpdateHumanBones});if(r.scene.add(c.normalizedHumanBonesRoot),this.helperRoot){const h=new mv(c);this.helperRoot.add(h),h.renderOrder=this.helperRoot.renderOrder}return c})}_v0Import(r){return ye(this,null,function*(){var t;const n=(t=this.parser.json.extensions)==null?void 0:t.VRM;if(!n)return null;const i=n.humanoid;if(!i)return null;const s={};i.humanBones!=null&&(yield Promise.all(i.humanBones.map(a=>ye(this,null,function*(){const l=a.bone,u=a.node;if(l==null||u==null)return;const c=yield this.parser.getDependency("node",u);if(c==null){console.warn(`A glTF node bound to the humanoid bone ${l} (index = ${u}) does not exist`);return}const h=vv[l],f=h??l;if(s[f]!=null){console.warn(`Multiple bone entries for ${f} detected (index = ${u}), ignoring duplicated entries.`);return}s[f]={node:c}}))));const o=new yv(this._ensureRequiredBonesExist(s),{autoUpdateHumanBones:this.autoUpdateHumanBones});if(r.scene.add(o.normalizedHumanBonesRoot),this.helperRoot){const a=new mv(o);this.helperRoot.add(a),a.renderOrder=this.helperRoot.renderOrder}return o})}_ensureRequiredBonesExist(r){const t=Object.values(NF).filter(e=>r[e]==null);if(t.length>0)throw new Error(`VRMHumanoidLoaderPlugin: These humanoid bones are required but not exist: ${t.join(", ")}`);return r}},_v=class extends Ki{constructor(){super(),this._currentTheta=0,this._currentRadius=0,this.theta=0,this.radius=0,this._currentTheta=0,this._currentRadius=0,this._attrPos=new cr(new Float32Array(65*3),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(3*63),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;this._currentTheta!==this.theta&&(this._currentTheta=this.theta,r=!0),this._currentRadius!==this.radius&&(this._currentRadius=this.radius,r=!0),r&&this._buildPosition()}_buildPosition(){this._attrPos.setXYZ(0,0,0,0);for(let r=0;r<64;r++){const t=r/63*this._currentTheta;this._attrPos.setXYZ(r+1,this._currentRadius*Math.sin(t),0,this._currentRadius*Math.cos(t))}this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<63;r++)this._attrIndex.setXYZ(r*3,0,r+1,r+2);this._attrIndex.needsUpdate=!0}},UF=class extends Ki{constructor(){super(),this.radius=0,this._currentRadius=0,this.tail=new gt,this._currentTail=new gt,this._attrPos=new cr(new Float32Array(294),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(194),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;this._currentRadius!==this.radius&&(this._currentRadius=this.radius,r=!0),this._currentTail.equals(this.tail)||(this._currentTail.copy(this.tail),r=!0),r&&this._buildPosition()}_buildPosition(){for(let r=0;r<32;r++){const t=r/16*Math.PI;this._attrPos.setXYZ(r,Math.cos(t),Math.sin(t),0),this._attrPos.setXYZ(32+r,0,Math.cos(t),Math.sin(t)),this._attrPos.setXYZ(64+r,Math.sin(t),0,Math.cos(t))}this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.setXYZ(96,0,0,0),this._attrPos.setXYZ(97,this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<32;r++){const t=(r+1)%32;this._attrIndex.setXY(r*2,r,t),this._attrIndex.setXY(64+r*2,32+r,32+t),this._attrIndex.setXY(128+r*2,64+r,64+t)}this._attrIndex.setXY(192,96,97),this._attrIndex.needsUpdate=!0}},ou=new oe,bv=new oe,wa=new gt,xv=new gt,wv=Math.sqrt(2)/2,zF=new oe(0,0,-wv,wv),VF=new gt(0,1,0),jF=class extends ea{constructor(r){super(),this.matrixAutoUpdate=!1,this.vrmLookAt=r;{const t=new _v;t.radius=.5;const e=new wg({color:65280,transparent:!0,opacity:.5,side:Sg,depthTest:!1,depthWrite:!1});this._meshPitch=new Tg(t,e),this.add(this._meshPitch)}{const t=new _v;t.radius=.5;const e=new wg({color:16711680,transparent:!0,opacity:.5,side:Sg,depthTest:!1,depthWrite:!1});this._meshYaw=new Tg(t,e),this.add(this._meshYaw)}{const t=new UF;t.radius=.1;const e=new Bc({color:16777215,depthTest:!1,depthWrite:!1});this._lineTarget=new Yp(t,e),this._lineTarget.frustumCulled=!1,this.add(this._lineTarget)}}dispose(){this._meshYaw.geometry.dispose(),this._meshYaw.material.dispose(),this._meshPitch.geometry.dispose(),this._meshPitch.material.dispose(),this._lineTarget.geometry.dispose(),this._lineTarget.material.dispose()}updateMatrixWorld(r){const t=Be.DEG2RAD*this.vrmLookAt.yaw;this._meshYaw.geometry.theta=t,this._meshYaw.geometry.update();const e=Be.DEG2RAD*this.vrmLookAt.pitch;this._meshPitch.geometry.theta=e,this._meshPitch.geometry.update(),this.vrmLookAt.getLookAtWorldPosition(wa),this.vrmLookAt.getLookAtWorldQuaternion(ou),ou.multiply(this.vrmLookAt.getFaceFrontQuaternion(bv)),this._meshYaw.position.copy(wa),this._meshYaw.quaternion.copy(ou),this._meshPitch.position.copy(wa),this._meshPitch.quaternion.copy(ou),this._meshPitch.quaternion.multiply(bv.setFromAxisAngle(VF,t)),this._meshPitch.quaternion.multiply(zF);const{target:n,autoUpdate:i}=this.vrmLookAt;n!=null&&i&&(n.getWorldPosition(xv).sub(wa),this._lineTarget.geometry.tail.copy(xv),this._lineTarget.geometry.update(),this._lineTarget.position.copy(wa)),super.updateMatrixWorld(r)}},$F=new gt,GF=new gt;function cp(r,t){return r.matrixWorld.decompose($F,t,GF),t}function pu(r){return[Math.atan2(-r.z,r.x),Math.atan2(r.y,Math.sqrt(r.x*r.x+r.z*r.z))]}function Sv(r){const t=Math.round(r/2/Math.PI);return r-2*Math.PI*t}var Tv=new gt(0,0,1),WF=new gt,HF=new gt,XF=new gt,YF=new oe,Ed=new oe,Iv=new oe,qF=new oe,Ad=new Hs,Yw=class qw{constructor(t,e){this.offsetFromHeadBone=new gt,this.autoUpdate=!0,this.faceFront=new gt(0,0,1),this.humanoid=t,this.applier=e,this._yaw=0,this._pitch=0,this._needsUpdate=!0,this._restHeadWorldQuaternion=this.getLookAtWorldQuaternion(new oe)}get yaw(){return this._yaw}set yaw(t){this._yaw=t,this._needsUpdate=!0}get pitch(){return this._pitch}set pitch(t){this._pitch=t,this._needsUpdate=!0}get euler(){return console.warn("VRMLookAt: euler is deprecated. use getEuler() instead."),this.getEuler(new Hs)}getEuler(t){return t.set(Be.DEG2RAD*this._pitch,Be.DEG2RAD*this._yaw,0,"YXZ")}copy(t){if(this.humanoid!==t.humanoid)throw new Error("VRMLookAt: humanoid must be same in order to copy");return this.offsetFromHeadBone.copy(t.offsetFromHeadBone),this.applier=t.applier,this.autoUpdate=t.autoUpdate,this.target=t.target,this.faceFront.copy(t.faceFront),this}clone(){return new qw(this.humanoid,this.applier).copy(this)}reset(){this._yaw=0,this._pitch=0,this._needsUpdate=!0}getLookAtWorldPosition(t){const e=this.humanoid.getRawBoneNode("head");return t.copy(this.offsetFromHeadBone).applyMatrix4(e.matrixWorld)}getLookAtWorldQuaternion(t){const e=this.humanoid.getRawBoneNode("head");return cp(e,t)}getFaceFrontQuaternion(t){if(this.faceFront.distanceToSquared(Tv)<.01)return t.copy(this._restHeadWorldQuaternion).invert();const[e,n]=pu(this.faceFront);return Ad.set(0,.5*Math.PI+e,n,"YZX"),t.setFromEuler(Ad).premultiply(qF.copy(this._restHeadWorldQuaternion).invert())}getLookAtWorldDirection(t){return this.getLookAtWorldQuaternion(Ed),this.getFaceFrontQuaternion(Iv),t.copy(Tv).applyQuaternion(Ed).applyQuaternion(Iv).applyEuler(this.getEuler(Ad))}lookAt(t){const e=YF.copy(this._restHeadWorldQuaternion).multiply(Ww(this.getLookAtWorldQuaternion(Ed))),n=this.getLookAtWorldPosition(HF),i=XF.copy(t).sub(n).applyQuaternion(e).normalize(),[s,o]=pu(this.faceFront),[a,l]=pu(i),u=Sv(a-s),c=Sv(o-l);this._yaw=Be.RAD2DEG*u,this._pitch=Be.RAD2DEG*c,this._needsUpdate=!0}update(t){this.target!=null&&this.autoUpdate&&this.lookAt(this.target.getWorldPosition(WF)),this._needsUpdate&&(this._needsUpdate=!1,this.applier.applyYawPitch(this._yaw,this._pitch))}};Yw.EULER_ORDER="YXZ";var QF=Yw,ZF=new gt(0,0,1),En=new oe,so=new oe,Zr=new Hs(0,0,0,"YXZ"),mu=class{constructor(r,t,e,n,i){this.humanoid=r,this.rangeMapHorizontalInner=t,this.rangeMapHorizontalOuter=e,this.rangeMapVerticalDown=n,this.rangeMapVerticalUp=i,this.faceFront=new gt(0,0,1),this._restQuatLeftEye=new oe,this._restQuatRightEye=new oe,this._restLeftEyeParentWorldQuat=new oe,this._restRightEyeParentWorldQuat=new oe;const s=this.humanoid.getRawBoneNode("leftEye"),o=this.humanoid.getRawBoneNode("rightEye");s&&(this._restQuatLeftEye.copy(s.quaternion),cp(s.parent,this._restLeftEyeParentWorldQuat)),o&&(this._restQuatRightEye.copy(o.quaternion),cp(o.parent,this._restRightEyeParentWorldQuat))}applyYawPitch(r,t){const e=this.humanoid.getRawBoneNode("leftEye"),n=this.humanoid.getRawBoneNode("rightEye"),i=this.humanoid.getNormalizedBoneNode("leftEye"),s=this.humanoid.getNormalizedBoneNode("rightEye");e&&(t<0?Zr.x=-Be.DEG2RAD*this.rangeMapVerticalDown.map(-t):Zr.x=Be.DEG2RAD*this.rangeMapVerticalUp.map(t),r<0?Zr.y=-Be.DEG2RAD*this.rangeMapHorizontalInner.map(-r):Zr.y=Be.DEG2RAD*this.rangeMapHorizontalOuter.map(r),En.setFromEuler(Zr),this._getWorldFaceFrontQuat(so),i.quaternion.copy(so).multiply(En).multiply(so.invert()),En.copy(this._restLeftEyeParentWorldQuat),e.quaternion.copy(i.quaternion).multiply(En).premultiply(En.invert()).multiply(this._restQuatLeftEye)),n&&(t<0?Zr.x=-Be.DEG2RAD*this.rangeMapVerticalDown.map(-t):Zr.x=Be.DEG2RAD*this.rangeMapVerticalUp.map(t),r<0?Zr.y=-Be.DEG2RAD*this.rangeMapHorizontalOuter.map(-r):Zr.y=Be.DEG2RAD*this.rangeMapHorizontalInner.map(r),En.setFromEuler(Zr),this._getWorldFaceFrontQuat(so),s.quaternion.copy(so).multiply(En).multiply(so.invert()),En.copy(this._restRightEyeParentWorldQuat),n.quaternion.copy(s.quaternion).multiply(En).premultiply(En.invert()).multiply(this._restQuatRightEye))}lookAt(r){console.warn("VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.");const t=Be.RAD2DEG*r.y,e=Be.RAD2DEG*r.x;this.applyYawPitch(t,e)}_getWorldFaceFrontQuat(r){if(this.faceFront.distanceToSquared(ZF)<.01)return r.identity();const[t,e]=pu(this.faceFront);return Zr.set(0,.5*Math.PI+t,e,"YZX"),r.setFromEuler(Zr)}};mu.type="bone";var hp=class{constructor(r,t,e,n,i){this.expressions=r,this.rangeMapHorizontalInner=t,this.rangeMapHorizontalOuter=e,this.rangeMapVerticalDown=n,this.rangeMapVerticalUp=i}applyYawPitch(r,t){t<0?(this.expressions.setValue("lookDown",0),this.expressions.setValue("lookUp",this.rangeMapVerticalUp.map(-t))):(this.expressions.setValue("lookUp",0),this.expressions.setValue("lookDown",this.rangeMapVerticalDown.map(t))),r<0?(this.expressions.setValue("lookLeft",0),this.expressions.setValue("lookRight",this.rangeMapHorizontalOuter.map(-r))):(this.expressions.setValue("lookRight",0),this.expressions.setValue("lookLeft",this.rangeMapHorizontalOuter.map(r)))}lookAt(r){console.warn("VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.");const t=Be.RAD2DEG*r.y,e=Be.RAD2DEG*r.x;this.applyYawPitch(t,e)}};hp.type="expression";var Mv=class{constructor(r,t){this.inputMaxValue=r,this.outputScale=t}map(r){return this.outputScale*Bw(r/this.inputMaxValue)}},KF=new Set(["1.0","1.0-beta"]),au=.01,JF=class{get name(){return"VRMLookAtLoaderPlugin"}constructor(r,t){this.parser=r,this.helperRoot=t==null?void 0:t.helperRoot}afterRoot(r){return ye(this,null,function*(){const t=r.userData.vrmHumanoid;if(t===null)return;if(t===void 0)throw new Error("VRMLookAtLoaderPlugin: vrmHumanoid is undefined. VRMHumanoidLoaderPlugin have to be used first");const e=r.userData.vrmExpressionManager;if(e!==null){if(e===void 0)throw new Error("VRMLookAtLoaderPlugin: vrmExpressionManager is undefined. VRMExpressionLoaderPlugin have to be used first");r.userData.vrmLookAt=yield this._import(r,t,e)}})}_import(r,t,e){return ye(this,null,function*(){if(t==null||e==null)return null;const n=yield this._v1Import(r,t,e);if(n)return n;const i=yield this._v0Import(r,t,e);return i||null})}_v1Import(r,t,e){return ye(this,null,function*(){var n,i,s;const o=this.parser.json;if(!(((n=o.extensionsUsed)==null?void 0:n.indexOf("VRMC_vrm"))!==-1))return null;const l=(i=o.extensions)==null?void 0:i.VRMC_vrm;if(!l)return null;const u=l.specVersion;if(!KF.has(u))return console.warn(`VRMLookAtLoaderPlugin: Unknown VRMC_vrm specVersion "${u}"`),null;const c=l.lookAt;if(!c)return null;const h=c.type==="expression"?1:10,f=this._v1ImportRangeMap(c.rangeMapHorizontalInner,h),d=this._v1ImportRangeMap(c.rangeMapHorizontalOuter,h),m=this._v1ImportRangeMap(c.rangeMapVerticalDown,h),g=this._v1ImportRangeMap(c.rangeMapVerticalUp,h);let p;c.type==="expression"?p=new hp(e,f,d,m,g):p=new mu(t,f,d,m,g);const y=this._importLookAt(t,p);return y.offsetFromHeadBone.fromArray((s=c.offsetFromHeadBone)!=null?s:[0,.06,0]),y})}_v1ImportRangeMap(r,t){var e,n;let i=(e=r==null?void 0:r.inputMaxValue)!=null?e:90;const s=(n=r==null?void 0:r.outputScale)!=null?n:t;return i(console.error(o),console.warn("VRMMetaLoaderPlugin: Failed to load a thumbnail image"),null))})}},nL=class{constructor(r){this.scene=r.scene,this.meta=r.meta,this.humanoid=r.humanoid,this.expressionManager=r.expressionManager,this.firstPerson=r.firstPerson,this.lookAt=r.lookAt}update(r){this.humanoid.update(),this.lookAt&&this.lookAt.update(r),this.expressionManager&&this.expressionManager.update()}},iL=class extends nL{constructor(r){super(r),this.materials=r.materials,this.springBoneManager=r.springBoneManager,this.nodeConstraintManager=r.nodeConstraintManager}update(r){super.update(r),this.nodeConstraintManager&&this.nodeConstraintManager.update(),this.springBoneManager&&this.springBoneManager.update(r),this.materials&&this.materials.forEach(t=>{t.update&&t.update(r)})}},sL=Object.defineProperty,Ev=Object.getOwnPropertySymbols,oL=Object.prototype.hasOwnProperty,aL=Object.prototype.propertyIsEnumerable,Av=(r,t,e)=>t in r?sL(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Cv=(r,t)=>{for(var e in t||(t={}))oL.call(t,e)&&Av(r,e,t[e]);if(Ev)for(var e of Ev(t))aL.call(t,e)&&Av(r,e,t[e]);return r},Os=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),lL={"":3e3,srgb:3001};function uL(r,t){parseInt(Cu,10)>=152?r.colorSpace=t:r.encoding=lL[t]}var cL=class{get pending(){return Promise.all(this._pendings)}constructor(r,t){this._parser=r,this._materialParams=t,this._pendings=[]}assignPrimitive(r,t){t!=null&&(this._materialParams[r]=t)}assignColor(r,t,e){t!=null&&(this._materialParams[r]=new nn().fromArray(t),e&&this._materialParams[r].convertSRGBToLinear())}assignTexture(r,t,e){return Os(this,null,function*(){const n=Os(this,null,function*(){t!=null&&(yield this._parser.assignTexture(this._materialParams,r,t),e&&uL(this._materialParams[r],"srgb"))});return this._pendings.push(n),n})}assignTextureByIndex(r,t,e){return Os(this,null,function*(){return this.assignTexture(r,t!=null?{index:t}:void 0,e)})}},hL=`// #define PHONG varying vec3 vViewPosition; @@ -3209,7 +3209,7 @@ void main() { #include #include -}`,dD=`// #define PHONG +}`,dL=`// #define PHONG uniform vec3 litFactor; @@ -4011,9 +4011,9 @@ void main() { gl_FragColor = vec4( col, diffuseColor.a ); postCorrection(); } -`,fD={None:"none"},Ov={None:"none",ScreenCoordinates:"screenCoordinates"},pD={3e3:"",3001:"srgb"};function Cd(r){return parseInt(Cu,10)>=152?r.colorSpace:pD[r.encoding]}var mD=class extends HM{constructor(r={}){var t;super({vertexShader:hD,fragmentShader:dD}),this.uvAnimationScrollXSpeedFactor=0,this.uvAnimationScrollYSpeedFactor=0,this.uvAnimationRotationSpeedFactor=0,this.fog=!0,this.normalMapType=XM,this._ignoreVertexColor=!0,this._v0CompatShade=!1,this._debugMode=fD.None,this._outlineWidthMode=Ov.None,this._isOutline=!1,r.transparentWithZWrite&&(r.depthWrite=!0),delete r.transparentWithZWrite,r.fog=!0,r.lights=!0,r.clipping=!0,this.uniforms=YM.merge([pa.common,pa.normalmap,pa.emissivemap,pa.fog,pa.lights,{litFactor:{value:new nn(1,1,1)},mapUvTransform:{value:new On},colorAlpha:{value:1},normalMapUvTransform:{value:new On},shadeColorFactor:{value:new nn(0,0,0)},shadeMultiplyTexture:{value:null},shadeMultiplyTextureUvTransform:{value:new On},shadingShiftFactor:{value:0},shadingShiftTexture:{value:null},shadingShiftTextureUvTransform:{value:new On},shadingShiftTextureScale:{value:1},shadingToonyFactor:{value:.9},giEqualizationFactor:{value:.9},matcapFactor:{value:new nn(1,1,1)},matcapTexture:{value:null},matcapTextureUvTransform:{value:new On},parametricRimColorFactor:{value:new nn(0,0,0)},rimMultiplyTexture:{value:null},rimMultiplyTextureUvTransform:{value:new On},rimLightingMixFactor:{value:1},parametricRimFresnelPowerFactor:{value:5},parametricRimLiftFactor:{value:0},emissive:{value:new nn(0,0,0)},emissiveIntensity:{value:1},emissiveMapUvTransform:{value:new On},outlineWidthMultiplyTexture:{value:null},outlineWidthMultiplyTextureUvTransform:{value:new On},outlineWidthFactor:{value:0},outlineColorFactor:{value:new nn(0,0,0)},outlineLightingMixFactor:{value:1},uvAnimationMaskTexture:{value:null},uvAnimationMaskTextureUvTransform:{value:new On},uvAnimationScrollXOffset:{value:0},uvAnimationScrollYOffset:{value:0},uvAnimationRotationPhase:{value:0}},(t=r.uniforms)!=null?t:{}]),this.setValues(r),this._uploadUniformsWorkaround(),this.customProgramCacheKey=()=>[...Object.entries(this._generateDefines()).map(([e,n])=>`${e}:${n}`),this.matcapTexture?`matcapTextureColorSpace:${Cd(this.matcapTexture)}`:"",this.shadeMultiplyTexture?`shadeMultiplyTextureColorSpace:${Cd(this.shadeMultiplyTexture)}`:"",this.rimMultiplyTexture?`rimMultiplyTextureColorSpace:${Cd(this.rimMultiplyTexture)}`:""].join(","),this.onBeforeCompile=e=>{const n=parseInt(Cu,10),i=Object.entries(Cv(Cv({},this._generateDefines()),this.defines)).filter(([s,o])=>!!o).map(([s,o])=>`#define ${s} ${o}`).join(` +`,fL={None:"none"},Ov={None:"none",ScreenCoordinates:"screenCoordinates"},pL={3e3:"",3001:"srgb"};function Cd(r){return parseInt(Cu,10)>=152?r.colorSpace:pL[r.encoding]}var mL=class extends HM{constructor(r={}){var t;super({vertexShader:hL,fragmentShader:dL}),this.uvAnimationScrollXSpeedFactor=0,this.uvAnimationScrollYSpeedFactor=0,this.uvAnimationRotationSpeedFactor=0,this.fog=!0,this.normalMapType=XM,this._ignoreVertexColor=!0,this._v0CompatShade=!1,this._debugMode=fL.None,this._outlineWidthMode=Ov.None,this._isOutline=!1,r.transparentWithZWrite&&(r.depthWrite=!0),delete r.transparentWithZWrite,r.fog=!0,r.lights=!0,r.clipping=!0,this.uniforms=YM.merge([pa.common,pa.normalmap,pa.emissivemap,pa.fog,pa.lights,{litFactor:{value:new nn(1,1,1)},mapUvTransform:{value:new On},colorAlpha:{value:1},normalMapUvTransform:{value:new On},shadeColorFactor:{value:new nn(0,0,0)},shadeMultiplyTexture:{value:null},shadeMultiplyTextureUvTransform:{value:new On},shadingShiftFactor:{value:0},shadingShiftTexture:{value:null},shadingShiftTextureUvTransform:{value:new On},shadingShiftTextureScale:{value:1},shadingToonyFactor:{value:.9},giEqualizationFactor:{value:.9},matcapFactor:{value:new nn(1,1,1)},matcapTexture:{value:null},matcapTextureUvTransform:{value:new On},parametricRimColorFactor:{value:new nn(0,0,0)},rimMultiplyTexture:{value:null},rimMultiplyTextureUvTransform:{value:new On},rimLightingMixFactor:{value:1},parametricRimFresnelPowerFactor:{value:5},parametricRimLiftFactor:{value:0},emissive:{value:new nn(0,0,0)},emissiveIntensity:{value:1},emissiveMapUvTransform:{value:new On},outlineWidthMultiplyTexture:{value:null},outlineWidthMultiplyTextureUvTransform:{value:new On},outlineWidthFactor:{value:0},outlineColorFactor:{value:new nn(0,0,0)},outlineLightingMixFactor:{value:1},uvAnimationMaskTexture:{value:null},uvAnimationMaskTextureUvTransform:{value:new On},uvAnimationScrollXOffset:{value:0},uvAnimationScrollYOffset:{value:0},uvAnimationRotationPhase:{value:0}},(t=r.uniforms)!=null?t:{}]),this.setValues(r),this._uploadUniformsWorkaround(),this.customProgramCacheKey=()=>[...Object.entries(this._generateDefines()).map(([e,n])=>`${e}:${n}`),this.matcapTexture?`matcapTextureColorSpace:${Cd(this.matcapTexture)}`:"",this.shadeMultiplyTexture?`shadeMultiplyTextureColorSpace:${Cd(this.shadeMultiplyTexture)}`:"",this.rimMultiplyTexture?`rimMultiplyTextureColorSpace:${Cd(this.rimMultiplyTexture)}`:""].join(","),this.onBeforeCompile=e=>{const n=parseInt(Cu,10),i=Object.entries(Cv(Cv({},this._generateDefines()),this.defines)).filter(([s,o])=>!!o).map(([s,o])=>`#define ${s} ${o}`).join(` `)+` -`;e.vertexShader=i+e.vertexShader,e.fragmentShader=i+e.fragmentShader,n<154&&(e.fragmentShader=e.fragmentShader.replace("#include ","#include "))}}get color(){return this.uniforms.litFactor.value}set color(r){this.uniforms.litFactor.value=r}get map(){return this.uniforms.map.value}set map(r){this.uniforms.map.value=r}get normalMap(){return this.uniforms.normalMap.value}set normalMap(r){this.uniforms.normalMap.value=r}get normalScale(){return this.uniforms.normalScale.value}set normalScale(r){this.uniforms.normalScale.value=r}get emissive(){return this.uniforms.emissive.value}set emissive(r){this.uniforms.emissive.value=r}get emissiveIntensity(){return this.uniforms.emissiveIntensity.value}set emissiveIntensity(r){this.uniforms.emissiveIntensity.value=r}get emissiveMap(){return this.uniforms.emissiveMap.value}set emissiveMap(r){this.uniforms.emissiveMap.value=r}get shadeColorFactor(){return this.uniforms.shadeColorFactor.value}set shadeColorFactor(r){this.uniforms.shadeColorFactor.value=r}get shadeMultiplyTexture(){return this.uniforms.shadeMultiplyTexture.value}set shadeMultiplyTexture(r){this.uniforms.shadeMultiplyTexture.value=r}get shadingShiftFactor(){return this.uniforms.shadingShiftFactor.value}set shadingShiftFactor(r){this.uniforms.shadingShiftFactor.value=r}get shadingShiftTexture(){return this.uniforms.shadingShiftTexture.value}set shadingShiftTexture(r){this.uniforms.shadingShiftTexture.value=r}get shadingShiftTextureScale(){return this.uniforms.shadingShiftTextureScale.value}set shadingShiftTextureScale(r){this.uniforms.shadingShiftTextureScale.value=r}get shadingToonyFactor(){return this.uniforms.shadingToonyFactor.value}set shadingToonyFactor(r){this.uniforms.shadingToonyFactor.value=r}get giEqualizationFactor(){return this.uniforms.giEqualizationFactor.value}set giEqualizationFactor(r){this.uniforms.giEqualizationFactor.value=r}get matcapFactor(){return this.uniforms.matcapFactor.value}set matcapFactor(r){this.uniforms.matcapFactor.value=r}get matcapTexture(){return this.uniforms.matcapTexture.value}set matcapTexture(r){this.uniforms.matcapTexture.value=r}get parametricRimColorFactor(){return this.uniforms.parametricRimColorFactor.value}set parametricRimColorFactor(r){this.uniforms.parametricRimColorFactor.value=r}get rimMultiplyTexture(){return this.uniforms.rimMultiplyTexture.value}set rimMultiplyTexture(r){this.uniforms.rimMultiplyTexture.value=r}get rimLightingMixFactor(){return this.uniforms.rimLightingMixFactor.value}set rimLightingMixFactor(r){this.uniforms.rimLightingMixFactor.value=r}get parametricRimFresnelPowerFactor(){return this.uniforms.parametricRimFresnelPowerFactor.value}set parametricRimFresnelPowerFactor(r){this.uniforms.parametricRimFresnelPowerFactor.value=r}get parametricRimLiftFactor(){return this.uniforms.parametricRimLiftFactor.value}set parametricRimLiftFactor(r){this.uniforms.parametricRimLiftFactor.value=r}get outlineWidthMultiplyTexture(){return this.uniforms.outlineWidthMultiplyTexture.value}set outlineWidthMultiplyTexture(r){this.uniforms.outlineWidthMultiplyTexture.value=r}get outlineWidthFactor(){return this.uniforms.outlineWidthFactor.value}set outlineWidthFactor(r){this.uniforms.outlineWidthFactor.value=r}get outlineColorFactor(){return this.uniforms.outlineColorFactor.value}set outlineColorFactor(r){this.uniforms.outlineColorFactor.value=r}get outlineLightingMixFactor(){return this.uniforms.outlineLightingMixFactor.value}set outlineLightingMixFactor(r){this.uniforms.outlineLightingMixFactor.value=r}get uvAnimationMaskTexture(){return this.uniforms.uvAnimationMaskTexture.value}set uvAnimationMaskTexture(r){this.uniforms.uvAnimationMaskTexture.value=r}get uvAnimationScrollXOffset(){return this.uniforms.uvAnimationScrollXOffset.value}set uvAnimationScrollXOffset(r){this.uniforms.uvAnimationScrollXOffset.value=r}get uvAnimationScrollYOffset(){return this.uniforms.uvAnimationScrollYOffset.value}set uvAnimationScrollYOffset(r){this.uniforms.uvAnimationScrollYOffset.value=r}get uvAnimationRotationPhase(){return this.uniforms.uvAnimationRotationPhase.value}set uvAnimationRotationPhase(r){this.uniforms.uvAnimationRotationPhase.value=r}get ignoreVertexColor(){return this._ignoreVertexColor}set ignoreVertexColor(r){this._ignoreVertexColor=r,this.needsUpdate=!0}get v0CompatShade(){return this._v0CompatShade}set v0CompatShade(r){this._v0CompatShade=r,this.needsUpdate=!0}get debugMode(){return this._debugMode}set debugMode(r){this._debugMode=r,this.needsUpdate=!0}get outlineWidthMode(){return this._outlineWidthMode}set outlineWidthMode(r){this._outlineWidthMode=r,this.needsUpdate=!0}get isOutline(){return this._isOutline}set isOutline(r){this._isOutline=r,this.needsUpdate=!0}get isMToonMaterial(){return!0}update(r){this._uploadUniformsWorkaround(),this._updateUVAnimation(r)}copy(r){return super.copy(r),this.map=r.map,this.normalMap=r.normalMap,this.emissiveMap=r.emissiveMap,this.shadeMultiplyTexture=r.shadeMultiplyTexture,this.shadingShiftTexture=r.shadingShiftTexture,this.matcapTexture=r.matcapTexture,this.rimMultiplyTexture=r.rimMultiplyTexture,this.outlineWidthMultiplyTexture=r.outlineWidthMultiplyTexture,this.uvAnimationMaskTexture=r.uvAnimationMaskTexture,this.normalMapType=r.normalMapType,this.uvAnimationScrollXSpeedFactor=r.uvAnimationScrollXSpeedFactor,this.uvAnimationScrollYSpeedFactor=r.uvAnimationScrollYSpeedFactor,this.uvAnimationRotationSpeedFactor=r.uvAnimationRotationSpeedFactor,this.ignoreVertexColor=r.ignoreVertexColor,this.v0CompatShade=r.v0CompatShade,this.debugMode=r.debugMode,this.outlineWidthMode=r.outlineWidthMode,this.isOutline=r.isOutline,this.needsUpdate=!0,this}_updateUVAnimation(r){this.uniforms.uvAnimationScrollXOffset.value+=r*this.uvAnimationScrollXSpeedFactor,this.uniforms.uvAnimationScrollYOffset.value+=r*this.uvAnimationScrollYSpeedFactor,this.uniforms.uvAnimationRotationPhase.value+=r*this.uvAnimationRotationSpeedFactor,this.uniforms.alphaTest.value=this.alphaTest,this.uniformsNeedUpdate=!0}_uploadUniformsWorkaround(){this.uniforms.opacity.value=this.opacity,this._updateTextureMatrix(this.uniforms.map,this.uniforms.mapUvTransform),this._updateTextureMatrix(this.uniforms.normalMap,this.uniforms.normalMapUvTransform),this._updateTextureMatrix(this.uniforms.emissiveMap,this.uniforms.emissiveMapUvTransform),this._updateTextureMatrix(this.uniforms.shadeMultiplyTexture,this.uniforms.shadeMultiplyTextureUvTransform),this._updateTextureMatrix(this.uniforms.shadingShiftTexture,this.uniforms.shadingShiftTextureUvTransform),this._updateTextureMatrix(this.uniforms.matcapTexture,this.uniforms.matcapTextureUvTransform),this._updateTextureMatrix(this.uniforms.rimMultiplyTexture,this.uniforms.rimMultiplyTextureUvTransform),this._updateTextureMatrix(this.uniforms.outlineWidthMultiplyTexture,this.uniforms.outlineWidthMultiplyTextureUvTransform),this._updateTextureMatrix(this.uniforms.uvAnimationMaskTexture,this.uniforms.uvAnimationMaskTextureUvTransform),this.uniformsNeedUpdate=!0}_generateDefines(){const r=parseInt(Cu,10),t=this.outlineWidthMultiplyTexture!==null,e=this.map!==null||this.normalMap!==null||this.emissiveMap!==null||this.shadeMultiplyTexture!==null||this.shadingShiftTexture!==null||this.rimMultiplyTexture!==null||this.uvAnimationMaskTexture!==null;return{THREE_VRM_THREE_REVISION:r,OUTLINE:this._isOutline,MTOON_USE_UV:t||e,MTOON_UVS_VERTEX_ONLY:t&&!e,V0_COMPAT_SHADE:this._v0CompatShade,USE_SHADEMULTIPLYTEXTURE:this.shadeMultiplyTexture!==null,USE_SHADINGSHIFTTEXTURE:this.shadingShiftTexture!==null,USE_MATCAPTEXTURE:this.matcapTexture!==null,USE_RIMMULTIPLYTEXTURE:this.rimMultiplyTexture!==null,USE_OUTLINEWIDTHMULTIPLYTEXTURE:this._isOutline&&this.outlineWidthMultiplyTexture!==null,USE_UVANIMATIONMASKTEXTURE:this.uvAnimationMaskTexture!==null,IGNORE_VERTEX_COLOR:this._ignoreVertexColor===!0,DEBUG_NORMAL:this._debugMode==="normal",DEBUG_LITSHADERATE:this._debugMode==="litShadeRate",DEBUG_UV:this._debugMode==="uv",OUTLINE_WIDTH_SCREEN:this._isOutline&&this._outlineWidthMode===Ov.ScreenCoordinates}}_updateTextureMatrix(r,t){r.value&&(r.value.matrixAutoUpdate&&r.value.updateMatrix(),t.value.copy(r.value.matrix))}},gD=new Set(["1.0","1.0-beta"]),Qw=class gu{get name(){return gu.EXTENSION_NAME}constructor(t,e={}){var n,i,s,o;this.parser=t,this.materialType=(n=e.materialType)!=null?n:mD,this.renderOrderOffset=(i=e.renderOrderOffset)!=null?i:0,this.v0CompatShade=(s=e.v0CompatShade)!=null?s:!1,this.debugMode=(o=e.debugMode)!=null?o:"none",this._mToonMaterialSet=new Set}beforeRoot(){return Os(this,null,function*(){this._removeUnlitExtensionIfMToonExists()})}afterRoot(t){return Os(this,null,function*(){t.userData.vrmMToonMaterials=Array.from(this._mToonMaterialSet)})}getMaterialType(t){return this._getMToonExtension(t)?this.materialType:null}extendMaterialParams(t,e){const n=this._getMToonExtension(t);return n?this._extendMaterialParams(n,e):null}loadMesh(t){return Os(this,null,function*(){var e;const n=this.parser,s=(e=n.json.meshes)==null?void 0:e[t];if(s==null)throw new Error(`MToonMaterialLoaderPlugin: Attempt to use meshes[${t}] of glTF but the mesh doesn't exist`);const o=s.primitives,a=yield n.loadMesh(t);if(o.length===1){const l=a,u=o[0].material;u!=null&&this._setupPrimitive(l,u)}else{const l=a;for(let u=0;u{var o;this._getMToonExtension(s)&&((o=i.extensions)!=null&&o.KHR_materials_unlit)&&delete i.extensions.KHR_materials_unlit})}_getMToonExtension(t){var e,n;const o=(e=this.parser.json.materials)==null?void 0:e[t];if(o==null){console.warn(`MToonMaterialLoaderPlugin: Attempt to use materials[${t}] of glTF but the material doesn't exist`);return}const a=(n=o.extensions)==null?void 0:n[gu.EXTENSION_NAME];if(a==null)return;const l=a.specVersion;if(!gD.has(l)){console.warn(`MToonMaterialLoaderPlugin: Unknown ${gu.EXTENSION_NAME} specVersion "${l}"`);return}return a}_extendMaterialParams(t,e){return Os(this,null,function*(){var n;delete e.metalness,delete e.roughness;const i=new cD(this.parser,e);i.assignPrimitive("transparentWithZWrite",t.transparentWithZWrite),i.assignColor("shadeColorFactor",t.shadeColorFactor),i.assignTexture("shadeMultiplyTexture",t.shadeMultiplyTexture,!0),i.assignPrimitive("shadingShiftFactor",t.shadingShiftFactor),i.assignTexture("shadingShiftTexture",t.shadingShiftTexture,!0),i.assignPrimitive("shadingShiftTextureScale",(n=t.shadingShiftTexture)==null?void 0:n.scale),i.assignPrimitive("shadingToonyFactor",t.shadingToonyFactor),i.assignPrimitive("giEqualizationFactor",t.giEqualizationFactor),i.assignColor("matcapFactor",t.matcapFactor),i.assignTexture("matcapTexture",t.matcapTexture,!0),i.assignColor("parametricRimColorFactor",t.parametricRimColorFactor),i.assignTexture("rimMultiplyTexture",t.rimMultiplyTexture,!0),i.assignPrimitive("rimLightingMixFactor",t.rimLightingMixFactor),i.assignPrimitive("parametricRimFresnelPowerFactor",t.parametricRimFresnelPowerFactor),i.assignPrimitive("parametricRimLiftFactor",t.parametricRimLiftFactor),i.assignPrimitive("outlineWidthMode",t.outlineWidthMode),i.assignPrimitive("outlineWidthFactor",t.outlineWidthFactor),i.assignTexture("outlineWidthMultiplyTexture",t.outlineWidthMultiplyTexture,!1),i.assignColor("outlineColorFactor",t.outlineColorFactor),i.assignPrimitive("outlineLightingMixFactor",t.outlineLightingMixFactor),i.assignTexture("uvAnimationMaskTexture",t.uvAnimationMaskTexture,!1),i.assignPrimitive("uvAnimationScrollXSpeedFactor",t.uvAnimationScrollXSpeedFactor),i.assignPrimitive("uvAnimationScrollYSpeedFactor",t.uvAnimationScrollYSpeedFactor),i.assignPrimitive("uvAnimationRotationSpeedFactor",t.uvAnimationRotationSpeedFactor),i.assignPrimitive("v0CompatShade",this.v0CompatShade),i.assignPrimitive("debugMode",this.debugMode),yield i.pending})}_setupPrimitive(t,e){const n=this._getMToonExtension(e);if(n){const i=this._parseRenderOrder(n);t.renderOrder=i+this.renderOrderOffset,this._generateOutline(t),this._addToMaterialSet(t);return}}_shouldGenerateOutline(t){return typeof t.outlineWidthMode=="string"&&t.outlineWidthMode!=="none"&&typeof t.outlineWidthFactor=="number"&&t.outlineWidthFactor>0}_generateOutline(t){const e=t.material;if(!(e instanceof $M)||!this._shouldGenerateOutline(e))return;t.material=[e];const n=e.clone();n.name+=" (Outline)",n.isOutline=!0,n.side=GM,t.material.push(n);const i=t.geometry,s=i.index?i.index.count:i.attributes.position.count/3;i.addGroup(0,s,0),i.addGroup(0,s,1)}_addToMaterialSet(t){const e=t.material,n=new Set;Array.isArray(e)?e.forEach(i=>n.add(i)):n.add(e);for(const i of n)this._mToonMaterialSet.add(i)}_parseRenderOrder(t){var e;return(t.transparentWithZWrite?0:19)+((e=t.renderQueueOffsetNumber)!=null?e:0)}};Qw.EXTENSION_NAME="VRMC_materials_mtoon";var yD=Qw,vD=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),Zw=class dp{get name(){return dp.EXTENSION_NAME}constructor(t){this.parser=t}extendMaterialParams(t,e){return vD(this,null,function*(){const n=this._getHDREmissiveMultiplierExtension(t);if(n==null)return;console.warn("VRMMaterialsHDREmissiveMultiplierLoaderPlugin: `VRMC_materials_hdr_emissiveMultiplier` is archived. Use `KHR_materials_emissive_strength` instead.");const i=n.emissiveMultiplier;e.emissiveIntensity=i})}_getHDREmissiveMultiplierExtension(t){var e,n;const o=(e=this.parser.json.materials)==null?void 0:e[t];if(o==null){console.warn(`VRMMaterialsHDREmissiveMultiplierLoaderPlugin: Attempt to use materials[${t}] of glTF but the material doesn't exist`);return}const a=(n=o.extensions)==null?void 0:n[dp.EXTENSION_NAME];if(a!=null)return a}};Zw.EXTENSION_NAME="VRMC_materials_hdr_emissiveMultiplier";var _D=Zw,bD=Object.defineProperty,xD=Object.defineProperties,wD=Object.getOwnPropertyDescriptors,Pv=Object.getOwnPropertySymbols,SD=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable,Rv=(r,t,e)=>t in r?bD(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,An=(r,t)=>{for(var e in t||(t={}))SD.call(t,e)&&Rv(r,e,t[e]);if(Pv)for(var e of Pv(t))TD.call(t,e)&&Rv(r,e,t[e]);return r},Fv=(r,t)=>xD(r,wD(t)),ID=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())});function oo(r){return Math.pow(r,2.2)}var MD=class{get name(){return"VRMMaterialsV0CompatPlugin"}constructor(r){var t;this.parser=r,this._renderQueueMapTransparent=new Map,this._renderQueueMapTransparentZWrite=new Map;const e=this.parser.json;e.extensionsUsed=(t=e.extensionsUsed)!=null?t:[],e.extensionsUsed.indexOf("KHR_texture_transform")===-1&&e.extensionsUsed.push("KHR_texture_transform")}beforeRoot(){return ID(this,null,function*(){var r;const t=this.parser.json,e=(r=t.extensions)==null?void 0:r.VRM,n=e==null?void 0:e.materialProperties;n&&(this._populateRenderQueueMap(n),n.forEach((i,s)=>{var o,a;const l=(o=t.materials)==null?void 0:o[s];if(l==null){console.warn(`VRMMaterialsV0CompatPlugin: Attempt to use materials[${s}] of glTF but the material doesn't exist`);return}if(i.shader==="VRM/MToon"){const u=this._parseV0MToonProperties(i,l);t.materials[s]=u}else if((a=i.shader)!=null&&a.startsWith("VRM/Unlit")){const u=this._parseV0UnlitProperties(i,l);t.materials[s]=u}else i.shader==="VRM_USE_GLTFSHADER"||console.warn(`VRMMaterialsV0CompatPlugin: Unknown shader: ${i.shader}`)}))})}_parseV0MToonProperties(r,t){var e,n,i,s,o,a,l,u,c,h,f,d,m,g,p,y,v,S,T,_,M,x,N,L,j,it,I,Q,w,nt,P,C,R,U,k,A,O,$,tt,et,yt,_t,ct,xt,bt,At,se,de,b,K,Z,B,D,q,ot;const at=(n=(e=r.keywordMap)==null?void 0:e._ALPHABLEND_ON)!=null?n:!1,ht=((i=r.floatProperties)==null?void 0:i._ZWrite)===1&&at,St=this._v0ParseRenderQueue(r),pt=(o=(s=r.keywordMap)==null?void 0:s._ALPHATEST_ON)!=null?o:!1,Ot=at?"BLEND":pt?"MASK":"OPAQUE",_e=pt?(l=(a=r.floatProperties)==null?void 0:a._Cutoff)!=null?l:.5:void 0,sr=((c=(u=r.floatProperties)==null?void 0:u._CullMode)!=null?c:2)===0,fr=this._portTextureTransform(r),vr=((f=(h=r.vectorProperties)==null?void 0:h._Color)!=null?f:[1,1,1,1]).map((kl,Ul)=>Ul===3?kl:oo(kl)),gn=(d=r.textureProperties)==null?void 0:d._MainTex,Ce=gn!=null?{index:gn,extensions:An({},fr)}:void 0,In=(g=(m=r.floatProperties)==null?void 0:m._BumpScale)!=null?g:1,Ei=(p=r.textureProperties)==null?void 0:p._BumpMap,Fr=Ei!=null?{index:Ei,scale:In,extensions:An({},fr)}:void 0,Ai=((v=(y=r.vectorProperties)==null?void 0:y._EmissionColor)!=null?v:[0,0,0,1]).map(oo),is=(S=r.textureProperties)==null?void 0:S._EmissionMap,ua=is!=null?{index:is,extensions:An({},fr)}:void 0,Xr=((_=(T=r.vectorProperties)==null?void 0:T._ShadeColor)!=null?_:[.97,.81,.86,1]).map(oo),ss=(M=r.textureProperties)==null?void 0:M._ShadeTexture,ni=ss!=null?{index:ss,extensions:An({},fr)}:void 0;let Yr=(N=(x=r.floatProperties)==null?void 0:x._ShadeShift)!=null?N:0,Js=(j=(L=r.floatProperties)==null?void 0:L._ShadeToony)!=null?j:.9;Js=Be.lerp(Js,1,.5+.5*Yr),Yr=-Yr-(1-Js);const Fl=(I=(it=r.floatProperties)==null?void 0:it._IndirectLightIntensity)!=null?I:.1,ch=Fl?1-Fl:void 0,ca=(Q=r.textureProperties)==null?void 0:Q._SphereAdd,hh=ca!=null?[1,1,1]:void 0,dh=ca!=null?{index:ca}:void 0,fh=(nt=(w=r.floatProperties)==null?void 0:w._RimLightingMix)!=null?nt:0,Dl=(P=r.textureProperties)==null?void 0:P._RimTexture,ph=Dl!=null?{index:Dl,extensions:An({},fr)}:void 0,mh=((R=(C=r.vectorProperties)==null?void 0:C._RimColor)!=null?R:[0,0,0,1]).map(oo),Ll=(k=(U=r.floatProperties)==null?void 0:U._RimFresnelPower)!=null?k:1,gh=(O=(A=r.floatProperties)==null?void 0:A._RimLift)!=null?O:0,yh=["none","worldCoordinates","screenCoordinates"][(tt=($=r.floatProperties)==null?void 0:$._OutlineWidthMode)!=null?tt:0];let ha=(yt=(et=r.floatProperties)==null?void 0:et._OutlineWidth)!=null?yt:0;ha=.01*ha;const Nl=(_t=r.textureProperties)==null?void 0:_t._OutlineWidthTexture,vh=Nl!=null?{index:Nl,extensions:An({},fr)}:void 0,_h=((xt=(ct=r.vectorProperties)==null?void 0:ct._OutlineColor)!=null?xt:[0,0,0]).map(oo),bh=((At=(bt=r.floatProperties)==null?void 0:bt._OutlineColorMode)!=null?At:0)===1?(de=(se=r.floatProperties)==null?void 0:se._OutlineLightingMix)!=null?de:1:0,Bl=(b=r.textureProperties)==null?void 0:b._UvAnimMaskTexture,xh=Bl!=null?{index:Bl,extensions:An({},fr)}:void 0,wh=(Z=(K=r.floatProperties)==null?void 0:K._UvAnimScrollX)!=null?Z:0;let to=(D=(B=r.floatProperties)==null?void 0:B._UvAnimScrollY)!=null?D:0;to!=null&&(to=-to);const Sh=(ot=(q=r.floatProperties)==null?void 0:q._UvAnimRotation)!=null?ot:0,Th={specVersion:"1.0",transparentWithZWrite:ht,renderQueueOffsetNumber:St,shadeColorFactor:Xr,shadeMultiplyTexture:ni,shadingShiftFactor:Yr,shadingToonyFactor:Js,giEqualizationFactor:ch,matcapFactor:hh,matcapTexture:dh,rimLightingMixFactor:fh,rimMultiplyTexture:ph,parametricRimColorFactor:mh,parametricRimFresnelPowerFactor:Ll,parametricRimLiftFactor:gh,outlineWidthMode:yh,outlineWidthFactor:ha,outlineWidthMultiplyTexture:vh,outlineColorFactor:_h,outlineLightingMixFactor:bh,uvAnimationMaskTexture:xh,uvAnimationScrollXSpeedFactor:wh,uvAnimationScrollYSpeedFactor:to,uvAnimationRotationSpeedFactor:Sh};return Fv(An({},t),{pbrMetallicRoughness:{baseColorFactor:vr,baseColorTexture:Ce},normalTexture:Fr,emissiveTexture:ua,emissiveFactor:Ai,alphaMode:Ot,alphaCutoff:_e,doubleSided:sr,extensions:{VRMC_materials_mtoon:Th}})}_parseV0UnlitProperties(r,t){var e,n,i,s,o;const a=r.shader==="VRM/UnlitTransparentZWrite",l=r.shader==="VRM/UnlitTransparent"||a,u=this._v0ParseRenderQueue(r),c=r.shader==="VRM/UnlitCutout",h=l?"BLEND":c?"MASK":"OPAQUE",f=c?(n=(e=r.floatProperties)==null?void 0:e._Cutoff)!=null?n:.5:void 0,d=this._portTextureTransform(r),m=((s=(i=r.vectorProperties)==null?void 0:i._Color)!=null?s:[1,1,1,1]).map(oo),g=(o=r.textureProperties)==null?void 0:o._MainTex,p=g!=null?{index:g,extensions:An({},d)}:void 0,y={specVersion:"1.0",transparentWithZWrite:a,renderQueueOffsetNumber:u,shadeColorFactor:m,shadeMultiplyTexture:p};return Fv(An({},t),{pbrMetallicRoughness:{baseColorFactor:m,baseColorTexture:p},alphaMode:h,alphaCutoff:f,extensions:{VRMC_materials_mtoon:y}})}_portTextureTransform(r){var t,e,n,i,s;const o=(t=r.vectorProperties)==null?void 0:t._MainTex;if(o==null)return{};const a=[(e=o==null?void 0:o[0])!=null?e:0,(n=o==null?void 0:o[1])!=null?n:0],l=[(i=o==null?void 0:o[2])!=null?i:1,(s=o==null?void 0:o[3])!=null?s:1];return a[1]=1-l[1]-a[1],{KHR_texture_transform:{offset:a,scale:l}}}_v0ParseRenderQueue(r){var t,e;const n=r.shader==="VRM/UnlitTransparentZWrite",i=((t=r.keywordMap)==null?void 0:t._ALPHABLEND_ON)!=null||r.shader==="VRM/UnlitTransparent"||n,s=((e=r.floatProperties)==null?void 0:e._ZWrite)===1||n;let o=0;if(i){const a=r.renderQueue;a!=null&&(s?o=this._renderQueueMapTransparentZWrite.get(a):o=this._renderQueueMapTransparent.get(a))}return o}_populateRenderQueueMap(r){const t=new Set,e=new Set;r.forEach(n=>{var i,s;const o=n.shader==="VRM/UnlitTransparentZWrite",a=((i=n.keywordMap)==null?void 0:i._ALPHABLEND_ON)!=null||n.shader==="VRM/UnlitTransparent"||o,l=((s=n.floatProperties)==null?void 0:s._ZWrite)===1||o;if(a){const u=n.renderQueue;u!=null&&(l?e.add(u):t.add(u))}}),t.size>10&&console.warn(`VRMMaterialsV0CompatPlugin: This VRM uses ${t.size} render queues for Transparent materials while VRM 1.0 only supports up to 10 render queues. The model might not be rendered correctly.`),e.size>10&&console.warn(`VRMMaterialsV0CompatPlugin: This VRM uses ${e.size} render queues for TransparentZWrite materials while VRM 1.0 only supports up to 10 render queues. The model might not be rendered correctly.`),Array.from(t).sort().forEach((n,i)=>{const s=Math.min(Math.max(i-t.size+1,-9),0);this._renderQueueMapTransparent.set(n,s)}),Array.from(e).sort().forEach((n,i)=>{const s=Math.min(Math.max(i,0),9);this._renderQueueMapTransparentZWrite.set(n,s)})}},Dv=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),Oi=new gt,Od=class extends ea{constructor(r){super(),this._attrPosition=new cr(new Float32Array([0,0,0,0,0,0]),3),this._attrPosition.setUsage(qM);const t=new Ki;t.setAttribute("position",this._attrPosition);const e=new Bc({color:16711935,depthTest:!1,depthWrite:!1});this._line=new QM(t,e),this.add(this._line),this.constraint=r}updateMatrixWorld(r){Oi.setFromMatrixPosition(this.constraint.destination.matrixWorld),this._attrPosition.setXYZ(0,Oi.x,Oi.y,Oi.z),this.constraint.source&&Oi.setFromMatrixPosition(this.constraint.source.matrixWorld),this._attrPosition.setXYZ(1,Oi.x,Oi.y,Oi.z),this._attrPosition.needsUpdate=!0,super.updateMatrixWorld(r)}};function Lv(r,t){return t.set(r.elements[12],r.elements[13],r.elements[14])}var ED=new gt,AD=new gt;function CD(r,t){return r.decompose(ED,t,AD),t}function Xu(r){return r.invert?r.invert():r.inverse(),r}var Tm=class{constructor(r,t){this.destination=r,this.source=t,this.weight=1}},OD=new gt,PD=new gt,RD=new gt,FD=new oe,DD=new oe,LD=new oe,ND=class extends Tm{get aimAxis(){return this._aimAxis}set aimAxis(r){this._aimAxis=r,this._v3AimAxis.set(r==="PositiveX"?1:r==="NegativeX"?-1:0,r==="PositiveY"?1:r==="NegativeY"?-1:0,r==="PositiveZ"?1:r==="NegativeZ"?-1:0)}get dependencies(){const r=new Set([this.source]);return this.destination.parent&&r.add(this.destination.parent),r}constructor(r,t){super(r,t),this._aimAxis="PositiveX",this._v3AimAxis=new gt(1,0,0),this._dstRestQuat=new oe}setInitState(){this._dstRestQuat.copy(this.destination.quaternion)}update(){this.destination.updateWorldMatrix(!0,!1),this.source.updateWorldMatrix(!0,!1);const r=FD.identity(),t=DD.identity();this.destination.parent&&(CD(this.destination.parent.matrixWorld,r),Xu(t.copy(r)));const e=OD.copy(this._v3AimAxis).applyQuaternion(this._dstRestQuat).applyQuaternion(r),n=Lv(this.source.matrixWorld,PD).sub(Lv(this.destination.matrixWorld,RD)).normalize(),i=LD.setFromUnitVectors(e,n).premultiply(t).multiply(r).multiply(this._dstRestQuat);this.destination.quaternion.copy(this._dstRestQuat).slerp(i,this.weight)}};function BD(r,t){const e=[r];let n=r.parent;for(;n!==null;)e.unshift(n),n=n.parent;e.forEach(i=>{t(i)})}var kD=class{constructor(){this._constraints=new Set,this._objectConstraintsMap=new Map}get constraints(){return this._constraints}addConstraint(r){this._constraints.add(r);let t=this._objectConstraintsMap.get(r.destination);t==null&&(t=new Set,this._objectConstraintsMap.set(r.destination,t)),t.add(r)}deleteConstraint(r){this._constraints.delete(r),this._objectConstraintsMap.get(r.destination).delete(r)}setInitState(){const r=new Set,t=new Set;for(const e of this._constraints)this._processConstraint(e,r,t,n=>n.setInitState())}update(){const r=new Set,t=new Set;for(const e of this._constraints)this._processConstraint(e,r,t,n=>n.update())}_processConstraint(r,t,e,n){if(e.has(r))return;if(t.has(r))throw new Error("VRMNodeConstraintManager: Circular dependency detected while updating constraints");t.add(r);const i=r.dependencies;for(const s of i)BD(s,o=>{const a=this._objectConstraintsMap.get(o);if(a)for(const l of a)this._processConstraint(l,t,e,n)});n(r),e.add(r)}},UD=new oe,zD=new oe,VD=class extends Tm{get dependencies(){return new Set([this.source])}constructor(r,t){super(r,t),this._dstRestQuat=new oe,this._invSrcRestQuat=new oe}setInitState(){this._dstRestQuat.copy(this.destination.quaternion),Xu(this._invSrcRestQuat.copy(this.source.quaternion))}update(){const r=UD.copy(this._invSrcRestQuat).multiply(this.source.quaternion),t=zD.copy(this._dstRestQuat).multiply(r);this.destination.quaternion.copy(this._dstRestQuat).slerp(t,this.weight)}},jD=new gt,$D=new oe,GD=new oe,WD=class extends Tm{get rollAxis(){return this._rollAxis}set rollAxis(r){this._rollAxis=r,this._v3RollAxis.set(r==="X"?1:0,r==="Y"?1:0,r==="Z"?1:0)}get dependencies(){return new Set([this.source])}constructor(r,t){super(r,t),this._rollAxis="X",this._v3RollAxis=new gt(1,0,0),this._dstRestQuat=new oe,this._invDstRestQuat=new oe,this._invSrcRestQuatMulDstRestQuat=new oe}setInitState(){this._dstRestQuat.copy(this.destination.quaternion),Xu(this._invDstRestQuat.copy(this._dstRestQuat)),Xu(this._invSrcRestQuatMulDstRestQuat.copy(this.source.quaternion)).multiply(this._dstRestQuat)}update(){const r=$D.copy(this._invDstRestQuat).multiply(this.source.quaternion).multiply(this._invSrcRestQuatMulDstRestQuat),t=jD.copy(this._v3RollAxis).applyQuaternion(r),n=GD.setFromUnitVectors(t,this._v3RollAxis).premultiply(this._dstRestQuat).multiply(r);this.destination.quaternion.copy(this._dstRestQuat).slerp(n,this.weight)}},HD=new Set(["1.0","1.0-beta"]),Kw=class La{get name(){return La.EXTENSION_NAME}constructor(t,e){this.parser=t,this.helperRoot=e==null?void 0:e.helperRoot}afterRoot(t){return Dv(this,null,function*(){t.userData.vrmNodeConstraintManager=yield this._import(t)})}_import(t){return Dv(this,null,function*(){var e;const n=this.parser.json;if(!(((e=n.extensionsUsed)==null?void 0:e.indexOf(La.EXTENSION_NAME))!==-1))return null;const s=new kD,o=yield this.parser.getDependencies("node");return o.forEach((a,l)=>{var u;const c=n.nodes[l],h=(u=c==null?void 0:c.extensions)==null?void 0:u[La.EXTENSION_NAME];if(h==null)return;const f=h.specVersion;if(!HD.has(f)){console.warn(`VRMNodeConstraintLoaderPlugin: Unknown ${La.EXTENSION_NAME} specVersion "${f}"`);return}const d=h.constraint;if(d.roll!=null){const m=this._importRollConstraint(a,o,d.roll);s.addConstraint(m)}else if(d.aim!=null){const m=this._importAimConstraint(a,o,d.aim);s.addConstraint(m)}else if(d.rotation!=null){const m=this._importRotationConstraint(a,o,d.rotation);s.addConstraint(m)}}),t.scene.updateMatrixWorld(),s.setInitState(),s})}_importRollConstraint(t,e,n){const{source:i,rollAxis:s,weight:o}=n,a=e[i],l=new WD(t,a);if(s!=null&&(l.rollAxis=s),o!=null&&(l.weight=o),this.helperRoot){const u=new Od(l);this.helperRoot.add(u)}return l}_importAimConstraint(t,e,n){const{source:i,aimAxis:s,weight:o}=n,a=e[i],l=new ND(t,a);if(s!=null&&(l.aimAxis=s),o!=null&&(l.weight=o),this.helperRoot){const u=new Od(l);this.helperRoot.add(u)}return l}_importRotationConstraint(t,e,n){const{source:i,weight:s}=n,o=e[i],a=new VD(t,o);if(s!=null&&(a.weight=s),this.helperRoot){const l=new Od(a);this.helperRoot.add(l)}return a}};Kw.EXTENSION_NAME="VRMC_node_constraint";var XD=Kw,lu=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),Im=class{},Pd=new gt,fs=new gt,Jw=class extends Im{get type(){return"capsule"}constructor(r){var t,e,n,i;super(),this.offset=(t=r==null?void 0:r.offset)!=null?t:new gt(0,0,0),this.tail=(e=r==null?void 0:r.tail)!=null?e:new gt(0,0,0),this.radius=(n=r==null?void 0:r.radius)!=null?n:0,this.inside=(i=r==null?void 0:r.inside)!=null?i:!1}calculateCollision(r,t,e,n){Pd.setFromMatrixPosition(r),fs.subVectors(this.tail,this.offset).applyMatrix4(r),fs.sub(Pd);const i=fs.lengthSq();n.copy(t).sub(Pd);const s=fs.dot(n);s<=0||(i<=s||fs.multiplyScalar(s/i),n.sub(fs));const o=n.length(),a=this.inside?this.radius-e-o:o-e-this.radius;return a<0&&(n.multiplyScalar(1/o),this.inside&&n.negate()),a}},Rd=new gt,Nv=new On,t1=class extends Im{get type(){return"plane"}constructor(r){var t,e;super(),this.offset=(t=r==null?void 0:r.offset)!=null?t:new gt(0,0,0),this.normal=(e=r==null?void 0:r.normal)!=null?e:new gt(0,0,1)}calculateCollision(r,t,e,n){n.setFromMatrixPosition(r),n.negate().add(t),Nv.getNormalMatrix(r),Rd.copy(this.normal).applyNormalMatrix(Nv).normalize();const i=n.dot(Rd)-e;return n.copy(Rd),i}},YD=new gt,e1=class extends Im{get type(){return"sphere"}constructor(r){var t,e,n;super(),this.offset=(t=r==null?void 0:r.offset)!=null?t:new gt(0,0,0),this.radius=(e=r==null?void 0:r.radius)!=null?e:0,this.inside=(n=r==null?void 0:r.inside)!=null?n:!1}calculateCollision(r,t,e,n){n.subVectors(t,YD.setFromMatrixPosition(r));const i=n.length(),s=this.inside?this.radius-e-i:i-e-this.radius;return s<0&&(n.multiplyScalar(1/i),this.inside&&n.negate()),s}},Cn=new gt,qD=class extends Ki{constructor(r){super(),this.worldScale=1,this._currentRadius=0,this._currentOffset=new gt,this._currentTail=new gt,this._shape=r,this._attrPos=new cr(new Float32Array(396),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(264),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;const t=this._shape.radius/this.worldScale;this._currentRadius!==t&&(this._currentRadius=t,r=!0),this._currentOffset.equals(this._shape.offset)||(this._currentOffset.copy(this._shape.offset),r=!0);const e=Cn.copy(this._shape.tail).divideScalar(this.worldScale);this._currentTail.distanceToSquared(e)>1e-10&&(this._currentTail.copy(e),r=!0),r&&this._buildPosition()}_buildPosition(){Cn.copy(this._currentTail).sub(this._currentOffset);const r=Cn.length()/this._currentRadius;for(let n=0;n<=16;n++){const i=n/16*Math.PI;this._attrPos.setXYZ(n,-Math.sin(i),-Math.cos(i),0),this._attrPos.setXYZ(17+n,r+Math.sin(i),Math.cos(i),0),this._attrPos.setXYZ(34+n,-Math.sin(i),0,-Math.cos(i)),this._attrPos.setXYZ(51+n,r+Math.sin(i),0,Math.cos(i))}for(let n=0;n<32;n++){const i=n/16*Math.PI;this._attrPos.setXYZ(68+n,0,Math.sin(i),Math.cos(i)),this._attrPos.setXYZ(100+n,r,Math.sin(i),Math.cos(i))}const t=Math.atan2(Cn.y,Math.sqrt(Cn.x*Cn.x+Cn.z*Cn.z)),e=-Math.atan2(Cn.z,Cn.x);this.rotateZ(t),this.rotateY(e),this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentOffset.x,this._currentOffset.y,this._currentOffset.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<34;r++){const t=(r+1)%34;this._attrIndex.setXY(r*2,r,t),this._attrIndex.setXY(68+r*2,34+r,34+t)}for(let r=0;r<32;r++){const t=(r+1)%32;this._attrIndex.setXY(136+r*2,68+r,68+t),this._attrIndex.setXY(200+r*2,100+r,100+t)}this._attrIndex.needsUpdate=!0}},QD=class extends Ki{constructor(r){super(),this.worldScale=1,this._currentOffset=new gt,this._currentNormal=new gt,this._shape=r,this._attrPos=new cr(new Float32Array(6*3),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(10),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;this._currentOffset.equals(this._shape.offset)||(this._currentOffset.copy(this._shape.offset),r=!0),this._currentNormal.equals(this._shape.normal)||(this._currentNormal.copy(this._shape.normal),r=!0),r&&this._buildPosition()}_buildPosition(){this._attrPos.setXYZ(0,-.5,-.5,0),this._attrPos.setXYZ(1,.5,-.5,0),this._attrPos.setXYZ(2,.5,.5,0),this._attrPos.setXYZ(3,-.5,.5,0),this._attrPos.setXYZ(4,0,0,0),this._attrPos.setXYZ(5,0,0,.25),this.translate(this._currentOffset.x,this._currentOffset.y,this._currentOffset.z),this.lookAt(this._currentNormal),this._attrPos.needsUpdate=!0}_buildIndex(){this._attrIndex.setXY(0,0,1),this._attrIndex.setXY(2,1,2),this._attrIndex.setXY(4,2,3),this._attrIndex.setXY(6,3,0),this._attrIndex.setXY(8,4,5),this._attrIndex.needsUpdate=!0}},ZD=class extends Ki{constructor(r){super(),this.worldScale=1,this._currentRadius=0,this._currentOffset=new gt,this._shape=r,this._attrPos=new cr(new Float32Array(32*3*3),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(64*3),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;const t=this._shape.radius/this.worldScale;this._currentRadius!==t&&(this._currentRadius=t,r=!0),this._currentOffset.equals(this._shape.offset)||(this._currentOffset.copy(this._shape.offset),r=!0),r&&this._buildPosition()}_buildPosition(){for(let r=0;r<32;r++){const t=r/16*Math.PI;this._attrPos.setXYZ(r,Math.cos(t),Math.sin(t),0),this._attrPos.setXYZ(32+r,0,Math.cos(t),Math.sin(t)),this._attrPos.setXYZ(64+r,Math.sin(t),0,Math.cos(t))}this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentOffset.x,this._currentOffset.y,this._currentOffset.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<32;r++){const t=(r+1)%32;this._attrIndex.setXY(r*2,r,t),this._attrIndex.setXY(64+r*2,32+r,32+t),this._attrIndex.setXY(128+r*2,64+r,64+t)}this._attrIndex.needsUpdate=!0}},KD=new gt,Fd=class extends ea{constructor(r){if(super(),this.matrixAutoUpdate=!1,this.collider=r,this.collider.shape instanceof e1)this._geometry=new ZD(this.collider.shape);else if(this.collider.shape instanceof Jw)this._geometry=new qD(this.collider.shape);else if(this.collider.shape instanceof t1)this._geometry=new QD(this.collider.shape);else throw new Error("VRMSpringBoneColliderHelper: Unknown collider shape type detected");const t=new Bc({color:16711935,depthTest:!1,depthWrite:!1});this._line=new Yp(this._geometry,t),this.add(this._line)}dispose(){this._geometry.dispose()}updateMatrixWorld(r){this.collider.updateWorldMatrix(!0,!1),this.matrix.copy(this.collider.matrixWorld);const t=this.matrix.elements;this._geometry.worldScale=KD.set(t[0],t[1],t[2]).length(),this._geometry.update(),super.updateMatrixWorld(r)}},JD=class extends Ki{constructor(r){super(),this.worldScale=1,this._currentRadius=0,this._currentTail=new gt,this._springBone=r,this._attrPos=new cr(new Float32Array(294),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(194),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;const t=this._springBone.settings.hitRadius/this.worldScale;this._currentRadius!==t&&(this._currentRadius=t,r=!0),this._currentTail.equals(this._springBone.initialLocalChildPosition)||(this._currentTail.copy(this._springBone.initialLocalChildPosition),r=!0),r&&this._buildPosition()}_buildPosition(){for(let r=0;r<32;r++){const t=r/16*Math.PI;this._attrPos.setXYZ(r,Math.cos(t),Math.sin(t),0),this._attrPos.setXYZ(32+r,0,Math.cos(t),Math.sin(t)),this._attrPos.setXYZ(64+r,Math.sin(t),0,Math.cos(t))}this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.setXYZ(96,0,0,0),this._attrPos.setXYZ(97,this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<32;r++){const t=(r+1)%32;this._attrIndex.setXY(r*2,r,t),this._attrIndex.setXY(64+r*2,32+r,32+t),this._attrIndex.setXY(128+r*2,64+r,64+t)}this._attrIndex.setXY(192,96,97),this._attrIndex.needsUpdate=!0}},tL=new gt,eL=class extends ea{constructor(r){super(),this.matrixAutoUpdate=!1,this.springBone=r,this._geometry=new JD(this.springBone);const t=new Bc({color:16776960,depthTest:!1,depthWrite:!1});this._line=new Yp(this._geometry,t),this.add(this._line)}dispose(){this._geometry.dispose()}updateMatrixWorld(r){this.springBone.bone.updateWorldMatrix(!0,!1),this.matrix.copy(this.springBone.bone.matrixWorld);const t=this.matrix.elements;this._geometry.worldScale=tL.set(t[0],t[1],t[2]).length(),this._geometry.update(),super.updateMatrixWorld(r)}},Dd=class extends Ja{constructor(r){super(),this.colliderMatrix=new ti,this.shape=r}updateWorldMatrix(r,t){super.updateWorldMatrix(r,t),rL(this.colliderMatrix,this.matrixWorld,this.shape.offset)}};function rL(r,t,e){const n=t.elements;r.copy(t),e&&(r.elements[12]=n[0]*e.x+n[4]*e.y+n[8]*e.z+n[12],r.elements[13]=n[1]*e.x+n[5]*e.y+n[9]*e.z+n[13],r.elements[14]=n[2]*e.x+n[6]*e.y+n[10]*e.z+n[14])}var nL=new ti;function iL(r){return r.invert?r.invert():r.getInverse(nL.copy(r)),r}var sL=class{constructor(r){this._inverseCache=new ti,this._shouldUpdateInverse=!0,this.matrix=r;const t={set:(e,n,i)=>(this._shouldUpdateInverse=!0,e[n]=i,!0)};this._originalElements=r.elements,r.elements=new Proxy(r.elements,t)}get inverse(){return this._shouldUpdateInverse&&(iL(this._inverseCache.copy(this.matrix)),this._shouldUpdateInverse=!1),this._inverseCache}revert(){this.matrix.elements=this._originalElements}},Ld=new ti,ao=new gt,Sa=new gt,Ta=new gt,Ia=new gt,oL=new ti,aL=class{constructor(r,t,e={},n=[]){this._currentTail=new gt,this._prevTail=new gt,this._boneAxis=new gt,this._worldSpaceBoneLength=0,this._center=null,this._initialLocalMatrix=new ti,this._initialLocalRotation=new oe,this._initialLocalChildPosition=new gt;var i,s,o,a,l,u;this.bone=r,this.bone.matrixAutoUpdate=!1,this.child=t,this.settings={hitRadius:(i=e.hitRadius)!=null?i:0,stiffness:(s=e.stiffness)!=null?s:1,gravityPower:(o=e.gravityPower)!=null?o:0,gravityDir:(l=(a=e.gravityDir)==null?void 0:a.clone())!=null?l:new gt(0,-1,0),dragForce:(u=e.dragForce)!=null?u:.4},this.colliderGroups=n}get dependencies(){const r=new Set,t=this.bone.parent;t&&r.add(t);for(let e=0;e{t(i)})}function fp(r,t){r.children.forEach(e=>{t(e)||fp(e,t)})}function uL(r){var t;const e=new Map;for(const n of r){let i=n;do{const s=((t=e.get(i))!=null?t:0)+1;if(s===r.size)return i;e.set(i,s),i=i.parent}while(i!==null)}return null}var Bv=class{constructor(){this._joints=new Set,this._sortedJoints=[],this._hasWarnedCircularDependency=!1,this._ancestors=[],this._objectSpringBonesMap=new Map,this._isSortedJointsDirty=!1,this._relevantChildrenUpdated=this._relevantChildrenUpdated.bind(this)}get joints(){return this._joints}get springBones(){return console.warn("VRMSpringBoneManager: springBones is deprecated. use joints instead."),this._joints}get colliderGroups(){const r=new Set;return this._joints.forEach(t=>{t.colliderGroups.forEach(e=>{r.add(e)})}),Array.from(r)}get colliders(){const r=new Set;return this.colliderGroups.forEach(t=>{t.colliders.forEach(e=>{r.add(e)})}),Array.from(r)}addJoint(r){this._joints.add(r);let t=this._objectSpringBonesMap.get(r.bone);t==null&&(t=new Set,this._objectSpringBonesMap.set(r.bone,t)),t.add(r),this._isSortedJointsDirty=!0}addSpringBone(r){console.warn("VRMSpringBoneManager: addSpringBone() is deprecated. use addJoint() instead."),this.addJoint(r)}deleteJoint(r){this._joints.delete(r),this._objectSpringBonesMap.get(r.bone).delete(r),this._isSortedJointsDirty=!0}deleteSpringBone(r){console.warn("VRMSpringBoneManager: deleteSpringBone() is deprecated. use deleteJoint() instead."),this.deleteJoint(r)}setInitState(){this._sortJoints();for(let r=0;r{var o,a;return((a=(o=this._objectSpringBonesMap.get(s))==null?void 0:o.size)!=null?a:0)>0?!0:(this._ancestors.push(s),!1)})),this._isSortedJointsDirty=!1}_insertJointSort(r,t,e,n,i){if(e.has(r))return;if(t.has(r)){this._hasWarnedCircularDependency||(console.warn("VRMSpringBoneManager: Circular dependency detected"),this._hasWarnedCircularDependency=!0);return}t.add(r);const s=r.dependencies;for(const o of s){let a=!1,l=null;lL(o,u=>{const c=this._objectSpringBonesMap.get(u);if(c)for(const h of c)a=!0,this._insertJointSort(h,t,e,n,i);else a||(l=u)}),l&&i.add(l)}n.push(r),e.add(r)}_relevantChildrenUpdated(r){var t,e;return((e=(t=this._objectSpringBonesMap.get(r))==null?void 0:t.size)!=null?e:0)>0?!0:(r.updateWorldMatrix(!1,!1),!1)}},kv="VRMC_springBone_extended_collider",cL=new Set(["1.0","1.0-beta"]),hL=new Set(["1.0"]),r1=class po{get name(){return po.EXTENSION_NAME}constructor(t,e){var n;this.parser=t,this.jointHelperRoot=e==null?void 0:e.jointHelperRoot,this.colliderHelperRoot=e==null?void 0:e.colliderHelperRoot,this.useExtendedColliders=(n=e==null?void 0:e.useExtendedColliders)!=null?n:!0}afterRoot(t){return lu(this,null,function*(){t.userData.vrmSpringBoneManager=yield this._import(t)})}_import(t){return lu(this,null,function*(){const e=yield this._v1Import(t);if(e!=null)return e;const n=yield this._v0Import(t);return n??null})}_v1Import(t){return lu(this,null,function*(){var e,n,i,s,o;const a=t.parser.json;if(!(((e=a.extensionsUsed)==null?void 0:e.indexOf(po.EXTENSION_NAME))!==-1))return null;const u=new Bv,c=yield t.parser.getDependencies("node"),h=(n=a.extensions)==null?void 0:n[po.EXTENSION_NAME];if(!h)return null;const f=h.specVersion;if(!cL.has(f))return console.warn(`VRMSpringBoneLoaderPlugin: Unknown ${po.EXTENSION_NAME} specVersion "${f}"`),null;const d=(i=h.colliders)==null?void 0:i.map((g,p)=>{var y,v,S,T,_,M,x,N,L,j,it,I,Q,w,nt;const P=c[g.node];if(P==null)return console.warn(`VRMSpringBoneLoaderPlugin: The collider #${p} attempted to use the node #${g.node} but not found`),null;const C=g.shape,R=(y=g.extensions)==null?void 0:y[kv];if(this.useExtendedColliders&&R!=null){const U=R.specVersion;if(!hL.has(U))console.warn(`VRMSpringBoneLoaderPlugin: Unknown ${kv} specVersion "${U}". Fallbacking to the ${po.EXTENSION_NAME} definition`);else{const k=R.shape;if(k.sphere)return this._importSphereCollider(P,{offset:new gt().fromArray((v=k.sphere.offset)!=null?v:[0,0,0]),radius:(S=k.sphere.radius)!=null?S:0,inside:(T=k.sphere.inside)!=null?T:!1});if(k.capsule)return this._importCapsuleCollider(P,{offset:new gt().fromArray((_=k.capsule.offset)!=null?_:[0,0,0]),radius:(M=k.capsule.radius)!=null?M:0,tail:new gt().fromArray((x=k.capsule.tail)!=null?x:[0,0,0]),inside:(N=k.capsule.inside)!=null?N:!1});if(k.plane)return this._importPlaneCollider(P,{offset:new gt().fromArray((L=k.plane.offset)!=null?L:[0,0,0]),normal:new gt().fromArray((j=k.plane.normal)!=null?j:[0,0,1])})}}if(C.sphere)return this._importSphereCollider(P,{offset:new gt().fromArray((it=C.sphere.offset)!=null?it:[0,0,0]),radius:(I=C.sphere.radius)!=null?I:0,inside:!1});if(C.capsule)return this._importCapsuleCollider(P,{offset:new gt().fromArray((Q=C.capsule.offset)!=null?Q:[0,0,0]),radius:(w=C.capsule.radius)!=null?w:0,tail:new gt().fromArray((nt=C.capsule.tail)!=null?nt:[0,0,0]),inside:!1});throw new Error(`VRMSpringBoneLoaderPlugin: The collider #${p} has no valid shape`)}),m=(s=h.colliderGroups)==null?void 0:s.map((g,p)=>{var y;return{colliders:((y=g.colliders)!=null?y:[]).flatMap(S=>{const T=d==null?void 0:d[S];return T??(console.warn(`VRMSpringBoneLoaderPlugin: The colliderGroup #${p} attempted to use a collider #${S} but not found`),[])}),name:g.name}});return(o=h.springs)==null||o.forEach((g,p)=>{var y;const v=g.joints,S=(y=g.colliderGroups)==null?void 0:y.map(M=>{const x=m==null?void 0:m[M];if(x==null)throw new Error(`VRMSpringBoneLoaderPlugin: The spring #${p} attempted to use a colliderGroup ${M} but not found`);return x}),T=g.center!=null?c[g.center]:void 0;let _;v.forEach(M=>{if(_){const x=_.node,N=c[x],L=M.node,j=c[L],it={hitRadius:_.hitRadius,dragForce:_.dragForce,gravityPower:_.gravityPower,stiffness:_.stiffness,gravityDir:_.gravityDir!=null?new gt().fromArray(_.gravityDir):void 0},I=this._importJoint(N,j,it,S);T&&(I.center=T),u.addJoint(I)}_=M})}),u.setInitState(),u})}_v0Import(t){return lu(this,null,function*(){var e,n,i;const s=t.parser.json;if(!(((e=s.extensionsUsed)==null?void 0:e.indexOf("VRM"))!==-1))return null;const a=(n=s.extensions)==null?void 0:n.VRM,l=a==null?void 0:a.secondaryAnimation;if(!l)return null;const u=l==null?void 0:l.boneGroups;if(!u)return null;const c=new Bv,h=yield t.parser.getDependencies("node"),f=(i=l.colliderGroups)==null?void 0:i.map(d=>{var m;const g=h[d.node];return{colliders:((m=d.colliders)!=null?m:[]).map((y,v)=>{var S,T,_;const M=new gt(0,0,0);return y.offset&&M.set((S=y.offset.x)!=null?S:0,(T=y.offset.y)!=null?T:0,y.offset.z?-y.offset.z:0),this._importSphereCollider(g,{offset:M,radius:(_=y.radius)!=null?_:0,inside:!1})})}});return u==null||u.forEach((d,m)=>{const g=d.bones;g&&g.forEach(p=>{var y,v,S,T;const _=h[p],M=new gt;d.gravityDir?M.set((y=d.gravityDir.x)!=null?y:0,(v=d.gravityDir.y)!=null?v:0,(S=d.gravityDir.z)!=null?S:0):M.set(0,-1,0);const x=d.center!=null?h[d.center]:void 0,N={hitRadius:d.hitRadius,dragForce:d.dragForce,gravityPower:d.gravityPower,stiffness:d.stiffiness,gravityDir:M},L=(T=d.colliderGroups)==null?void 0:T.map(j=>{const it=f==null?void 0:f[j];if(it==null)throw new Error(`VRMSpringBoneLoaderPlugin: The spring #${m} attempted to use a colliderGroup ${j} but not found`);return it});_.traverse(j=>{var it;const I=(it=j.children[0])!=null?it:null,Q=this._importJoint(j,I,N,L);x&&(Q.center=x),c.addJoint(Q)})})}),t.scene.updateMatrixWorld(),c.setInitState(),c})}_importJoint(t,e,n,i){const s=new aL(t,e,n,i);if(this.jointHelperRoot){const o=new eL(s);this.jointHelperRoot.add(o),o.renderOrder=this.jointHelperRoot.renderOrder}return s}_importSphereCollider(t,e){const n=new e1(e),i=new Dd(n);if(t.add(i),this.colliderHelperRoot){const s=new Fd(i);this.colliderHelperRoot.add(s),s.renderOrder=this.colliderHelperRoot.renderOrder}return i}_importCapsuleCollider(t,e){const n=new Jw(e),i=new Dd(n);if(t.add(i),this.colliderHelperRoot){const s=new Fd(i);this.colliderHelperRoot.add(s),s.renderOrder=this.colliderHelperRoot.renderOrder}return i}_importPlaneCollider(t,e){const n=new t1(e),i=new Dd(n);if(t.add(i),this.colliderHelperRoot){const s=new Fd(i);this.colliderHelperRoot.add(s),s.renderOrder=this.colliderHelperRoot.renderOrder}return i}};r1.EXTENSION_NAME="VRMC_springBone";var dL=r1,a8=class{get name(){return"VRMLoaderPlugin"}constructor(r,t){var e,n,i,s,o,a,l,u,c,h;this.parser=r;const f=t==null?void 0:t.helperRoot,d=t==null?void 0:t.autoUpdateHumanBones;this.expressionPlugin=(e=t==null?void 0:t.expressionPlugin)!=null?e:new CF(r),this.firstPersonPlugin=(n=t==null?void 0:t.firstPersonPlugin)!=null?n:new PF(r),this.humanoidPlugin=(i=t==null?void 0:t.humanoidPlugin)!=null?i:new kF(r,{helperRoot:f,autoUpdateHumanBones:d}),this.lookAtPlugin=(s=t==null?void 0:t.lookAtPlugin)!=null?s:new JF(r,{helperRoot:f}),this.metaPlugin=(o=t==null?void 0:t.metaPlugin)!=null?o:new rD(r),this.mtoonMaterialPlugin=(a=t==null?void 0:t.mtoonMaterialPlugin)!=null?a:new yD(r),this.materialsHDREmissiveMultiplierPlugin=(l=t==null?void 0:t.materialsHDREmissiveMultiplierPlugin)!=null?l:new _D(r),this.materialsV0CompatPlugin=(u=t==null?void 0:t.materialsV0CompatPlugin)!=null?u:new MD(r),this.springBonePlugin=(c=t==null?void 0:t.springBonePlugin)!=null?c:new dL(r,{colliderHelperRoot:f,jointHelperRoot:f}),this.nodeConstraintPlugin=(h=t==null?void 0:t.nodeConstraintPlugin)!=null?h:new XD(r,{helperRoot:f})}beforeRoot(){return su(this,null,function*(){yield this.materialsV0CompatPlugin.beforeRoot(),yield this.mtoonMaterialPlugin.beforeRoot()})}loadMesh(r){return su(this,null,function*(){return yield this.mtoonMaterialPlugin.loadMesh(r)})}getMaterialType(r){const t=this.mtoonMaterialPlugin.getMaterialType(r);return t??null}extendMaterialParams(r,t){return su(this,null,function*(){yield this.materialsHDREmissiveMultiplierPlugin.extendMaterialParams(r,t),yield this.mtoonMaterialPlugin.extendMaterialParams(r,t)})}afterRoot(r){return su(this,null,function*(){yield this.metaPlugin.afterRoot(r),yield this.humanoidPlugin.afterRoot(r),yield this.expressionPlugin.afterRoot(r),yield this.lookAtPlugin.afterRoot(r),yield this.firstPersonPlugin.afterRoot(r),yield this.springBonePlugin.afterRoot(r),yield this.nodeConstraintPlugin.afterRoot(r),yield this.mtoonMaterialPlugin.afterRoot(r);const t=r.userData.vrmMeta,e=r.userData.vrmHumanoid;if(t&&e){const n=new iD({scene:r.scene,expressionManager:r.userData.vrmExpressionManager,firstPerson:r.userData.vrmFirstPerson,humanoid:e,lookAt:r.userData.vrmLookAt,meta:t,materials:r.userData.vrmMToonMaterials,springBoneManager:r.userData.vrmSpringBoneManager,nodeConstraintManager:r.userData.vrmNodeConstraintManager});r.userData.vrm=n}})}};function fL(r){const t=new Set;return r.traverse(e=>{if(!e.isMesh)return;const n=e;t.add(n)}),t}function Uv(r,t,e){if(t.size===1){const o=t.values().next().value;if(o.weight===1)return r[o.index]}const n=new Float32Array(r[0].count*3);let i=0;if(e)i=1;else for(const o of t)i+=o.weight;for(const o of t){const a=r[o.index],l=o.weight/i;for(let u=0;uu.getOrCreate(N)).join(","),M=`${S};${p};${_}`;let x=o.get(M);x==null&&(x=v.clone(),bL(x,T,d),o.set(M,x)),y.geometry.setAttribute("skinIndex",x)}for(const y of f)y.bind(g,new ti)}}function gL(r){const t=new Set;return r.traverse(e=>{if(!e.isSkinnedMesh)return;const n=e;t.add(n)}),t}function yL(r,t){const e=new Set;for(let n=0;ne)return!1;return!0}var Nd=class{constructor(){this._objectIndexMap=new Map,this._index=0}get(r){return this._objectIndexMap.get(r)}getOrCreate(r){let t=this._objectIndexMap.get(r);return t==null&&(t=this._index,this._objectIndexMap.set(r,t),this._index++),t}};function zv(r){if(Object.values(r).forEach(t=>{t!=null&&t.isTexture&&t.dispose()}),r.isShaderMaterial){const t=r.uniforms;t&&Object.values(t).forEach(e=>{const n=e.value;n!=null&&n.isTexture&&n.dispose()})}r.dispose()}function wL(r){const t=r.geometry;t&&t.dispose();const e=r.skeleton;e&&e.dispose();const n=r.material;n&&(Array.isArray(n)?n.forEach(i=>zv(i)):n&&zv(n))}function SL(r){r.traverse(wL)}function TL(r,t){var e,n;console.warn("VRMUtils.removeUnnecessaryJoints: removeUnnecessaryJoints is deprecated. Use combineSkeletons instead. combineSkeletons contributes more to the performance improvement. This function will be removed in the next major version.");const i=(e=t==null?void 0:t.experimentalSameBoneCounts)!=null?e:!1,s=[];r.traverse(l=>{l.type==="SkinnedMesh"&&s.push(l)});const o=new Map;let a=0;for(const l of s){const c=l.geometry.getAttribute("skinIndex");if(o.has(c))continue;const h=new Map,f=new Map;for(let d=0;d{var n,i,s,o;if(!e.isMesh)return;const a=e,l=a.geometry,u=l.index;if(u==null)return;const c=t.get(l);if(c!=null){a.geometry=c;return}const h=Object.values(l.attributes)[0].count,f=new Array(h);let d=0;const m=u.array;for(let T=0;T{v.addGroup(T.start,T.count,T.materialIndex)}),v.boundingBox=(i=(n=l.boundingBox)==null?void 0:n.clone())!=null?i:null,v.boundingSphere=(o=(s=l.boundingSphere)==null?void 0:s.clone())!=null?o:null,v.setDrawRange(l.drawRange.start,l.drawRange.count),v.userData=l.userData,t.set(l,v);{const T=u.array,_=new T.constructor(T.length);for(let M=0;M{const _=l.attributes[T];if(_.isInterleavedBufferAttribute)throw new Error("removeUnnecessaryVertices: InterleavedBufferAttribute is not supported");const M=_.array,{itemSize:x,normalized:N}=_,L=new M.constructor(p.length*x);p.forEach((j,it)=>{for(let I=0;I{v.morphAttributes[T]=[];const _=l.morphAttributes[T];for(let M=0;M<_.length;M++){const x=_[M];if(x.isInterleavedBufferAttribute)throw new Error("removeUnnecessaryVertices: InterleavedBufferAttribute is not supported");const N=x.array,{itemSize:L,normalized:j}=x,it=new N.constructor(p.length*L);p.forEach((I,Q)=>{for(let w=0;wI===0),v.morphAttributes[T][M]=new cr(it,L,j)}}),S&&(v.morphAttributes={}),a.geometry=v}),Array.from(t.keys()).forEach(e=>{e.dispose()})}function ML(r){var t;((t=r.meta)==null?void 0:t.metaVersion)==="0"&&(r.scene.rotation.y=Math.PI)}var sa=class{constructor(){}};sa.combineMorphs=pL;sa.combineSkeletons=mL;sa.deepDispose=SL;sa.removeUnnecessaryJoints=TL;sa.removeUnnecessaryVertices=IL;sa.rotateVRM0=ML;/*! +`;e.vertexShader=i+e.vertexShader,e.fragmentShader=i+e.fragmentShader,n<154&&(e.fragmentShader=e.fragmentShader.replace("#include ","#include "))}}get color(){return this.uniforms.litFactor.value}set color(r){this.uniforms.litFactor.value=r}get map(){return this.uniforms.map.value}set map(r){this.uniforms.map.value=r}get normalMap(){return this.uniforms.normalMap.value}set normalMap(r){this.uniforms.normalMap.value=r}get normalScale(){return this.uniforms.normalScale.value}set normalScale(r){this.uniforms.normalScale.value=r}get emissive(){return this.uniforms.emissive.value}set emissive(r){this.uniforms.emissive.value=r}get emissiveIntensity(){return this.uniforms.emissiveIntensity.value}set emissiveIntensity(r){this.uniforms.emissiveIntensity.value=r}get emissiveMap(){return this.uniforms.emissiveMap.value}set emissiveMap(r){this.uniforms.emissiveMap.value=r}get shadeColorFactor(){return this.uniforms.shadeColorFactor.value}set shadeColorFactor(r){this.uniforms.shadeColorFactor.value=r}get shadeMultiplyTexture(){return this.uniforms.shadeMultiplyTexture.value}set shadeMultiplyTexture(r){this.uniforms.shadeMultiplyTexture.value=r}get shadingShiftFactor(){return this.uniforms.shadingShiftFactor.value}set shadingShiftFactor(r){this.uniforms.shadingShiftFactor.value=r}get shadingShiftTexture(){return this.uniforms.shadingShiftTexture.value}set shadingShiftTexture(r){this.uniforms.shadingShiftTexture.value=r}get shadingShiftTextureScale(){return this.uniforms.shadingShiftTextureScale.value}set shadingShiftTextureScale(r){this.uniforms.shadingShiftTextureScale.value=r}get shadingToonyFactor(){return this.uniforms.shadingToonyFactor.value}set shadingToonyFactor(r){this.uniforms.shadingToonyFactor.value=r}get giEqualizationFactor(){return this.uniforms.giEqualizationFactor.value}set giEqualizationFactor(r){this.uniforms.giEqualizationFactor.value=r}get matcapFactor(){return this.uniforms.matcapFactor.value}set matcapFactor(r){this.uniforms.matcapFactor.value=r}get matcapTexture(){return this.uniforms.matcapTexture.value}set matcapTexture(r){this.uniforms.matcapTexture.value=r}get parametricRimColorFactor(){return this.uniforms.parametricRimColorFactor.value}set parametricRimColorFactor(r){this.uniforms.parametricRimColorFactor.value=r}get rimMultiplyTexture(){return this.uniforms.rimMultiplyTexture.value}set rimMultiplyTexture(r){this.uniforms.rimMultiplyTexture.value=r}get rimLightingMixFactor(){return this.uniforms.rimLightingMixFactor.value}set rimLightingMixFactor(r){this.uniforms.rimLightingMixFactor.value=r}get parametricRimFresnelPowerFactor(){return this.uniforms.parametricRimFresnelPowerFactor.value}set parametricRimFresnelPowerFactor(r){this.uniforms.parametricRimFresnelPowerFactor.value=r}get parametricRimLiftFactor(){return this.uniforms.parametricRimLiftFactor.value}set parametricRimLiftFactor(r){this.uniforms.parametricRimLiftFactor.value=r}get outlineWidthMultiplyTexture(){return this.uniforms.outlineWidthMultiplyTexture.value}set outlineWidthMultiplyTexture(r){this.uniforms.outlineWidthMultiplyTexture.value=r}get outlineWidthFactor(){return this.uniforms.outlineWidthFactor.value}set outlineWidthFactor(r){this.uniforms.outlineWidthFactor.value=r}get outlineColorFactor(){return this.uniforms.outlineColorFactor.value}set outlineColorFactor(r){this.uniforms.outlineColorFactor.value=r}get outlineLightingMixFactor(){return this.uniforms.outlineLightingMixFactor.value}set outlineLightingMixFactor(r){this.uniforms.outlineLightingMixFactor.value=r}get uvAnimationMaskTexture(){return this.uniforms.uvAnimationMaskTexture.value}set uvAnimationMaskTexture(r){this.uniforms.uvAnimationMaskTexture.value=r}get uvAnimationScrollXOffset(){return this.uniforms.uvAnimationScrollXOffset.value}set uvAnimationScrollXOffset(r){this.uniforms.uvAnimationScrollXOffset.value=r}get uvAnimationScrollYOffset(){return this.uniforms.uvAnimationScrollYOffset.value}set uvAnimationScrollYOffset(r){this.uniforms.uvAnimationScrollYOffset.value=r}get uvAnimationRotationPhase(){return this.uniforms.uvAnimationRotationPhase.value}set uvAnimationRotationPhase(r){this.uniforms.uvAnimationRotationPhase.value=r}get ignoreVertexColor(){return this._ignoreVertexColor}set ignoreVertexColor(r){this._ignoreVertexColor=r,this.needsUpdate=!0}get v0CompatShade(){return this._v0CompatShade}set v0CompatShade(r){this._v0CompatShade=r,this.needsUpdate=!0}get debugMode(){return this._debugMode}set debugMode(r){this._debugMode=r,this.needsUpdate=!0}get outlineWidthMode(){return this._outlineWidthMode}set outlineWidthMode(r){this._outlineWidthMode=r,this.needsUpdate=!0}get isOutline(){return this._isOutline}set isOutline(r){this._isOutline=r,this.needsUpdate=!0}get isMToonMaterial(){return!0}update(r){this._uploadUniformsWorkaround(),this._updateUVAnimation(r)}copy(r){return super.copy(r),this.map=r.map,this.normalMap=r.normalMap,this.emissiveMap=r.emissiveMap,this.shadeMultiplyTexture=r.shadeMultiplyTexture,this.shadingShiftTexture=r.shadingShiftTexture,this.matcapTexture=r.matcapTexture,this.rimMultiplyTexture=r.rimMultiplyTexture,this.outlineWidthMultiplyTexture=r.outlineWidthMultiplyTexture,this.uvAnimationMaskTexture=r.uvAnimationMaskTexture,this.normalMapType=r.normalMapType,this.uvAnimationScrollXSpeedFactor=r.uvAnimationScrollXSpeedFactor,this.uvAnimationScrollYSpeedFactor=r.uvAnimationScrollYSpeedFactor,this.uvAnimationRotationSpeedFactor=r.uvAnimationRotationSpeedFactor,this.ignoreVertexColor=r.ignoreVertexColor,this.v0CompatShade=r.v0CompatShade,this.debugMode=r.debugMode,this.outlineWidthMode=r.outlineWidthMode,this.isOutline=r.isOutline,this.needsUpdate=!0,this}_updateUVAnimation(r){this.uniforms.uvAnimationScrollXOffset.value+=r*this.uvAnimationScrollXSpeedFactor,this.uniforms.uvAnimationScrollYOffset.value+=r*this.uvAnimationScrollYSpeedFactor,this.uniforms.uvAnimationRotationPhase.value+=r*this.uvAnimationRotationSpeedFactor,this.uniforms.alphaTest.value=this.alphaTest,this.uniformsNeedUpdate=!0}_uploadUniformsWorkaround(){this.uniforms.opacity.value=this.opacity,this._updateTextureMatrix(this.uniforms.map,this.uniforms.mapUvTransform),this._updateTextureMatrix(this.uniforms.normalMap,this.uniforms.normalMapUvTransform),this._updateTextureMatrix(this.uniforms.emissiveMap,this.uniforms.emissiveMapUvTransform),this._updateTextureMatrix(this.uniforms.shadeMultiplyTexture,this.uniforms.shadeMultiplyTextureUvTransform),this._updateTextureMatrix(this.uniforms.shadingShiftTexture,this.uniforms.shadingShiftTextureUvTransform),this._updateTextureMatrix(this.uniforms.matcapTexture,this.uniforms.matcapTextureUvTransform),this._updateTextureMatrix(this.uniforms.rimMultiplyTexture,this.uniforms.rimMultiplyTextureUvTransform),this._updateTextureMatrix(this.uniforms.outlineWidthMultiplyTexture,this.uniforms.outlineWidthMultiplyTextureUvTransform),this._updateTextureMatrix(this.uniforms.uvAnimationMaskTexture,this.uniforms.uvAnimationMaskTextureUvTransform),this.uniformsNeedUpdate=!0}_generateDefines(){const r=parseInt(Cu,10),t=this.outlineWidthMultiplyTexture!==null,e=this.map!==null||this.normalMap!==null||this.emissiveMap!==null||this.shadeMultiplyTexture!==null||this.shadingShiftTexture!==null||this.rimMultiplyTexture!==null||this.uvAnimationMaskTexture!==null;return{THREE_VRM_THREE_REVISION:r,OUTLINE:this._isOutline,MTOON_USE_UV:t||e,MTOON_UVS_VERTEX_ONLY:t&&!e,V0_COMPAT_SHADE:this._v0CompatShade,USE_SHADEMULTIPLYTEXTURE:this.shadeMultiplyTexture!==null,USE_SHADINGSHIFTTEXTURE:this.shadingShiftTexture!==null,USE_MATCAPTEXTURE:this.matcapTexture!==null,USE_RIMMULTIPLYTEXTURE:this.rimMultiplyTexture!==null,USE_OUTLINEWIDTHMULTIPLYTEXTURE:this._isOutline&&this.outlineWidthMultiplyTexture!==null,USE_UVANIMATIONMASKTEXTURE:this.uvAnimationMaskTexture!==null,IGNORE_VERTEX_COLOR:this._ignoreVertexColor===!0,DEBUG_NORMAL:this._debugMode==="normal",DEBUG_LITSHADERATE:this._debugMode==="litShadeRate",DEBUG_UV:this._debugMode==="uv",OUTLINE_WIDTH_SCREEN:this._isOutline&&this._outlineWidthMode===Ov.ScreenCoordinates}}_updateTextureMatrix(r,t){r.value&&(r.value.matrixAutoUpdate&&r.value.updateMatrix(),t.value.copy(r.value.matrix))}},gL=new Set(["1.0","1.0-beta"]),Qw=class gu{get name(){return gu.EXTENSION_NAME}constructor(t,e={}){var n,i,s,o;this.parser=t,this.materialType=(n=e.materialType)!=null?n:mL,this.renderOrderOffset=(i=e.renderOrderOffset)!=null?i:0,this.v0CompatShade=(s=e.v0CompatShade)!=null?s:!1,this.debugMode=(o=e.debugMode)!=null?o:"none",this._mToonMaterialSet=new Set}beforeRoot(){return Os(this,null,function*(){this._removeUnlitExtensionIfMToonExists()})}afterRoot(t){return Os(this,null,function*(){t.userData.vrmMToonMaterials=Array.from(this._mToonMaterialSet)})}getMaterialType(t){return this._getMToonExtension(t)?this.materialType:null}extendMaterialParams(t,e){const n=this._getMToonExtension(t);return n?this._extendMaterialParams(n,e):null}loadMesh(t){return Os(this,null,function*(){var e;const n=this.parser,s=(e=n.json.meshes)==null?void 0:e[t];if(s==null)throw new Error(`MToonMaterialLoaderPlugin: Attempt to use meshes[${t}] of glTF but the mesh doesn't exist`);const o=s.primitives,a=yield n.loadMesh(t);if(o.length===1){const l=a,u=o[0].material;u!=null&&this._setupPrimitive(l,u)}else{const l=a;for(let u=0;u{var o;this._getMToonExtension(s)&&((o=i.extensions)!=null&&o.KHR_materials_unlit)&&delete i.extensions.KHR_materials_unlit})}_getMToonExtension(t){var e,n;const o=(e=this.parser.json.materials)==null?void 0:e[t];if(o==null){console.warn(`MToonMaterialLoaderPlugin: Attempt to use materials[${t}] of glTF but the material doesn't exist`);return}const a=(n=o.extensions)==null?void 0:n[gu.EXTENSION_NAME];if(a==null)return;const l=a.specVersion;if(!gL.has(l)){console.warn(`MToonMaterialLoaderPlugin: Unknown ${gu.EXTENSION_NAME} specVersion "${l}"`);return}return a}_extendMaterialParams(t,e){return Os(this,null,function*(){var n;delete e.metalness,delete e.roughness;const i=new cL(this.parser,e);i.assignPrimitive("transparentWithZWrite",t.transparentWithZWrite),i.assignColor("shadeColorFactor",t.shadeColorFactor),i.assignTexture("shadeMultiplyTexture",t.shadeMultiplyTexture,!0),i.assignPrimitive("shadingShiftFactor",t.shadingShiftFactor),i.assignTexture("shadingShiftTexture",t.shadingShiftTexture,!0),i.assignPrimitive("shadingShiftTextureScale",(n=t.shadingShiftTexture)==null?void 0:n.scale),i.assignPrimitive("shadingToonyFactor",t.shadingToonyFactor),i.assignPrimitive("giEqualizationFactor",t.giEqualizationFactor),i.assignColor("matcapFactor",t.matcapFactor),i.assignTexture("matcapTexture",t.matcapTexture,!0),i.assignColor("parametricRimColorFactor",t.parametricRimColorFactor),i.assignTexture("rimMultiplyTexture",t.rimMultiplyTexture,!0),i.assignPrimitive("rimLightingMixFactor",t.rimLightingMixFactor),i.assignPrimitive("parametricRimFresnelPowerFactor",t.parametricRimFresnelPowerFactor),i.assignPrimitive("parametricRimLiftFactor",t.parametricRimLiftFactor),i.assignPrimitive("outlineWidthMode",t.outlineWidthMode),i.assignPrimitive("outlineWidthFactor",t.outlineWidthFactor),i.assignTexture("outlineWidthMultiplyTexture",t.outlineWidthMultiplyTexture,!1),i.assignColor("outlineColorFactor",t.outlineColorFactor),i.assignPrimitive("outlineLightingMixFactor",t.outlineLightingMixFactor),i.assignTexture("uvAnimationMaskTexture",t.uvAnimationMaskTexture,!1),i.assignPrimitive("uvAnimationScrollXSpeedFactor",t.uvAnimationScrollXSpeedFactor),i.assignPrimitive("uvAnimationScrollYSpeedFactor",t.uvAnimationScrollYSpeedFactor),i.assignPrimitive("uvAnimationRotationSpeedFactor",t.uvAnimationRotationSpeedFactor),i.assignPrimitive("v0CompatShade",this.v0CompatShade),i.assignPrimitive("debugMode",this.debugMode),yield i.pending})}_setupPrimitive(t,e){const n=this._getMToonExtension(e);if(n){const i=this._parseRenderOrder(n);t.renderOrder=i+this.renderOrderOffset,this._generateOutline(t),this._addToMaterialSet(t);return}}_shouldGenerateOutline(t){return typeof t.outlineWidthMode=="string"&&t.outlineWidthMode!=="none"&&typeof t.outlineWidthFactor=="number"&&t.outlineWidthFactor>0}_generateOutline(t){const e=t.material;if(!(e instanceof $M)||!this._shouldGenerateOutline(e))return;t.material=[e];const n=e.clone();n.name+=" (Outline)",n.isOutline=!0,n.side=GM,t.material.push(n);const i=t.geometry,s=i.index?i.index.count:i.attributes.position.count/3;i.addGroup(0,s,0),i.addGroup(0,s,1)}_addToMaterialSet(t){const e=t.material,n=new Set;Array.isArray(e)?e.forEach(i=>n.add(i)):n.add(e);for(const i of n)this._mToonMaterialSet.add(i)}_parseRenderOrder(t){var e;return(t.transparentWithZWrite?0:19)+((e=t.renderQueueOffsetNumber)!=null?e:0)}};Qw.EXTENSION_NAME="VRMC_materials_mtoon";var yL=Qw,vL=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),Zw=class dp{get name(){return dp.EXTENSION_NAME}constructor(t){this.parser=t}extendMaterialParams(t,e){return vL(this,null,function*(){const n=this._getHDREmissiveMultiplierExtension(t);if(n==null)return;console.warn("VRMMaterialsHDREmissiveMultiplierLoaderPlugin: `VRMC_materials_hdr_emissiveMultiplier` is archived. Use `KHR_materials_emissive_strength` instead.");const i=n.emissiveMultiplier;e.emissiveIntensity=i})}_getHDREmissiveMultiplierExtension(t){var e,n;const o=(e=this.parser.json.materials)==null?void 0:e[t];if(o==null){console.warn(`VRMMaterialsHDREmissiveMultiplierLoaderPlugin: Attempt to use materials[${t}] of glTF but the material doesn't exist`);return}const a=(n=o.extensions)==null?void 0:n[dp.EXTENSION_NAME];if(a!=null)return a}};Zw.EXTENSION_NAME="VRMC_materials_hdr_emissiveMultiplier";var _L=Zw,bL=Object.defineProperty,xL=Object.defineProperties,wL=Object.getOwnPropertyDescriptors,Pv=Object.getOwnPropertySymbols,SL=Object.prototype.hasOwnProperty,TL=Object.prototype.propertyIsEnumerable,Rv=(r,t,e)=>t in r?bL(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,An=(r,t)=>{for(var e in t||(t={}))SL.call(t,e)&&Rv(r,e,t[e]);if(Pv)for(var e of Pv(t))TL.call(t,e)&&Rv(r,e,t[e]);return r},Fv=(r,t)=>xL(r,wL(t)),IL=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())});function oo(r){return Math.pow(r,2.2)}var ML=class{get name(){return"VRMMaterialsV0CompatPlugin"}constructor(r){var t;this.parser=r,this._renderQueueMapTransparent=new Map,this._renderQueueMapTransparentZWrite=new Map;const e=this.parser.json;e.extensionsUsed=(t=e.extensionsUsed)!=null?t:[],e.extensionsUsed.indexOf("KHR_texture_transform")===-1&&e.extensionsUsed.push("KHR_texture_transform")}beforeRoot(){return IL(this,null,function*(){var r;const t=this.parser.json,e=(r=t.extensions)==null?void 0:r.VRM,n=e==null?void 0:e.materialProperties;n&&(this._populateRenderQueueMap(n),n.forEach((i,s)=>{var o,a;const l=(o=t.materials)==null?void 0:o[s];if(l==null){console.warn(`VRMMaterialsV0CompatPlugin: Attempt to use materials[${s}] of glTF but the material doesn't exist`);return}if(i.shader==="VRM/MToon"){const u=this._parseV0MToonProperties(i,l);t.materials[s]=u}else if((a=i.shader)!=null&&a.startsWith("VRM/Unlit")){const u=this._parseV0UnlitProperties(i,l);t.materials[s]=u}else i.shader==="VRM_USE_GLTFSHADER"||console.warn(`VRMMaterialsV0CompatPlugin: Unknown shader: ${i.shader}`)}))})}_parseV0MToonProperties(r,t){var e,n,i,s,o,a,l,u,c,h,f,d,m,g,p,y,v,S,T,_,M,x,N,D,j,it,I,Q,w,nt,P,C,R,U,k,A,O,$,tt,et,yt,_t,ct,xt,bt,At,se,de,b,K,Z,B,L,q,ot;const at=(n=(e=r.keywordMap)==null?void 0:e._ALPHABLEND_ON)!=null?n:!1,ht=((i=r.floatProperties)==null?void 0:i._ZWrite)===1&&at,St=this._v0ParseRenderQueue(r),pt=(o=(s=r.keywordMap)==null?void 0:s._ALPHATEST_ON)!=null?o:!1,Ot=at?"BLEND":pt?"MASK":"OPAQUE",_e=pt?(l=(a=r.floatProperties)==null?void 0:a._Cutoff)!=null?l:.5:void 0,sr=((c=(u=r.floatProperties)==null?void 0:u._CullMode)!=null?c:2)===0,fr=this._portTextureTransform(r),vr=((f=(h=r.vectorProperties)==null?void 0:h._Color)!=null?f:[1,1,1,1]).map((kl,Ul)=>Ul===3?kl:oo(kl)),gn=(d=r.textureProperties)==null?void 0:d._MainTex,Ce=gn!=null?{index:gn,extensions:An({},fr)}:void 0,In=(g=(m=r.floatProperties)==null?void 0:m._BumpScale)!=null?g:1,Ei=(p=r.textureProperties)==null?void 0:p._BumpMap,Fr=Ei!=null?{index:Ei,scale:In,extensions:An({},fr)}:void 0,Ai=((v=(y=r.vectorProperties)==null?void 0:y._EmissionColor)!=null?v:[0,0,0,1]).map(oo),is=(S=r.textureProperties)==null?void 0:S._EmissionMap,ua=is!=null?{index:is,extensions:An({},fr)}:void 0,Xr=((_=(T=r.vectorProperties)==null?void 0:T._ShadeColor)!=null?_:[.97,.81,.86,1]).map(oo),ss=(M=r.textureProperties)==null?void 0:M._ShadeTexture,ni=ss!=null?{index:ss,extensions:An({},fr)}:void 0;let Yr=(N=(x=r.floatProperties)==null?void 0:x._ShadeShift)!=null?N:0,Js=(j=(D=r.floatProperties)==null?void 0:D._ShadeToony)!=null?j:.9;Js=Be.lerp(Js,1,.5+.5*Yr),Yr=-Yr-(1-Js);const Fl=(I=(it=r.floatProperties)==null?void 0:it._IndirectLightIntensity)!=null?I:.1,ch=Fl?1-Fl:void 0,ca=(Q=r.textureProperties)==null?void 0:Q._SphereAdd,hh=ca!=null?[1,1,1]:void 0,dh=ca!=null?{index:ca}:void 0,fh=(nt=(w=r.floatProperties)==null?void 0:w._RimLightingMix)!=null?nt:0,Ll=(P=r.textureProperties)==null?void 0:P._RimTexture,ph=Ll!=null?{index:Ll,extensions:An({},fr)}:void 0,mh=((R=(C=r.vectorProperties)==null?void 0:C._RimColor)!=null?R:[0,0,0,1]).map(oo),Dl=(k=(U=r.floatProperties)==null?void 0:U._RimFresnelPower)!=null?k:1,gh=(O=(A=r.floatProperties)==null?void 0:A._RimLift)!=null?O:0,yh=["none","worldCoordinates","screenCoordinates"][(tt=($=r.floatProperties)==null?void 0:$._OutlineWidthMode)!=null?tt:0];let ha=(yt=(et=r.floatProperties)==null?void 0:et._OutlineWidth)!=null?yt:0;ha=.01*ha;const Nl=(_t=r.textureProperties)==null?void 0:_t._OutlineWidthTexture,vh=Nl!=null?{index:Nl,extensions:An({},fr)}:void 0,_h=((xt=(ct=r.vectorProperties)==null?void 0:ct._OutlineColor)!=null?xt:[0,0,0]).map(oo),bh=((At=(bt=r.floatProperties)==null?void 0:bt._OutlineColorMode)!=null?At:0)===1?(de=(se=r.floatProperties)==null?void 0:se._OutlineLightingMix)!=null?de:1:0,Bl=(b=r.textureProperties)==null?void 0:b._UvAnimMaskTexture,xh=Bl!=null?{index:Bl,extensions:An({},fr)}:void 0,wh=(Z=(K=r.floatProperties)==null?void 0:K._UvAnimScrollX)!=null?Z:0;let to=(L=(B=r.floatProperties)==null?void 0:B._UvAnimScrollY)!=null?L:0;to!=null&&(to=-to);const Sh=(ot=(q=r.floatProperties)==null?void 0:q._UvAnimRotation)!=null?ot:0,Th={specVersion:"1.0",transparentWithZWrite:ht,renderQueueOffsetNumber:St,shadeColorFactor:Xr,shadeMultiplyTexture:ni,shadingShiftFactor:Yr,shadingToonyFactor:Js,giEqualizationFactor:ch,matcapFactor:hh,matcapTexture:dh,rimLightingMixFactor:fh,rimMultiplyTexture:ph,parametricRimColorFactor:mh,parametricRimFresnelPowerFactor:Dl,parametricRimLiftFactor:gh,outlineWidthMode:yh,outlineWidthFactor:ha,outlineWidthMultiplyTexture:vh,outlineColorFactor:_h,outlineLightingMixFactor:bh,uvAnimationMaskTexture:xh,uvAnimationScrollXSpeedFactor:wh,uvAnimationScrollYSpeedFactor:to,uvAnimationRotationSpeedFactor:Sh};return Fv(An({},t),{pbrMetallicRoughness:{baseColorFactor:vr,baseColorTexture:Ce},normalTexture:Fr,emissiveTexture:ua,emissiveFactor:Ai,alphaMode:Ot,alphaCutoff:_e,doubleSided:sr,extensions:{VRMC_materials_mtoon:Th}})}_parseV0UnlitProperties(r,t){var e,n,i,s,o;const a=r.shader==="VRM/UnlitTransparentZWrite",l=r.shader==="VRM/UnlitTransparent"||a,u=this._v0ParseRenderQueue(r),c=r.shader==="VRM/UnlitCutout",h=l?"BLEND":c?"MASK":"OPAQUE",f=c?(n=(e=r.floatProperties)==null?void 0:e._Cutoff)!=null?n:.5:void 0,d=this._portTextureTransform(r),m=((s=(i=r.vectorProperties)==null?void 0:i._Color)!=null?s:[1,1,1,1]).map(oo),g=(o=r.textureProperties)==null?void 0:o._MainTex,p=g!=null?{index:g,extensions:An({},d)}:void 0,y={specVersion:"1.0",transparentWithZWrite:a,renderQueueOffsetNumber:u,shadeColorFactor:m,shadeMultiplyTexture:p};return Fv(An({},t),{pbrMetallicRoughness:{baseColorFactor:m,baseColorTexture:p},alphaMode:h,alphaCutoff:f,extensions:{VRMC_materials_mtoon:y}})}_portTextureTransform(r){var t,e,n,i,s;const o=(t=r.vectorProperties)==null?void 0:t._MainTex;if(o==null)return{};const a=[(e=o==null?void 0:o[0])!=null?e:0,(n=o==null?void 0:o[1])!=null?n:0],l=[(i=o==null?void 0:o[2])!=null?i:1,(s=o==null?void 0:o[3])!=null?s:1];return a[1]=1-l[1]-a[1],{KHR_texture_transform:{offset:a,scale:l}}}_v0ParseRenderQueue(r){var t,e;const n=r.shader==="VRM/UnlitTransparentZWrite",i=((t=r.keywordMap)==null?void 0:t._ALPHABLEND_ON)!=null||r.shader==="VRM/UnlitTransparent"||n,s=((e=r.floatProperties)==null?void 0:e._ZWrite)===1||n;let o=0;if(i){const a=r.renderQueue;a!=null&&(s?o=this._renderQueueMapTransparentZWrite.get(a):o=this._renderQueueMapTransparent.get(a))}return o}_populateRenderQueueMap(r){const t=new Set,e=new Set;r.forEach(n=>{var i,s;const o=n.shader==="VRM/UnlitTransparentZWrite",a=((i=n.keywordMap)==null?void 0:i._ALPHABLEND_ON)!=null||n.shader==="VRM/UnlitTransparent"||o,l=((s=n.floatProperties)==null?void 0:s._ZWrite)===1||o;if(a){const u=n.renderQueue;u!=null&&(l?e.add(u):t.add(u))}}),t.size>10&&console.warn(`VRMMaterialsV0CompatPlugin: This VRM uses ${t.size} render queues for Transparent materials while VRM 1.0 only supports up to 10 render queues. The model might not be rendered correctly.`),e.size>10&&console.warn(`VRMMaterialsV0CompatPlugin: This VRM uses ${e.size} render queues for TransparentZWrite materials while VRM 1.0 only supports up to 10 render queues. The model might not be rendered correctly.`),Array.from(t).sort().forEach((n,i)=>{const s=Math.min(Math.max(i-t.size+1,-9),0);this._renderQueueMapTransparent.set(n,s)}),Array.from(e).sort().forEach((n,i)=>{const s=Math.min(Math.max(i,0),9);this._renderQueueMapTransparentZWrite.set(n,s)})}},Lv=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),Oi=new gt,Od=class extends ea{constructor(r){super(),this._attrPosition=new cr(new Float32Array([0,0,0,0,0,0]),3),this._attrPosition.setUsage(qM);const t=new Ki;t.setAttribute("position",this._attrPosition);const e=new Bc({color:16711935,depthTest:!1,depthWrite:!1});this._line=new QM(t,e),this.add(this._line),this.constraint=r}updateMatrixWorld(r){Oi.setFromMatrixPosition(this.constraint.destination.matrixWorld),this._attrPosition.setXYZ(0,Oi.x,Oi.y,Oi.z),this.constraint.source&&Oi.setFromMatrixPosition(this.constraint.source.matrixWorld),this._attrPosition.setXYZ(1,Oi.x,Oi.y,Oi.z),this._attrPosition.needsUpdate=!0,super.updateMatrixWorld(r)}};function Dv(r,t){return t.set(r.elements[12],r.elements[13],r.elements[14])}var EL=new gt,AL=new gt;function CL(r,t){return r.decompose(EL,t,AL),t}function Xu(r){return r.invert?r.invert():r.inverse(),r}var Tm=class{constructor(r,t){this.destination=r,this.source=t,this.weight=1}},OL=new gt,PL=new gt,RL=new gt,FL=new oe,LL=new oe,DL=new oe,NL=class extends Tm{get aimAxis(){return this._aimAxis}set aimAxis(r){this._aimAxis=r,this._v3AimAxis.set(r==="PositiveX"?1:r==="NegativeX"?-1:0,r==="PositiveY"?1:r==="NegativeY"?-1:0,r==="PositiveZ"?1:r==="NegativeZ"?-1:0)}get dependencies(){const r=new Set([this.source]);return this.destination.parent&&r.add(this.destination.parent),r}constructor(r,t){super(r,t),this._aimAxis="PositiveX",this._v3AimAxis=new gt(1,0,0),this._dstRestQuat=new oe}setInitState(){this._dstRestQuat.copy(this.destination.quaternion)}update(){this.destination.updateWorldMatrix(!0,!1),this.source.updateWorldMatrix(!0,!1);const r=FL.identity(),t=LL.identity();this.destination.parent&&(CL(this.destination.parent.matrixWorld,r),Xu(t.copy(r)));const e=OL.copy(this._v3AimAxis).applyQuaternion(this._dstRestQuat).applyQuaternion(r),n=Dv(this.source.matrixWorld,PL).sub(Dv(this.destination.matrixWorld,RL)).normalize(),i=DL.setFromUnitVectors(e,n).premultiply(t).multiply(r).multiply(this._dstRestQuat);this.destination.quaternion.copy(this._dstRestQuat).slerp(i,this.weight)}};function BL(r,t){const e=[r];let n=r.parent;for(;n!==null;)e.unshift(n),n=n.parent;e.forEach(i=>{t(i)})}var kL=class{constructor(){this._constraints=new Set,this._objectConstraintsMap=new Map}get constraints(){return this._constraints}addConstraint(r){this._constraints.add(r);let t=this._objectConstraintsMap.get(r.destination);t==null&&(t=new Set,this._objectConstraintsMap.set(r.destination,t)),t.add(r)}deleteConstraint(r){this._constraints.delete(r),this._objectConstraintsMap.get(r.destination).delete(r)}setInitState(){const r=new Set,t=new Set;for(const e of this._constraints)this._processConstraint(e,r,t,n=>n.setInitState())}update(){const r=new Set,t=new Set;for(const e of this._constraints)this._processConstraint(e,r,t,n=>n.update())}_processConstraint(r,t,e,n){if(e.has(r))return;if(t.has(r))throw new Error("VRMNodeConstraintManager: Circular dependency detected while updating constraints");t.add(r);const i=r.dependencies;for(const s of i)BL(s,o=>{const a=this._objectConstraintsMap.get(o);if(a)for(const l of a)this._processConstraint(l,t,e,n)});n(r),e.add(r)}},UL=new oe,zL=new oe,VL=class extends Tm{get dependencies(){return new Set([this.source])}constructor(r,t){super(r,t),this._dstRestQuat=new oe,this._invSrcRestQuat=new oe}setInitState(){this._dstRestQuat.copy(this.destination.quaternion),Xu(this._invSrcRestQuat.copy(this.source.quaternion))}update(){const r=UL.copy(this._invSrcRestQuat).multiply(this.source.quaternion),t=zL.copy(this._dstRestQuat).multiply(r);this.destination.quaternion.copy(this._dstRestQuat).slerp(t,this.weight)}},jL=new gt,$L=new oe,GL=new oe,WL=class extends Tm{get rollAxis(){return this._rollAxis}set rollAxis(r){this._rollAxis=r,this._v3RollAxis.set(r==="X"?1:0,r==="Y"?1:0,r==="Z"?1:0)}get dependencies(){return new Set([this.source])}constructor(r,t){super(r,t),this._rollAxis="X",this._v3RollAxis=new gt(1,0,0),this._dstRestQuat=new oe,this._invDstRestQuat=new oe,this._invSrcRestQuatMulDstRestQuat=new oe}setInitState(){this._dstRestQuat.copy(this.destination.quaternion),Xu(this._invDstRestQuat.copy(this._dstRestQuat)),Xu(this._invSrcRestQuatMulDstRestQuat.copy(this.source.quaternion)).multiply(this._dstRestQuat)}update(){const r=$L.copy(this._invDstRestQuat).multiply(this.source.quaternion).multiply(this._invSrcRestQuatMulDstRestQuat),t=jL.copy(this._v3RollAxis).applyQuaternion(r),n=GL.setFromUnitVectors(t,this._v3RollAxis).premultiply(this._dstRestQuat).multiply(r);this.destination.quaternion.copy(this._dstRestQuat).slerp(n,this.weight)}},HL=new Set(["1.0","1.0-beta"]),Kw=class Da{get name(){return Da.EXTENSION_NAME}constructor(t,e){this.parser=t,this.helperRoot=e==null?void 0:e.helperRoot}afterRoot(t){return Lv(this,null,function*(){t.userData.vrmNodeConstraintManager=yield this._import(t)})}_import(t){return Lv(this,null,function*(){var e;const n=this.parser.json;if(!(((e=n.extensionsUsed)==null?void 0:e.indexOf(Da.EXTENSION_NAME))!==-1))return null;const s=new kL,o=yield this.parser.getDependencies("node");return o.forEach((a,l)=>{var u;const c=n.nodes[l],h=(u=c==null?void 0:c.extensions)==null?void 0:u[Da.EXTENSION_NAME];if(h==null)return;const f=h.specVersion;if(!HL.has(f)){console.warn(`VRMNodeConstraintLoaderPlugin: Unknown ${Da.EXTENSION_NAME} specVersion "${f}"`);return}const d=h.constraint;if(d.roll!=null){const m=this._importRollConstraint(a,o,d.roll);s.addConstraint(m)}else if(d.aim!=null){const m=this._importAimConstraint(a,o,d.aim);s.addConstraint(m)}else if(d.rotation!=null){const m=this._importRotationConstraint(a,o,d.rotation);s.addConstraint(m)}}),t.scene.updateMatrixWorld(),s.setInitState(),s})}_importRollConstraint(t,e,n){const{source:i,rollAxis:s,weight:o}=n,a=e[i],l=new WL(t,a);if(s!=null&&(l.rollAxis=s),o!=null&&(l.weight=o),this.helperRoot){const u=new Od(l);this.helperRoot.add(u)}return l}_importAimConstraint(t,e,n){const{source:i,aimAxis:s,weight:o}=n,a=e[i],l=new NL(t,a);if(s!=null&&(l.aimAxis=s),o!=null&&(l.weight=o),this.helperRoot){const u=new Od(l);this.helperRoot.add(u)}return l}_importRotationConstraint(t,e,n){const{source:i,weight:s}=n,o=e[i],a=new VL(t,o);if(s!=null&&(a.weight=s),this.helperRoot){const l=new Od(a);this.helperRoot.add(l)}return a}};Kw.EXTENSION_NAME="VRMC_node_constraint";var XL=Kw,lu=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),Im=class{},Pd=new gt,fs=new gt,Jw=class extends Im{get type(){return"capsule"}constructor(r){var t,e,n,i;super(),this.offset=(t=r==null?void 0:r.offset)!=null?t:new gt(0,0,0),this.tail=(e=r==null?void 0:r.tail)!=null?e:new gt(0,0,0),this.radius=(n=r==null?void 0:r.radius)!=null?n:0,this.inside=(i=r==null?void 0:r.inside)!=null?i:!1}calculateCollision(r,t,e,n){Pd.setFromMatrixPosition(r),fs.subVectors(this.tail,this.offset).applyMatrix4(r),fs.sub(Pd);const i=fs.lengthSq();n.copy(t).sub(Pd);const s=fs.dot(n);s<=0||(i<=s||fs.multiplyScalar(s/i),n.sub(fs));const o=n.length(),a=this.inside?this.radius-e-o:o-e-this.radius;return a<0&&(n.multiplyScalar(1/o),this.inside&&n.negate()),a}},Rd=new gt,Nv=new On,t1=class extends Im{get type(){return"plane"}constructor(r){var t,e;super(),this.offset=(t=r==null?void 0:r.offset)!=null?t:new gt(0,0,0),this.normal=(e=r==null?void 0:r.normal)!=null?e:new gt(0,0,1)}calculateCollision(r,t,e,n){n.setFromMatrixPosition(r),n.negate().add(t),Nv.getNormalMatrix(r),Rd.copy(this.normal).applyNormalMatrix(Nv).normalize();const i=n.dot(Rd)-e;return n.copy(Rd),i}},YL=new gt,e1=class extends Im{get type(){return"sphere"}constructor(r){var t,e,n;super(),this.offset=(t=r==null?void 0:r.offset)!=null?t:new gt(0,0,0),this.radius=(e=r==null?void 0:r.radius)!=null?e:0,this.inside=(n=r==null?void 0:r.inside)!=null?n:!1}calculateCollision(r,t,e,n){n.subVectors(t,YL.setFromMatrixPosition(r));const i=n.length(),s=this.inside?this.radius-e-i:i-e-this.radius;return s<0&&(n.multiplyScalar(1/i),this.inside&&n.negate()),s}},Cn=new gt,qL=class extends Ki{constructor(r){super(),this.worldScale=1,this._currentRadius=0,this._currentOffset=new gt,this._currentTail=new gt,this._shape=r,this._attrPos=new cr(new Float32Array(396),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(264),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;const t=this._shape.radius/this.worldScale;this._currentRadius!==t&&(this._currentRadius=t,r=!0),this._currentOffset.equals(this._shape.offset)||(this._currentOffset.copy(this._shape.offset),r=!0);const e=Cn.copy(this._shape.tail).divideScalar(this.worldScale);this._currentTail.distanceToSquared(e)>1e-10&&(this._currentTail.copy(e),r=!0),r&&this._buildPosition()}_buildPosition(){Cn.copy(this._currentTail).sub(this._currentOffset);const r=Cn.length()/this._currentRadius;for(let n=0;n<=16;n++){const i=n/16*Math.PI;this._attrPos.setXYZ(n,-Math.sin(i),-Math.cos(i),0),this._attrPos.setXYZ(17+n,r+Math.sin(i),Math.cos(i),0),this._attrPos.setXYZ(34+n,-Math.sin(i),0,-Math.cos(i)),this._attrPos.setXYZ(51+n,r+Math.sin(i),0,Math.cos(i))}for(let n=0;n<32;n++){const i=n/16*Math.PI;this._attrPos.setXYZ(68+n,0,Math.sin(i),Math.cos(i)),this._attrPos.setXYZ(100+n,r,Math.sin(i),Math.cos(i))}const t=Math.atan2(Cn.y,Math.sqrt(Cn.x*Cn.x+Cn.z*Cn.z)),e=-Math.atan2(Cn.z,Cn.x);this.rotateZ(t),this.rotateY(e),this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentOffset.x,this._currentOffset.y,this._currentOffset.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<34;r++){const t=(r+1)%34;this._attrIndex.setXY(r*2,r,t),this._attrIndex.setXY(68+r*2,34+r,34+t)}for(let r=0;r<32;r++){const t=(r+1)%32;this._attrIndex.setXY(136+r*2,68+r,68+t),this._attrIndex.setXY(200+r*2,100+r,100+t)}this._attrIndex.needsUpdate=!0}},QL=class extends Ki{constructor(r){super(),this.worldScale=1,this._currentOffset=new gt,this._currentNormal=new gt,this._shape=r,this._attrPos=new cr(new Float32Array(6*3),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(10),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;this._currentOffset.equals(this._shape.offset)||(this._currentOffset.copy(this._shape.offset),r=!0),this._currentNormal.equals(this._shape.normal)||(this._currentNormal.copy(this._shape.normal),r=!0),r&&this._buildPosition()}_buildPosition(){this._attrPos.setXYZ(0,-.5,-.5,0),this._attrPos.setXYZ(1,.5,-.5,0),this._attrPos.setXYZ(2,.5,.5,0),this._attrPos.setXYZ(3,-.5,.5,0),this._attrPos.setXYZ(4,0,0,0),this._attrPos.setXYZ(5,0,0,.25),this.translate(this._currentOffset.x,this._currentOffset.y,this._currentOffset.z),this.lookAt(this._currentNormal),this._attrPos.needsUpdate=!0}_buildIndex(){this._attrIndex.setXY(0,0,1),this._attrIndex.setXY(2,1,2),this._attrIndex.setXY(4,2,3),this._attrIndex.setXY(6,3,0),this._attrIndex.setXY(8,4,5),this._attrIndex.needsUpdate=!0}},ZL=class extends Ki{constructor(r){super(),this.worldScale=1,this._currentRadius=0,this._currentOffset=new gt,this._shape=r,this._attrPos=new cr(new Float32Array(32*3*3),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(64*3),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;const t=this._shape.radius/this.worldScale;this._currentRadius!==t&&(this._currentRadius=t,r=!0),this._currentOffset.equals(this._shape.offset)||(this._currentOffset.copy(this._shape.offset),r=!0),r&&this._buildPosition()}_buildPosition(){for(let r=0;r<32;r++){const t=r/16*Math.PI;this._attrPos.setXYZ(r,Math.cos(t),Math.sin(t),0),this._attrPos.setXYZ(32+r,0,Math.cos(t),Math.sin(t)),this._attrPos.setXYZ(64+r,Math.sin(t),0,Math.cos(t))}this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentOffset.x,this._currentOffset.y,this._currentOffset.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<32;r++){const t=(r+1)%32;this._attrIndex.setXY(r*2,r,t),this._attrIndex.setXY(64+r*2,32+r,32+t),this._attrIndex.setXY(128+r*2,64+r,64+t)}this._attrIndex.needsUpdate=!0}},KL=new gt,Fd=class extends ea{constructor(r){if(super(),this.matrixAutoUpdate=!1,this.collider=r,this.collider.shape instanceof e1)this._geometry=new ZL(this.collider.shape);else if(this.collider.shape instanceof Jw)this._geometry=new qL(this.collider.shape);else if(this.collider.shape instanceof t1)this._geometry=new QL(this.collider.shape);else throw new Error("VRMSpringBoneColliderHelper: Unknown collider shape type detected");const t=new Bc({color:16711935,depthTest:!1,depthWrite:!1});this._line=new Yp(this._geometry,t),this.add(this._line)}dispose(){this._geometry.dispose()}updateMatrixWorld(r){this.collider.updateWorldMatrix(!0,!1),this.matrix.copy(this.collider.matrixWorld);const t=this.matrix.elements;this._geometry.worldScale=KL.set(t[0],t[1],t[2]).length(),this._geometry.update(),super.updateMatrixWorld(r)}},JL=class extends Ki{constructor(r){super(),this.worldScale=1,this._currentRadius=0,this._currentTail=new gt,this._springBone=r,this._attrPos=new cr(new Float32Array(294),3),this.setAttribute("position",this._attrPos),this._attrIndex=new cr(new Uint16Array(194),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let r=!1;const t=this._springBone.settings.hitRadius/this.worldScale;this._currentRadius!==t&&(this._currentRadius=t,r=!0),this._currentTail.equals(this._springBone.initialLocalChildPosition)||(this._currentTail.copy(this._springBone.initialLocalChildPosition),r=!0),r&&this._buildPosition()}_buildPosition(){for(let r=0;r<32;r++){const t=r/16*Math.PI;this._attrPos.setXYZ(r,Math.cos(t),Math.sin(t),0),this._attrPos.setXYZ(32+r,0,Math.cos(t),Math.sin(t)),this._attrPos.setXYZ(64+r,Math.sin(t),0,Math.cos(t))}this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.setXYZ(96,0,0,0),this._attrPos.setXYZ(97,this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let r=0;r<32;r++){const t=(r+1)%32;this._attrIndex.setXY(r*2,r,t),this._attrIndex.setXY(64+r*2,32+r,32+t),this._attrIndex.setXY(128+r*2,64+r,64+t)}this._attrIndex.setXY(192,96,97),this._attrIndex.needsUpdate=!0}},tD=new gt,eD=class extends ea{constructor(r){super(),this.matrixAutoUpdate=!1,this.springBone=r,this._geometry=new JL(this.springBone);const t=new Bc({color:16776960,depthTest:!1,depthWrite:!1});this._line=new Yp(this._geometry,t),this.add(this._line)}dispose(){this._geometry.dispose()}updateMatrixWorld(r){this.springBone.bone.updateWorldMatrix(!0,!1),this.matrix.copy(this.springBone.bone.matrixWorld);const t=this.matrix.elements;this._geometry.worldScale=tD.set(t[0],t[1],t[2]).length(),this._geometry.update(),super.updateMatrixWorld(r)}},Ld=class extends Ja{constructor(r){super(),this.colliderMatrix=new ti,this.shape=r}updateWorldMatrix(r,t){super.updateWorldMatrix(r,t),rD(this.colliderMatrix,this.matrixWorld,this.shape.offset)}};function rD(r,t,e){const n=t.elements;r.copy(t),e&&(r.elements[12]=n[0]*e.x+n[4]*e.y+n[8]*e.z+n[12],r.elements[13]=n[1]*e.x+n[5]*e.y+n[9]*e.z+n[13],r.elements[14]=n[2]*e.x+n[6]*e.y+n[10]*e.z+n[14])}var nD=new ti;function iD(r){return r.invert?r.invert():r.getInverse(nD.copy(r)),r}var sD=class{constructor(r){this._inverseCache=new ti,this._shouldUpdateInverse=!0,this.matrix=r;const t={set:(e,n,i)=>(this._shouldUpdateInverse=!0,e[n]=i,!0)};this._originalElements=r.elements,r.elements=new Proxy(r.elements,t)}get inverse(){return this._shouldUpdateInverse&&(iD(this._inverseCache.copy(this.matrix)),this._shouldUpdateInverse=!1),this._inverseCache}revert(){this.matrix.elements=this._originalElements}},Dd=new ti,ao=new gt,Sa=new gt,Ta=new gt,Ia=new gt,oD=new ti,aD=class{constructor(r,t,e={},n=[]){this._currentTail=new gt,this._prevTail=new gt,this._boneAxis=new gt,this._worldSpaceBoneLength=0,this._center=null,this._initialLocalMatrix=new ti,this._initialLocalRotation=new oe,this._initialLocalChildPosition=new gt;var i,s,o,a,l,u;this.bone=r,this.bone.matrixAutoUpdate=!1,this.child=t,this.settings={hitRadius:(i=e.hitRadius)!=null?i:0,stiffness:(s=e.stiffness)!=null?s:1,gravityPower:(o=e.gravityPower)!=null?o:0,gravityDir:(l=(a=e.gravityDir)==null?void 0:a.clone())!=null?l:new gt(0,-1,0),dragForce:(u=e.dragForce)!=null?u:.4},this.colliderGroups=n}get dependencies(){const r=new Set,t=this.bone.parent;t&&r.add(t);for(let e=0;e{t(i)})}function fp(r,t){r.children.forEach(e=>{t(e)||fp(e,t)})}function uD(r){var t;const e=new Map;for(const n of r){let i=n;do{const s=((t=e.get(i))!=null?t:0)+1;if(s===r.size)return i;e.set(i,s),i=i.parent}while(i!==null)}return null}var Bv=class{constructor(){this._joints=new Set,this._sortedJoints=[],this._hasWarnedCircularDependency=!1,this._ancestors=[],this._objectSpringBonesMap=new Map,this._isSortedJointsDirty=!1,this._relevantChildrenUpdated=this._relevantChildrenUpdated.bind(this)}get joints(){return this._joints}get springBones(){return console.warn("VRMSpringBoneManager: springBones is deprecated. use joints instead."),this._joints}get colliderGroups(){const r=new Set;return this._joints.forEach(t=>{t.colliderGroups.forEach(e=>{r.add(e)})}),Array.from(r)}get colliders(){const r=new Set;return this.colliderGroups.forEach(t=>{t.colliders.forEach(e=>{r.add(e)})}),Array.from(r)}addJoint(r){this._joints.add(r);let t=this._objectSpringBonesMap.get(r.bone);t==null&&(t=new Set,this._objectSpringBonesMap.set(r.bone,t)),t.add(r),this._isSortedJointsDirty=!0}addSpringBone(r){console.warn("VRMSpringBoneManager: addSpringBone() is deprecated. use addJoint() instead."),this.addJoint(r)}deleteJoint(r){this._joints.delete(r),this._objectSpringBonesMap.get(r.bone).delete(r),this._isSortedJointsDirty=!0}deleteSpringBone(r){console.warn("VRMSpringBoneManager: deleteSpringBone() is deprecated. use deleteJoint() instead."),this.deleteJoint(r)}setInitState(){this._sortJoints();for(let r=0;r{var o,a;return((a=(o=this._objectSpringBonesMap.get(s))==null?void 0:o.size)!=null?a:0)>0?!0:(this._ancestors.push(s),!1)})),this._isSortedJointsDirty=!1}_insertJointSort(r,t,e,n,i){if(e.has(r))return;if(t.has(r)){this._hasWarnedCircularDependency||(console.warn("VRMSpringBoneManager: Circular dependency detected"),this._hasWarnedCircularDependency=!0);return}t.add(r);const s=r.dependencies;for(const o of s){let a=!1,l=null;lD(o,u=>{const c=this._objectSpringBonesMap.get(u);if(c)for(const h of c)a=!0,this._insertJointSort(h,t,e,n,i);else a||(l=u)}),l&&i.add(l)}n.push(r),e.add(r)}_relevantChildrenUpdated(r){var t,e;return((e=(t=this._objectSpringBonesMap.get(r))==null?void 0:t.size)!=null?e:0)>0?!0:(r.updateWorldMatrix(!1,!1),!1)}},kv="VRMC_springBone_extended_collider",cD=new Set(["1.0","1.0-beta"]),hD=new Set(["1.0"]),r1=class po{get name(){return po.EXTENSION_NAME}constructor(t,e){var n;this.parser=t,this.jointHelperRoot=e==null?void 0:e.jointHelperRoot,this.colliderHelperRoot=e==null?void 0:e.colliderHelperRoot,this.useExtendedColliders=(n=e==null?void 0:e.useExtendedColliders)!=null?n:!0}afterRoot(t){return lu(this,null,function*(){t.userData.vrmSpringBoneManager=yield this._import(t)})}_import(t){return lu(this,null,function*(){const e=yield this._v1Import(t);if(e!=null)return e;const n=yield this._v0Import(t);return n??null})}_v1Import(t){return lu(this,null,function*(){var e,n,i,s,o;const a=t.parser.json;if(!(((e=a.extensionsUsed)==null?void 0:e.indexOf(po.EXTENSION_NAME))!==-1))return null;const u=new Bv,c=yield t.parser.getDependencies("node"),h=(n=a.extensions)==null?void 0:n[po.EXTENSION_NAME];if(!h)return null;const f=h.specVersion;if(!cD.has(f))return console.warn(`VRMSpringBoneLoaderPlugin: Unknown ${po.EXTENSION_NAME} specVersion "${f}"`),null;const d=(i=h.colliders)==null?void 0:i.map((g,p)=>{var y,v,S,T,_,M,x,N,D,j,it,I,Q,w,nt;const P=c[g.node];if(P==null)return console.warn(`VRMSpringBoneLoaderPlugin: The collider #${p} attempted to use the node #${g.node} but not found`),null;const C=g.shape,R=(y=g.extensions)==null?void 0:y[kv];if(this.useExtendedColliders&&R!=null){const U=R.specVersion;if(!hD.has(U))console.warn(`VRMSpringBoneLoaderPlugin: Unknown ${kv} specVersion "${U}". Fallbacking to the ${po.EXTENSION_NAME} definition`);else{const k=R.shape;if(k.sphere)return this._importSphereCollider(P,{offset:new gt().fromArray((v=k.sphere.offset)!=null?v:[0,0,0]),radius:(S=k.sphere.radius)!=null?S:0,inside:(T=k.sphere.inside)!=null?T:!1});if(k.capsule)return this._importCapsuleCollider(P,{offset:new gt().fromArray((_=k.capsule.offset)!=null?_:[0,0,0]),radius:(M=k.capsule.radius)!=null?M:0,tail:new gt().fromArray((x=k.capsule.tail)!=null?x:[0,0,0]),inside:(N=k.capsule.inside)!=null?N:!1});if(k.plane)return this._importPlaneCollider(P,{offset:new gt().fromArray((D=k.plane.offset)!=null?D:[0,0,0]),normal:new gt().fromArray((j=k.plane.normal)!=null?j:[0,0,1])})}}if(C.sphere)return this._importSphereCollider(P,{offset:new gt().fromArray((it=C.sphere.offset)!=null?it:[0,0,0]),radius:(I=C.sphere.radius)!=null?I:0,inside:!1});if(C.capsule)return this._importCapsuleCollider(P,{offset:new gt().fromArray((Q=C.capsule.offset)!=null?Q:[0,0,0]),radius:(w=C.capsule.radius)!=null?w:0,tail:new gt().fromArray((nt=C.capsule.tail)!=null?nt:[0,0,0]),inside:!1});throw new Error(`VRMSpringBoneLoaderPlugin: The collider #${p} has no valid shape`)}),m=(s=h.colliderGroups)==null?void 0:s.map((g,p)=>{var y;return{colliders:((y=g.colliders)!=null?y:[]).flatMap(S=>{const T=d==null?void 0:d[S];return T??(console.warn(`VRMSpringBoneLoaderPlugin: The colliderGroup #${p} attempted to use a collider #${S} but not found`),[])}),name:g.name}});return(o=h.springs)==null||o.forEach((g,p)=>{var y;const v=g.joints,S=(y=g.colliderGroups)==null?void 0:y.map(M=>{const x=m==null?void 0:m[M];if(x==null)throw new Error(`VRMSpringBoneLoaderPlugin: The spring #${p} attempted to use a colliderGroup ${M} but not found`);return x}),T=g.center!=null?c[g.center]:void 0;let _;v.forEach(M=>{if(_){const x=_.node,N=c[x],D=M.node,j=c[D],it={hitRadius:_.hitRadius,dragForce:_.dragForce,gravityPower:_.gravityPower,stiffness:_.stiffness,gravityDir:_.gravityDir!=null?new gt().fromArray(_.gravityDir):void 0},I=this._importJoint(N,j,it,S);T&&(I.center=T),u.addJoint(I)}_=M})}),u.setInitState(),u})}_v0Import(t){return lu(this,null,function*(){var e,n,i;const s=t.parser.json;if(!(((e=s.extensionsUsed)==null?void 0:e.indexOf("VRM"))!==-1))return null;const a=(n=s.extensions)==null?void 0:n.VRM,l=a==null?void 0:a.secondaryAnimation;if(!l)return null;const u=l==null?void 0:l.boneGroups;if(!u)return null;const c=new Bv,h=yield t.parser.getDependencies("node"),f=(i=l.colliderGroups)==null?void 0:i.map(d=>{var m;const g=h[d.node];return{colliders:((m=d.colliders)!=null?m:[]).map((y,v)=>{var S,T,_;const M=new gt(0,0,0);return y.offset&&M.set((S=y.offset.x)!=null?S:0,(T=y.offset.y)!=null?T:0,y.offset.z?-y.offset.z:0),this._importSphereCollider(g,{offset:M,radius:(_=y.radius)!=null?_:0,inside:!1})})}});return u==null||u.forEach((d,m)=>{const g=d.bones;g&&g.forEach(p=>{var y,v,S,T;const _=h[p],M=new gt;d.gravityDir?M.set((y=d.gravityDir.x)!=null?y:0,(v=d.gravityDir.y)!=null?v:0,(S=d.gravityDir.z)!=null?S:0):M.set(0,-1,0);const x=d.center!=null?h[d.center]:void 0,N={hitRadius:d.hitRadius,dragForce:d.dragForce,gravityPower:d.gravityPower,stiffness:d.stiffiness,gravityDir:M},D=(T=d.colliderGroups)==null?void 0:T.map(j=>{const it=f==null?void 0:f[j];if(it==null)throw new Error(`VRMSpringBoneLoaderPlugin: The spring #${m} attempted to use a colliderGroup ${j} but not found`);return it});_.traverse(j=>{var it;const I=(it=j.children[0])!=null?it:null,Q=this._importJoint(j,I,N,D);x&&(Q.center=x),c.addJoint(Q)})})}),t.scene.updateMatrixWorld(),c.setInitState(),c})}_importJoint(t,e,n,i){const s=new aD(t,e,n,i);if(this.jointHelperRoot){const o=new eD(s);this.jointHelperRoot.add(o),o.renderOrder=this.jointHelperRoot.renderOrder}return s}_importSphereCollider(t,e){const n=new e1(e),i=new Ld(n);if(t.add(i),this.colliderHelperRoot){const s=new Fd(i);this.colliderHelperRoot.add(s),s.renderOrder=this.colliderHelperRoot.renderOrder}return i}_importCapsuleCollider(t,e){const n=new Jw(e),i=new Ld(n);if(t.add(i),this.colliderHelperRoot){const s=new Fd(i);this.colliderHelperRoot.add(s),s.renderOrder=this.colliderHelperRoot.renderOrder}return i}_importPlaneCollider(t,e){const n=new t1(e),i=new Ld(n);if(t.add(i),this.colliderHelperRoot){const s=new Fd(i);this.colliderHelperRoot.add(s),s.renderOrder=this.colliderHelperRoot.renderOrder}return i}};r1.EXTENSION_NAME="VRMC_springBone";var dD=r1,a8=class{get name(){return"VRMLoaderPlugin"}constructor(r,t){var e,n,i,s,o,a,l,u,c,h;this.parser=r;const f=t==null?void 0:t.helperRoot,d=t==null?void 0:t.autoUpdateHumanBones;this.expressionPlugin=(e=t==null?void 0:t.expressionPlugin)!=null?e:new CF(r),this.firstPersonPlugin=(n=t==null?void 0:t.firstPersonPlugin)!=null?n:new PF(r),this.humanoidPlugin=(i=t==null?void 0:t.humanoidPlugin)!=null?i:new kF(r,{helperRoot:f,autoUpdateHumanBones:d}),this.lookAtPlugin=(s=t==null?void 0:t.lookAtPlugin)!=null?s:new JF(r,{helperRoot:f}),this.metaPlugin=(o=t==null?void 0:t.metaPlugin)!=null?o:new rL(r),this.mtoonMaterialPlugin=(a=t==null?void 0:t.mtoonMaterialPlugin)!=null?a:new yL(r),this.materialsHDREmissiveMultiplierPlugin=(l=t==null?void 0:t.materialsHDREmissiveMultiplierPlugin)!=null?l:new _L(r),this.materialsV0CompatPlugin=(u=t==null?void 0:t.materialsV0CompatPlugin)!=null?u:new ML(r),this.springBonePlugin=(c=t==null?void 0:t.springBonePlugin)!=null?c:new dD(r,{colliderHelperRoot:f,jointHelperRoot:f}),this.nodeConstraintPlugin=(h=t==null?void 0:t.nodeConstraintPlugin)!=null?h:new XL(r,{helperRoot:f})}beforeRoot(){return su(this,null,function*(){yield this.materialsV0CompatPlugin.beforeRoot(),yield this.mtoonMaterialPlugin.beforeRoot()})}loadMesh(r){return su(this,null,function*(){return yield this.mtoonMaterialPlugin.loadMesh(r)})}getMaterialType(r){const t=this.mtoonMaterialPlugin.getMaterialType(r);return t??null}extendMaterialParams(r,t){return su(this,null,function*(){yield this.materialsHDREmissiveMultiplierPlugin.extendMaterialParams(r,t),yield this.mtoonMaterialPlugin.extendMaterialParams(r,t)})}afterRoot(r){return su(this,null,function*(){yield this.metaPlugin.afterRoot(r),yield this.humanoidPlugin.afterRoot(r),yield this.expressionPlugin.afterRoot(r),yield this.lookAtPlugin.afterRoot(r),yield this.firstPersonPlugin.afterRoot(r),yield this.springBonePlugin.afterRoot(r),yield this.nodeConstraintPlugin.afterRoot(r),yield this.mtoonMaterialPlugin.afterRoot(r);const t=r.userData.vrmMeta,e=r.userData.vrmHumanoid;if(t&&e){const n=new iL({scene:r.scene,expressionManager:r.userData.vrmExpressionManager,firstPerson:r.userData.vrmFirstPerson,humanoid:e,lookAt:r.userData.vrmLookAt,meta:t,materials:r.userData.vrmMToonMaterials,springBoneManager:r.userData.vrmSpringBoneManager,nodeConstraintManager:r.userData.vrmNodeConstraintManager});r.userData.vrm=n}})}};function fD(r){const t=new Set;return r.traverse(e=>{if(!e.isMesh)return;const n=e;t.add(n)}),t}function Uv(r,t,e){if(t.size===1){const o=t.values().next().value;if(o.weight===1)return r[o.index]}const n=new Float32Array(r[0].count*3);let i=0;if(e)i=1;else for(const o of t)i+=o.weight;for(const o of t){const a=r[o.index],l=o.weight/i;for(let u=0;uu.getOrCreate(N)).join(","),M=`${S};${p};${_}`;let x=o.get(M);x==null&&(x=v.clone(),bD(x,T,d),o.set(M,x)),y.geometry.setAttribute("skinIndex",x)}for(const y of f)y.bind(g,new ti)}}function gD(r){const t=new Set;return r.traverse(e=>{if(!e.isSkinnedMesh)return;const n=e;t.add(n)}),t}function yD(r,t){const e=new Set;for(let n=0;ne)return!1;return!0}var Nd=class{constructor(){this._objectIndexMap=new Map,this._index=0}get(r){return this._objectIndexMap.get(r)}getOrCreate(r){let t=this._objectIndexMap.get(r);return t==null&&(t=this._index,this._objectIndexMap.set(r,t),this._index++),t}};function zv(r){if(Object.values(r).forEach(t=>{t!=null&&t.isTexture&&t.dispose()}),r.isShaderMaterial){const t=r.uniforms;t&&Object.values(t).forEach(e=>{const n=e.value;n!=null&&n.isTexture&&n.dispose()})}r.dispose()}function wD(r){const t=r.geometry;t&&t.dispose();const e=r.skeleton;e&&e.dispose();const n=r.material;n&&(Array.isArray(n)?n.forEach(i=>zv(i)):n&&zv(n))}function SD(r){r.traverse(wD)}function TD(r,t){var e,n;console.warn("VRMUtils.removeUnnecessaryJoints: removeUnnecessaryJoints is deprecated. Use combineSkeletons instead. combineSkeletons contributes more to the performance improvement. This function will be removed in the next major version.");const i=(e=t==null?void 0:t.experimentalSameBoneCounts)!=null?e:!1,s=[];r.traverse(l=>{l.type==="SkinnedMesh"&&s.push(l)});const o=new Map;let a=0;for(const l of s){const c=l.geometry.getAttribute("skinIndex");if(o.has(c))continue;const h=new Map,f=new Map;for(let d=0;d{var n,i,s,o;if(!e.isMesh)return;const a=e,l=a.geometry,u=l.index;if(u==null)return;const c=t.get(l);if(c!=null){a.geometry=c;return}const h=Object.values(l.attributes)[0].count,f=new Array(h);let d=0;const m=u.array;for(let T=0;T{v.addGroup(T.start,T.count,T.materialIndex)}),v.boundingBox=(i=(n=l.boundingBox)==null?void 0:n.clone())!=null?i:null,v.boundingSphere=(o=(s=l.boundingSphere)==null?void 0:s.clone())!=null?o:null,v.setDrawRange(l.drawRange.start,l.drawRange.count),v.userData=l.userData,t.set(l,v);{const T=u.array,_=new T.constructor(T.length);for(let M=0;M{const _=l.attributes[T];if(_.isInterleavedBufferAttribute)throw new Error("removeUnnecessaryVertices: InterleavedBufferAttribute is not supported");const M=_.array,{itemSize:x,normalized:N}=_,D=new M.constructor(p.length*x);p.forEach((j,it)=>{for(let I=0;I{v.morphAttributes[T]=[];const _=l.morphAttributes[T];for(let M=0;M<_.length;M++){const x=_[M];if(x.isInterleavedBufferAttribute)throw new Error("removeUnnecessaryVertices: InterleavedBufferAttribute is not supported");const N=x.array,{itemSize:D,normalized:j}=x,it=new N.constructor(p.length*D);p.forEach((I,Q)=>{for(let w=0;wI===0),v.morphAttributes[T][M]=new cr(it,D,j)}}),S&&(v.morphAttributes={}),a.geometry=v}),Array.from(t.keys()).forEach(e=>{e.dispose()})}function MD(r){var t;((t=r.meta)==null?void 0:t.metaVersion)==="0"&&(r.scene.rotation.y=Math.PI)}var sa=class{constructor(){}};sa.combineMorphs=pD;sa.combineSkeletons=mD;sa.deepDispose=SD;sa.removeUnnecessaryJoints=TD;sa.removeUnnecessaryVertices=ID;sa.rotateVRM0=MD;/*! * @pixiv/three-vrm-core v3.3.5 * The implementation of core features of VRM, for @pixiv/three-vrm * @@ -4062,23 +4062,23 @@ void main() { * Copyright (c) 2019-2025 pixiv Inc. * @pixiv/three-vrm-animation is distributed under MIT License * https://github.com/pixiv/three-vrm/blob/release/LICENSE - */var Vv=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),EL={Aa:"aa",Ih:"ih",Ou:"ou",Ee:"ee",Oh:"oh",Blink:"blink",Happy:"happy",Angry:"angry",Sad:"sad",Relaxed:"relaxed",LookUp:"lookUp",Surprised:"surprised",LookDown:"lookDown",LookLeft:"lookLeft",LookRight:"lookRight",BlinkLeft:"blinkLeft",BlinkRight:"blinkRight",Neutral:"neutral"};new nn;new Ao;new gt;new gt;var jv={hips:null,spine:"hips",chest:"spine",upperChest:"chest",neck:"upperChest",head:"neck",leftEye:"head",rightEye:"head",jaw:"head",leftUpperLeg:"hips",leftLowerLeg:"leftUpperLeg",leftFoot:"leftLowerLeg",leftToes:"leftFoot",rightUpperLeg:"hips",rightLowerLeg:"rightUpperLeg",rightFoot:"rightLowerLeg",rightToes:"rightFoot",leftShoulder:"upperChest",leftUpperArm:"leftShoulder",leftLowerArm:"leftUpperArm",leftHand:"leftLowerArm",rightShoulder:"upperChest",rightUpperArm:"rightShoulder",rightLowerArm:"rightUpperArm",rightHand:"rightLowerArm",leftThumbMetacarpal:"leftHand",leftThumbProximal:"leftThumbMetacarpal",leftThumbDistal:"leftThumbProximal",leftIndexProximal:"leftHand",leftIndexIntermediate:"leftIndexProximal",leftIndexDistal:"leftIndexIntermediate",leftMiddleProximal:"leftHand",leftMiddleIntermediate:"leftMiddleProximal",leftMiddleDistal:"leftMiddleIntermediate",leftRingProximal:"leftHand",leftRingIntermediate:"leftRingProximal",leftRingDistal:"leftRingIntermediate",leftLittleProximal:"leftHand",leftLittleIntermediate:"leftLittleProximal",leftLittleDistal:"leftLittleIntermediate",rightThumbMetacarpal:"rightHand",rightThumbProximal:"rightThumbMetacarpal",rightThumbDistal:"rightThumbProximal",rightIndexProximal:"rightHand",rightIndexIntermediate:"rightIndexProximal",rightIndexDistal:"rightIndexIntermediate",rightMiddleProximal:"rightHand",rightMiddleIntermediate:"rightMiddleProximal",rightMiddleDistal:"rightMiddleIntermediate",rightRingProximal:"rightHand",rightRingIntermediate:"rightRingProximal",rightRingDistal:"rightRingIntermediate",rightLittleProximal:"rightHand",rightLittleIntermediate:"rightLittleProximal",rightLittleDistal:"rightLittleIntermediate"};function AL(r){return r.invert?r.invert():r.inverse(),r}new gt;new gt;new gt;new gt;new gt;new gt(0,1,0);var CL=new gt,OL=new gt;function PL(r,t){return r.matrixWorld.decompose(CL,t,OL),t}function Bd(r){return[Math.atan2(-r.z,r.x),Math.atan2(r.y,Math.sqrt(r.x*r.x+r.z*r.z))]}function $v(r){const t=Math.round(r/2/Math.PI);return r-2*Math.PI*t}var Gv=new gt(0,0,1),RL=new gt,FL=new gt,DL=new gt,LL=new oe,kd=new oe,Wv=new oe,NL=new oe,Ud=new Hs,n1=class i1{constructor(t,e){this.offsetFromHeadBone=new gt,this.autoUpdate=!0,this.faceFront=new gt(0,0,1),this.humanoid=t,this.applier=e,this._yaw=0,this._pitch=0,this._needsUpdate=!0,this._restHeadWorldQuaternion=this.getLookAtWorldQuaternion(new oe)}get yaw(){return this._yaw}set yaw(t){this._yaw=t,this._needsUpdate=!0}get pitch(){return this._pitch}set pitch(t){this._pitch=t,this._needsUpdate=!0}get euler(){return console.warn("VRMLookAt: euler is deprecated. use getEuler() instead."),this.getEuler(new Hs)}getEuler(t){return t.set(Be.DEG2RAD*this._pitch,Be.DEG2RAD*this._yaw,0,"YXZ")}copy(t){if(this.humanoid!==t.humanoid)throw new Error("VRMLookAt: humanoid must be same in order to copy");return this.offsetFromHeadBone.copy(t.offsetFromHeadBone),this.applier=t.applier,this.autoUpdate=t.autoUpdate,this.target=t.target,this.faceFront.copy(t.faceFront),this}clone(){return new i1(this.humanoid,this.applier).copy(this)}reset(){this._yaw=0,this._pitch=0,this._needsUpdate=!0}getLookAtWorldPosition(t){const e=this.humanoid.getRawBoneNode("head");return t.copy(this.offsetFromHeadBone).applyMatrix4(e.matrixWorld)}getLookAtWorldQuaternion(t){const e=this.humanoid.getRawBoneNode("head");return PL(e,t)}getFaceFrontQuaternion(t){if(this.faceFront.distanceToSquared(Gv)<.01)return t.copy(this._restHeadWorldQuaternion).invert();const[e,n]=Bd(this.faceFront);return Ud.set(0,.5*Math.PI+e,n,"YZX"),t.setFromEuler(Ud).premultiply(NL.copy(this._restHeadWorldQuaternion).invert())}getLookAtWorldDirection(t){return this.getLookAtWorldQuaternion(kd),this.getFaceFrontQuaternion(Wv),t.copy(Gv).applyQuaternion(kd).applyQuaternion(Wv).applyEuler(this.getEuler(Ud))}lookAt(t){const e=LL.copy(this._restHeadWorldQuaternion).multiply(AL(this.getLookAtWorldQuaternion(kd))),n=this.getLookAtWorldPosition(FL),i=DL.copy(t).sub(n).applyQuaternion(e).normalize(),[s,o]=Bd(this.faceFront),[a,l]=Bd(i),u=$v(a-s),c=$v(o-l);this._yaw=Be.RAD2DEG*u,this._pitch=Be.RAD2DEG*c,this._needsUpdate=!0}update(t){this.target!=null&&this.autoUpdate&&this.lookAt(this.target.getWorldPosition(RL)),this._needsUpdate&&(this._needsUpdate=!1,this.applier.applyYawPitch(this._yaw,this._pitch))}};n1.EULER_ORDER="YXZ";var BL=n1;new gt(0,0,1);new Hs(0,0,0,"YXZ");var Hv=180/Math.PI,zd=new Hs,Xv=class extends Ja{constructor(r){super(),this.vrmLookAt=r,this.type="VRMLookAtQuaternionProxy";const t=this.rotation._onChangeCallback;this.rotation._onChange(()=>{t(),this._applyToLookAt()});const e=this.quaternion._onChangeCallback;this.quaternion._onChange(()=>{e(),this._applyToLookAt()})}_applyToLookAt(){zd.setFromQuaternion(this.quaternion,BL.EULER_ORDER),this.vrmLookAt.yaw=Hv*zd.y,this.vrmLookAt.pitch=Hv*zd.x}};function kL(r,t,e){var n,i;const s=new Map,o=new Map;for(const[a,l]of r.humanoidTracks.rotation.entries()){const u=(n=t.getNormalizedBoneNode(a))==null?void 0:n.name;if(u!=null){const c=new eE(`${u}.quaternion`,l.times,l.values.map((h,f)=>e==="0"&&f%2===0?-h:h));o.set(a,c)}}for(const[a,l]of r.humanoidTracks.translation.entries()){const u=(i=t.getNormalizedBoneNode(a))==null?void 0:i.name;if(u!=null){const c=r.restHipsPosition.y,f=t.normalizedRestPose.hips.position[1]/c,d=l.clone();d.values=d.values.map((m,g)=>(e==="0"&&g%3!==1?-m:m)*f),d.name=`${u}.position`,s.set(a,d)}}return{translation:s,rotation:o}}function UL(r,t){const e=new Map,n=new Map;for(const[i,s]of r.expressionTracks.preset.entries()){const o=t.getExpressionTrackName(i);if(o!=null){const a=s.clone();a.name=o,e.set(i,a)}}for(const[i,s]of r.expressionTracks.custom.entries()){const o=t.getExpressionTrackName(i);if(o!=null){const a=s.clone();a.name=o,n.set(i,a)}}return{preset:e,custom:n}}function zL(r,t){if(r.lookAtTrack==null)return null;const e=r.lookAtTrack.clone();return e.name=t,e}function l8(r,t){const e=[],n=kL(r,t.humanoid,t.meta.metaVersion);if(e.push(...n.translation.values()),e.push(...n.rotation.values()),t.expressionManager!=null){const i=UL(r,t.expressionManager);e.push(...i.preset.values()),e.push(...i.custom.values())}if(t.lookAt!=null){let i=t.scene.children.find(o=>o instanceof Xv);i==null?(console.warn("createVRMAnimationClip: VRMLookAtQuaternionProxy is not found. Creating a new one automatically. To suppress this warning, create a VRMLookAtQuaternionProxy manually"),i=new Xv(t.lookAt),i.name="VRMLookAtQuaternionProxy",t.scene.add(i)):i.name==null&&(console.warn("createVRMAnimationClip: VRMLookAtQuaternionProxy is found but its name is not set. Setting the name automatically. To suppress this warning, set the name manually"),i.name="VRMLookAtQuaternionProxy");const s=zL(r,`${i.name}.quaternion`);s!=null&&e.push(s)}return new JM("Clip",r.duration,e)}var VL=class{constructor(){this.duration=0,this.restHipsPosition=new gt,this.humanoidTracks={translation:new Map,rotation:new Map},this.expressionTracks={preset:new Map,custom:new Map},this.lookAtTrack=null}};function Yv(r,t){const e=r.length,n=[];let i=[],s=0;for(let o=0;o{const y=i.animations[p],v=this._parseAnimation(g,y,l,u);return v.restHipsPosition=f,v});r.userData.vrmAnimations=m})}_createNodeMap(r){var t,e,n,i,s;const o=new Map,a=new Map,l=(t=r.humanoid)==null?void 0:t.humanBones;l&&Object.entries(l).forEach(([f,d])=>{const m=d==null?void 0:d.node;m!=null&&o.set(m,f)});const u=(e=r.expressions)==null?void 0:e.preset;u&&Object.entries(u).forEach(([f,d])=>{const m=d==null?void 0:d.node;m!=null&&a.set(m,f)});const c=(n=r.expressions)==null?void 0:n.custom;c&&Object.entries(c).forEach(([f,d])=>{const{node:m}=d;a.set(m,f)});const h=(s=(i=r.lookAt)==null?void 0:i.node)!=null?s:null;return{humanoidIndexToName:o,expressionsIndexToName:a,lookAtIndex:h}}_createBoneWorldMatrixMap(r,t){return Vv(this,null,function*(){var e,n;r.scene.updateWorldMatrix(!1,!0);const i=yield r.parser.getDependencies("node"),s=new Map;if(t.humanoid==null)return s;for(const[o,a]of Object.entries(t.humanoid.humanBones)){const l=a==null?void 0:a.node;if(l!=null){const u=i[l];s.set(o,u.matrixWorld),o==="hips"&&s.set("hipsParent",(n=(e=u.parent)==null?void 0:e.matrixWorld)!=null?n:jL)}}return s})}_parseAnimation(r,t,e,n){const i=r.tracks,s=t.channels,o=new VL;return o.duration=r.duration,s.forEach((a,l)=>{const{node:u,path:c}=a.target,h=i[l];if(u==null)return;const f=e.humanoidIndexToName.get(u);if(f!=null){let m=jv[f];for(;m!=null&&n.get(m)==null;)m=jv[m];if(m==null&&(m="hipsParent"),c==="translation")if(f!=="hips")console.warn(`The loading animation contains a translation track for ${f}, which is not permitted in the VRMC_vrm_animation spec. ignoring the track`);else{const g=n.get("hipsParent"),p=Yv(h.values,3).flatMap(v=>Ma.fromArray(v).applyMatrix4(g).toArray()),y=h.clone();y.values=new Float32Array(p),o.humanoidTracks.translation.set(f,y)}else if(c==="rotation"){const g=n.get(f),p=n.get(m);g.decompose(Ma,Vd,Ma),Vd.invert(),p.decompose(Ma,qv,Ma);const y=Yv(h.values,4).flatMap(S=>$L.fromArray(S).premultiply(qv).multiply(Vd).toArray()),v=h.clone();v.values=new Float32Array(y),o.humanoidTracks.rotation.set(f,v)}else throw new Error(`Invalid path "${c}"`);return}const d=e.expressionsIndexToName.get(u);if(d!=null){if(c==="translation"){const m=h.times,g=new Float32Array(h.values.length/3);for(let y=0;ynew Promise((n,i)=>{var s=l=>{try{a(e.next(l))}catch(u){i(u)}},o=l=>{try{a(e.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((e=e.apply(r,t)).next())}),ED={Aa:"aa",Ih:"ih",Ou:"ou",Ee:"ee",Oh:"oh",Blink:"blink",Happy:"happy",Angry:"angry",Sad:"sad",Relaxed:"relaxed",LookUp:"lookUp",Surprised:"surprised",LookDown:"lookDown",LookLeft:"lookLeft",LookRight:"lookRight",BlinkLeft:"blinkLeft",BlinkRight:"blinkRight",Neutral:"neutral"};new nn;new Ao;new gt;new gt;var jv={hips:null,spine:"hips",chest:"spine",upperChest:"chest",neck:"upperChest",head:"neck",leftEye:"head",rightEye:"head",jaw:"head",leftUpperLeg:"hips",leftLowerLeg:"leftUpperLeg",leftFoot:"leftLowerLeg",leftToes:"leftFoot",rightUpperLeg:"hips",rightLowerLeg:"rightUpperLeg",rightFoot:"rightLowerLeg",rightToes:"rightFoot",leftShoulder:"upperChest",leftUpperArm:"leftShoulder",leftLowerArm:"leftUpperArm",leftHand:"leftLowerArm",rightShoulder:"upperChest",rightUpperArm:"rightShoulder",rightLowerArm:"rightUpperArm",rightHand:"rightLowerArm",leftThumbMetacarpal:"leftHand",leftThumbProximal:"leftThumbMetacarpal",leftThumbDistal:"leftThumbProximal",leftIndexProximal:"leftHand",leftIndexIntermediate:"leftIndexProximal",leftIndexDistal:"leftIndexIntermediate",leftMiddleProximal:"leftHand",leftMiddleIntermediate:"leftMiddleProximal",leftMiddleDistal:"leftMiddleIntermediate",leftRingProximal:"leftHand",leftRingIntermediate:"leftRingProximal",leftRingDistal:"leftRingIntermediate",leftLittleProximal:"leftHand",leftLittleIntermediate:"leftLittleProximal",leftLittleDistal:"leftLittleIntermediate",rightThumbMetacarpal:"rightHand",rightThumbProximal:"rightThumbMetacarpal",rightThumbDistal:"rightThumbProximal",rightIndexProximal:"rightHand",rightIndexIntermediate:"rightIndexProximal",rightIndexDistal:"rightIndexIntermediate",rightMiddleProximal:"rightHand",rightMiddleIntermediate:"rightMiddleProximal",rightMiddleDistal:"rightMiddleIntermediate",rightRingProximal:"rightHand",rightRingIntermediate:"rightRingProximal",rightRingDistal:"rightRingIntermediate",rightLittleProximal:"rightHand",rightLittleIntermediate:"rightLittleProximal",rightLittleDistal:"rightLittleIntermediate"};function AD(r){return r.invert?r.invert():r.inverse(),r}new gt;new gt;new gt;new gt;new gt;new gt(0,1,0);var CD=new gt,OD=new gt;function PD(r,t){return r.matrixWorld.decompose(CD,t,OD),t}function Bd(r){return[Math.atan2(-r.z,r.x),Math.atan2(r.y,Math.sqrt(r.x*r.x+r.z*r.z))]}function $v(r){const t=Math.round(r/2/Math.PI);return r-2*Math.PI*t}var Gv=new gt(0,0,1),RD=new gt,FD=new gt,LD=new gt,DD=new oe,kd=new oe,Wv=new oe,ND=new oe,Ud=new Hs,n1=class i1{constructor(t,e){this.offsetFromHeadBone=new gt,this.autoUpdate=!0,this.faceFront=new gt(0,0,1),this.humanoid=t,this.applier=e,this._yaw=0,this._pitch=0,this._needsUpdate=!0,this._restHeadWorldQuaternion=this.getLookAtWorldQuaternion(new oe)}get yaw(){return this._yaw}set yaw(t){this._yaw=t,this._needsUpdate=!0}get pitch(){return this._pitch}set pitch(t){this._pitch=t,this._needsUpdate=!0}get euler(){return console.warn("VRMLookAt: euler is deprecated. use getEuler() instead."),this.getEuler(new Hs)}getEuler(t){return t.set(Be.DEG2RAD*this._pitch,Be.DEG2RAD*this._yaw,0,"YXZ")}copy(t){if(this.humanoid!==t.humanoid)throw new Error("VRMLookAt: humanoid must be same in order to copy");return this.offsetFromHeadBone.copy(t.offsetFromHeadBone),this.applier=t.applier,this.autoUpdate=t.autoUpdate,this.target=t.target,this.faceFront.copy(t.faceFront),this}clone(){return new i1(this.humanoid,this.applier).copy(this)}reset(){this._yaw=0,this._pitch=0,this._needsUpdate=!0}getLookAtWorldPosition(t){const e=this.humanoid.getRawBoneNode("head");return t.copy(this.offsetFromHeadBone).applyMatrix4(e.matrixWorld)}getLookAtWorldQuaternion(t){const e=this.humanoid.getRawBoneNode("head");return PD(e,t)}getFaceFrontQuaternion(t){if(this.faceFront.distanceToSquared(Gv)<.01)return t.copy(this._restHeadWorldQuaternion).invert();const[e,n]=Bd(this.faceFront);return Ud.set(0,.5*Math.PI+e,n,"YZX"),t.setFromEuler(Ud).premultiply(ND.copy(this._restHeadWorldQuaternion).invert())}getLookAtWorldDirection(t){return this.getLookAtWorldQuaternion(kd),this.getFaceFrontQuaternion(Wv),t.copy(Gv).applyQuaternion(kd).applyQuaternion(Wv).applyEuler(this.getEuler(Ud))}lookAt(t){const e=DD.copy(this._restHeadWorldQuaternion).multiply(AD(this.getLookAtWorldQuaternion(kd))),n=this.getLookAtWorldPosition(FD),i=LD.copy(t).sub(n).applyQuaternion(e).normalize(),[s,o]=Bd(this.faceFront),[a,l]=Bd(i),u=$v(a-s),c=$v(o-l);this._yaw=Be.RAD2DEG*u,this._pitch=Be.RAD2DEG*c,this._needsUpdate=!0}update(t){this.target!=null&&this.autoUpdate&&this.lookAt(this.target.getWorldPosition(RD)),this._needsUpdate&&(this._needsUpdate=!1,this.applier.applyYawPitch(this._yaw,this._pitch))}};n1.EULER_ORDER="YXZ";var BD=n1;new gt(0,0,1);new Hs(0,0,0,"YXZ");var Hv=180/Math.PI,zd=new Hs,Xv=class extends Ja{constructor(r){super(),this.vrmLookAt=r,this.type="VRMLookAtQuaternionProxy";const t=this.rotation._onChangeCallback;this.rotation._onChange(()=>{t(),this._applyToLookAt()});const e=this.quaternion._onChangeCallback;this.quaternion._onChange(()=>{e(),this._applyToLookAt()})}_applyToLookAt(){zd.setFromQuaternion(this.quaternion,BD.EULER_ORDER),this.vrmLookAt.yaw=Hv*zd.y,this.vrmLookAt.pitch=Hv*zd.x}};function kD(r,t,e){var n,i;const s=new Map,o=new Map;for(const[a,l]of r.humanoidTracks.rotation.entries()){const u=(n=t.getNormalizedBoneNode(a))==null?void 0:n.name;if(u!=null){const c=new eE(`${u}.quaternion`,l.times,l.values.map((h,f)=>e==="0"&&f%2===0?-h:h));o.set(a,c)}}for(const[a,l]of r.humanoidTracks.translation.entries()){const u=(i=t.getNormalizedBoneNode(a))==null?void 0:i.name;if(u!=null){const c=r.restHipsPosition.y,f=t.normalizedRestPose.hips.position[1]/c,d=l.clone();d.values=d.values.map((m,g)=>(e==="0"&&g%3!==1?-m:m)*f),d.name=`${u}.position`,s.set(a,d)}}return{translation:s,rotation:o}}function UD(r,t){const e=new Map,n=new Map;for(const[i,s]of r.expressionTracks.preset.entries()){const o=t.getExpressionTrackName(i);if(o!=null){const a=s.clone();a.name=o,e.set(i,a)}}for(const[i,s]of r.expressionTracks.custom.entries()){const o=t.getExpressionTrackName(i);if(o!=null){const a=s.clone();a.name=o,n.set(i,a)}}return{preset:e,custom:n}}function zD(r,t){if(r.lookAtTrack==null)return null;const e=r.lookAtTrack.clone();return e.name=t,e}function l8(r,t){const e=[],n=kD(r,t.humanoid,t.meta.metaVersion);if(e.push(...n.translation.values()),e.push(...n.rotation.values()),t.expressionManager!=null){const i=UD(r,t.expressionManager);e.push(...i.preset.values()),e.push(...i.custom.values())}if(t.lookAt!=null){let i=t.scene.children.find(o=>o instanceof Xv);i==null?(console.warn("createVRMAnimationClip: VRMLookAtQuaternionProxy is not found. Creating a new one automatically. To suppress this warning, create a VRMLookAtQuaternionProxy manually"),i=new Xv(t.lookAt),i.name="VRMLookAtQuaternionProxy",t.scene.add(i)):i.name==null&&(console.warn("createVRMAnimationClip: VRMLookAtQuaternionProxy is found but its name is not set. Setting the name automatically. To suppress this warning, set the name manually"),i.name="VRMLookAtQuaternionProxy");const s=zD(r,`${i.name}.quaternion`);s!=null&&e.push(s)}return new JM("Clip",r.duration,e)}var VD=class{constructor(){this.duration=0,this.restHipsPosition=new gt,this.humanoidTracks={translation:new Map,rotation:new Map},this.expressionTracks={preset:new Map,custom:new Map},this.lookAtTrack=null}};function Yv(r,t){const e=r.length,n=[];let i=[],s=0;for(let o=0;o{const y=i.animations[p],v=this._parseAnimation(g,y,l,u);return v.restHipsPosition=f,v});r.userData.vrmAnimations=m})}_createNodeMap(r){var t,e,n,i,s;const o=new Map,a=new Map,l=(t=r.humanoid)==null?void 0:t.humanBones;l&&Object.entries(l).forEach(([f,d])=>{const m=d==null?void 0:d.node;m!=null&&o.set(m,f)});const u=(e=r.expressions)==null?void 0:e.preset;u&&Object.entries(u).forEach(([f,d])=>{const m=d==null?void 0:d.node;m!=null&&a.set(m,f)});const c=(n=r.expressions)==null?void 0:n.custom;c&&Object.entries(c).forEach(([f,d])=>{const{node:m}=d;a.set(m,f)});const h=(s=(i=r.lookAt)==null?void 0:i.node)!=null?s:null;return{humanoidIndexToName:o,expressionsIndexToName:a,lookAtIndex:h}}_createBoneWorldMatrixMap(r,t){return Vv(this,null,function*(){var e,n;r.scene.updateWorldMatrix(!1,!0);const i=yield r.parser.getDependencies("node"),s=new Map;if(t.humanoid==null)return s;for(const[o,a]of Object.entries(t.humanoid.humanBones)){const l=a==null?void 0:a.node;if(l!=null){const u=i[l];s.set(o,u.matrixWorld),o==="hips"&&s.set("hipsParent",(n=(e=u.parent)==null?void 0:e.matrixWorld)!=null?n:jD)}}return s})}_parseAnimation(r,t,e,n){const i=r.tracks,s=t.channels,o=new VD;return o.duration=r.duration,s.forEach((a,l)=>{const{node:u,path:c}=a.target,h=i[l];if(u==null)return;const f=e.humanoidIndexToName.get(u);if(f!=null){let m=jv[f];for(;m!=null&&n.get(m)==null;)m=jv[m];if(m==null&&(m="hipsParent"),c==="translation")if(f!=="hips")console.warn(`The loading animation contains a translation track for ${f}, which is not permitted in the VRMC_vrm_animation spec. ignoring the track`);else{const g=n.get("hipsParent"),p=Yv(h.values,3).flatMap(v=>Ma.fromArray(v).applyMatrix4(g).toArray()),y=h.clone();y.values=new Float32Array(p),o.humanoidTracks.translation.set(f,y)}else if(c==="rotation"){const g=n.get(f),p=n.get(m);g.decompose(Ma,Vd,Ma),Vd.invert(),p.decompose(Ma,qv,Ma);const y=Yv(h.values,4).flatMap(S=>$D.fromArray(S).premultiply(qv).multiply(Vd).toArray()),v=h.clone();v.values=new Float32Array(y),o.humanoidTracks.rotation.set(f,v)}else throw new Error(`Invalid path "${c}"`);return}const d=e.expressionsIndexToName.get(u);if(d!=null){if(c==="translation"){const m=h.times,g=new Float32Array(h.values.length/3);for(let y=0;y=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dt(r){return this instanceof Dt?(this.v=r,this):new Dt(r)}function Ar(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(r,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(d){return function(m){return Promise.resolve(m).then(d,h)}}function a(d,m){n[d]&&(i[d]=function(g){return new Promise(function(p,y){s.push([d,g,p,y])>1||l(d,g)})},m&&(i[d]=m(i[d])))}function l(d,m){try{u(n[d](m))}catch(g){f(s[0][3],g)}}function u(d){d.value instanceof Dt?Promise.resolve(d.value.v).then(c,h):f(s[0][2],d)}function c(d){l("next",d)}function h(d){l("throw",d)}function f(d,m){d(m),s.shift(),s.length&&l(s[0][0],s[0][1])}}function ks(r){var t,e;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=r[i]?function(o){return(e=!e)?{value:Dt(r[i](o)),done:!1}:s?s(o):o}:s}}function Hn(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 Qv=="function"?Qv(r):r[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(s){e[s]=r[s]&&function(o){return new Promise(function(a,l){o=r[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(u){s({value:u,done:a})},o)}}const HL=new TextDecoder("utf-8"),pp=r=>HL.decode(r),XL=new TextEncoder,Mm=r=>XL.encode(r),YL=r=>typeof r=="number",s1=r=>typeof r=="boolean",Je=r=>typeof r=="function",Cr=r=>r!=null&&Object(r)===r,zs=r=>Cr(r)&&Je(r.then),Tl=r=>Cr(r)&&Je(r[Symbol.iterator]),oa=r=>Cr(r)&&Je(r[Symbol.asyncIterator]),mp=r=>Cr(r)&&Cr(r.schema),o1=r=>Cr(r)&&"done"in r&&"value"in r,a1=r=>Cr(r)&&Je(r.stat)&&YL(r.fd),l1=r=>Cr(r)&&Em(r.body),Jc=r=>"_getDOMStream"in r&&"_getNodeStream"in r,qL=r=>Cr(r)&&Je(r.abort)&&Je(r.getWriter)&&!Jc(r),Em=r=>Cr(r)&&Je(r.cancel)&&Je(r.getReader)&&!Jc(r),QL=r=>Cr(r)&&Je(r.end)&&Je(r.write)&&s1(r.writable)&&!Jc(r),u1=r=>Cr(r)&&Je(r.read)&&Je(r.pipe)&&s1(r.readable)&&!Jc(r),ZL=r=>Cr(r)&&Je(r.clear)&&Je(r.bytes)&&Je(r.position)&&Je(r.setPosition)&&Je(r.capacity)&&Je(r.getBufferIdentifier)&&Je(r.createLong),Am=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function KL(r){const t=r[0]?[r[0]]:[];let e,n,i,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let i,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,n);for(const c=e.length;++lMe(Int32Array,r),Kv=r=>Me(BigInt64Array,r),fe=r=>Me(Uint8Array,r),gp=r=>(r.next(),r);function*JL(r,t){const e=function*(i){yield i},n=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Am?e(t):Tl(t)?t:e(t);return yield*gp(function*(i){let s=null;do s=i.next(yield Me(r,s));while(!s.done)}(n[Symbol.iterator]())),new r}const tN=r=>JL(Uint8Array,r);function c1(r,t){return Ar(this,arguments,function*(){if(zs(t))return yield Dt(yield Dt(yield*ks(Hn(c1(r,yield Dt(t))))));const n=function(o){return Ar(this,arguments,function*(){yield yield Dt(yield Dt(o))})},i=function(o){return Ar(this,arguments,function*(){yield Dt(yield*ks(Hn(gp(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 Am?n(t):Tl(t)?i(t):oa(t)?t:n(t);return yield Dt(yield*ks(Hn(gp(function(o){return Ar(this,arguments,function*(){let a=null;do a=yield Dt(o.next(yield yield Dt(Me(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Dt(new r)})}const eN=r=>c1(Uint8Array,r);function h1(r,t,e){if(r!==0){e=e.slice(0,t);for(let n=-1,i=e.length;++n0)do if(r[e]!==t[e])return!1;while(++e(r.next(),r);function*nN(r){let t,e=!1,n=[],i,s,o,a=0;function l(){return s==="peek"?Yn(n,o)[0]:([i,n,a]=Yn(n,o),i)}({cmd:s,size:o}=(yield null)||{cmd:"read",size:0});const u=tN(r)[Symbol.iterator]();try{do if({done:t,value:i}=Number.isNaN(o-a)?u.next():u.next(o-a),!t&&i.byteLength>0&&(n.push(i),a+=i.byteLength),t||o<=a)do({cmd:s,size:o}=yield l());while(o0&&(i.push(s),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Dt(u()));while(a0&&(i.push(fe(s)),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Dt(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 re(this,void 0,void 0,function*(){const{reader:e,source:n}=this;e&&(yield e.cancel(t).catch(()=>{})),n&&n.locked&&this.releaseLock()})}read(t){return re(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=fe(e)),e})}}const jd=(r,t)=>{const e=i=>n([t,i]);let n;return[t,e,new Promise(i=>(n=i)&&r.once(t,e))]};function aN(r){return Ar(this,arguments,function*(){const e=[];let n="error",i=!1,s=null,o,a,l=0,u=[],c;function h(){return o==="peek"?Yn(u,a)[0]:([c,u,l]=Yn(u,a),c)}if({cmd:o,size:a}=(yield yield Dt(null))||{cmd:"read",size:0},r.isTTY)return yield yield Dt(new Uint8Array(0)),yield Dt(null);try{e[0]=jd(r,"end"),e[1]=jd(r,"error");do{if(e[2]=jd(r,"readable"),[n,s]=yield Dt(Promise.race(e.map(d=>d[2]))),n==="error")break;if((i=n==="end")||(Number.isFinite(a-l)?(c=fe(r.read(a-l)),c.byteLength0&&(u.push(c),l+=c.byteLength)),i||a<=l)do({cmd:o,size:a}=yield yield Dt(h()));while(a{for(const[y,v]of d)r.off(y,v);try{const y=r.destroy;y&&y.call(r,m),m=void 0}catch(y){m=y||m}finally{m!=null?p(m):g()}})}})}var He;(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"})(He||(He={}));var gr;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(gr||(gr={}));var mr;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(mr||(mr={}));var dn;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(dn||(dn={}));var $t;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})($t||($t={}));var qn;(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"})(qn||(qn={}));const $d=2,zn=4,mi=4,Se=4,Li=new Int32Array(2),Jv=new Float32Array(Li.buffer),t0=new Float64Array(Li.buffer),cu=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var yp;(function(r){r[r.UTF8_BYTES=1]="UTF8_BYTES",r[r.UTF16_STRING=2]="UTF16_STRING"})(yp||(yp={}));let Xo=class d1{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new d1(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){Jv[0]=e,this.writeInt32(t,Li[0])}writeFloat64(t,e){t0[0]=e,this.writeInt32(t,Li[cu?0:1]),this.writeInt32(t+4,Li[cu?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);const n=~(this.bb.capacity()-this.space+e)+1&t-1;for(;this.space=0&&this.vtable[e]==0;e--);const n=e+1;for(;e>=0;e--)this.addInt16(this.vtable[e]!=0?t-this.vtable[e]:0);const i=2;this.addInt16(t-this.object_start);const s=(n+i)*$d;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,zn+i),this.addOffset(t),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(t,e){this.finish(t,e,!0)}requiredField(t,e){const n=this.bb.capacity()-t,i=n-this.bb.readInt32(n);if(!(e=0;n--)t.addInt32(e[n]);return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,n){return Mr.startUnion(t),Mr.addMode(t,e),Mr.addTypeIds(t,n),Mr.endUnion(t)}}let a0=class ja{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 ja).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,e){return t.setPosition(t.position()+Se),(e||new ja).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(t){return ja.startUtf8(t),ja.endUtf8(t)}};var Oe;(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"})(Oe||(Oe={}));let Jr=class wu{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 wu).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,e){return t.setPosition(t.position()+Se),(e||new wu).__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):Oe.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 gi).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(t,e){const n=this.bb.__offset(this.bb_pos,14);return n?(e||new wu).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}childrenLength(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,16);return n?(e||new tr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,Oe.NONE)}static addType(t,e){t.addFieldOffset(3,e,0)}static addDictionary(t,e){t.addFieldOffset(4,e,0)}static addChildren(t,e){t.addFieldOffset(5,e,0)}static createChildrenVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startChildrenVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(6,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},Fn=class oi{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 oi).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,e){return t.setPosition(t.position()+Se),(e||new oi).__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):Yo.Little}fields(t,e){const n=this.bb.__offset(this.bb_pos,6);return n?(e||new Jr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}fieldsLength(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,8);return n?(e||new tr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb.__vector(this.bb_pos+e)+t*8):BigInt(0)}featuresLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,Yo.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startFieldsVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(2,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static addFeatures(t,e){t.addFieldOffset(3,e,0)}static createFeaturesVector(t,e){t.startVector(8,e.length,8);for(let n=e.length-1;n>=0;n--)t.addInt64(e[n]);return t.endVector()}static startFeaturesVector(t,e){t.startVector(8,e,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,e){t.finish(e)}static finishSizePrefixedSchemaBuffer(t,e){t.finish(e,void 0,!0)}static createSchema(t,e,n,i,s){return oi.startSchema(t),oi.addEndianness(t,e),oi.addFields(t,n),oi.addCustomMetadata(t,i),oi.addFeatures(t,s),oi.endSchema(t)}};var ve;(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"})(ve||(ve={}));var z;(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"})(z||(z={}));var di;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(di||(di={}));const lN=void 0;function ll(r){if(r===null)return"null";if(r===lN)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=>ll(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}function Ae(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 y1(r,t){return Ae(r/t)+Ae(r%t)/Ae(t)}const uN=Symbol.for("isArrowBigNum");function wn(r,...t){return t.length===0?Object.setPrototypeOf(Me(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}wn.prototype[uN]=!0;wn.prototype.toJSON=function(){return`"${cl(this)}"`};wn.prototype.valueOf=function(r){return v1(this,r)};wn.prototype.toString=function(){return cl(this)};wn.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return v1(this);case"string":return cl(this);case"default":return dN(this)}return cl(this)};function No(...r){return wn.apply(this,r)}function Bo(...r){return wn.apply(this,r)}function ul(...r){return wn.apply(this,r)}Object.setPrototypeOf(No.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Bo.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(ul.prototype,Object.create(Uint32Array.prototype));Object.assign(No.prototype,wn.prototype,{constructor:No,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Bo.prototype,wn.prototype,{constructor:Bo,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(ul.prototype,wn.prototype,{constructor:ul,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const cN=BigInt(4294967296)*BigInt(4294967296),hN=cN-BigInt(1);function v1(r,t){const{buffer:e,byteOffset:n,byteLength:i,signed:s}=r,o=new BigUint64Array(e,n,i/8),a=s&&o.at(-1)&BigInt(1)<=0)return Gd(r);t=t.slice();let n=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Rt.prototype);let Hi=class extends Rt{constructor(){super(z.Null)}toString(){return"Null"}};x1=Symbol.toStringTag;Hi[x1]=(r=>r[Symbol.toStringTag]="Null")(Hi.prototype);let Vs=class extends Rt{constructor(t,e){super(z.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}`}};w1=Symbol.toStringTag;Vs[w1]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Vs.prototype);class hl extends Vs{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(hl.prototype,"ArrayType",{value:Int32Array});let Zu=class extends Rt{constructor(t){super(z.Float),this.precision=t}get ArrayType(){switch(this.precision){case mr.HALF:return Uint16Array;case mr.SINGLE:return Float32Array;case mr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};S1=Symbol.toStringTag;Zu[S1]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Zu.prototype);let Ku=class extends Rt{constructor(){super(z.Binary)}toString(){return"Binary"}};T1=Symbol.toStringTag;Ku[T1]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Ku.prototype);let Ju=class extends Rt{constructor(){super(z.LargeBinary)}toString(){return"LargeBinary"}};I1=Symbol.toStringTag;Ju[I1]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Ju.prototype);let tc=class extends Rt{constructor(){super(z.Utf8)}toString(){return"Utf8"}};M1=Symbol.toStringTag;tc[M1]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(tc.prototype);let ec=class extends Rt{constructor(){super(z.LargeUtf8)}toString(){return"LargeUtf8"}};E1=Symbol.toStringTag;ec[E1]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(ec.prototype);let rc=class extends Rt{constructor(){super(z.Bool)}toString(){return"Bool"}};A1=Symbol.toStringTag;rc[A1]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(rc.prototype);let nc=class extends Rt{constructor(t,e,n=128){super(z.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};C1=Symbol.toStringTag;nc[C1]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(nc.prototype);let ic=class extends Rt{constructor(t){super(z.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${dn[this.unit]}>`}get ArrayType(){return this.unit===dn.DAY?Int32Array:BigInt64Array}};O1=Symbol.toStringTag;ic[O1]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(ic.prototype);let sc=class extends Rt{constructor(t,e){super(z.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${$t[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};P1=Symbol.toStringTag;sc[P1]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(sc.prototype);let oc=class extends Rt{constructor(t,e){super(z.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${$t[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};R1=Symbol.toStringTag;oc[R1]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(oc.prototype);let ac=class extends Rt{constructor(t){super(z.Interval),this.unit=t}toString(){return`Interval<${qn[this.unit]}>`}};F1=Symbol.toStringTag;ac[F1]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(ac.prototype);let lc=class extends Rt{constructor(t){super(z.Duration),this.unit=t}toString(){return`Duration<${$t[this.unit]}>`}};D1=Symbol.toStringTag;lc[D1]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(lc.prototype);let uc=class extends Rt{constructor(t){super(z.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}};L1=Symbol.toStringTag;uc[L1]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(uc.prototype);let br=class extends Rt{constructor(t){super(z.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}};N1=Symbol.toStringTag;br[N1]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(br.prototype);let cc=class extends Rt{constructor(t,e,n){super(z.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((i,s,o)=>(i[s]=o)&&i||i,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}};B1=Symbol.toStringTag;cc[B1]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(cc.prototype);let hc=class extends Rt{constructor(t){super(z.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k1=Symbol.toStringTag;hc[k1]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(hc.prototype);let dc=class extends Rt{constructor(t,e){super(z.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}>`}};U1=Symbol.toStringTag;dc[U1]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(dc.prototype);let fc=class extends Rt{constructor(t,e=!1){var n,i,s;if(super(z.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((n=t==null?void 0:t.type)===null||n===void 0)&&n.children)){const o=(i=t==null?void 0:t.type)===null||i===void 0?void 0:i.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}};z1=Symbol.toStringTag;fc[z1]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(fc.prototype);const pN=(r=>()=>++r)(-1);let qo=class extends Rt{constructor(t,e,n,i){super(z.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=n==null?pN():Ae(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};V1=Symbol.toStringTag;qo[V1]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(qo.prototype);function fi(r){const t=r;switch(r.typeId){case z.Decimal:return r.bitWidth/32;case z.Interval:return 1+t.unit;case z.FixedSizeList:return t.listSize;case z.FixedSizeBinary:return t.byteWidth;default:return 1}}let le=class{visitMany(t,...e){return t.map((n,i)=>this.visit(n,...e.map(s=>s[i])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return mN(this,t,e)}getVisitFnByTypeId(t,e=!0){return wo(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 mN(r,t,e=!0){return typeof t=="number"?wo(r,t,e):typeof t=="string"&&t in z?wo(r,z[t],e):t&&t instanceof Rt?wo(r,l0(t),e):t!=null&&t.type&&t.type instanceof Rt?wo(r,l0(t.type),e):wo(r,z.NONE,e)}function wo(r,t,e=!0){let n=null;switch(t){case z.Null:n=r.visitNull;break;case z.Bool:n=r.visitBool;break;case z.Int:n=r.visitInt;break;case z.Int8:n=r.visitInt8||r.visitInt;break;case z.Int16:n=r.visitInt16||r.visitInt;break;case z.Int32:n=r.visitInt32||r.visitInt;break;case z.Int64:n=r.visitInt64||r.visitInt;break;case z.Uint8:n=r.visitUint8||r.visitInt;break;case z.Uint16:n=r.visitUint16||r.visitInt;break;case z.Uint32:n=r.visitUint32||r.visitInt;break;case z.Uint64:n=r.visitUint64||r.visitInt;break;case z.Float:n=r.visitFloat;break;case z.Float16:n=r.visitFloat16||r.visitFloat;break;case z.Float32:n=r.visitFloat32||r.visitFloat;break;case z.Float64:n=r.visitFloat64||r.visitFloat;break;case z.Utf8:n=r.visitUtf8;break;case z.LargeUtf8:n=r.visitLargeUtf8;break;case z.Binary:n=r.visitBinary;break;case z.LargeBinary:n=r.visitLargeBinary;break;case z.FixedSizeBinary:n=r.visitFixedSizeBinary;break;case z.Date:n=r.visitDate;break;case z.DateDay:n=r.visitDateDay||r.visitDate;break;case z.DateMillisecond:n=r.visitDateMillisecond||r.visitDate;break;case z.Timestamp:n=r.visitTimestamp;break;case z.TimestampSecond:n=r.visitTimestampSecond||r.visitTimestamp;break;case z.TimestampMillisecond:n=r.visitTimestampMillisecond||r.visitTimestamp;break;case z.TimestampMicrosecond:n=r.visitTimestampMicrosecond||r.visitTimestamp;break;case z.TimestampNanosecond:n=r.visitTimestampNanosecond||r.visitTimestamp;break;case z.Time:n=r.visitTime;break;case z.TimeSecond:n=r.visitTimeSecond||r.visitTime;break;case z.TimeMillisecond:n=r.visitTimeMillisecond||r.visitTime;break;case z.TimeMicrosecond:n=r.visitTimeMicrosecond||r.visitTime;break;case z.TimeNanosecond:n=r.visitTimeNanosecond||r.visitTime;break;case z.Decimal:n=r.visitDecimal;break;case z.List:n=r.visitList;break;case z.Struct:n=r.visitStruct;break;case z.Union:n=r.visitUnion;break;case z.DenseUnion:n=r.visitDenseUnion||r.visitUnion;break;case z.SparseUnion:n=r.visitSparseUnion||r.visitUnion;break;case z.Dictionary:n=r.visitDictionary;break;case z.Interval:n=r.visitInterval;break;case z.IntervalDayTime:n=r.visitIntervalDayTime||r.visitInterval;break;case z.IntervalYearMonth:n=r.visitIntervalYearMonth||r.visitInterval;break;case z.Duration:n=r.visitDuration;break;case z.DurationSecond:n=r.visitDurationSecond||r.visitDuration;break;case z.DurationMillisecond:n=r.visitDurationMillisecond||r.visitDuration;break;case z.DurationMicrosecond:n=r.visitDurationMicrosecond||r.visitDuration;break;case z.DurationNanosecond:n=r.visitDurationNanosecond||r.visitDuration;break;case z.FixedSizeList:n=r.visitFixedSizeList;break;case z.Map:n=r.visitMap;break}if(typeof n=="function")return n;if(!e)return()=>null;throw new Error(`Unrecognized type '${z[t]}'`)}function l0(r){switch(r.typeId){case z.Null:return z.Null;case z.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?z.Int8:z.Uint8;case 16:return e?z.Int16:z.Uint16;case 32:return e?z.Int32:z.Uint32;case 64:return e?z.Int64:z.Uint64}return z.Int}case z.Float:switch(r.precision){case mr.HALF:return z.Float16;case mr.SINGLE:return z.Float32;case mr.DOUBLE:return z.Float64}return z.Float;case z.Binary:return z.Binary;case z.LargeBinary:return z.LargeBinary;case z.Utf8:return z.Utf8;case z.LargeUtf8:return z.LargeUtf8;case z.Bool:return z.Bool;case z.Decimal:return z.Decimal;case z.Time:switch(r.unit){case $t.SECOND:return z.TimeSecond;case $t.MILLISECOND:return z.TimeMillisecond;case $t.MICROSECOND:return z.TimeMicrosecond;case $t.NANOSECOND:return z.TimeNanosecond}return z.Time;case z.Timestamp:switch(r.unit){case $t.SECOND:return z.TimestampSecond;case $t.MILLISECOND:return z.TimestampMillisecond;case $t.MICROSECOND:return z.TimestampMicrosecond;case $t.NANOSECOND:return z.TimestampNanosecond}return z.Timestamp;case z.Date:switch(r.unit){case dn.DAY:return z.DateDay;case dn.MILLISECOND:return z.DateMillisecond}return z.Date;case z.Interval:switch(r.unit){case qn.DAY_TIME:return z.IntervalDayTime;case qn.YEAR_MONTH:return z.IntervalYearMonth}return z.Interval;case z.Duration:switch(r.unit){case $t.SECOND:return z.DurationSecond;case $t.MILLISECOND:return z.DurationMillisecond;case $t.MICROSECOND:return z.DurationMicrosecond;case $t.NANOSECOND:return z.DurationNanosecond}return z.Duration;case z.Map:return z.Map;case z.List:return z.List;case z.Struct:return z.Struct;case z.Union:switch(r.mode){case gr.Dense:return z.DenseUnion;case gr.Sparse:return z.SparseUnion}return z.Union;case z.FixedSizeBinary:return z.FixedSizeBinary;case z.FixedSizeList:return z.FixedSizeList;case z.Dictionary:return z.Dictionary}throw new Error(`Unrecognized type '${z[r.typeId]}'`)}le.prototype.visitInt8=null;le.prototype.visitInt16=null;le.prototype.visitInt32=null;le.prototype.visitInt64=null;le.prototype.visitUint8=null;le.prototype.visitUint16=null;le.prototype.visitUint32=null;le.prototype.visitUint64=null;le.prototype.visitFloat16=null;le.prototype.visitFloat32=null;le.prototype.visitFloat64=null;le.prototype.visitDateDay=null;le.prototype.visitDateMillisecond=null;le.prototype.visitTimestampSecond=null;le.prototype.visitTimestampMillisecond=null;le.prototype.visitTimestampMicrosecond=null;le.prototype.visitTimestampNanosecond=null;le.prototype.visitTimeSecond=null;le.prototype.visitTimeMillisecond=null;le.prototype.visitTimeMicrosecond=null;le.prototype.visitTimeNanosecond=null;le.prototype.visitDenseUnion=null;le.prototype.visitSparseUnion=null;le.prototype.visitIntervalDayTime=null;le.prototype.visitIntervalYearMonth=null;le.prototype.visitDuration=null;le.prototype.visitDurationSecond=null;le.prototype.visitDurationMillisecond=null;le.prototype.visitDurationMicrosecond=null;le.prototype.visitDurationNanosecond=null;const j1=new Float64Array(1),lo=new Uint32Array(j1.buffer);function $1(r){const t=(r&31744)>>10,e=(r&1023)/1024,n=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return n*(e?Number.NaN:1/0);case 0:return n*(e?6103515625e-14*e:0)}return n*Math.pow(2,t-15)*(1+e)}function gN(r){if(r!==r)return 32256;j1[0]=r;const t=(lo[1]&2147483648)>>16&65535;let e=lo[1]&2146435072,n=0;return e>=1089470464?lo[0]>0?e=31744:(e=(e&2080374784)>>16,n=(lo[1]&1048575)>>10):e<=1056964608?(n=1048576+(lo[1]&1048575),n=1048576+(n<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,n=(lo[1]&1048575)+512>>10),t|e|n&65535}let Gt=class extends le{};function Zt(r){return(t,e,n)=>{if(t.setValid(e,n!=null))return r(t,e,n)}}const yN=(r,t,e)=>{r[t]=Math.floor(e/864e5)},G1=(r,t,e,n)=>{if(e+1{const i=r+e;n?t[i>>3]|=1<>3]&=~(1<{r[t]=e},Cm=({values:r},t,e)=>{r[t]=e},W1=({values:r},t,e)=>{r[t]=gN(e)},_N=(r,t,e)=>{switch(r.type.precision){case mr.HALF:return W1(r,t,e);case mr.SINGLE:case mr.DOUBLE:return Cm(r,t,e)}},H1=({values:r},t,e)=>{yN(r,t,e.valueOf())},X1=({values:r},t,e)=>{r[t]=BigInt(e)},bN=({stride:r,values:t},e,n)=>{t.set(n.subarray(0,r),r*e)},Y1=({values:r,valueOffsets:t},e,n)=>G1(r,t,e,n),q1=({values:r,valueOffsets:t},e,n)=>G1(r,t,e,Mm(n)),xN=(r,t,e)=>{r.type.unit===dn.DAY?H1(r,t,e):X1(r,t,e)},Q1=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},Z1=({values:r},t,e)=>{r[t]=BigInt(e)},K1=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},J1=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},wN=(r,t,e)=>{switch(r.type.unit){case $t.SECOND:return Q1(r,t,e);case $t.MILLISECOND:return Z1(r,t,e);case $t.MICROSECOND:return K1(r,t,e);case $t.NANOSECOND:return J1(r,t,e)}},tS=({values:r},t,e)=>{r[t]=e},eS=({values:r},t,e)=>{r[t]=e},rS=({values:r},t,e)=>{r[t]=e},nS=({values:r},t,e)=>{r[t]=e},SN=(r,t,e)=>{switch(r.type.unit){case $t.SECOND:return tS(r,t,e);case $t.MILLISECOND:return eS(r,t,e);case $t.MICROSECOND:return rS(r,t,e);case $t.NANOSECOND:return nS(r,t,e)}},TN=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},IN=(r,t,e)=>{const n=r.children[0],i=r.valueOffsets,s=fn.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=i[t],l=i[t+1];a{const n=r.children[0],{valueOffsets:i}=r,s=fn.getVisitFn(n);let{[t]:o,[t+1]:a}=i;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(n,o,u),++o>=a)break},EN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),AN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),CN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),ON=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),PN=(r,t,e)=>{const n=r.type.children.map(s=>fn.getVisitFn(s.type)),i=e instanceof Map?CN(t,e):e instanceof ze?AN(t,e):Array.isArray(e)?EN(t,e):ON(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},RN=(r,t,e)=>{r.type.mode===gr.Dense?iS(r,t,e):sS(r,t,e)},iS=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];fn.visit(i,r.valueOffsets[t],e)},sS=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];fn.visit(i,t,e)},FN=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},DN=(r,t,e)=>{r.type.unit===qn.DAY_TIME?oS(r,t,e):aS(r,t,e)},oS=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},aS=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},lS=({values:r},t,e)=>{r[t]=e},uS=({values:r},t,e)=>{r[t]=e},cS=({values:r},t,e)=>{r[t]=e},hS=({values:r},t,e)=>{r[t]=e},LN=(r,t,e)=>{switch(r.type.unit){case $t.SECOND:return lS(r,t,e);case $t.MILLISECOND:return uS(r,t,e);case $t.MICROSECOND:return cS(r,t,e);case $t.NANOSECOND:return hS(r,t,e)}},NN=(r,t,e)=>{const{stride:n}=r,i=r.children[0],s=fn.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=t*n;++o`${ll(t)}: ${ll(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new BN(this[yn],this[ko])}},BN=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[yn].type.children.findIndex(n=>n.name===e)!==-1}getOwnPropertyDescriptor(t,e){if(t[yn].type.children.findIndex(n=>n.name===e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[yn].type.children.findIndex(i=>i.name===e);if(n!==-1){const i=Or.visit(t[yn].children[n],t[ko]);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[yn].type.children.findIndex(s=>s.name===e);return i!==-1?(fn.visit(t[yn].children[i],t[ko],n),Reflect.set(t,e,n)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,n):!1}},Lt=class extends le{};function Wt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const UN=(r,t)=>864e5*r[t],zN=(r,t)=>null,dS=(r,t,e)=>{if(e+1>=t.length)return null;const n=Ae(t[e]),i=Ae(t[e+1]);return r.subarray(n,i)},VN=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<UN(r,t),pS=({values:r},t)=>Ae(r[t]),ts=({stride:r,values:t},e)=>t[r*e],jN=({stride:r,values:t},e)=>$1(t[r*e]),mS=({values:r},t)=>r[t],$N=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),gS=({values:r,valueOffsets:t},e)=>dS(r,t,e),yS=({values:r,valueOffsets:t},e)=>{const n=dS(r,t,e);return n!==null?pp(n):null},GN=({values:r},t)=>r[t],WN=({type:r,values:t},e)=>r.precision!==mr.HALF?t[e]:$1(t[e]),HN=(r,t)=>r.type.unit===dn.DAY?fS(r,t):pS(r,t),vS=({values:r},t)=>1e3*Ae(r[t]),_S=({values:r},t)=>Ae(r[t]),bS=({values:r},t)=>y1(r[t],BigInt(1e3)),xS=({values:r},t)=>y1(r[t],BigInt(1e6)),XN=(r,t)=>{switch(r.type.unit){case $t.SECOND:return vS(r,t);case $t.MILLISECOND:return _S(r,t);case $t.MICROSECOND:return bS(r,t);case $t.NANOSECOND:return xS(r,t)}},wS=({values:r},t)=>r[t],SS=({values:r},t)=>r[t],TS=({values:r},t)=>r[t],IS=({values:r},t)=>r[t],YN=(r,t)=>{switch(r.type.unit){case $t.SECOND:return wS(r,t);case $t.MILLISECOND:return SS(r,t);case $t.MICROSECOND:return TS(r,t);case $t.NANOSECOND:return IS(r,t)}},qN=({values:r,stride:t},e)=>fN.decimal(r.subarray(t*e,t*(e+1))),QN=(r,t)=>{const{valueOffsets:e,stride:n,children:i}=r,{[t*n]:s,[t*n+1]:o}=e,l=i[0].slice(s,o-s);return new ze([l])},ZN=(r,t)=>{const{valueOffsets:e,children:n}=r,{[t]:i,[t+1]:s}=e,o=n[0];return new Pm(o.slice(i,s-i))},KN=(r,t)=>new Om(r,t),JN=(r,t)=>r.type.mode===gr.Dense?MS(r,t):ES(r,t),MS=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return Or.visit(n,r.valueOffsets[t])},ES=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return Or.visit(n,t)},t3=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},e3=(r,t)=>r.type.unit===qn.DAY_TIME?AS(r,t):CS(r,t),AS=({values:r},t)=>r.subarray(2*t,2*(t+1)),CS=({values:r},t)=>{const e=r[t],n=new Int32Array(2);return n[0]=Math.trunc(e/12),n[1]=Math.trunc(e%12),n},OS=({values:r},t)=>r[t],PS=({values:r},t)=>r[t],RS=({values:r},t)=>r[t],FS=({values:r},t)=>r[t],r3=(r,t)=>{switch(r.type.unit){case $t.SECOND:return OS(r,t);case $t.MILLISECOND:return PS(r,t);case $t.MICROSECOND:return RS(r,t);case $t.NANOSECOND:return FS(r,t)}},n3=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new ze([s])};Lt.prototype.visitNull=Wt(zN);Lt.prototype.visitBool=Wt(VN);Lt.prototype.visitInt=Wt(GN);Lt.prototype.visitInt8=Wt(ts);Lt.prototype.visitInt16=Wt(ts);Lt.prototype.visitInt32=Wt(ts);Lt.prototype.visitInt64=Wt(mS);Lt.prototype.visitUint8=Wt(ts);Lt.prototype.visitUint16=Wt(ts);Lt.prototype.visitUint32=Wt(ts);Lt.prototype.visitUint64=Wt(mS);Lt.prototype.visitFloat=Wt(WN);Lt.prototype.visitFloat16=Wt(jN);Lt.prototype.visitFloat32=Wt(ts);Lt.prototype.visitFloat64=Wt(ts);Lt.prototype.visitUtf8=Wt(yS);Lt.prototype.visitLargeUtf8=Wt(yS);Lt.prototype.visitBinary=Wt(gS);Lt.prototype.visitLargeBinary=Wt(gS);Lt.prototype.visitFixedSizeBinary=Wt($N);Lt.prototype.visitDate=Wt(HN);Lt.prototype.visitDateDay=Wt(fS);Lt.prototype.visitDateMillisecond=Wt(pS);Lt.prototype.visitTimestamp=Wt(XN);Lt.prototype.visitTimestampSecond=Wt(vS);Lt.prototype.visitTimestampMillisecond=Wt(_S);Lt.prototype.visitTimestampMicrosecond=Wt(bS);Lt.prototype.visitTimestampNanosecond=Wt(xS);Lt.prototype.visitTime=Wt(YN);Lt.prototype.visitTimeSecond=Wt(wS);Lt.prototype.visitTimeMillisecond=Wt(SS);Lt.prototype.visitTimeMicrosecond=Wt(TS);Lt.prototype.visitTimeNanosecond=Wt(IS);Lt.prototype.visitDecimal=Wt(qN);Lt.prototype.visitList=Wt(QN);Lt.prototype.visitStruct=Wt(KN);Lt.prototype.visitUnion=Wt(JN);Lt.prototype.visitDenseUnion=Wt(MS);Lt.prototype.visitSparseUnion=Wt(ES);Lt.prototype.visitDictionary=Wt(t3);Lt.prototype.visitInterval=Wt(e3);Lt.prototype.visitIntervalDayTime=Wt(AS);Lt.prototype.visitIntervalYearMonth=Wt(CS);Lt.prototype.visitDuration=Wt(r3);Lt.prototype.visitDurationSecond=Wt(OS);Lt.prototype.visitDurationMillisecond=Wt(PS);Lt.prototype.visitDurationMicrosecond=Wt(RS);Lt.prototype.visitDurationNanosecond=Wt(FS);Lt.prototype.visitFixedSizeList=Wt(n3);Lt.prototype.visitMap=Wt(ZN);const Or=new Lt,So=Symbol.for("keys"),Uo=Symbol.for("vals"),To=Symbol.for("kKeysAsStrings"),xp=Symbol.for("_kKeysAsStrings");let Pm=class{constructor(t){return this[So]=new ze([t.children[0]]).memoize(),this[Uo]=t.children[1],new Proxy(this,new s3)}get[To](){return this[xp]||(this[xp]=Array.from(this[So].toArray(),String))}[Symbol.iterator](){return new i3(this[So],this[Uo])}get size(){return this[So].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[So],e=this[Uo],n={};for(let i=-1,s=t.length;++i`${ll(t)}: ${ll(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},i3=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),Or.visit(this.vals,t)]})}},s3=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[To]}has(t,e){return t[To].includes(e)}getOwnPropertyDescriptor(t,e){if(t[To].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[To].indexOf(e);if(n!==-1){const i=Or.visit(Reflect.get(t,Uo),n);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[To].indexOf(e);return i!==-1?(fn.visit(Reflect.get(t,Uo),i,n),Reflect.set(t,e,n)):Reflect.has(t,e)?Reflect.set(t,e,n):!1}};Object.defineProperties(Pm.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[So]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Uo]:{writable:!0,enumerable:!1,configurable:!1,value:null},[xp]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let u0;function DS(r,t,e,n){const{length:i=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?i:e;return s<0&&(s=(s%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),n?n(r,s,o):[s,o]}const Rm=(r,t)=>r<0?t+r:r,c0=r=>r!==r;function aa(r){if(typeof r!=="object"||r===null)return c0(r)?c0:e=>e===r;if(r instanceof Date){const e=r.valueOf();return n=>n instanceof Date?n.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?rN(r,e):!1:r instanceof Map?a3(r):Array.isArray(r)?o3(r):r instanceof ze?l3(r):u3(r,!0)}function o3(r){const t=[];for(let e=-1,n=r.length;++e!1;const n=[];for(let i=-1,s=e.length;++i{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return c3(r,e);case Map:return h0(r,e,e.keys());case Pm:case Om:case Object:case void 0:return h0(r,e,t||Object.keys(e))}return e instanceof ze?h3(r,e):!1}}function c3(r,t){const e=r.length;if(t.length!==e)return!1;for(let n=-1;++n>n}function pc(r,t,e){const n=e.byteLength+7&-8;if(r>0||e.byteLength>3):mc(new Fm(e,r,t,null,LS)).subarray(0,n)),i}return e}function mc(r){const t=[];let e=0,n=0,i=0;for(const o of r)o&&(i|=1<0)&&(t[e++]=i);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}let Fm=class{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8===0?0:8-t%8);return wp(r,t,i)+wp(r,n,e)+f3(r,i>>3,n-i>>3)}function f3(r,t,e){let n=0,i=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:i+e;for(;o-i>=4;)n+=Wd(s.getUint32(i)),i+=4;for(;o-i>=2;)n+=Wd(s.getUint16(i)),i+=2;for(;o-i>=1;)n+=Wd(s.getUint8(i)),i+=1;return n}function Wd(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 p3=-1;let Pe=class Sp{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 Rt.isSparseUnion(t)?this.children.some(e=>e.nullable):Rt.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this;return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Rt.isUnion(this.type))return this.children.reduce((n,i)=>n+i.nullCount,0);let t=this._nullCount,e;return t<=p3&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-wp(e,this.offset,this.offset+this.length)),t}constructor(t,e,n,i,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;s instanceof Sp?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=fi(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(Rt.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===gr.Dense?this.valueOffsets[t]:t;return i.getValid(s)}if(this.nullable&&this.nullCount>0){const n=this.offset+t;return(this.nullBitmap[n>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(pc(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];n=(h&u)!==0,s[c]=e?h|u:h&~u}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new Sp(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(this._nullCount===0)-1,a=i===16?n:1,l=this._sliceBuffers(t,e,n,i);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===z.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);i[e>>3]=(1<0&&i.set(pc(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[di.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s;const{buffers:o}=this;return(s=o[di.TYPE])&&(o[di.TYPE]=s.subarray(t,t+e)),(s=o[di.OFFSET])&&(o[di.OFFSET]=s.subarray(t,t+e+1))||(s=o[di.DATA])&&(o[di.DATA]=i===6?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map(i=>i.slice(e,n))}};Pe.prototype.children=Object.freeze([]);class Xa extends le{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{["type"]:e,["offset"]:n=0,["length"]:i=0}=t;return new Pe(e,n,i,i)}visitBool(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length>>3,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitInt(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitFloat(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitUtf8(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.data),s=fe(t.nullBitmap),o=Ea(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,i,s])}visitLargeUtf8(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.data),s=fe(t.nullBitmap),o=Kv(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,i,s])}visitBinary(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.data),s=fe(t.nullBitmap),o=Ea(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,i,s])}visitLargeBinary(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.data),s=fe(t.nullBitmap),o=Kv(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,i,s])}visitFixedSizeBinary(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitDate(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitTimestamp(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitTime(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitDecimal(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitList(t){const{["type"]:e,["offset"]:n=0,["child"]:i}=t,s=fe(t.nullBitmap),o=Ea(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,void 0,s],[i])}visitStruct(t){const{["type"]:e,["offset"]:n=0,["children"]:i=[]}=t,s=fe(t.nullBitmap),{length:o=i.reduce((l,{length:u})=>Math.max(l,u),0),nullCount:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,void 0,s],i)}visitUnion(t){const{["type"]:e,["offset"]:n=0,["children"]:i=[]}=t,s=Me(e.ArrayType,t.typeIds),{["length"]:o=s.length,["nullCount"]:a=-1}=t;if(Rt.isSparseUnion(e))return new Pe(e,n,o,a,[void 0,void 0,void 0,s],i);const l=Ea(t.valueOffsets);return new Pe(e,n,o,a,[l,void 0,void 0,s],i)}visitDictionary(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.indices.ArrayType,t.data),{["dictionary"]:o=new ze([new Xa().visit({type:e.dictionary})])}=t,{["length"]:a=s.length,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[void 0,s,i],[],o)}visitInterval(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitDuration(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitFixedSizeList(t){const{["type"]:e,["offset"]:n=0,["child"]:i=new Xa().visit({type:e.valueType})}=t,s=fe(t.nullBitmap),{["length"]:o=i.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,void 0,s],[i])}visitMap(t){const{["type"]:e,["offset"]:n=0,["child"]:i=new Xa().visit({type:e.childType})}=t,s=fe(t.nullBitmap),o=Ea(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,void 0,s],[i])}}const m3=new Xa;function he(r){return m3.visit(r)}let d0=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 NS(r){return r.reduce((t,e)=>t+e.nullCount,0)}function BS(r){return r.reduce((t,e,n)=>(t[n+1]=t[n]+e.length,t),new Uint32Array(r.length+1))}function kS(r,t,e,n){const i=[];for(let s=-1,o=r.length;++s=n)break;if(e>=l+u)continue;if(l>=e&&l+u<=n){i.push(a);continue}const c=Math.max(0,e-l),h=Math.min(n-l,u);i.push(a.slice(c,h-c))}return i.length===0&&i.push(r[0].slice(0,0)),i}function Dm(r,t,e,n){let i=0,s=0,o=t.length-1;do{if(i>=o-1)return e0?0:-1}function v3(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let n=0;for(const i of new Fm(e,r.offset+(t||0),r.length,e,LS)){if(!i)return n;++n}return-1}function te(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case z.Union:break;case z.Dictionary:break;default:return v3(r,e)}const n=Or.getVisitFn(r),i=aa(t);for(let s=(e||0)-1,o=r.length;++s{const i=r.data[n];return i.values.subarray(0,i.length)[Symbol.iterator]()});let e=0;return new d0(r.data.length,n=>{const s=r.data[n].length,o=r.slice(e,e+s);return e+=s,new _3(o)})}let _3=class{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof Pe)))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}=$S[o.typeId],c=s[0];this.isValid=h=>Lm(c,h),this.get=h=>a(c,h),this.set=(h,f)=>l(c,h,f),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,GS[o.typeId]),this._offsets=BS(s);break}this.data=s,this.type=o,this.stride=fi(o),this.numChildren=(i=(n=o.children)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return g3(this.data)}get nullCount(){return NS(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${z[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(Rm(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return Nm.visit(this)}concat(...t){return new ws(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new ws(DS(this,t,e,({data:n,_offsets:i},s,o)=>kS(n,i,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this;switch(t.typeId){case z.Int:case z.Float:case z.Decimal:case z.Time:case z.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,n*i);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Rt.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Rt.isDictionary(this.type)){const t=new f0(this.data[0].dictionary),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new ws(e)}return new f0(this)}unmemoize(){if(Rt.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new ws(e)}return this}};jS=Symbol.toStringTag;ze[jS]=(r=>{r.type=Rt.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(z).map(e=>z[e]).filter(e=>typeof e=="number"&&e!==z.NONE);for(const e of t){const n=Or.getVisitFnByTypeId(e),i=fn.getVisitFnByTypeId(e),s=yc.getVisitFnByTypeId(e);$S[e]={get:n,set:i,indexOf:s},GS[e]=Object.create(r,{isValid:{value:gc(Lm)},get:{value:gc(Or.getVisitFnByTypeId(e))},set:{value:US(fn.getVisitFnByTypeId(e))},indexOf:{value:zS(yc.getVisitFnByTypeId(e))}})}return"Vector"})(ze.prototype);let f0=class WS extends ze{constructor(t){super(t.data);const e=this.get,n=this.set,i=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){n.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new WS(i.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new ze(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}};class Tp{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(t,e,n,i){return t.prep(8,24),t.writeInt64(BigInt(i??0)),t.pad(4),t.writeInt32(n),t.writeInt64(BigInt(e??0)),t.offset()}}class Dr{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 Dr).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+Se),(e||new Dr).__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):He.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6);return e?(t||new Fn).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const n=this.bb.__offset(this.bb_pos,8);return n?(e||new Tp).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}dictionariesLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,e){const n=this.bb.__offset(this.bb_pos,10);return n?(e||new Tp).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}recordBatchesLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12);return n?(e||new tr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,He.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}let Ue=class Ss{constructor(t=[],e,n,i=He.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=Ip(this.fields)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(t=>t.name)}toString(){return`Schema<{ ${this.fields.map((t,e)=>`${e}: ${t}`).join(", ")} }>`}select(t){const e=new Set(t),n=this.fields.filter(i=>e.has(i.name));return new Ss(n,this.metadata)}selectAt(t){const e=t.map(n=>this.fields[n]).filter(Boolean);return new Ss(e,this.metadata)}assign(...t){const e=t[0]instanceof Ss?t[0]:Array.isArray(t[0])?new Ss(t[0]):new Ss(t),n=[...this.fields],i=hu(hu(new Map,this.metadata),e.metadata),s=e.fields.filter(a=>{const l=n.findIndex(u=>u.name===a.name);return~l?(n[l]=a.clone({metadata:hu(hu(new Map,n[l].metadata),a.metadata)}))&&!1:!0}),o=Ip(s,new Map);return new Ss([...n,...s],i,new Map([...this.dictionaries,...o]))}};Ue.prototype.fields=null;Ue.prototype.metadata=null;Ue.prototype.dictionaries=null;class Le{static new(...t){let[e,n,i,s]=t;return t[0]&&typeof t[0]=="object"&&({name:e}=t[0],n===void 0&&(n=t[0].type),i===void 0&&(i=t[0].nullable),s===void 0&&(s=t[0].metadata)),new Le(`${e}`,n,i,s)}constructor(t,e,n=!1,i){this.name=t,this.type=e,this.nullable=n,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,n,i,s]=t;return!t[0]||typeof t[0]!="object"?[e=this.name,n=this.type,i=this.nullable,s=this.metadata]=t:{name:e=this.name,type:n=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0],Le.new(e,n,i,s)}}Le.prototype.type=null;Le.prototype.name=null;Le.prototype.nullable=null;Le.prototype.metadata=null;function hu(r,t){return new Map([...r||new Map,...t||new Map])}function Ip(r,t=new Map){for(let e=-1,n=r.length;++e0&&Ip(s.children,t)}return t}var b3=f1,x3=Xo;class dl{static decode(t){t=new x3(fe(t));const e=Dr.getRootAsFooter(t),n=Ue.decode(e.schema(),new Map,e.version());return new w3(n,e)}static encode(t){const e=new b3,n=Ue.encode(e,t.schema);Dr.startRecordBatchesVector(e,t.numRecordBatches);for(const o of[...t.recordBatches()].slice().reverse())Xi.encode(e,o);const i=e.endVector();Dr.startDictionariesVector(e,t.numDictionaries);for(const o of[...t.dictionaryBatches()].slice().reverse())Xi.encode(e,o);const s=e.endVector();return Dr.startFooter(e),Dr.addSchema(e,n),Dr.addVersion(e,He.V5),Dr.addRecordBatches(e,i),Dr.addDictionaries(e,s),Dr.finishFooterBuffer(e,Dr.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=He.V5,n,i){this.schema=t,this.version=e,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let t,e=-1,n=this.numRecordBatches;++e=0&&t=0&&t=0&&t=0&&tthis._closedPromiseResolve=t)}get closed(){return this._closedPromise}cancel(t){return re(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(Ve);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return rn.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return rn.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return re(this,void 0,void 0,function*(){return yield this.abort(t),Ve})}return(t){return re(this,void 0,void 0,function*(){return yield this.close(),Ve})}read(t){return re(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return re(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((e,n)=>{this.resolvers.push({resolve:e,reject:n})}):Promise.resolve(Ve)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class Su extends S3{write(t){if((t=fe(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?pp(this.toUint8Array(!0)):this.toUint8Array(!1).then(pp)}toUint8Array(t=!1){return t?Yn(this._values)[0]:re(this,void 0,void 0,function*(){var e,n,i,s;const o=[];let a=0;try{for(var l=!0,u=Hn(this),c;c=yield u.next(),e=c.done,!e;l=!0){s=c.value,l=!1;const h=s;o.push(h),a+=h.byteLength}}catch(h){n={error:h}}finally{try{!l&&!e&&(i=u.return)&&(yield i.call(u))}finally{if(n)throw n.error}}return Yn(o,a)[0]})}}class vc{constructor(t){t&&(this.source=new T3(rn.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 Qo{constructor(t){t instanceof Qo?this.source=t.source:t instanceof Su?this.source=new ps(rn.fromAsyncIterable(t)):u1(t)?this.source=new ps(rn.fromNodeStream(t)):Em(t)?this.source=new ps(rn.fromDOMStream(t)):l1(t)?this.source=new ps(rn.fromDOMStream(t.body)):Tl(t)?this.source=new ps(rn.fromIterable(t)):zs(t)?this.source=new ps(rn.fromAsyncIterable(t)):oa(t)&&(this.source=new ps(rn.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 T3{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)||Ve)}return(t){return Object.create(this.source.return&&this.source.return(t)||Ve)}}class ps{constructor(t){this.source=t,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(t){return re(this,void 0,void 0,function*(){yield this.return(t)})}get closed(){return this._closedPromise}read(t){return re(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return re(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(t){return re(this,arguments,void 0,function*(e,n="read"){return yield this.source.next({cmd:n,size:e})})}throw(t){return re(this,void 0,void 0,function*(){const e=this.source.throw&&(yield this.source.throw(t))||Ve;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}return(t){return re(this,void 0,void 0,function*(){const e=this.source.return&&(yield this.source.return(t))||Ve;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}}class m0 extends vc{constructor(t,e){super(),this.position=0,this.buffer=fe(t),this.size=e===void 0?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:n}=this.readAt(t,4);return new DataView(e,n).getInt32(0,!0)}seek(t){return this.position=Math.min(t,this.size),t>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let i=e[3]*n[3];this.buffer[0]=i&65535;let s=i>>>16;return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${Oo(this.buffer[3])} ${Oo(this.buffer[2])} ${Oo(this.buffer[1])} ${Oo(this.buffer[0])}`}static multiply(t,e){return new ui(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new ui(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return ui.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return ui.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new ui(e);for(let o=n?1:0;o0&&this.readData(t,n)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class E3 extends XS{constructor(t,e,n,i,s){super(new Uint8Array(0),e,n,i,s),this.sources=t}readNullBitmap(t,e,{offset:n}=this.nextBufferRange()){return e<=0?new Uint8Array(0):mc(this.sources[n])}readOffsets(t,{offset:e}=this.nextBufferRange()){return Me(Uint8Array,Me(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return Me(Uint8Array,Me(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:n}=this;return Rt.isTimestamp(t)||(Rt.isInt(t)||Rt.isTime(t))&&t.bitWidth===64||Rt.isDuration(t)||Rt.isDate(t)&&t.unit===dn.MILLISECOND?Me(Uint8Array,Ya.convertArray(n[e])):Rt.isDecimal(t)?Me(Uint8Array,M3.convertArray(n[e])):Rt.isBinary(t)||Rt.isLargeBinary(t)||Rt.isFixedSizeBinary(t)?A3(n[e]):Rt.isBool(t)?mc(n[e]):Rt.isUtf8(t)||Rt.isLargeUtf8(t)?Mm(n[e].join("")):Me(Uint8Array,Me(t.ArrayType,n[e].map(i=>+i)))}}function A3(r){const t=r.join(""),e=new Uint8Array(t.length/2);for(let n=0;n>1]=Number.parseInt(t.slice(n,n+2),16);return e}let kt=class extends le{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((n,i)=>this.compareFields(n,e[i]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}};function Sr(r,t){return t instanceof r.constructor}function Qs(r,t){return r===t||Sr(r,t)}function Si(r,t){return r===t||Sr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function eh(r,t){return r===t||Sr(r,t)&&r.precision===t.precision}function C3(r,t){return r===t||Sr(r,t)&&r.byteWidth===t.byteWidth}function Um(r,t){return r===t||Sr(r,t)&&r.unit===t.unit}function Il(r,t){return r===t||Sr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function Ml(r,t){return r===t||Sr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function O3(r,t){return r===t||Sr(r,t)&&r.children.length===t.children.length&&Yi.compareManyFields(r.children,t.children)}function P3(r,t){return r===t||Sr(r,t)&&r.children.length===t.children.length&&Yi.compareManyFields(r.children,t.children)}function zm(r,t){return r===t||Sr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,n)=>e===t.typeIds[n])&&Yi.compareManyFields(r.children,t.children)}function R3(r,t){return r===t||Sr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Yi.visit(r.indices,t.indices)&&Yi.visit(r.dictionary,t.dictionary)}function Vm(r,t){return r===t||Sr(r,t)&&r.unit===t.unit}function El(r,t){return r===t||Sr(r,t)&&r.unit===t.unit}function F3(r,t){return r===t||Sr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Yi.compareManyFields(r.children,t.children)}function D3(r,t){return r===t||Sr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Yi.compareManyFields(r.children,t.children)}kt.prototype.visitNull=Qs;kt.prototype.visitBool=Qs;kt.prototype.visitInt=Si;kt.prototype.visitInt8=Si;kt.prototype.visitInt16=Si;kt.prototype.visitInt32=Si;kt.prototype.visitInt64=Si;kt.prototype.visitUint8=Si;kt.prototype.visitUint16=Si;kt.prototype.visitUint32=Si;kt.prototype.visitUint64=Si;kt.prototype.visitFloat=eh;kt.prototype.visitFloat16=eh;kt.prototype.visitFloat32=eh;kt.prototype.visitFloat64=eh;kt.prototype.visitUtf8=Qs;kt.prototype.visitLargeUtf8=Qs;kt.prototype.visitBinary=Qs;kt.prototype.visitLargeBinary=Qs;kt.prototype.visitFixedSizeBinary=C3;kt.prototype.visitDate=Um;kt.prototype.visitDateDay=Um;kt.prototype.visitDateMillisecond=Um;kt.prototype.visitTimestamp=Il;kt.prototype.visitTimestampSecond=Il;kt.prototype.visitTimestampMillisecond=Il;kt.prototype.visitTimestampMicrosecond=Il;kt.prototype.visitTimestampNanosecond=Il;kt.prototype.visitTime=Ml;kt.prototype.visitTimeSecond=Ml;kt.prototype.visitTimeMillisecond=Ml;kt.prototype.visitTimeMicrosecond=Ml;kt.prototype.visitTimeNanosecond=Ml;kt.prototype.visitDecimal=Qs;kt.prototype.visitList=O3;kt.prototype.visitStruct=P3;kt.prototype.visitUnion=zm;kt.prototype.visitDenseUnion=zm;kt.prototype.visitSparseUnion=zm;kt.prototype.visitDictionary=R3;kt.prototype.visitInterval=Vm;kt.prototype.visitIntervalDayTime=Vm;kt.prototype.visitIntervalYearMonth=Vm;kt.prototype.visitDuration=El;kt.prototype.visitDurationSecond=El;kt.prototype.visitDurationMillisecond=El;kt.prototype.visitDurationMicrosecond=El;kt.prototype.visitDurationNanosecond=El;kt.prototype.visitFixedSizeList=F3;kt.prototype.visitMap=D3;const Yi=new kt;function Mp(r,t){return Yi.compareSchemas(r,t)}function Hd(r,t){return L3(r,t.map(e=>e.data.concat()))}function L3(r,t){const e=[...r.fields],n=[],i={numBatches:t.reduce((h,f)=>Math.max(h,f.length),0)};let s=0,o=0,a=-1;const l=t.length;let u,c=[];for(;i.numBatches-- >0;){for(o=Number.POSITIVE_INFINITY,a=-1;++a0&&(n[s++]=he({type:new br(e),length:o,nullCount:0,children:c.slice()})))}return[r=r.assign(e),n.map(h=>new Er(r,h))]}function N3(r,t,e,n,i){var s;const o=(t+63&-64)>>3;for(let a=-1,l=n.length;++a=t)c===t?e[a]=u:(e[a]=u.slice(0,t),i.numBatches=Math.max(i.numBatches,n[a].unshift(u.slice(t,c-t))));else{const h=r[a];r[a]=h.clone({nullable:!0}),e[a]=(s=u==null?void 0:u._changeLengthAndBackfillNullBitmap(t))!==null&&s!==void 0?s:he({type:h.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return e}var YS;let qi=class Ts{constructor(...t){var e,n;if(t.length===0)return this.batches=[],this.schema=new Ue([]),this._offsets=[0],this;let i,s;t[0]instanceof Ue&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop());const o=l=>{if(l){if(l instanceof Er)return[l];if(l instanceof Ts)return l.batches;if(l instanceof Pe){if(l.type instanceof br)return[new Er(new Ue(l.type.children),l)]}else{if(Array.isArray(l))return l.flatMap(u=>o(u));if(typeof l[Symbol.iterator]=="function")return[...l].flatMap(u=>o(u));if(typeof l=="object"){const u=Object.keys(l),c=u.map(d=>new ze([l[d]])),h=i??new Ue(u.map((d,m)=>new Le(String(d),c[m].type,c[m].nullable))),[,f]=Hd(h,c);return f.length===0?[new Er(l)]:f}}}return[]},a=t.flatMap(l=>o(l));if(i=(n=i??((e=a[0])===null||e===void 0?void 0:e.schema))!==null&&n!==void 0?n:new Ue([]),!(i instanceof Ue))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const l of a){if(!(l instanceof Er))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!Mp(i,l.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=a,this._offsets=s??BS(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=NS(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(Rm(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?Nm.visit(new ze(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ + */function re(r,t,e,n){function i(s){return s instanceof e?s:new e(function(o){o(s)})}return new(e||(e=Promise))(function(s,o){function a(c){try{u(n.next(c))}catch(h){o(h)}}function l(c){try{u(n.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((n=n.apply(r,t||[])).next())})}function Qv(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Lt(r){return this instanceof Lt?(this.v=r,this):new Lt(r)}function Ar(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(r,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(d){return function(m){return Promise.resolve(m).then(d,h)}}function a(d,m){n[d]&&(i[d]=function(g){return new Promise(function(p,y){s.push([d,g,p,y])>1||l(d,g)})},m&&(i[d]=m(i[d])))}function l(d,m){try{u(n[d](m))}catch(g){f(s[0][3],g)}}function u(d){d.value instanceof Lt?Promise.resolve(d.value.v).then(c,h):f(s[0][2],d)}function c(d){l("next",d)}function h(d){l("throw",d)}function f(d,m){d(m),s.shift(),s.length&&l(s[0][0],s[0][1])}}function ks(r){var t,e;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=r[i]?function(o){return(e=!e)?{value:Lt(r[i](o)),done:!1}:s?s(o):o}:s}}function Hn(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 Qv=="function"?Qv(r):r[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(s){e[s]=r[s]&&function(o){return new Promise(function(a,l){o=r[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(u){s({value:u,done:a})},o)}}const HD=new TextDecoder("utf-8"),pp=r=>HD.decode(r),XD=new TextEncoder,Mm=r=>XD.encode(r),YD=r=>typeof r=="number",s1=r=>typeof r=="boolean",Je=r=>typeof r=="function",Cr=r=>r!=null&&Object(r)===r,zs=r=>Cr(r)&&Je(r.then),Tl=r=>Cr(r)&&Je(r[Symbol.iterator]),oa=r=>Cr(r)&&Je(r[Symbol.asyncIterator]),mp=r=>Cr(r)&&Cr(r.schema),o1=r=>Cr(r)&&"done"in r&&"value"in r,a1=r=>Cr(r)&&Je(r.stat)&&YD(r.fd),l1=r=>Cr(r)&&Em(r.body),Jc=r=>"_getDOMStream"in r&&"_getNodeStream"in r,qD=r=>Cr(r)&&Je(r.abort)&&Je(r.getWriter)&&!Jc(r),Em=r=>Cr(r)&&Je(r.cancel)&&Je(r.getReader)&&!Jc(r),QD=r=>Cr(r)&&Je(r.end)&&Je(r.write)&&s1(r.writable)&&!Jc(r),u1=r=>Cr(r)&&Je(r.read)&&Je(r.pipe)&&s1(r.readable)&&!Jc(r),ZD=r=>Cr(r)&&Je(r.clear)&&Je(r.bytes)&&Je(r.position)&&Je(r.setPosition)&&Je(r.capacity)&&Je(r.getBufferIdentifier)&&Je(r.createLong),Am=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function KD(r){const t=r[0]?[r[0]]:[];let e,n,i,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let i,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,n);for(const c=e.length;++lMe(Int32Array,r),Kv=r=>Me(BigInt64Array,r),fe=r=>Me(Uint8Array,r),gp=r=>(r.next(),r);function*JD(r,t){const e=function*(i){yield i},n=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Am?e(t):Tl(t)?t:e(t);return yield*gp(function*(i){let s=null;do s=i.next(yield Me(r,s));while(!s.done)}(n[Symbol.iterator]())),new r}const tN=r=>JD(Uint8Array,r);function c1(r,t){return Ar(this,arguments,function*(){if(zs(t))return yield Lt(yield Lt(yield*ks(Hn(c1(r,yield Lt(t))))));const n=function(o){return Ar(this,arguments,function*(){yield yield Lt(yield Lt(o))})},i=function(o){return Ar(this,arguments,function*(){yield Lt(yield*ks(Hn(gp(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 Am?n(t):Tl(t)?i(t):oa(t)?t:n(t);return yield Lt(yield*ks(Hn(gp(function(o){return Ar(this,arguments,function*(){let a=null;do a=yield Lt(o.next(yield yield Lt(Me(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Lt(new r)})}const eN=r=>c1(Uint8Array,r);function h1(r,t,e){if(r!==0){e=e.slice(0,t);for(let n=-1,i=e.length;++n0)do if(r[e]!==t[e])return!1;while(++e(r.next(),r);function*nN(r){let t,e=!1,n=[],i,s,o,a=0;function l(){return s==="peek"?Yn(n,o)[0]:([i,n,a]=Yn(n,o),i)}({cmd:s,size:o}=(yield null)||{cmd:"read",size:0});const u=tN(r)[Symbol.iterator]();try{do if({done:t,value:i}=Number.isNaN(o-a)?u.next():u.next(o-a),!t&&i.byteLength>0&&(n.push(i),a+=i.byteLength),t||o<=a)do({cmd:s,size:o}=yield l());while(o0&&(i.push(s),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Lt(u()));while(a0&&(i.push(fe(s)),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Lt(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 re(this,void 0,void 0,function*(){const{reader:e,source:n}=this;e&&(yield e.cancel(t).catch(()=>{})),n&&n.locked&&this.releaseLock()})}read(t){return re(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=fe(e)),e})}}const jd=(r,t)=>{const e=i=>n([t,i]);let n;return[t,e,new Promise(i=>(n=i)&&r.once(t,e))]};function aN(r){return Ar(this,arguments,function*(){const e=[];let n="error",i=!1,s=null,o,a,l=0,u=[],c;function h(){return o==="peek"?Yn(u,a)[0]:([c,u,l]=Yn(u,a),c)}if({cmd:o,size:a}=(yield yield Lt(null))||{cmd:"read",size:0},r.isTTY)return yield yield Lt(new Uint8Array(0)),yield Lt(null);try{e[0]=jd(r,"end"),e[1]=jd(r,"error");do{if(e[2]=jd(r,"readable"),[n,s]=yield Lt(Promise.race(e.map(d=>d[2]))),n==="error")break;if((i=n==="end")||(Number.isFinite(a-l)?(c=fe(r.read(a-l)),c.byteLength0&&(u.push(c),l+=c.byteLength)),i||a<=l)do({cmd:o,size:a}=yield yield Lt(h()));while(a{for(const[y,v]of d)r.off(y,v);try{const y=r.destroy;y&&y.call(r,m),m=void 0}catch(y){m=y||m}finally{m!=null?p(m):g()}})}})}var He;(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"})(He||(He={}));var gr;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(gr||(gr={}));var mr;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(mr||(mr={}));var dn;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(dn||(dn={}));var $t;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})($t||($t={}));var qn;(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"})(qn||(qn={}));const $d=2,zn=4,mi=4,Se=4,Di=new Int32Array(2),Jv=new Float32Array(Di.buffer),t0=new Float64Array(Di.buffer),cu=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var yp;(function(r){r[r.UTF8_BYTES=1]="UTF8_BYTES",r[r.UTF16_STRING=2]="UTF16_STRING"})(yp||(yp={}));let Xo=class d1{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new d1(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){Jv[0]=e,this.writeInt32(t,Di[0])}writeFloat64(t,e){t0[0]=e,this.writeInt32(t,Di[cu?0:1]),this.writeInt32(t+4,Di[cu?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);const n=~(this.bb.capacity()-this.space+e)+1&t-1;for(;this.space=0&&this.vtable[e]==0;e--);const n=e+1;for(;e>=0;e--)this.addInt16(this.vtable[e]!=0?t-this.vtable[e]:0);const i=2;this.addInt16(t-this.object_start);const s=(n+i)*$d;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,zn+i),this.addOffset(t),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(t,e){this.finish(t,e,!0)}requiredField(t,e){const n=this.bb.capacity()-t,i=n-this.bb.readInt32(n);if(!(e=0;n--)t.addInt32(e[n]);return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,n){return Mr.startUnion(t),Mr.addMode(t,e),Mr.addTypeIds(t,n),Mr.endUnion(t)}}let a0=class ja{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 ja).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,e){return t.setPosition(t.position()+Se),(e||new ja).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(t){return ja.startUtf8(t),ja.endUtf8(t)}};var Oe;(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"})(Oe||(Oe={}));let Jr=class wu{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 wu).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,e){return t.setPosition(t.position()+Se),(e||new wu).__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):Oe.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 gi).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(t,e){const n=this.bb.__offset(this.bb_pos,14);return n?(e||new wu).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}childrenLength(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,16);return n?(e||new tr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,Oe.NONE)}static addType(t,e){t.addFieldOffset(3,e,0)}static addDictionary(t,e){t.addFieldOffset(4,e,0)}static addChildren(t,e){t.addFieldOffset(5,e,0)}static createChildrenVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startChildrenVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(6,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},Fn=class oi{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 oi).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,e){return t.setPosition(t.position()+Se),(e||new oi).__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):Yo.Little}fields(t,e){const n=this.bb.__offset(this.bb_pos,6);return n?(e||new Jr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}fieldsLength(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,8);return n?(e||new tr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb.__vector(this.bb_pos+e)+t*8):BigInt(0)}featuresLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,Yo.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startFieldsVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(2,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static addFeatures(t,e){t.addFieldOffset(3,e,0)}static createFeaturesVector(t,e){t.startVector(8,e.length,8);for(let n=e.length-1;n>=0;n--)t.addInt64(e[n]);return t.endVector()}static startFeaturesVector(t,e){t.startVector(8,e,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,e){t.finish(e)}static finishSizePrefixedSchemaBuffer(t,e){t.finish(e,void 0,!0)}static createSchema(t,e,n,i,s){return oi.startSchema(t),oi.addEndianness(t,e),oi.addFields(t,n),oi.addCustomMetadata(t,i),oi.addFeatures(t,s),oi.endSchema(t)}};var ve;(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"})(ve||(ve={}));var z;(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"})(z||(z={}));var di;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(di||(di={}));const lN=void 0;function ll(r){if(r===null)return"null";if(r===lN)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=>ll(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}function Ae(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 y1(r,t){return Ae(r/t)+Ae(r%t)/Ae(t)}const uN=Symbol.for("isArrowBigNum");function wn(r,...t){return t.length===0?Object.setPrototypeOf(Me(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}wn.prototype[uN]=!0;wn.prototype.toJSON=function(){return`"${cl(this)}"`};wn.prototype.valueOf=function(r){return v1(this,r)};wn.prototype.toString=function(){return cl(this)};wn.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return v1(this);case"string":return cl(this);case"default":return dN(this)}return cl(this)};function No(...r){return wn.apply(this,r)}function Bo(...r){return wn.apply(this,r)}function ul(...r){return wn.apply(this,r)}Object.setPrototypeOf(No.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Bo.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(ul.prototype,Object.create(Uint32Array.prototype));Object.assign(No.prototype,wn.prototype,{constructor:No,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Bo.prototype,wn.prototype,{constructor:Bo,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(ul.prototype,wn.prototype,{constructor:ul,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const cN=BigInt(4294967296)*BigInt(4294967296),hN=cN-BigInt(1);function v1(r,t){const{buffer:e,byteOffset:n,byteLength:i,signed:s}=r,o=new BigUint64Array(e,n,i/8),a=s&&o.at(-1)&BigInt(1)<=0)return Gd(r);t=t.slice();let n=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Rt.prototype);let Hi=class extends Rt{constructor(){super(z.Null)}toString(){return"Null"}};x1=Symbol.toStringTag;Hi[x1]=(r=>r[Symbol.toStringTag]="Null")(Hi.prototype);let Vs=class extends Rt{constructor(t,e){super(z.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}`}};w1=Symbol.toStringTag;Vs[w1]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Vs.prototype);class hl extends Vs{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(hl.prototype,"ArrayType",{value:Int32Array});let Zu=class extends Rt{constructor(t){super(z.Float),this.precision=t}get ArrayType(){switch(this.precision){case mr.HALF:return Uint16Array;case mr.SINGLE:return Float32Array;case mr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};S1=Symbol.toStringTag;Zu[S1]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Zu.prototype);let Ku=class extends Rt{constructor(){super(z.Binary)}toString(){return"Binary"}};T1=Symbol.toStringTag;Ku[T1]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Ku.prototype);let Ju=class extends Rt{constructor(){super(z.LargeBinary)}toString(){return"LargeBinary"}};I1=Symbol.toStringTag;Ju[I1]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Ju.prototype);let tc=class extends Rt{constructor(){super(z.Utf8)}toString(){return"Utf8"}};M1=Symbol.toStringTag;tc[M1]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(tc.prototype);let ec=class extends Rt{constructor(){super(z.LargeUtf8)}toString(){return"LargeUtf8"}};E1=Symbol.toStringTag;ec[E1]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(ec.prototype);let rc=class extends Rt{constructor(){super(z.Bool)}toString(){return"Bool"}};A1=Symbol.toStringTag;rc[A1]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(rc.prototype);let nc=class extends Rt{constructor(t,e,n=128){super(z.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};C1=Symbol.toStringTag;nc[C1]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(nc.prototype);let ic=class extends Rt{constructor(t){super(z.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${dn[this.unit]}>`}get ArrayType(){return this.unit===dn.DAY?Int32Array:BigInt64Array}};O1=Symbol.toStringTag;ic[O1]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(ic.prototype);let sc=class extends Rt{constructor(t,e){super(z.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${$t[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};P1=Symbol.toStringTag;sc[P1]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(sc.prototype);let oc=class extends Rt{constructor(t,e){super(z.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${$t[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};R1=Symbol.toStringTag;oc[R1]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(oc.prototype);let ac=class extends Rt{constructor(t){super(z.Interval),this.unit=t}toString(){return`Interval<${qn[this.unit]}>`}};F1=Symbol.toStringTag;ac[F1]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(ac.prototype);let lc=class extends Rt{constructor(t){super(z.Duration),this.unit=t}toString(){return`Duration<${$t[this.unit]}>`}};L1=Symbol.toStringTag;lc[L1]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(lc.prototype);let uc=class extends Rt{constructor(t){super(z.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}};D1=Symbol.toStringTag;uc[D1]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(uc.prototype);let br=class extends Rt{constructor(t){super(z.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}};N1=Symbol.toStringTag;br[N1]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(br.prototype);let cc=class extends Rt{constructor(t,e,n){super(z.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((i,s,o)=>(i[s]=o)&&i||i,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}};B1=Symbol.toStringTag;cc[B1]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(cc.prototype);let hc=class extends Rt{constructor(t){super(z.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k1=Symbol.toStringTag;hc[k1]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(hc.prototype);let dc=class extends Rt{constructor(t,e){super(z.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}>`}};U1=Symbol.toStringTag;dc[U1]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(dc.prototype);let fc=class extends Rt{constructor(t,e=!1){var n,i,s;if(super(z.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((n=t==null?void 0:t.type)===null||n===void 0)&&n.children)){const o=(i=t==null?void 0:t.type)===null||i===void 0?void 0:i.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}};z1=Symbol.toStringTag;fc[z1]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(fc.prototype);const pN=(r=>()=>++r)(-1);let qo=class extends Rt{constructor(t,e,n,i){super(z.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=n==null?pN():Ae(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};V1=Symbol.toStringTag;qo[V1]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(qo.prototype);function fi(r){const t=r;switch(r.typeId){case z.Decimal:return r.bitWidth/32;case z.Interval:return 1+t.unit;case z.FixedSizeList:return t.listSize;case z.FixedSizeBinary:return t.byteWidth;default:return 1}}let le=class{visitMany(t,...e){return t.map((n,i)=>this.visit(n,...e.map(s=>s[i])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return mN(this,t,e)}getVisitFnByTypeId(t,e=!0){return wo(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 mN(r,t,e=!0){return typeof t=="number"?wo(r,t,e):typeof t=="string"&&t in z?wo(r,z[t],e):t&&t instanceof Rt?wo(r,l0(t),e):t!=null&&t.type&&t.type instanceof Rt?wo(r,l0(t.type),e):wo(r,z.NONE,e)}function wo(r,t,e=!0){let n=null;switch(t){case z.Null:n=r.visitNull;break;case z.Bool:n=r.visitBool;break;case z.Int:n=r.visitInt;break;case z.Int8:n=r.visitInt8||r.visitInt;break;case z.Int16:n=r.visitInt16||r.visitInt;break;case z.Int32:n=r.visitInt32||r.visitInt;break;case z.Int64:n=r.visitInt64||r.visitInt;break;case z.Uint8:n=r.visitUint8||r.visitInt;break;case z.Uint16:n=r.visitUint16||r.visitInt;break;case z.Uint32:n=r.visitUint32||r.visitInt;break;case z.Uint64:n=r.visitUint64||r.visitInt;break;case z.Float:n=r.visitFloat;break;case z.Float16:n=r.visitFloat16||r.visitFloat;break;case z.Float32:n=r.visitFloat32||r.visitFloat;break;case z.Float64:n=r.visitFloat64||r.visitFloat;break;case z.Utf8:n=r.visitUtf8;break;case z.LargeUtf8:n=r.visitLargeUtf8;break;case z.Binary:n=r.visitBinary;break;case z.LargeBinary:n=r.visitLargeBinary;break;case z.FixedSizeBinary:n=r.visitFixedSizeBinary;break;case z.Date:n=r.visitDate;break;case z.DateDay:n=r.visitDateDay||r.visitDate;break;case z.DateMillisecond:n=r.visitDateMillisecond||r.visitDate;break;case z.Timestamp:n=r.visitTimestamp;break;case z.TimestampSecond:n=r.visitTimestampSecond||r.visitTimestamp;break;case z.TimestampMillisecond:n=r.visitTimestampMillisecond||r.visitTimestamp;break;case z.TimestampMicrosecond:n=r.visitTimestampMicrosecond||r.visitTimestamp;break;case z.TimestampNanosecond:n=r.visitTimestampNanosecond||r.visitTimestamp;break;case z.Time:n=r.visitTime;break;case z.TimeSecond:n=r.visitTimeSecond||r.visitTime;break;case z.TimeMillisecond:n=r.visitTimeMillisecond||r.visitTime;break;case z.TimeMicrosecond:n=r.visitTimeMicrosecond||r.visitTime;break;case z.TimeNanosecond:n=r.visitTimeNanosecond||r.visitTime;break;case z.Decimal:n=r.visitDecimal;break;case z.List:n=r.visitList;break;case z.Struct:n=r.visitStruct;break;case z.Union:n=r.visitUnion;break;case z.DenseUnion:n=r.visitDenseUnion||r.visitUnion;break;case z.SparseUnion:n=r.visitSparseUnion||r.visitUnion;break;case z.Dictionary:n=r.visitDictionary;break;case z.Interval:n=r.visitInterval;break;case z.IntervalDayTime:n=r.visitIntervalDayTime||r.visitInterval;break;case z.IntervalYearMonth:n=r.visitIntervalYearMonth||r.visitInterval;break;case z.Duration:n=r.visitDuration;break;case z.DurationSecond:n=r.visitDurationSecond||r.visitDuration;break;case z.DurationMillisecond:n=r.visitDurationMillisecond||r.visitDuration;break;case z.DurationMicrosecond:n=r.visitDurationMicrosecond||r.visitDuration;break;case z.DurationNanosecond:n=r.visitDurationNanosecond||r.visitDuration;break;case z.FixedSizeList:n=r.visitFixedSizeList;break;case z.Map:n=r.visitMap;break}if(typeof n=="function")return n;if(!e)return()=>null;throw new Error(`Unrecognized type '${z[t]}'`)}function l0(r){switch(r.typeId){case z.Null:return z.Null;case z.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?z.Int8:z.Uint8;case 16:return e?z.Int16:z.Uint16;case 32:return e?z.Int32:z.Uint32;case 64:return e?z.Int64:z.Uint64}return z.Int}case z.Float:switch(r.precision){case mr.HALF:return z.Float16;case mr.SINGLE:return z.Float32;case mr.DOUBLE:return z.Float64}return z.Float;case z.Binary:return z.Binary;case z.LargeBinary:return z.LargeBinary;case z.Utf8:return z.Utf8;case z.LargeUtf8:return z.LargeUtf8;case z.Bool:return z.Bool;case z.Decimal:return z.Decimal;case z.Time:switch(r.unit){case $t.SECOND:return z.TimeSecond;case $t.MILLISECOND:return z.TimeMillisecond;case $t.MICROSECOND:return z.TimeMicrosecond;case $t.NANOSECOND:return z.TimeNanosecond}return z.Time;case z.Timestamp:switch(r.unit){case $t.SECOND:return z.TimestampSecond;case $t.MILLISECOND:return z.TimestampMillisecond;case $t.MICROSECOND:return z.TimestampMicrosecond;case $t.NANOSECOND:return z.TimestampNanosecond}return z.Timestamp;case z.Date:switch(r.unit){case dn.DAY:return z.DateDay;case dn.MILLISECOND:return z.DateMillisecond}return z.Date;case z.Interval:switch(r.unit){case qn.DAY_TIME:return z.IntervalDayTime;case qn.YEAR_MONTH:return z.IntervalYearMonth}return z.Interval;case z.Duration:switch(r.unit){case $t.SECOND:return z.DurationSecond;case $t.MILLISECOND:return z.DurationMillisecond;case $t.MICROSECOND:return z.DurationMicrosecond;case $t.NANOSECOND:return z.DurationNanosecond}return z.Duration;case z.Map:return z.Map;case z.List:return z.List;case z.Struct:return z.Struct;case z.Union:switch(r.mode){case gr.Dense:return z.DenseUnion;case gr.Sparse:return z.SparseUnion}return z.Union;case z.FixedSizeBinary:return z.FixedSizeBinary;case z.FixedSizeList:return z.FixedSizeList;case z.Dictionary:return z.Dictionary}throw new Error(`Unrecognized type '${z[r.typeId]}'`)}le.prototype.visitInt8=null;le.prototype.visitInt16=null;le.prototype.visitInt32=null;le.prototype.visitInt64=null;le.prototype.visitUint8=null;le.prototype.visitUint16=null;le.prototype.visitUint32=null;le.prototype.visitUint64=null;le.prototype.visitFloat16=null;le.prototype.visitFloat32=null;le.prototype.visitFloat64=null;le.prototype.visitDateDay=null;le.prototype.visitDateMillisecond=null;le.prototype.visitTimestampSecond=null;le.prototype.visitTimestampMillisecond=null;le.prototype.visitTimestampMicrosecond=null;le.prototype.visitTimestampNanosecond=null;le.prototype.visitTimeSecond=null;le.prototype.visitTimeMillisecond=null;le.prototype.visitTimeMicrosecond=null;le.prototype.visitTimeNanosecond=null;le.prototype.visitDenseUnion=null;le.prototype.visitSparseUnion=null;le.prototype.visitIntervalDayTime=null;le.prototype.visitIntervalYearMonth=null;le.prototype.visitDuration=null;le.prototype.visitDurationSecond=null;le.prototype.visitDurationMillisecond=null;le.prototype.visitDurationMicrosecond=null;le.prototype.visitDurationNanosecond=null;const j1=new Float64Array(1),lo=new Uint32Array(j1.buffer);function $1(r){const t=(r&31744)>>10,e=(r&1023)/1024,n=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return n*(e?Number.NaN:1/0);case 0:return n*(e?6103515625e-14*e:0)}return n*Math.pow(2,t-15)*(1+e)}function gN(r){if(r!==r)return 32256;j1[0]=r;const t=(lo[1]&2147483648)>>16&65535;let e=lo[1]&2146435072,n=0;return e>=1089470464?lo[0]>0?e=31744:(e=(e&2080374784)>>16,n=(lo[1]&1048575)>>10):e<=1056964608?(n=1048576+(lo[1]&1048575),n=1048576+(n<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,n=(lo[1]&1048575)+512>>10),t|e|n&65535}let Gt=class extends le{};function Zt(r){return(t,e,n)=>{if(t.setValid(e,n!=null))return r(t,e,n)}}const yN=(r,t,e)=>{r[t]=Math.floor(e/864e5)},G1=(r,t,e,n)=>{if(e+1{const i=r+e;n?t[i>>3]|=1<>3]&=~(1<{r[t]=e},Cm=({values:r},t,e)=>{r[t]=e},W1=({values:r},t,e)=>{r[t]=gN(e)},_N=(r,t,e)=>{switch(r.type.precision){case mr.HALF:return W1(r,t,e);case mr.SINGLE:case mr.DOUBLE:return Cm(r,t,e)}},H1=({values:r},t,e)=>{yN(r,t,e.valueOf())},X1=({values:r},t,e)=>{r[t]=BigInt(e)},bN=({stride:r,values:t},e,n)=>{t.set(n.subarray(0,r),r*e)},Y1=({values:r,valueOffsets:t},e,n)=>G1(r,t,e,n),q1=({values:r,valueOffsets:t},e,n)=>G1(r,t,e,Mm(n)),xN=(r,t,e)=>{r.type.unit===dn.DAY?H1(r,t,e):X1(r,t,e)},Q1=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},Z1=({values:r},t,e)=>{r[t]=BigInt(e)},K1=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},J1=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},wN=(r,t,e)=>{switch(r.type.unit){case $t.SECOND:return Q1(r,t,e);case $t.MILLISECOND:return Z1(r,t,e);case $t.MICROSECOND:return K1(r,t,e);case $t.NANOSECOND:return J1(r,t,e)}},tS=({values:r},t,e)=>{r[t]=e},eS=({values:r},t,e)=>{r[t]=e},rS=({values:r},t,e)=>{r[t]=e},nS=({values:r},t,e)=>{r[t]=e},SN=(r,t,e)=>{switch(r.type.unit){case $t.SECOND:return tS(r,t,e);case $t.MILLISECOND:return eS(r,t,e);case $t.MICROSECOND:return rS(r,t,e);case $t.NANOSECOND:return nS(r,t,e)}},TN=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},IN=(r,t,e)=>{const n=r.children[0],i=r.valueOffsets,s=fn.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=i[t],l=i[t+1];a{const n=r.children[0],{valueOffsets:i}=r,s=fn.getVisitFn(n);let{[t]:o,[t+1]:a}=i;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(n,o,u),++o>=a)break},EN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),AN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),CN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),ON=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),PN=(r,t,e)=>{const n=r.type.children.map(s=>fn.getVisitFn(s.type)),i=e instanceof Map?CN(t,e):e instanceof ze?AN(t,e):Array.isArray(e)?EN(t,e):ON(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},RN=(r,t,e)=>{r.type.mode===gr.Dense?iS(r,t,e):sS(r,t,e)},iS=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];fn.visit(i,r.valueOffsets[t],e)},sS=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];fn.visit(i,t,e)},FN=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},LN=(r,t,e)=>{r.type.unit===qn.DAY_TIME?oS(r,t,e):aS(r,t,e)},oS=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},aS=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},lS=({values:r},t,e)=>{r[t]=e},uS=({values:r},t,e)=>{r[t]=e},cS=({values:r},t,e)=>{r[t]=e},hS=({values:r},t,e)=>{r[t]=e},DN=(r,t,e)=>{switch(r.type.unit){case $t.SECOND:return lS(r,t,e);case $t.MILLISECOND:return uS(r,t,e);case $t.MICROSECOND:return cS(r,t,e);case $t.NANOSECOND:return hS(r,t,e)}},NN=(r,t,e)=>{const{stride:n}=r,i=r.children[0],s=fn.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=t*n;++o`${ll(t)}: ${ll(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new BN(this[yn],this[ko])}},BN=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[yn].type.children.findIndex(n=>n.name===e)!==-1}getOwnPropertyDescriptor(t,e){if(t[yn].type.children.findIndex(n=>n.name===e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[yn].type.children.findIndex(i=>i.name===e);if(n!==-1){const i=Or.visit(t[yn].children[n],t[ko]);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[yn].type.children.findIndex(s=>s.name===e);return i!==-1?(fn.visit(t[yn].children[i],t[ko],n),Reflect.set(t,e,n)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,n):!1}},Dt=class extends le{};function Wt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const UN=(r,t)=>864e5*r[t],zN=(r,t)=>null,dS=(r,t,e)=>{if(e+1>=t.length)return null;const n=Ae(t[e]),i=Ae(t[e+1]);return r.subarray(n,i)},VN=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<UN(r,t),pS=({values:r},t)=>Ae(r[t]),ts=({stride:r,values:t},e)=>t[r*e],jN=({stride:r,values:t},e)=>$1(t[r*e]),mS=({values:r},t)=>r[t],$N=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),gS=({values:r,valueOffsets:t},e)=>dS(r,t,e),yS=({values:r,valueOffsets:t},e)=>{const n=dS(r,t,e);return n!==null?pp(n):null},GN=({values:r},t)=>r[t],WN=({type:r,values:t},e)=>r.precision!==mr.HALF?t[e]:$1(t[e]),HN=(r,t)=>r.type.unit===dn.DAY?fS(r,t):pS(r,t),vS=({values:r},t)=>1e3*Ae(r[t]),_S=({values:r},t)=>Ae(r[t]),bS=({values:r},t)=>y1(r[t],BigInt(1e3)),xS=({values:r},t)=>y1(r[t],BigInt(1e6)),XN=(r,t)=>{switch(r.type.unit){case $t.SECOND:return vS(r,t);case $t.MILLISECOND:return _S(r,t);case $t.MICROSECOND:return bS(r,t);case $t.NANOSECOND:return xS(r,t)}},wS=({values:r},t)=>r[t],SS=({values:r},t)=>r[t],TS=({values:r},t)=>r[t],IS=({values:r},t)=>r[t],YN=(r,t)=>{switch(r.type.unit){case $t.SECOND:return wS(r,t);case $t.MILLISECOND:return SS(r,t);case $t.MICROSECOND:return TS(r,t);case $t.NANOSECOND:return IS(r,t)}},qN=({values:r,stride:t},e)=>fN.decimal(r.subarray(t*e,t*(e+1))),QN=(r,t)=>{const{valueOffsets:e,stride:n,children:i}=r,{[t*n]:s,[t*n+1]:o}=e,l=i[0].slice(s,o-s);return new ze([l])},ZN=(r,t)=>{const{valueOffsets:e,children:n}=r,{[t]:i,[t+1]:s}=e,o=n[0];return new Pm(o.slice(i,s-i))},KN=(r,t)=>new Om(r,t),JN=(r,t)=>r.type.mode===gr.Dense?MS(r,t):ES(r,t),MS=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return Or.visit(n,r.valueOffsets[t])},ES=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return Or.visit(n,t)},t3=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},e3=(r,t)=>r.type.unit===qn.DAY_TIME?AS(r,t):CS(r,t),AS=({values:r},t)=>r.subarray(2*t,2*(t+1)),CS=({values:r},t)=>{const e=r[t],n=new Int32Array(2);return n[0]=Math.trunc(e/12),n[1]=Math.trunc(e%12),n},OS=({values:r},t)=>r[t],PS=({values:r},t)=>r[t],RS=({values:r},t)=>r[t],FS=({values:r},t)=>r[t],r3=(r,t)=>{switch(r.type.unit){case $t.SECOND:return OS(r,t);case $t.MILLISECOND:return PS(r,t);case $t.MICROSECOND:return RS(r,t);case $t.NANOSECOND:return FS(r,t)}},n3=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new ze([s])};Dt.prototype.visitNull=Wt(zN);Dt.prototype.visitBool=Wt(VN);Dt.prototype.visitInt=Wt(GN);Dt.prototype.visitInt8=Wt(ts);Dt.prototype.visitInt16=Wt(ts);Dt.prototype.visitInt32=Wt(ts);Dt.prototype.visitInt64=Wt(mS);Dt.prototype.visitUint8=Wt(ts);Dt.prototype.visitUint16=Wt(ts);Dt.prototype.visitUint32=Wt(ts);Dt.prototype.visitUint64=Wt(mS);Dt.prototype.visitFloat=Wt(WN);Dt.prototype.visitFloat16=Wt(jN);Dt.prototype.visitFloat32=Wt(ts);Dt.prototype.visitFloat64=Wt(ts);Dt.prototype.visitUtf8=Wt(yS);Dt.prototype.visitLargeUtf8=Wt(yS);Dt.prototype.visitBinary=Wt(gS);Dt.prototype.visitLargeBinary=Wt(gS);Dt.prototype.visitFixedSizeBinary=Wt($N);Dt.prototype.visitDate=Wt(HN);Dt.prototype.visitDateDay=Wt(fS);Dt.prototype.visitDateMillisecond=Wt(pS);Dt.prototype.visitTimestamp=Wt(XN);Dt.prototype.visitTimestampSecond=Wt(vS);Dt.prototype.visitTimestampMillisecond=Wt(_S);Dt.prototype.visitTimestampMicrosecond=Wt(bS);Dt.prototype.visitTimestampNanosecond=Wt(xS);Dt.prototype.visitTime=Wt(YN);Dt.prototype.visitTimeSecond=Wt(wS);Dt.prototype.visitTimeMillisecond=Wt(SS);Dt.prototype.visitTimeMicrosecond=Wt(TS);Dt.prototype.visitTimeNanosecond=Wt(IS);Dt.prototype.visitDecimal=Wt(qN);Dt.prototype.visitList=Wt(QN);Dt.prototype.visitStruct=Wt(KN);Dt.prototype.visitUnion=Wt(JN);Dt.prototype.visitDenseUnion=Wt(MS);Dt.prototype.visitSparseUnion=Wt(ES);Dt.prototype.visitDictionary=Wt(t3);Dt.prototype.visitInterval=Wt(e3);Dt.prototype.visitIntervalDayTime=Wt(AS);Dt.prototype.visitIntervalYearMonth=Wt(CS);Dt.prototype.visitDuration=Wt(r3);Dt.prototype.visitDurationSecond=Wt(OS);Dt.prototype.visitDurationMillisecond=Wt(PS);Dt.prototype.visitDurationMicrosecond=Wt(RS);Dt.prototype.visitDurationNanosecond=Wt(FS);Dt.prototype.visitFixedSizeList=Wt(n3);Dt.prototype.visitMap=Wt(ZN);const Or=new Dt,So=Symbol.for("keys"),Uo=Symbol.for("vals"),To=Symbol.for("kKeysAsStrings"),xp=Symbol.for("_kKeysAsStrings");let Pm=class{constructor(t){return this[So]=new ze([t.children[0]]).memoize(),this[Uo]=t.children[1],new Proxy(this,new s3)}get[To](){return this[xp]||(this[xp]=Array.from(this[So].toArray(),String))}[Symbol.iterator](){return new i3(this[So],this[Uo])}get size(){return this[So].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[So],e=this[Uo],n={};for(let i=-1,s=t.length;++i`${ll(t)}: ${ll(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},i3=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),Or.visit(this.vals,t)]})}},s3=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[To]}has(t,e){return t[To].includes(e)}getOwnPropertyDescriptor(t,e){if(t[To].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[To].indexOf(e);if(n!==-1){const i=Or.visit(Reflect.get(t,Uo),n);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[To].indexOf(e);return i!==-1?(fn.visit(Reflect.get(t,Uo),i,n),Reflect.set(t,e,n)):Reflect.has(t,e)?Reflect.set(t,e,n):!1}};Object.defineProperties(Pm.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[So]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Uo]:{writable:!0,enumerable:!1,configurable:!1,value:null},[xp]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let u0;function LS(r,t,e,n){const{length:i=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?i:e;return s<0&&(s=(s%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),n?n(r,s,o):[s,o]}const Rm=(r,t)=>r<0?t+r:r,c0=r=>r!==r;function aa(r){if(typeof r!=="object"||r===null)return c0(r)?c0:e=>e===r;if(r instanceof Date){const e=r.valueOf();return n=>n instanceof Date?n.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?rN(r,e):!1:r instanceof Map?a3(r):Array.isArray(r)?o3(r):r instanceof ze?l3(r):u3(r,!0)}function o3(r){const t=[];for(let e=-1,n=r.length;++e!1;const n=[];for(let i=-1,s=e.length;++i{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return c3(r,e);case Map:return h0(r,e,e.keys());case Pm:case Om:case Object:case void 0:return h0(r,e,t||Object.keys(e))}return e instanceof ze?h3(r,e):!1}}function c3(r,t){const e=r.length;if(t.length!==e)return!1;for(let n=-1;++n>n}function pc(r,t,e){const n=e.byteLength+7&-8;if(r>0||e.byteLength>3):mc(new Fm(e,r,t,null,DS)).subarray(0,n)),i}return e}function mc(r){const t=[];let e=0,n=0,i=0;for(const o of r)o&&(i|=1<0)&&(t[e++]=i);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}let Fm=class{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8===0?0:8-t%8);return wp(r,t,i)+wp(r,n,e)+f3(r,i>>3,n-i>>3)}function f3(r,t,e){let n=0,i=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:i+e;for(;o-i>=4;)n+=Wd(s.getUint32(i)),i+=4;for(;o-i>=2;)n+=Wd(s.getUint16(i)),i+=2;for(;o-i>=1;)n+=Wd(s.getUint8(i)),i+=1;return n}function Wd(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 p3=-1;let Pe=class Sp{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 Rt.isSparseUnion(t)?this.children.some(e=>e.nullable):Rt.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this;return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Rt.isUnion(this.type))return this.children.reduce((n,i)=>n+i.nullCount,0);let t=this._nullCount,e;return t<=p3&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-wp(e,this.offset,this.offset+this.length)),t}constructor(t,e,n,i,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;s instanceof Sp?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=fi(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(Rt.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===gr.Dense?this.valueOffsets[t]:t;return i.getValid(s)}if(this.nullable&&this.nullCount>0){const n=this.offset+t;return(this.nullBitmap[n>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(pc(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];n=(h&u)!==0,s[c]=e?h|u:h&~u}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new Sp(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(this._nullCount===0)-1,a=i===16?n:1,l=this._sliceBuffers(t,e,n,i);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===z.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);i[e>>3]=(1<0&&i.set(pc(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[di.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s;const{buffers:o}=this;return(s=o[di.TYPE])&&(o[di.TYPE]=s.subarray(t,t+e)),(s=o[di.OFFSET])&&(o[di.OFFSET]=s.subarray(t,t+e+1))||(s=o[di.DATA])&&(o[di.DATA]=i===6?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map(i=>i.slice(e,n))}};Pe.prototype.children=Object.freeze([]);class Xa extends le{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{["type"]:e,["offset"]:n=0,["length"]:i=0}=t;return new Pe(e,n,i,i)}visitBool(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length>>3,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitInt(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitFloat(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitUtf8(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.data),s=fe(t.nullBitmap),o=Ea(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,i,s])}visitLargeUtf8(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.data),s=fe(t.nullBitmap),o=Kv(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,i,s])}visitBinary(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.data),s=fe(t.nullBitmap),o=Ea(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,i,s])}visitLargeBinary(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.data),s=fe(t.nullBitmap),o=Kv(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,i,s])}visitFixedSizeBinary(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitDate(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitTimestamp(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitTime(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitDecimal(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitList(t){const{["type"]:e,["offset"]:n=0,["child"]:i}=t,s=fe(t.nullBitmap),o=Ea(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,void 0,s],[i])}visitStruct(t){const{["type"]:e,["offset"]:n=0,["children"]:i=[]}=t,s=fe(t.nullBitmap),{length:o=i.reduce((l,{length:u})=>Math.max(l,u),0),nullCount:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,void 0,s],i)}visitUnion(t){const{["type"]:e,["offset"]:n=0,["children"]:i=[]}=t,s=Me(e.ArrayType,t.typeIds),{["length"]:o=s.length,["nullCount"]:a=-1}=t;if(Rt.isSparseUnion(e))return new Pe(e,n,o,a,[void 0,void 0,void 0,s],i);const l=Ea(t.valueOffsets);return new Pe(e,n,o,a,[l,void 0,void 0,s],i)}visitDictionary(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.indices.ArrayType,t.data),{["dictionary"]:o=new ze([new Xa().visit({type:e.dictionary})])}=t,{["length"]:a=s.length,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[void 0,s,i],[],o)}visitInterval(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitDuration(t){const{["type"]:e,["offset"]:n=0}=t,i=fe(t.nullBitmap),s=Me(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,s,i])}visitFixedSizeList(t){const{["type"]:e,["offset"]:n=0,["child"]:i=new Xa().visit({type:e.valueType})}=t,s=fe(t.nullBitmap),{["length"]:o=i.length/fi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Pe(e,n,o,a,[void 0,void 0,s],[i])}visitMap(t){const{["type"]:e,["offset"]:n=0,["child"]:i=new Xa().visit({type:e.childType})}=t,s=fe(t.nullBitmap),o=Ea(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Pe(e,n,a,l,[o,void 0,s],[i])}}const m3=new Xa;function he(r){return m3.visit(r)}let d0=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 NS(r){return r.reduce((t,e)=>t+e.nullCount,0)}function BS(r){return r.reduce((t,e,n)=>(t[n+1]=t[n]+e.length,t),new Uint32Array(r.length+1))}function kS(r,t,e,n){const i=[];for(let s=-1,o=r.length;++s=n)break;if(e>=l+u)continue;if(l>=e&&l+u<=n){i.push(a);continue}const c=Math.max(0,e-l),h=Math.min(n-l,u);i.push(a.slice(c,h-c))}return i.length===0&&i.push(r[0].slice(0,0)),i}function Lm(r,t,e,n){let i=0,s=0,o=t.length-1;do{if(i>=o-1)return e0?0:-1}function v3(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let n=0;for(const i of new Fm(e,r.offset+(t||0),r.length,e,DS)){if(!i)return n;++n}return-1}function te(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case z.Union:break;case z.Dictionary:break;default:return v3(r,e)}const n=Or.getVisitFn(r),i=aa(t);for(let s=(e||0)-1,o=r.length;++s{const i=r.data[n];return i.values.subarray(0,i.length)[Symbol.iterator]()});let e=0;return new d0(r.data.length,n=>{const s=r.data[n].length,o=r.slice(e,e+s);return e+=s,new _3(o)})}let _3=class{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof Pe)))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}=$S[o.typeId],c=s[0];this.isValid=h=>Dm(c,h),this.get=h=>a(c,h),this.set=(h,f)=>l(c,h,f),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,GS[o.typeId]),this._offsets=BS(s);break}this.data=s,this.type=o,this.stride=fi(o),this.numChildren=(i=(n=o.children)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return g3(this.data)}get nullCount(){return NS(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${z[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(Rm(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return Nm.visit(this)}concat(...t){return new ws(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new ws(LS(this,t,e,({data:n,_offsets:i},s,o)=>kS(n,i,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this;switch(t.typeId){case z.Int:case z.Float:case z.Decimal:case z.Time:case z.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,n*i);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Rt.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Rt.isDictionary(this.type)){const t=new f0(this.data[0].dictionary),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new ws(e)}return new f0(this)}unmemoize(){if(Rt.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new ws(e)}return this}};jS=Symbol.toStringTag;ze[jS]=(r=>{r.type=Rt.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(z).map(e=>z[e]).filter(e=>typeof e=="number"&&e!==z.NONE);for(const e of t){const n=Or.getVisitFnByTypeId(e),i=fn.getVisitFnByTypeId(e),s=yc.getVisitFnByTypeId(e);$S[e]={get:n,set:i,indexOf:s},GS[e]=Object.create(r,{isValid:{value:gc(Dm)},get:{value:gc(Or.getVisitFnByTypeId(e))},set:{value:US(fn.getVisitFnByTypeId(e))},indexOf:{value:zS(yc.getVisitFnByTypeId(e))}})}return"Vector"})(ze.prototype);let f0=class WS extends ze{constructor(t){super(t.data);const e=this.get,n=this.set,i=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){n.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new WS(i.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new ze(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}};class Tp{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(t,e,n,i){return t.prep(8,24),t.writeInt64(BigInt(i??0)),t.pad(4),t.writeInt32(n),t.writeInt64(BigInt(e??0)),t.offset()}}class Lr{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 Lr).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+Se),(e||new Lr).__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):He.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6);return e?(t||new Fn).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const n=this.bb.__offset(this.bb_pos,8);return n?(e||new Tp).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}dictionariesLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,e){const n=this.bb.__offset(this.bb_pos,10);return n?(e||new Tp).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}recordBatchesLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12);return n?(e||new tr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,He.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}let Ue=class Ss{constructor(t=[],e,n,i=He.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=Ip(this.fields)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(t=>t.name)}toString(){return`Schema<{ ${this.fields.map((t,e)=>`${e}: ${t}`).join(", ")} }>`}select(t){const e=new Set(t),n=this.fields.filter(i=>e.has(i.name));return new Ss(n,this.metadata)}selectAt(t){const e=t.map(n=>this.fields[n]).filter(Boolean);return new Ss(e,this.metadata)}assign(...t){const e=t[0]instanceof Ss?t[0]:Array.isArray(t[0])?new Ss(t[0]):new Ss(t),n=[...this.fields],i=hu(hu(new Map,this.metadata),e.metadata),s=e.fields.filter(a=>{const l=n.findIndex(u=>u.name===a.name);return~l?(n[l]=a.clone({metadata:hu(hu(new Map,n[l].metadata),a.metadata)}))&&!1:!0}),o=Ip(s,new Map);return new Ss([...n,...s],i,new Map([...this.dictionaries,...o]))}};Ue.prototype.fields=null;Ue.prototype.metadata=null;Ue.prototype.dictionaries=null;class De{static new(...t){let[e,n,i,s]=t;return t[0]&&typeof t[0]=="object"&&({name:e}=t[0],n===void 0&&(n=t[0].type),i===void 0&&(i=t[0].nullable),s===void 0&&(s=t[0].metadata)),new De(`${e}`,n,i,s)}constructor(t,e,n=!1,i){this.name=t,this.type=e,this.nullable=n,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,n,i,s]=t;return!t[0]||typeof t[0]!="object"?[e=this.name,n=this.type,i=this.nullable,s=this.metadata]=t:{name:e=this.name,type:n=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0],De.new(e,n,i,s)}}De.prototype.type=null;De.prototype.name=null;De.prototype.nullable=null;De.prototype.metadata=null;function hu(r,t){return new Map([...r||new Map,...t||new Map])}function Ip(r,t=new Map){for(let e=-1,n=r.length;++e0&&Ip(s.children,t)}return t}var b3=f1,x3=Xo;class dl{static decode(t){t=new x3(fe(t));const e=Lr.getRootAsFooter(t),n=Ue.decode(e.schema(),new Map,e.version());return new w3(n,e)}static encode(t){const e=new b3,n=Ue.encode(e,t.schema);Lr.startRecordBatchesVector(e,t.numRecordBatches);for(const o of[...t.recordBatches()].slice().reverse())Xi.encode(e,o);const i=e.endVector();Lr.startDictionariesVector(e,t.numDictionaries);for(const o of[...t.dictionaryBatches()].slice().reverse())Xi.encode(e,o);const s=e.endVector();return Lr.startFooter(e),Lr.addSchema(e,n),Lr.addVersion(e,He.V5),Lr.addRecordBatches(e,i),Lr.addDictionaries(e,s),Lr.finishFooterBuffer(e,Lr.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=He.V5,n,i){this.schema=t,this.version=e,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let t,e=-1,n=this.numRecordBatches;++e=0&&t=0&&t=0&&t=0&&tthis._closedPromiseResolve=t)}get closed(){return this._closedPromise}cancel(t){return re(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(Ve);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return rn.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return rn.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return re(this,void 0,void 0,function*(){return yield this.abort(t),Ve})}return(t){return re(this,void 0,void 0,function*(){return yield this.close(),Ve})}read(t){return re(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return re(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((e,n)=>{this.resolvers.push({resolve:e,reject:n})}):Promise.resolve(Ve)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class Su extends S3{write(t){if((t=fe(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?pp(this.toUint8Array(!0)):this.toUint8Array(!1).then(pp)}toUint8Array(t=!1){return t?Yn(this._values)[0]:re(this,void 0,void 0,function*(){var e,n,i,s;const o=[];let a=0;try{for(var l=!0,u=Hn(this),c;c=yield u.next(),e=c.done,!e;l=!0){s=c.value,l=!1;const h=s;o.push(h),a+=h.byteLength}}catch(h){n={error:h}}finally{try{!l&&!e&&(i=u.return)&&(yield i.call(u))}finally{if(n)throw n.error}}return Yn(o,a)[0]})}}class vc{constructor(t){t&&(this.source=new T3(rn.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 Qo{constructor(t){t instanceof Qo?this.source=t.source:t instanceof Su?this.source=new ps(rn.fromAsyncIterable(t)):u1(t)?this.source=new ps(rn.fromNodeStream(t)):Em(t)?this.source=new ps(rn.fromDOMStream(t)):l1(t)?this.source=new ps(rn.fromDOMStream(t.body)):Tl(t)?this.source=new ps(rn.fromIterable(t)):zs(t)?this.source=new ps(rn.fromAsyncIterable(t)):oa(t)&&(this.source=new ps(rn.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 T3{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)||Ve)}return(t){return Object.create(this.source.return&&this.source.return(t)||Ve)}}class ps{constructor(t){this.source=t,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(t){return re(this,void 0,void 0,function*(){yield this.return(t)})}get closed(){return this._closedPromise}read(t){return re(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return re(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(t){return re(this,arguments,void 0,function*(e,n="read"){return yield this.source.next({cmd:n,size:e})})}throw(t){return re(this,void 0,void 0,function*(){const e=this.source.throw&&(yield this.source.throw(t))||Ve;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}return(t){return re(this,void 0,void 0,function*(){const e=this.source.return&&(yield this.source.return(t))||Ve;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}}class m0 extends vc{constructor(t,e){super(),this.position=0,this.buffer=fe(t),this.size=e===void 0?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:n}=this.readAt(t,4);return new DataView(e,n).getInt32(0,!0)}seek(t){return this.position=Math.min(t,this.size),t>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let i=e[3]*n[3];this.buffer[0]=i&65535;let s=i>>>16;return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${Oo(this.buffer[3])} ${Oo(this.buffer[2])} ${Oo(this.buffer[1])} ${Oo(this.buffer[0])}`}static multiply(t,e){return new ui(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new ui(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return ui.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return ui.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new ui(e);for(let o=n?1:0;o0&&this.readData(t,n)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class E3 extends XS{constructor(t,e,n,i,s){super(new Uint8Array(0),e,n,i,s),this.sources=t}readNullBitmap(t,e,{offset:n}=this.nextBufferRange()){return e<=0?new Uint8Array(0):mc(this.sources[n])}readOffsets(t,{offset:e}=this.nextBufferRange()){return Me(Uint8Array,Me(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return Me(Uint8Array,Me(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:n}=this;return Rt.isTimestamp(t)||(Rt.isInt(t)||Rt.isTime(t))&&t.bitWidth===64||Rt.isDuration(t)||Rt.isDate(t)&&t.unit===dn.MILLISECOND?Me(Uint8Array,Ya.convertArray(n[e])):Rt.isDecimal(t)?Me(Uint8Array,M3.convertArray(n[e])):Rt.isBinary(t)||Rt.isLargeBinary(t)||Rt.isFixedSizeBinary(t)?A3(n[e]):Rt.isBool(t)?mc(n[e]):Rt.isUtf8(t)||Rt.isLargeUtf8(t)?Mm(n[e].join("")):Me(Uint8Array,Me(t.ArrayType,n[e].map(i=>+i)))}}function A3(r){const t=r.join(""),e=new Uint8Array(t.length/2);for(let n=0;n>1]=Number.parseInt(t.slice(n,n+2),16);return e}let kt=class extends le{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((n,i)=>this.compareFields(n,e[i]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}};function Sr(r,t){return t instanceof r.constructor}function Qs(r,t){return r===t||Sr(r,t)}function Si(r,t){return r===t||Sr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function eh(r,t){return r===t||Sr(r,t)&&r.precision===t.precision}function C3(r,t){return r===t||Sr(r,t)&&r.byteWidth===t.byteWidth}function Um(r,t){return r===t||Sr(r,t)&&r.unit===t.unit}function Il(r,t){return r===t||Sr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function Ml(r,t){return r===t||Sr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function O3(r,t){return r===t||Sr(r,t)&&r.children.length===t.children.length&&Yi.compareManyFields(r.children,t.children)}function P3(r,t){return r===t||Sr(r,t)&&r.children.length===t.children.length&&Yi.compareManyFields(r.children,t.children)}function zm(r,t){return r===t||Sr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,n)=>e===t.typeIds[n])&&Yi.compareManyFields(r.children,t.children)}function R3(r,t){return r===t||Sr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Yi.visit(r.indices,t.indices)&&Yi.visit(r.dictionary,t.dictionary)}function Vm(r,t){return r===t||Sr(r,t)&&r.unit===t.unit}function El(r,t){return r===t||Sr(r,t)&&r.unit===t.unit}function F3(r,t){return r===t||Sr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Yi.compareManyFields(r.children,t.children)}function L3(r,t){return r===t||Sr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Yi.compareManyFields(r.children,t.children)}kt.prototype.visitNull=Qs;kt.prototype.visitBool=Qs;kt.prototype.visitInt=Si;kt.prototype.visitInt8=Si;kt.prototype.visitInt16=Si;kt.prototype.visitInt32=Si;kt.prototype.visitInt64=Si;kt.prototype.visitUint8=Si;kt.prototype.visitUint16=Si;kt.prototype.visitUint32=Si;kt.prototype.visitUint64=Si;kt.prototype.visitFloat=eh;kt.prototype.visitFloat16=eh;kt.prototype.visitFloat32=eh;kt.prototype.visitFloat64=eh;kt.prototype.visitUtf8=Qs;kt.prototype.visitLargeUtf8=Qs;kt.prototype.visitBinary=Qs;kt.prototype.visitLargeBinary=Qs;kt.prototype.visitFixedSizeBinary=C3;kt.prototype.visitDate=Um;kt.prototype.visitDateDay=Um;kt.prototype.visitDateMillisecond=Um;kt.prototype.visitTimestamp=Il;kt.prototype.visitTimestampSecond=Il;kt.prototype.visitTimestampMillisecond=Il;kt.prototype.visitTimestampMicrosecond=Il;kt.prototype.visitTimestampNanosecond=Il;kt.prototype.visitTime=Ml;kt.prototype.visitTimeSecond=Ml;kt.prototype.visitTimeMillisecond=Ml;kt.prototype.visitTimeMicrosecond=Ml;kt.prototype.visitTimeNanosecond=Ml;kt.prototype.visitDecimal=Qs;kt.prototype.visitList=O3;kt.prototype.visitStruct=P3;kt.prototype.visitUnion=zm;kt.prototype.visitDenseUnion=zm;kt.prototype.visitSparseUnion=zm;kt.prototype.visitDictionary=R3;kt.prototype.visitInterval=Vm;kt.prototype.visitIntervalDayTime=Vm;kt.prototype.visitIntervalYearMonth=Vm;kt.prototype.visitDuration=El;kt.prototype.visitDurationSecond=El;kt.prototype.visitDurationMillisecond=El;kt.prototype.visitDurationMicrosecond=El;kt.prototype.visitDurationNanosecond=El;kt.prototype.visitFixedSizeList=F3;kt.prototype.visitMap=L3;const Yi=new kt;function Mp(r,t){return Yi.compareSchemas(r,t)}function Hd(r,t){return D3(r,t.map(e=>e.data.concat()))}function D3(r,t){const e=[...r.fields],n=[],i={numBatches:t.reduce((h,f)=>Math.max(h,f.length),0)};let s=0,o=0,a=-1;const l=t.length;let u,c=[];for(;i.numBatches-- >0;){for(o=Number.POSITIVE_INFINITY,a=-1;++a0&&(n[s++]=he({type:new br(e),length:o,nullCount:0,children:c.slice()})))}return[r=r.assign(e),n.map(h=>new Er(r,h))]}function N3(r,t,e,n,i){var s;const o=(t+63&-64)>>3;for(let a=-1,l=n.length;++a=t)c===t?e[a]=u:(e[a]=u.slice(0,t),i.numBatches=Math.max(i.numBatches,n[a].unshift(u.slice(t,c-t))));else{const h=r[a];r[a]=h.clone({nullable:!0}),e[a]=(s=u==null?void 0:u._changeLengthAndBackfillNullBitmap(t))!==null&&s!==void 0?s:he({type:h.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return e}var YS;let qi=class Ts{constructor(...t){var e,n;if(t.length===0)return this.batches=[],this.schema=new Ue([]),this._offsets=[0],this;let i,s;t[0]instanceof Ue&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop());const o=l=>{if(l){if(l instanceof Er)return[l];if(l instanceof Ts)return l.batches;if(l instanceof Pe){if(l.type instanceof br)return[new Er(new Ue(l.type.children),l)]}else{if(Array.isArray(l))return l.flatMap(u=>o(u));if(typeof l[Symbol.iterator]=="function")return[...l].flatMap(u=>o(u));if(typeof l=="object"){const u=Object.keys(l),c=u.map(d=>new ze([l[d]])),h=i??new Ue(u.map((d,m)=>new De(String(d),c[m].type,c[m].nullable))),[,f]=Hd(h,c);return f.length===0?[new Er(l)]:f}}}return[]},a=t.flatMap(l=>o(l));if(i=(n=i??((e=a[0])===null||e===void 0?void 0:e.schema))!==null&&n!==void 0?n:new Ue([]),!(i instanceof Ue))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const l of a){if(!(l instanceof Er))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!Mp(i,l.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=a,this._offsets=s??BS(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=NS(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(Rm(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?Nm.visit(new ze(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ ${this.toArray().join(`, `)} -]`}concat(...t){const e=this.schema,n=this.data.concat(t.flatMap(({data:i})=>i));return new Ts(e,n.map(i=>new Er(e,i)))}slice(t,e){const n=this.schema;[t,e]=DS({length:this.numRows},t,e);const i=kS(this.data,this._offsets,t,e);return new Ts(n,i.map(s=>new Er(n,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&tn.children[t]);if(e.length===0){const{type:n}=this.schema.fields[t],i=he({type:n,length:0,nullCount:0});e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new ze(e)}return null}setChild(t,e){var n;return this.setChildAt((n=this.schema.fields)===null||n===void 0?void 0:n.findIndex(i=>i.name===t),e)}setChildAt(t,e){let n=this.schema,i=[...this.batches];if(t>-1&&tthis.getChildAt(u));[s[t],a[t]]=[o,e],[n,i]=Hd(n,a)}return new Ts(n,i)}select(t){const e=this.schema.fields.reduce((n,i,s)=>n.set(i.name,s),new Map);return this.selectAt(t.map(n=>e.get(n)).filter(n=>n>-1))}selectAt(t){const e=this.schema.selectAt(t),n=this.batches.map(i=>i.selectAt(t));return new Ts(e,n)}assign(t){const e=this.schema.fields,[n,i]=t.schema.fields.reduce((a,l,u)=>{const[c,h]=a,f=e.findIndex(d=>d.name===l.name);return~f?h[f]=u:c.push(u),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,l)=>[l,i[l]]).map(([a,l])=>l===void 0?this.getChildAt(a):t.getChildAt(l)),...n.map(a=>t.getChildAt(a))].filter(Boolean);return new Ts(...Hd(s,o))}};YS=Symbol.toStringTag;qi[YS]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=gc(Lm),r.get=gc(Or.getVisitFn(z.Struct)),r.set=US(fn.getVisitFn(z.Struct)),r.indexOf=zS(yc.getVisitFn(z.Struct)),"Table"))(qi.prototype);var qS;let Er=class $a{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof Ue))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=he({nullCount:0,type:new br(this.schema.fields),children:this.schema.fields.map(e=>he({type:e.type,nullCount:0}))})]=t,!(this.data instanceof Pe))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=g0(this.schema,this.data.children);break}case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce((l,u,c)=>(l.children[c]=e[u],l.length=Math.max(l.length,e[u].length),l.fields[c]=Le.new({name:u,type:e[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new Ue(n),a=he({type:new br(n),length:s,children:i,nullCount:0});[this.schema,this.data]=g0(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=QS(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 Or.visit(this.data,t)}at(t){return this.get(Rm(t,this.numRows))}set(t,e){return fn.visit(this.data,t,e)}indexOf(t,e){return yc.visit(this.data,t,e)}[Symbol.iterator](){return Nm.visit(new ze([this.data]))}toArray(){return[...this]}concat(...t){return new qi(this.schema,[this,...t])}slice(t,e){const[n]=new ze([this.data]).slice(t,e).data;return new $a(this.schema,n)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&ti.name===t),e)}setChildAt(t,e){let n=this.schema,i=this.data;if(t>-1&&ta.name===s);~o&&(i[o]=this.data.children[o])}return new $a(e,he({type:n,length:this.numRows,children:i}))}selectAt(t){const e=this.schema.selectAt(t),n=t.map(s=>this.data.children[s]).filter(Boolean),i=he({type:new br(e.fields),length:this.numRows,children:n});return new $a(e,i)}};qS=Symbol.toStringTag;Er[qS]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(Er.prototype);function g0(r,t,e=t.reduce((n,i)=>Math.max(n,i.length),0)){var n;const i=[...r.fields],s=[...t],o=(e+63&-64)>>3;for(const[a,l]of r.fields.entries()){const u=t[a];(!u||u.length!==e)&&(i[a]=l.clone({nullable:!0}),s[a]=(n=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&n!==void 0?n:he({type:l.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(i),he({type:new br(i),length:e,children:s})]}function QS(r,t,e=new Map){var n,i;if(((n=r==null?void 0:r.length)!==null&&n!==void 0?n:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++she({type:i.type})),n=he({type:new br(t.fields),nullCount:0,children:e});super(t,n)}}let Pi=class Pn{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 Pn).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+Se),(e||new Pn).__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):He.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):ve.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12);return n?(e||new tr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,He.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,ve.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(t,e,n,i,s,o){return Pn.startMessage(t),Pn.addVersion(t,e),Pn.addHeaderType(t,n),Pn.addHeader(t,i),Pn.addBodyLength(t,s),Pn.addCustomMetadata(t,o),Pn.endMessage(t)}};class B3 extends le{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return o0.startNull(e),o0.endNull(e)}visitInt(t,e){return Br.startInt(e),Br.addBitWidth(e,t.bitWidth),Br.addIsSigned(e,t.isSigned),Br.endInt(e)}visitFloat(t,e){return Vn.startFloatingPoint(e),Vn.addPrecision(e,t.precision),Vn.endFloatingPoint(e)}visitBinary(t,e){return e0.startBinary(e),e0.endBinary(e)}visitLargeBinary(t,e){return n0.startLargeBinary(e),n0.endLargeBinary(e)}visitBool(t,e){return r0.startBool(e),r0.endBool(e)}visitUtf8(t,e){return a0.startUtf8(e),a0.endUtf8(e)}visitLargeUtf8(t,e){return i0.startLargeUtf8(e),i0.endLargeUtf8(e)}visitDecimal(t,e){return yo.startDecimal(e),yo.addScale(e,t.scale),yo.addPrecision(e,t.precision),yo.addBitWidth(e,t.bitWidth),yo.endDecimal(e)}visitDate(t,e){return yu.startDate(e),yu.addUnit(e,t.unit),yu.endDate(e)}visitTime(t,e){return on.startTime(e),on.addUnit(e,t.unit),on.addBitWidth(e,t.bitWidth),on.endTime(e)}visitTimestamp(t,e){const n=t.timezone&&e.createString(t.timezone)||void 0;return an.startTimestamp(e),an.addUnit(e,t.unit),n!==void 0&&an.addTimezone(e,n),an.endTimestamp(e)}visitInterval(t,e){return jn.startInterval(e),jn.addUnit(e,t.unit),jn.endInterval(e)}visitDuration(t,e){return vu.startDuration(e),vu.addUnit(e,t.unit),vu.endDuration(e)}visitList(t,e){return s0.startList(e),s0.endList(e)}visitStruct(t,e){return Ps.startStruct_(e),Ps.endStruct_(e)}visitUnion(t,e){Mr.startTypeIdsVector(e,t.typeIds.length);const n=Mr.createTypeIdsVector(e,t.typeIds);return Mr.startUnion(e),Mr.addMode(e,t.mode),Mr.addTypeIds(e,n),Mr.endUnion(e)}visitDictionary(t,e){const n=this.visit(t.indices,e);return gi.startDictionaryEncoding(e),gi.addId(e,BigInt(t.id)),gi.addIsOrdered(e,t.isOrdered),n!==void 0&&gi.addIndexType(e,n),gi.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return _u.startFixedSizeBinary(e),_u.addByteWidth(e,t.byteWidth),_u.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return bu.startFixedSizeList(e),bu.addListSize(e,t.listSize),bu.endFixedSizeList(e)}visitMap(t,e){return xu.startMap(e),xu.addKeysSorted(e,t.keysSorted),xu.endMap(e)}}const Xd=new B3;function k3(r,t=new Map){return new Ue(z3(r,t),Tu(r.metadata),t)}function ZS(r){return new Wr(r.count,KS(r.columns),JS(r.columns))}function U3(r){return new Qn(ZS(r.data),r.id,r.isDelta)}function z3(r,t){return(r.fields||[]).filter(Boolean).map(e=>Le.fromJSON(e,t))}function y0(r,t){return(r.children||[]).filter(Boolean).map(e=>Le.fromJSON(e,t))}function KS(r){return(r||[]).reduce((t,e)=>[...t,new Qi(e.count,V3(e.VALIDITY)),...KS(e.children)],[])}function JS(r,t=[]){for(let e=-1,n=(r||[]).length;++et+ +(e===0),0)}function j3(r,t){let e,n,i,s,o,a;return!t||!(s=r.dictionary)?(o=_0(r,y0(r,t)),i=new Le(r.name,o,r.nullable,Tu(r.metadata))):t.has(e=s.id)?(n=(n=s.indexType)?v0(n):new hl,a=new qo(t.get(e),n,e,s.isOrdered),i=new Le(r.name,a,r.nullable,Tu(r.metadata))):(n=(n=s.indexType)?v0(n):new hl,t.set(e,o=_0(r,y0(r,t))),a=new qo(o,n,e,s.isOrdered),i=new Le(r.name,a,r.nullable,Tu(r.metadata))),i||null}function Tu(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function v0(r){return new Vs(r.isSigned,r.bitWidth)}function _0(r,t){const e=r.type.name;switch(e){case"NONE":return new Hi;case"null":return new Hi;case"binary":return new Ku;case"largebinary":return new Ju;case"utf8":return new tc;case"largeutf8":return new ec;case"bool":return new rc;case"list":return new uc((t||[])[0]);case"struct":return new br(t||[]);case"struct_":return new br(t||[])}switch(e){case"int":{const n=r.type;return new Vs(n.isSigned,n.bitWidth)}case"floatingpoint":{const n=r.type;return new Zu(mr[n.precision])}case"decimal":{const n=r.type;return new nc(n.scale,n.precision,n.bitWidth)}case"date":{const n=r.type;return new ic(dn[n.unit])}case"time":{const n=r.type;return new sc($t[n.unit],n.bitWidth)}case"timestamp":{const n=r.type;return new oc($t[n.unit],n.timezone)}case"interval":{const n=r.type;return new ac(qn[n.unit])}case"duration":{const n=r.type;return new lc($t[n.unit])}case"union":{const n=r.type,[i,...s]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("");return new cc(gr[o],n.typeIds||[],t||[])}case"fixedsizebinary":{const n=r.type;return new hc(n.byteWidth)}case"fixedsizelist":{const n=r.type;return new dc(n.listSize,(t||[])[0])}case"map":{const n=r.type;return new fc((t||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var $3=f1,G3=Xo;class xr{static fromJSON(t,e){const n=new xr(0,He.V5,e);return n._createHeader=W3(t,e),n}static decode(t){t=new G3(fe(t));const e=Pi.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new xr(n,i,s);return o._createHeader=H3(e,s),o}static encode(t){const e=new $3;let n=-1;return t.isSchema()?n=Ue.encode(e,t.header()):t.isRecordBatch()?n=Wr.encode(e,t.header()):t.isDictionaryBatch()&&(n=Qn.encode(e,t.header())),Pi.startMessage(e),Pi.addVersion(e,He.V5),Pi.addHeader(e,n),Pi.addHeaderType(e,t.headerType),Pi.addBodyLength(e,BigInt(t.bodyLength)),Pi.finishMessageBuffer(e,Pi.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof Ue)return new xr(0,He.V5,ve.Schema,t);if(t instanceof Wr)return new xr(e,He.V5,ve.RecordBatch,t);if(t instanceof Qn)return new xr(e,He.V5,ve.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===ve.Schema}isRecordBatch(){return this.headerType===ve.RecordBatch}isDictionaryBatch(){return this.headerType===ve.DictionaryBatch}constructor(t,e,n,i){this._version=e,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=Ae(t)}}class Wr{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,n){this._nodes=e,this._buffers=n,this._length=Ae(t)}}class Qn{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,n=!1){this._data=t,this._isDelta=n,this._id=Ae(e)}}class Gn{constructor(t,e){this.offset=Ae(t),this.length=Ae(e)}}class Qi{constructor(t,e){this.length=Ae(t),this.nullCount=Ae(e)}}function W3(r,t){return()=>{switch(t){case ve.Schema:return Ue.fromJSON(r);case ve.RecordBatch:return Wr.fromJSON(r);case ve.DictionaryBatch:return Qn.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${ve[t]}, type: ${t} }`)}}function H3(r,t){return()=>{switch(t){case ve.Schema:return Ue.decode(r.header(new Fn),new Map,r.version());case ve.RecordBatch:return Wr.decode(r.header(new hi),r.version());case ve.DictionaryBatch:return Qn.decode(r.header(new mo),r.version())}throw new Error(`Unrecognized Message type: { name: ${ve[t]}, type: ${t} }`)}}Le.encode=nB;Le.decode=eB;Le.fromJSON=j3;Ue.encode=rB;Ue.decode=X3;Ue.fromJSON=k3;Wr.encode=iB;Wr.decode=Y3;Wr.fromJSON=ZS;Qn.encode=sB;Qn.decode=q3;Qn.fromJSON=U3;Qi.encode=oB;Qi.decode=Z3;Gn.encode=aB;Gn.decode=Q3;function X3(r,t=new Map,e=He.V5){const n=tB(r,t);return new Ue(n,Iu(r),t,e)}function Y3(r,t=He.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Wr(r.length(),K3(r),J3(r,t))}function q3(r,t=He.V5){return new Qn(Wr.decode(r.data(),t),r.id(),r.isDelta())}function Q3(r){return new Gn(r.offset(),r.length())}function Z3(r){return new Qi(r.length(),r.nullCount())}function K3(r){const t=[];for(let e,n=-1,i=-1,s=r.nodesLength();++nLe.encode(r,s));Fn.startFieldsVector(r,e.length);const n=Fn.createFieldsVector(r,e),i=t.metadata&&t.metadata.size>0?Fn.createCustomMetadataVector(r,[...t.metadata].map(([s,o])=>{const a=r.createString(`${s}`),l=r.createString(`${o}`);return tr.startKeyValue(r),tr.addKey(r,a),tr.addValue(r,l),tr.endKeyValue(r)})):-1;return Fn.startSchema(r),Fn.addFields(r,n),Fn.addEndianness(r,lB?Yo.Little:Yo.Big),i!==-1&&Fn.addCustomMetadata(r,i),Fn.endSchema(r)}function nB(r,t){let e=-1,n=-1,i=-1;const s=t.type;let o=t.typeId;Rt.isDictionary(s)?(o=s.dictionary.typeId,i=Xd.visit(s,r),n=Xd.visit(s.dictionary,r)):n=Xd.visit(s,r);const a=(s.children||[]).map(c=>Le.encode(r,c)),l=Jr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Jr.createCustomMetadataVector(r,[...t.metadata].map(([c,h])=>{const f=r.createString(`${c}`),d=r.createString(`${h}`);return tr.startKeyValue(r),tr.addKey(r,f),tr.addValue(r,d),tr.endKeyValue(r)})):-1;return t.name&&(e=r.createString(t.name)),Jr.startField(r),Jr.addType(r,n),Jr.addTypeType(r,o),Jr.addChildren(r,l),Jr.addNullable(r,!!t.nullable),e!==-1&&Jr.addName(r,e),i!==-1&&Jr.addDictionary(r,i),u!==-1&&Jr.addCustomMetadata(r,u),Jr.endField(r)}function iB(r,t){const e=t.nodes||[],n=t.buffers||[];hi.startNodesVector(r,e.length);for(const o of e.slice().reverse())Qi.encode(r,o);const i=r.endVector();hi.startBuffersVector(r,n.length);for(const o of n.slice().reverse())Gn.encode(r,o);const s=r.endVector();return hi.startRecordBatch(r),hi.addLength(r,BigInt(t.length)),hi.addNodes(r,i),hi.addBuffers(r,s),hi.endRecordBatch(r)}function sB(r,t){const e=Wr.encode(r,t.data);return mo.startDictionaryBatch(r),mo.addId(r,BigInt(t.id)),mo.addIsDelta(r,t.isDelta),mo.addData(r,e),mo.endDictionaryBatch(r)}function oB(r,t){return g1.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function aB(r,t){return m1.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const lB=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),$m=r=>`Expected ${ve[r]} Message in stream, but was null or length 0.`,Gm=r=>`Header pointer of flatbuffer-encoded ${ve[r]} Message is null or length 0.`,tT=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,eT=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class rT{constructor(t){this.source=t instanceof vc?t:new vc(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?Ve: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($m(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=fe(this.source.read(t));if(e.byteLength[...i,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE_ID&&[s.TYPE_ID]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...e(s.children)],[])}}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error($m(t));return e.value}readSchema(){const t=ve.Schema,e=this.readMessage(t),n=e==null?void 0:e.header();if(!e||!n)throw new Error(Gm(t));return n}}const rh=4,Ep="ARROW1",fl=new Uint8Array(Ep.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 rn.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return rn.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 un?t:mp(t)?mB(t):a1(t)?vB(t):zs(t)?re(this,void 0,void 0,function*(){return yield un.from(yield t)}):l1(t)||Em(t)||u1(t)||oa(t)?yB(new Qo(t)):gB(new vc(t))}static readAll(t){return t instanceof un?t.isSync()?S0(t):T0(t):mp(t)||ArrayBuffer.isView(t)||Tl(t)||o1(t)?S0(t):T0(t)}}class bc extends un{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Ar(this,arguments,function*(){yield Dt(yield*ks(Hn(this[Symbol.iterator]())))})}}class xc extends un{constructor(t){super(t),this._impl=t}readAll(){return re(this,void 0,void 0,function*(){var t,e,n,i;const s=new Array;try{for(var o=!0,a=Hn(this),l;l=yield a.next(),t=l.done,!t;o=!0){i=l.value,o=!1;const u=i;s.push(u)}}catch(u){e={error:u}}finally{try{!o&&!t&&(n=a.return)&&(yield n.call(a))}finally{if(e)throw e.error}}return s})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class iT extends bc{constructor(t){super(t),this._impl=t}}class dB extends xc{constructor(t){super(t),this._impl=t}}class sT{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const n=this._loadVectors(t,e,this.schema.fields),i=he({type:new br(this.schema.fields),length:t.length,children:n});return new Er(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,a=s.get(n),l=o.dictionaries.get(n),u=this._loadVectors(t.data,e,[l]);return(a&&i?a.concat(new ze(u)):new ze(u)).memoize()}_loadVectors(t,e,n){return new XS(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class wc extends sT{constructor(t,e){super(e),this._reader=mp(t)?new cB(this._handle=t):new rT(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=aT(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):Ve}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):Ve}next(){if(this.closed)return Ve;let t;const{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const n=t.header(),i=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const n=t.header(),i=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new jm(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class Sc extends sT{constructor(t,e){super(e),this._reader=new uB(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return re(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 re(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=aT(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return re(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):Ve})}return(t){return re(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):Ve})}next(){return re(this,void 0,void 0,function*(){if(this.closed)return Ve;let t;const{_reader:e}=this;for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const n=t.header(),i=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const n=t.header(),i=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new jm(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return re(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class oT extends wc{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 m0?t:new m0(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e;if(this.closed)return null;this._footer||this.open();const n=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(ve.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null}_readDictionaryBatch(t){var e;const n=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(ve.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){const{_handle:t}=this,e=t.size-nT,n=t.readInt32(e),i=t.readAt(e-n,n);return dl.decode(i)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return re(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const n of this._footer.dictionaryBatches())n&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return re(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());const n=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(ve.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null})}_readDictionaryBatch(t){return re(this,void 0,void 0,function*(){var e;const n=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(ve.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return re(this,void 0,void 0,function*(){const{_handle:t}=this;t._pending&&(yield t._pending);const e=t.size-nT,n=yield t.readInt32(e),i=yield t.readAt(e-n,n);return dl.decode(i)})}_readNextMessageAndValidate(t){return re(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?Wm(t)?new iT(new oT(r.read())):new bc(new wc(r)):new bc(new wc(function*(){}()))}function yB(r){return re(this,void 0,void 0,function*(){const t=yield r.peek(Al+7&-8);return t&&t.byteLength>=4?Wm(t)?new iT(new oT(yield r.read())):new xc(new Sc(r)):new xc(new Sc(function(){return Ar(this,arguments,function*(){})}()))})}function vB(r){return re(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new _c(r,t);return t>=hB&&Wm(yield e.readAt(0,Al+7&-8))?new dB(new fB(e)):new xc(new Sc(e))})}class $e extends le{static assemble(...t){const e=i=>i.flatMap(s=>Array.isArray(s)?e(s):s instanceof Er?s.data.children:s.data),n=new $e;return n.visitMany(e(t)),n}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof ze)return this.visitMany(t.data),this;const{type:e}=t;if(!Rt.isDictionary(e)){const{length:n}=t;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(Rt.isUnion(e))this.nodes.push(new Qi(n,0));else{const{nullCount:i}=t;Rt.isNull(e)||bn.call(this,i<=0?new Uint8Array(0):pc(t.offset,n,t.nullBitmap)),this.nodes.push(new Qi(n,i))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function bn(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new Gn(this._byteLength,t)),this._byteLength+=t,this}function _B(r){var t;const{type:e,length:n,typeIds:i,valueOffsets:s}=r;if(bn.call(this,i),e.mode===gr.Sparse)return Ap.call(this,r);if(e.mode===gr.Dense){if(r.offset<=0)return bn.call(this,s),Ap.call(this,r);{const o=new Int32Array(n),a=Object.create(null),l=Object.create(null);for(let u,c,h=-1;++h{const h=e.typeIds[c],f=a[h],d=l[h];return u.slice(f,Math.min(n,d))}))}}return this}function bB(r){let t;return r.nullCount>=r.length?bn.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?bn.call(this,pc(r.offset,r.length,t)):bn.call(this,mc(r.values))}function Ti(r){return bn.call(this,r.values.subarray(0,r.length*r.stride))}function nh(r){const{length:t,values:e,valueOffsets:n}=r,i=Ae(n[0]),s=Ae(n[t]),o=Math.min(s-i,e.byteLength-i);return bn.call(this,h1(-i,t+1,n)),bn.call(this,e.subarray(i,i+o)),this}function Hm(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:n,[t]:i}=e;return bn.call(this,h1(-n,t+1,e)),this.visit(r.children[0].slice(n,i-n))}return this.visit(r.children[0])}function Ap(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}$e.prototype.visitBool=bB;$e.prototype.visitInt=Ti;$e.prototype.visitFloat=Ti;$e.prototype.visitUtf8=nh;$e.prototype.visitLargeUtf8=nh;$e.prototype.visitBinary=nh;$e.prototype.visitLargeBinary=nh;$e.prototype.visitFixedSizeBinary=Ti;$e.prototype.visitDate=Ti;$e.prototype.visitTimestamp=Ti;$e.prototype.visitTime=Ti;$e.prototype.visitDecimal=Ti;$e.prototype.visitList=Hm;$e.prototype.visitStruct=Ap;$e.prototype.visitUnion=_B;$e.prototype.visitInterval=Ti;$e.prototype.visitDuration=Ti;$e.prototype.visitFixedSizeList=Hm;$e.prototype.visitMap=Hm;class lT extends Bm{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 Su,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Cr(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 zs(t)?t.then(e=>this.writeAll(e)):oa(t)?Qm(this,t):qm(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 Su?this._sink=t:(this._sink=new Su,t&&qL(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&QL(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||!Mp(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 qi&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof Er&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!Mp(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof Er?t instanceof jm||this._writeRecordBatch(t):t instanceof qi?this.writeAll(t.batches):Tl(t)&&this.writeAll(t)}_writeMessage(t,e=8){const n=e-1,i=xr.encode(t),s=i.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+n&~n,l=a-s-o;return t.headerType===ve.RecordBatch?this._recordBatchBlocks.push(new Xi(a,t.bodyLength,this._position)):t.headerType===ve.DictionaryBatch&&this._dictionaryBlocks.push(new Xi(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(i),this._writePadding(l)}_write(t){if(this._started){const e=fe(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(xr.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(fl)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){const{byteLength:e,nodes:n,bufferRegions:i,buffers:s}=$e.assemble(t),o=new Wr(t.numRows,n,i),a=xr.from(o,e);return this._writeDictionaries(t)._writeMessage(a)._writeBodyBuffers(s)}_writeDictionaryBatch(t,e,n=!1){const{byteLength:i,nodes:s,bufferRegions:o,buffers:a}=$e.assemble(new ze([t])),l=new Wr(t.length,s,o),u=new Qn(l,e,n),c=xr.from(u,i);return this._writeMessage(c)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e,n,i;for(let s=-1,o=t.length;++s0&&(this._write(e),(i=(n+7&-8)-n)>0&&this._writePadding(i));return this}_writeDictionaries(t){var e,n;for(const[i,s]of t.dictionaries){const o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(i),l=(n=this._dictionaryDeltaOffsets.get(i))!==null&&n!==void 0?n:0;if(!a||a.data[0]!==o[0])for(const[u,c]of o.entries())this._writeDictionaryBatch(c,i,u>0);else if(ln.writeAll(i)):oa(t)?Qm(n,t):qm(n,t)}}class Ym extends lT{static writeAll(t){const e=new Ym;return zs(t)?t.then(n=>e.writeAll(n)):oa(t)?Qm(e,t):qm(e,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,n=!1){if(!n&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,n)}_writeFooter(t){const e=dl.encode(new dl(t,He.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function qm(r,t){let e=t;t instanceof qi&&(e=t.batches,r.reset(void 0,t.schema));for(const n of e)r.write(n);return r.finish()}function Qm(r,t){return re(this,void 0,void 0,function*(){var e,n,i,s,o,a,l;try{for(e=!0,n=Hn(t);i=yield n.next(),s=i.done,!s;e=!0){l=i.value,e=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!e&&!s&&(a=n.return)&&(yield a.call(n))}finally{if(o)throw o.error}}return r.finish()})}function xB(r,t="stream"){return(t==="stream"?Xm:Ym).writeAll(r).toUint8Array(!0)}var wB=Object.create,uT=Object.defineProperty,SB=Object.getOwnPropertyDescriptor,TB=Object.getOwnPropertyNames,IB=Object.getPrototypeOf,MB=Object.prototype.hasOwnProperty,EB=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),AB=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of TB(t))!MB.call(r,i)&&i!==e&&uT(r,i,{get:()=>t[i],enumerable:!(n=SB(t,i))||n.enumerable});return r},CB=(r,t,e)=>(e=r!=null?wB(IB(r)):{},AB(!r||!r.__esModule?uT(e,"default",{value:r,enumerable:!0}):e,r)),OB=EB((r,t)=>{t.exports=Worker}),cT=(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))(cT||{}),PB=(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))(PB||{}),RB=(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))(RB||{}),FB=(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))(FB||{}),DB=(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))(DB||{}),LB=(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))(LB||{}),NB=class{log(r){}},hT=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},BB=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(BB||{}),kB=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=un.from(t);return console.assert(e.isSync(),"Reader is not sync"),console.assert(e.isFile(),"Reader is not file"),new qi(e)}async send(r,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.startPendingQuery(this._conn,r,t);for(;e==null;)e=await this._bindings.pollPendingQuery(this._conn);let n=new dT(this._bindings,this._conn,e),i=await un.from(n);return console.assert(i.isAsync()),console.assert(i.isStream()),i}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(r){return await this._bindings.getTableNames(this._conn,r)}async prepare(r){let t=await this._bindings.createPrepared(this._conn,r);return new UB(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=xB(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)}},dT=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}},UB=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=un.from(t);return console.assert(e.isSync()),console.assert(e.isFile()),new qi(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new dT(this.bindings,this.connectionId,t),n=await un.from(e);return console.assert(n.isAsync()),console.assert(n.isStream()),n}},zB=(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))(zB||{}),VB=(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))(VB||{}),me=class{constructor(r,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=r,this.data=t,this.promise=new Promise((e,n)=>{this.promiseResolver=e,this.promiseRejecter=n})}};function Mu(r){switch(r.typeId){case z.Binary:return{sqlType:"binary"};case z.Bool:return{sqlType:"bool"};case z.Date:return{sqlType:"date"};case z.DateDay:return{sqlType:"date32[d]"};case z.DateMillisecond:return{sqlType:"date64[ms]"};case z.Decimal:{let t=r;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case z.Float:return{sqlType:"float"};case z.Float16:return{sqlType:"float16"};case z.Float32:return{sqlType:"float32"};case z.Float64:return{sqlType:"float64"};case z.Int:return{sqlType:"int32"};case z.Int16:return{sqlType:"int16"};case z.Int32:return{sqlType:"int32"};case z.Int64:return{sqlType:"int64"};case z.Uint16:return{sqlType:"uint16"};case z.Uint32:return{sqlType:"uint32"};case z.Uint64:return{sqlType:"uint64"};case z.Uint8:return{sqlType:"uint8"};case z.IntervalDayTime:return{sqlType:"interval[dt]"};case z.IntervalYearMonth:return{sqlType:"interval[m]"};case z.List:return{sqlType:"list",valueType:Mu(r.valueType)};case z.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case z.Null:return{sqlType:"null"};case z.Utf8:return{sqlType:"utf8"};case z.Struct:return{sqlType:"struct",fields:r.children.map(t=>Cp(t.name,t.type))};case z.Map:{let t=r;return{sqlType:"map",keyType:Mu(t.keyType),valueType:Mu(t.valueType)}}case z.Time:return{sqlType:"time[s]"};case z.TimeMicrosecond:return{sqlType:"time[us]"};case z.TimeMillisecond:return{sqlType:"time[ms]"};case z.TimeNanosecond:return{sqlType:"time[ns]"};case z.TimeSecond:return{sqlType:"time[s]"};case z.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case z.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case z.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case z.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case z.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function Cp(r,t){let e=Mu(t);return e.name=r,e}var jB=new TextEncoder,$B=class{constructor(r,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=r,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),t!=null&&this.attach(t)}get logger(){return this._logger}attach(r){this._worker=r,this._worker.addEventListener("message",this._onMessageHandler),this._worker.addEventListener("error",this._onErrorHandler),this._worker.addEventListener("close",this._onCloseHandler),this._workerShutdownPromise=new Promise((t,e)=>{this._workerShutdownResolver=t})}detach(){this._worker&&(this._worker.removeEventListener("message",this._onMessageHandler),this._worker.removeEventListener("error",this._onErrorHandler),this._worker.removeEventListener("close",this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(r,t=[]){if(!this._worker){console.error("cannot send a message since the worker is not set!");return}let e=this._nextMessageId++;return this._pendingRequests.set(e,r),this._worker.postMessage({messageId:e,type:r.type,data:r.data},t),await r.promise}onMessage(r){var t;let e=r.data;switch(e.type){case"LOG":{this._logger.log(e.data);return}case"INSTANTIATE_PROGRESS":{for(let i of this._onInstantiationProgress)i(e.data);return}}let n=this._pendingRequests.get(e.requestId);if(!n){console.warn("unassociated response: [".concat(e.requestId,", ").concat(e.type.toString(),"]"));return}if(this._pendingRequests.delete(e.requestId),e.type=="ERROR"){let i=new Error(e.data.message);i.name=e.data.name,(t=Object.getOwnPropertyDescriptor(i,"stack"))!=null&&t.writable&&(i.stack=e.data.stack),n.promiseRejecter(i);return}switch(n.type){case"CLOSE_PREPARED":case"COLLECT_FILE_STATISTICS":case"REGISTER_OPFS_FILE_NAME":case"COPY_FILE_TO_PATH":case"DISCONNECT":case"DROP_FILE":case"DROP_FILES":case"FLUSH_FILES":case"INSERT_ARROW_FROM_IPC_STREAM":case"IMPORT_CSV_FROM_PATH":case"IMPORT_JSON_FROM_PATH":case"OPEN":case"PING":case"REGISTER_FILE_BUFFER":case"REGISTER_FILE_HANDLE":case"REGISTER_FILE_URL":case"RESET":if(e.type=="OK"){n.promiseResolver(e.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],e.type=="OK"){n.promiseResolver(e.data);return}break;case"GLOB_FILE_INFOS":if(e.type=="FILE_INFOS"){n.promiseResolver(e.data);return}break;case"GET_VERSION":if(e.type=="VERSION_STRING"){n.promiseResolver(e.data);return}break;case"GET_FEATURE_FLAGS":if(e.type=="FEATURE_FLAGS"){n.promiseResolver(e.data);return}break;case"GET_TABLE_NAMES":if(e.type=="TABLE_NAMES"){n.promiseResolver(e.data);return}break;case"TOKENIZE":if(e.type=="SCRIPT_TOKENS"){n.promiseResolver(e.data);return}break;case"COPY_FILE_TO_BUFFER":if(e.type=="FILE_BUFFER"){n.promiseResolver(e.data);return}break;case"EXPORT_FILE_STATISTICS":if(e.type=="FILE_STATISTICS"){n.promiseResolver(e.data);return}break;case"CONNECT":if(e.type=="CONNECTION_INFO"){n.promiseResolver(e.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(e.type=="QUERY_RESULT"){n.promiseResolver(e.data);return}break;case"SEND_PREPARED":if(e.type=="QUERY_RESULT_HEADER"){n.promiseResolver(e.data);return}break;case"START_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(e.data);return}break;case"POLL_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(e.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],e.type=="SUCCESS"){n.promiseResolver(e.data);return}break;case"FETCH_QUERY_RESULTS":if(e.type=="QUERY_RESULT_CHUNK"){n.promiseResolver(e.data);return}break;case"CREATE_PREPARED":if(e.type=="PREPARED_STATEMENT_ID"){n.promiseResolver(e.data);return}break}n.promiseRejecter(new Error("unexpected response type: ".concat(e.type.toString())))}onError(r){console.error(r),console.error("error in duckdb worker: ".concat(r.message)),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn("worker terminated with ".concat(this._pendingRequests.size," pending requests"));return}this._pendingRequests.clear()}async reset(){let r=new me("RESET",null);return await this.postTask(r)}async ping(){let r=new me("PING",null);await this.postTask(r)}async dropFile(r){let t=new me("DROP_FILE",r);return await this.postTask(t)}async dropFiles(){let r=new me("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new me("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,t=null,e=n=>{}){this._onInstantiationProgress.push(e);let n=new me("INSTANTIATE",[r,t]);return await this.postTask(n)}async getVersion(){let r=new me("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new me("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let t=new me("OPEN",r);await this.postTask(t)}async tokenize(r){let t=new me("TOKENIZE",r);return await this.postTask(t)}async connectInternal(){let r=new me("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new kB(this,r)}async disconnect(r){let t=new me("DISCONNECT",r);await this.postTask(t)}async runQuery(r,t){let e=new me("RUN_QUERY",[r,t]);return await this.postTask(e)}async startPendingQuery(r,t,e=!1){let n=new me("START_PENDING_QUERY",[r,t,e]);return await this.postTask(n)}async pollPendingQuery(r){let t=new me("POLL_PENDING_QUERY",r);return await this.postTask(t)}async cancelPendingQuery(r){let t=new me("CANCEL_PENDING_QUERY",r);return await this.postTask(t)}async fetchQueryResults(r){let t=new me("FETCH_QUERY_RESULTS",r);return await this.postTask(t)}async getTableNames(r,t){let e=new me("GET_TABLE_NAMES",[r,t]);return await this.postTask(e)}async createPrepared(r,t){let e=new me("CREATE_PREPARED",[r,t]);return await this.postTask(e)}async closePrepared(r,t){let e=new me("CLOSE_PREPARED",[r,t]);await this.postTask(e)}async runPrepared(r,t,e){let n=new me("RUN_PREPARED",[r,t,e]);return await this.postTask(n)}async sendPrepared(r,t,e){let n=new me("SEND_PREPARED",[r,t,e]);return await this.postTask(n)}async globFiles(r){let t=new me("GLOB_FILE_INFOS",r);return await this.postTask(t)}async registerFileText(r,t){let e=jB.encode(t);await this.registerFileBuffer(r,e)}async registerFileURL(r,t,e,n){t===void 0&&(t=r);let i=new me("REGISTER_FILE_URL",[r,t,e,n]);await this.postTask(i)}async registerEmptyFileBuffer(r){}async registerFileBuffer(r,t){let e=new me("REGISTER_FILE_BUFFER",[r,t]);await this.postTask(e,[t.buffer])}async registerFileHandle(r,t,e,n){let i=new me("REGISTER_FILE_HANDLE",[r,t,e,n]);await this.postTask(i,[])}async registerOPFSFileName(r){let t=new me("REGISTER_OPFS_FILE_NAME",[r]);await this.postTask(t,[])}async collectFileStatistics(r,t){let e=new me("COLLECT_FILE_STATISTICS",[r,t]);await this.postTask(e,[])}async exportFileStatistics(r){let t=new me("EXPORT_FILE_STATISTICS",r);return await this.postTask(t,[])}async copyFileToBuffer(r){let t=new me("COPY_FILE_TO_BUFFER",r);return await this.postTask(t)}async copyFileToPath(r,t){let e=new me("COPY_FILE_TO_PATH",[r,t]);await this.postTask(e)}async insertArrowFromIPCStream(r,t,e){if(t.length==0)return;let n=new me("INSERT_ARROW_FROM_IPC_STREAM",[r,t,e]);await this.postTask(n,[t.buffer])}async insertCSVFromPath(r,t,e){if(e.columns!==void 0){let i=[];for(let s in e.columns){let o=e.columns[s];i.push(Cp(s,o))}e.columnsFlat=i,delete e.columns}let n=new me("IMPORT_CSV_FROM_PATH",[r,t,e]);await this.postTask(n)}async insertJSONFromPath(r,t,e){if(e.columns!==void 0){let i=[];for(let s in e.columns){let o=e.columns[s];i.push(Cp(s,o))}e.columnsFlat=i,delete e.columns}let n=new me("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(n)}};function GB(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}GB();var WB=(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))(WB||{}),HB=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])),XB=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])),YB=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])),qB=()=>(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])),QB={version:"1.29.1-dev68.0"},Zm=QB.version.split(".");Zm[0];Zm[1];Zm[2];var ZB=()=>typeof navigator>"u",Yd=null,qd=null,Qd=null,Zd=null,Kd=null;async function KB(){return Yd==null&&(Yd=typeof BigInt64Array<"u"),qd==null&&(qd=await XB()),Qd==null&&(Qd=await qB()),Zd==null&&(Zd=await YB()),Kd==null&&(Kd=await HB()),{bigInt64Array:Yd,crossOriginIsolated:ZB()||globalThis.crossOriginIsolated||!1,wasmExceptions:qd,wasmSIMD:Zd,wasmThreads:Qd,wasmBulkMemory:Kd}}async function I0(r){let t=await KB();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}}CB(OB());const Jd={},Ga={};function qa(r,t){try{const n=(Jd[r]||(Jd[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return n in Ga?Ga[n]:M0(n,n.split(":"))}catch{if(r in Ga)return Ga[r];const e=r==null?void 0:r.match(JB);return e?M0(r,e.slice(1)):NaN}}const JB=/([+-]\d\d):?(\d\d)?/;function M0(r,t){const e=+t[0],n=+(t[1]||0);return Ga[r]=e>0?e*60+n:e*60-n}class Vr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(qa(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)),fT(this),Op(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Vr(...e,t):new Vr(Date.now(),t)}withTimeZone(t){return new Vr(+this,t)}getTimezoneOffset(){return-qa(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Op(this),+this}[Symbol.for("constructDateFrom")](t){return new Vr(+new Date(t),this.timeZone)}}const E0=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!E0.test(r))return;const t=r.replace(E0,"$1UTC");Vr.prototype[t]&&(r.startsWith("get")?Vr.prototype[r]=function(){return this.internal[t]()}:(Vr.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),tk(this),+this},Vr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Op(this),+this}))});function Op(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function tk(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()),fT(r)}function fT(r){const t=qa(r.timeZone,r),e=new Date(+r);e.setUTCHours(e.getUTCHours()-1);const n=-new Date(+r).getTimezoneOffset(),i=-new Date(+e).getTimezoneOffset(),s=n-i,o=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();s&&o&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+s);const a=n-t;a&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+a);const l=qa(r.timeZone,r),c=-new Date(+r).getTimezoneOffset()-l,h=l!==t,f=c-a;if(h&&f){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+f);const d=qa(r.timeZone,r),m=l-d;m&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+m),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+m))}}const ek=new TextDecoder("utf-8"),rk=r=>ek.decode(r),nk=new TextEncoder,pT=r=>nk.encode(r),Ln=r=>typeof r=="function",Cl=r=>r!=null&&Object(r)===r,ik=r=>Cl(r)&&Ln(r.then),mT=r=>Cl(r)&&Ln(r[Symbol.iterator]),sk=r=>Cl(r)&&Ln(r[Symbol.asyncIterator]),ok=r=>Cl(r)&&"done"in r&&"value"in r,ak=r=>Cl(r)&&Ln(r.clear)&&Ln(r.bytes)&&Ln(r.position)&&Ln(r.setPosition)&&Ln(r.capacity)&&Ln(r.getBufferIdentifier)&&Ln(r.createLong),Km=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function lk(r){const t=r[0]?[r[0]]:[];let e,n,i,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let i,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,n);for(const c=e.length;++lyr(Int8Array,r),hk=r=>yr(Int16Array,r),dk=r=>yr(Int32Array,r),fk=r=>yr(BigInt64Array,r),pk=r=>yr(Uint8Array,r),mk=r=>yr(Uint16Array,r),gk=r=>yr(Uint32Array,r),yk=r=>yr(BigUint64Array,r),vk=r=>yr(Float32Array,r),_k=r=>yr(Float64Array,r),bk=r=>yr(Uint8ClampedArray,r),Rp=r=>(r.next(),r);function*ri(r,t){const e=function*(i){yield i},n=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Km?e(t):mT(t)?t:e(t);return yield*Rp(function*(i){let s=null;do s=i.next(yield yr(r,s));while(!s.done)}(n[Symbol.iterator]())),new r}const xk=r=>ri(Int8Array,r),wk=r=>ri(Int16Array,r),Sk=r=>ri(Int32Array,r),Tk=r=>ri(Uint8Array,r),Ik=r=>ri(Uint16Array,r),Mk=r=>ri(Uint32Array,r),Ek=r=>ri(Float32Array,r),Ak=r=>ri(Float64Array,r),Ck=r=>ri(Uint8ClampedArray,r);function Sn(r,t){return Ar(this,arguments,function*(){if(ik(t))return yield Dt(yield Dt(yield*ks(Hn(Sn(r,yield Dt(t))))));const n=function(o){return Ar(this,arguments,function*(){yield yield Dt(yield Dt(o))})},i=function(o){return Ar(this,arguments,function*(){yield Dt(yield*ks(Hn(Rp(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 Km?n(t):mT(t)?i(t):sk(t)?t:n(t);return yield Dt(yield*ks(Hn(Rp(function(o){return Ar(this,arguments,function*(){let a=null;do a=yield Dt(o.next(yield yield Dt(yr(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Dt(new r)})}const Ok=r=>Sn(Int8Array,r),Pk=r=>Sn(Int16Array,r),Rk=r=>Sn(Int32Array,r),Fk=r=>Sn(Uint8Array,r),Dk=r=>Sn(Uint16Array,r),Lk=r=>Sn(Uint32Array,r),Nk=r=>Sn(Float32Array,r),Bk=r=>Sn(Float64Array,r),kk=r=>Sn(Uint8ClampedArray,r);function Uk(r,t,e){if(r!==0){e=e.slice(0,t);for(let n=-1,i=e.length;++n0)do if(r[e]!==t[e])return!1;while(++eKo(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const jk=Object.freeze(Object.defineProperty({__proto__:null,valueToString:Ko},Symbol.toStringTag,{value:"Module"}));function wr(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 yT(r,t){return wr(r/t)+wr(r%t)/wr(t)}const vT=Symbol.for("isArrowBigNum");function Tn(r,...t){return t.length===0?Object.setPrototypeOf(yr(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}Tn.prototype[vT]=!0;Tn.prototype.toJSON=function(){return`"${Jo(this)}"`};Tn.prototype.valueOf=function(r){return Jm(this,r)};Tn.prototype.toString=function(){return Jo(this)};Tn.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Jm(this);case"string":return Jo(this);case"default":return _T(this)}return Jo(this)};function zo(...r){return Tn.apply(this,r)}function Vo(...r){return Tn.apply(this,r)}function pl(...r){return Tn.apply(this,r)}Object.setPrototypeOf(zo.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Vo.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(pl.prototype,Object.create(Uint32Array.prototype));Object.assign(zo.prototype,Tn.prototype,{constructor:zo,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Vo.prototype,Tn.prototype,{constructor:Vo,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(pl.prototype,Tn.prototype,{constructor:pl,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const $k=BigInt(4294967296)*BigInt(4294967296),Gk=$k-BigInt(1);function Jm(r,t){const{buffer:e,byteOffset:n,byteLength:i,signed:s}=r,o=new BigUint64Array(e,n,i/8),a=s&&o.at(-1)&BigInt(1)<=0)return tf(r);t=t.slice();let n=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Pt.prototype);class A0 extends Pt{constructor(){super(H.Null)}toString(){return"Null"}}xT=Symbol.toStringTag;A0[xT]=(r=>r[Symbol.toStringTag]="Null")(A0.prototype);class C0 extends Pt{constructor(t,e){super(H.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}wT=Symbol.toStringTag;C0[wT]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(C0.prototype);class O0 extends Pt{constructor(t){super(H.Float),this.precision=t}get ArrayType(){switch(this.precision){case jr.HALF:return Uint16Array;case jr.SINGLE:return Float32Array;case jr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}ST=Symbol.toStringTag;O0[ST]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(O0.prototype);class P0 extends Pt{constructor(){super(H.Binary)}toString(){return"Binary"}}TT=Symbol.toStringTag;P0[TT]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(P0.prototype);class R0 extends Pt{constructor(){super(H.LargeBinary)}toString(){return"LargeBinary"}}IT=Symbol.toStringTag;R0[IT]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(R0.prototype);class F0 extends Pt{constructor(){super(H.Utf8)}toString(){return"Utf8"}}MT=Symbol.toStringTag;F0[MT]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(F0.prototype);class D0 extends Pt{constructor(){super(H.LargeUtf8)}toString(){return"LargeUtf8"}}ET=Symbol.toStringTag;D0[ET]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(D0.prototype);class L0 extends Pt{constructor(){super(H.Bool)}toString(){return"Bool"}}AT=Symbol.toStringTag;L0[AT]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(L0.prototype);class N0 extends Pt{constructor(t,e,n=128){super(H.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}CT=Symbol.toStringTag;N0[CT]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(N0.prototype);class B0 extends Pt{constructor(t){super(H.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${Zi[this.unit]}>`}get ArrayType(){return this.unit===Zi.DAY?Int32Array:BigInt64Array}}OT=Symbol.toStringTag;B0[OT]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(B0.prototype);class k0 extends Pt{constructor(t,e){super(H.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${ne[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}PT=Symbol.toStringTag;k0[PT]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(k0.prototype);class U0 extends Pt{constructor(t,e){super(H.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${ne[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}RT=Symbol.toStringTag;U0[RT]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(U0.prototype);class z0 extends Pt{constructor(t){super(H.Interval),this.unit=t}toString(){return`Interval<${js[this.unit]}>`}}FT=Symbol.toStringTag;z0[FT]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(z0.prototype);class V0 extends Pt{constructor(t){super(H.Duration),this.unit=t}toString(){return`Duration<${ne[this.unit]}>`}}DT=Symbol.toStringTag;V0[DT]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(V0.prototype);class j0 extends Pt{constructor(t){super(H.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}LT=Symbol.toStringTag;j0[LT]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(j0.prototype);class Fp extends Pt{constructor(t){super(H.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}NT=Symbol.toStringTag;Fp[NT]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(Fp.prototype);class $0 extends Pt{constructor(t,e,n){super(H.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((i,s,o)=>(i[s]=o)&&i||i,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}}BT=Symbol.toStringTag;$0[BT]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))($0.prototype);class G0 extends Pt{constructor(t){super(H.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}kT=Symbol.toStringTag;G0[kT]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(G0.prototype);class W0 extends Pt{constructor(t,e){super(H.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}UT=Symbol.toStringTag;W0[UT]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(W0.prototype);class H0 extends Pt{constructor(t,e=!1){var n,i,s;if(super(H.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((n=t==null?void 0:t.type)===null||n===void 0)&&n.children)){const o=(i=t==null?void 0:t.type)===null||i===void 0?void 0:i.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}zT=Symbol.toStringTag;H0[zT]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(H0.prototype);const Hk=(r=>()=>++r)(-1);class X0 extends Pt{constructor(t,e,n,i){super(H.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=n==null?Hk():wr(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}VT=Symbol.toStringTag;X0[VT]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(X0.prototype);function jT(r){const t=r;switch(r.typeId){case H.Decimal:return r.bitWidth/32;case H.Interval:return 1+t.unit;case H.FixedSizeList:return t.listSize;case H.FixedSizeBinary:return t.byteWidth;default:return 1}}class pe{visitMany(t,...e){return t.map((n,i)=>this.visit(n,...e.map(s=>s[i])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return Xk(this,t,e)}getVisitFnByTypeId(t,e=!0){return Io(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function Xk(r,t,e=!0){return typeof t=="number"?Io(r,t,e):typeof t=="string"&&t in H?Io(r,H[t],e):t&&t instanceof Pt?Io(r,Y0(t),e):t!=null&&t.type&&t.type instanceof Pt?Io(r,Y0(t.type),e):Io(r,H.NONE,e)}function Io(r,t,e=!0){let n=null;switch(t){case H.Null:n=r.visitNull;break;case H.Bool:n=r.visitBool;break;case H.Int:n=r.visitInt;break;case H.Int8:n=r.visitInt8||r.visitInt;break;case H.Int16:n=r.visitInt16||r.visitInt;break;case H.Int32:n=r.visitInt32||r.visitInt;break;case H.Int64:n=r.visitInt64||r.visitInt;break;case H.Uint8:n=r.visitUint8||r.visitInt;break;case H.Uint16:n=r.visitUint16||r.visitInt;break;case H.Uint32:n=r.visitUint32||r.visitInt;break;case H.Uint64:n=r.visitUint64||r.visitInt;break;case H.Float:n=r.visitFloat;break;case H.Float16:n=r.visitFloat16||r.visitFloat;break;case H.Float32:n=r.visitFloat32||r.visitFloat;break;case H.Float64:n=r.visitFloat64||r.visitFloat;break;case H.Utf8:n=r.visitUtf8;break;case H.LargeUtf8:n=r.visitLargeUtf8;break;case H.Binary:n=r.visitBinary;break;case H.LargeBinary:n=r.visitLargeBinary;break;case H.FixedSizeBinary:n=r.visitFixedSizeBinary;break;case H.Date:n=r.visitDate;break;case H.DateDay:n=r.visitDateDay||r.visitDate;break;case H.DateMillisecond:n=r.visitDateMillisecond||r.visitDate;break;case H.Timestamp:n=r.visitTimestamp;break;case H.TimestampSecond:n=r.visitTimestampSecond||r.visitTimestamp;break;case H.TimestampMillisecond:n=r.visitTimestampMillisecond||r.visitTimestamp;break;case H.TimestampMicrosecond:n=r.visitTimestampMicrosecond||r.visitTimestamp;break;case H.TimestampNanosecond:n=r.visitTimestampNanosecond||r.visitTimestamp;break;case H.Time:n=r.visitTime;break;case H.TimeSecond:n=r.visitTimeSecond||r.visitTime;break;case H.TimeMillisecond:n=r.visitTimeMillisecond||r.visitTime;break;case H.TimeMicrosecond:n=r.visitTimeMicrosecond||r.visitTime;break;case H.TimeNanosecond:n=r.visitTimeNanosecond||r.visitTime;break;case H.Decimal:n=r.visitDecimal;break;case H.List:n=r.visitList;break;case H.Struct:n=r.visitStruct;break;case H.Union:n=r.visitUnion;break;case H.DenseUnion:n=r.visitDenseUnion||r.visitUnion;break;case H.SparseUnion:n=r.visitSparseUnion||r.visitUnion;break;case H.Dictionary:n=r.visitDictionary;break;case H.Interval:n=r.visitInterval;break;case H.IntervalDayTime:n=r.visitIntervalDayTime||r.visitInterval;break;case H.IntervalYearMonth:n=r.visitIntervalYearMonth||r.visitInterval;break;case H.Duration:n=r.visitDuration;break;case H.DurationSecond:n=r.visitDurationSecond||r.visitDuration;break;case H.DurationMillisecond:n=r.visitDurationMillisecond||r.visitDuration;break;case H.DurationMicrosecond:n=r.visitDurationMicrosecond||r.visitDuration;break;case H.DurationNanosecond:n=r.visitDurationNanosecond||r.visitDuration;break;case H.FixedSizeList:n=r.visitFixedSizeList;break;case H.Map:n=r.visitMap;break}if(typeof n=="function")return n;if(!e)return()=>null;throw new Error(`Unrecognized type '${H[t]}'`)}function Y0(r){switch(r.typeId){case H.Null:return H.Null;case H.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?H.Int8:H.Uint8;case 16:return e?H.Int16:H.Uint16;case 32:return e?H.Int32:H.Uint32;case 64:return e?H.Int64:H.Uint64}return H.Int}case H.Float:switch(r.precision){case jr.HALF:return H.Float16;case jr.SINGLE:return H.Float32;case jr.DOUBLE:return H.Float64}return H.Float;case H.Binary:return H.Binary;case H.LargeBinary:return H.LargeBinary;case H.Utf8:return H.Utf8;case H.LargeUtf8:return H.LargeUtf8;case H.Bool:return H.Bool;case H.Decimal:return H.Decimal;case H.Time:switch(r.unit){case ne.SECOND:return H.TimeSecond;case ne.MILLISECOND:return H.TimeMillisecond;case ne.MICROSECOND:return H.TimeMicrosecond;case ne.NANOSECOND:return H.TimeNanosecond}return H.Time;case H.Timestamp:switch(r.unit){case ne.SECOND:return H.TimestampSecond;case ne.MILLISECOND:return H.TimestampMillisecond;case ne.MICROSECOND:return H.TimestampMicrosecond;case ne.NANOSECOND:return H.TimestampNanosecond}return H.Timestamp;case H.Date:switch(r.unit){case Zi.DAY:return H.DateDay;case Zi.MILLISECOND:return H.DateMillisecond}return H.Date;case H.Interval:switch(r.unit){case js.DAY_TIME:return H.IntervalDayTime;case js.YEAR_MONTH:return H.IntervalYearMonth}return H.Interval;case H.Duration:switch(r.unit){case ne.SECOND:return H.DurationSecond;case ne.MILLISECOND:return H.DurationMillisecond;case ne.MICROSECOND:return H.DurationMicrosecond;case ne.NANOSECOND:return H.DurationNanosecond}return H.Duration;case H.Map:return H.Map;case H.List:return H.List;case H.Struct:return H.Struct;case H.Union:switch(r.mode){case Zn.Dense:return H.DenseUnion;case Zn.Sparse:return H.SparseUnion}return H.Union;case H.FixedSizeBinary:return H.FixedSizeBinary;case H.FixedSizeList:return H.FixedSizeList;case H.Dictionary:return H.Dictionary}throw new Error(`Unrecognized type '${H[r.typeId]}'`)}pe.prototype.visitInt8=null;pe.prototype.visitInt16=null;pe.prototype.visitInt32=null;pe.prototype.visitInt64=null;pe.prototype.visitUint8=null;pe.prototype.visitUint16=null;pe.prototype.visitUint32=null;pe.prototype.visitUint64=null;pe.prototype.visitFloat16=null;pe.prototype.visitFloat32=null;pe.prototype.visitFloat64=null;pe.prototype.visitDateDay=null;pe.prototype.visitDateMillisecond=null;pe.prototype.visitTimestampSecond=null;pe.prototype.visitTimestampMillisecond=null;pe.prototype.visitTimestampMicrosecond=null;pe.prototype.visitTimestampNanosecond=null;pe.prototype.visitTimeSecond=null;pe.prototype.visitTimeMillisecond=null;pe.prototype.visitTimeMicrosecond=null;pe.prototype.visitTimeNanosecond=null;pe.prototype.visitDenseUnion=null;pe.prototype.visitSparseUnion=null;pe.prototype.visitIntervalDayTime=null;pe.prototype.visitIntervalYearMonth=null;pe.prototype.visitDuration=null;pe.prototype.visitDurationSecond=null;pe.prototype.visitDurationMillisecond=null;pe.prototype.visitDurationMicrosecond=null;pe.prototype.visitDurationNanosecond=null;const $T=new Float64Array(1),uo=new Uint32Array($T.buffer);function tg(r){const t=(r&31744)>>10,e=(r&1023)/1024,n=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return n*(e?Number.NaN:1/0);case 0:return n*(e?6103515625e-14*e:0)}return n*Math.pow(2,t-15)*(1+e)}function GT(r){if(r!==r)return 32256;$T[0]=r;const t=(uo[1]&2147483648)>>16&65535;let e=uo[1]&2146435072,n=0;return e>=1089470464?uo[0]>0?e=31744:(e=(e&2080374784)>>16,n=(uo[1]&1048575)>>10):e<=1056964608?(n=1048576+(uo[1]&1048575),n=1048576+(n<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,n=(uo[1]&1048575)+512>>10),t|e|n&65535}const Yk=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:GT,uint16ToFloat64:tg},Symbol.toStringTag,{value:"Module"}));class Xt extends pe{}function Kt(r){return(t,e,n)=>{if(t.setValid(e,n!=null))return r(t,e,n)}}const qk=(r,t,e)=>{r[t]=Math.floor(e/864e5)},WT=(r,t,e,n)=>{if(e+1{const i=r+e;n?t[i>>3]|=1<>3]&=~(1<{r[t]=e},eg=({values:r},t,e)=>{r[t]=e},HT=({values:r},t,e)=>{r[t]=GT(e)},Zk=(r,t,e)=>{switch(r.type.precision){case jr.HALF:return HT(r,t,e);case jr.SINGLE:case jr.DOUBLE:return eg(r,t,e)}},XT=({values:r},t,e)=>{qk(r,t,e.valueOf())},YT=({values:r},t,e)=>{r[t]=BigInt(e)},Kk=({stride:r,values:t},e,n)=>{t.set(n.subarray(0,r),r*e)},qT=({values:r,valueOffsets:t},e,n)=>WT(r,t,e,n),QT=({values:r,valueOffsets:t},e,n)=>WT(r,t,e,pT(n)),Jk=(r,t,e)=>{r.type.unit===Zi.DAY?XT(r,t,e):YT(r,t,e)},ZT=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},KT=({values:r},t,e)=>{r[t]=BigInt(e)},JT=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},tI=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},tU=(r,t,e)=>{switch(r.type.unit){case ne.SECOND:return ZT(r,t,e);case ne.MILLISECOND:return KT(r,t,e);case ne.MICROSECOND:return JT(r,t,e);case ne.NANOSECOND:return tI(r,t,e)}},eI=({values:r},t,e)=>{r[t]=e},rI=({values:r},t,e)=>{r[t]=e},nI=({values:r},t,e)=>{r[t]=e},iI=({values:r},t,e)=>{r[t]=e},eU=(r,t,e)=>{switch(r.type.unit){case ne.SECOND:return eI(r,t,e);case ne.MILLISECOND:return rI(r,t,e);case ne.MICROSECOND:return nI(r,t,e);case ne.NANOSECOND:return iI(r,t,e)}},rU=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},nU=(r,t,e)=>{const n=r.children[0],i=r.valueOffsets,s=Kn.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=i[t],l=i[t+1];a{const n=r.children[0],{valueOffsets:i}=r,s=Kn.getVisitFn(n);let{[t]:o,[t+1]:a}=i;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(n,o,u),++o>=a)break},sU=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),oU=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),aU=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),lU=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),uU=(r,t,e)=>{const n=r.type.children.map(s=>Kn.getVisitFn(s.type)),i=e instanceof Map?aU(t,e):e instanceof lr?oU(t,e):Array.isArray(e)?sU(t,e):lU(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},cU=(r,t,e)=>{r.type.mode===Zn.Dense?sI(r,t,e):oI(r,t,e)},sI=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];Kn.visit(i,r.valueOffsets[t],e)},oI=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];Kn.visit(i,t,e)},hU=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},dU=(r,t,e)=>{r.type.unit===js.DAY_TIME?aI(r,t,e):lI(r,t,e)},aI=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},lI=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},uI=({values:r},t,e)=>{r[t]=e},cI=({values:r},t,e)=>{r[t]=e},hI=({values:r},t,e)=>{r[t]=e},dI=({values:r},t,e)=>{r[t]=e},fU=(r,t,e)=>{switch(r.type.unit){case ne.SECOND:return uI(r,t,e);case ne.MILLISECOND:return cI(r,t,e);case ne.MICROSECOND:return hI(r,t,e);case ne.NANOSECOND:return dI(r,t,e)}},pU=(r,t,e)=>{const{stride:n}=r,i=r.children[0],s=Kn.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=t*n;++o`${Ko(t)}: ${Ko(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new mU(this[vn],this[jo])}}class mU{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[vn].type.children.some(n=>n.name===e)}getOwnPropertyDescriptor(t,e){if(t[vn].type.children.some(n=>n.name===e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[vn].type.children.findIndex(i=>i.name===e);if(n!==-1){const i=pn.visit(t[vn].children[n],t[jo]);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[vn].type.children.findIndex(s=>s.name===e);return i!==-1?(Kn.visit(t[vn].children[i],t[jo],n),Reflect.set(t,e,n)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,n):!1}}const yU=new gU;class Ut extends pe{}function Yt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const vU=(r,t)=>864e5*r[t],_U=(r,t)=>null,fI=(r,t,e)=>{if(e+1>=t.length)return null;const n=wr(t[e]),i=wr(t[e+1]);return r.subarray(n,i)},bU=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<vU(r,t),mI=({values:r},t)=>wr(r[t]),es=({stride:r,values:t},e)=>t[r*e],xU=({stride:r,values:t},e)=>tg(t[r*e]),gI=({values:r},t)=>r[t],wU=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),yI=({values:r,valueOffsets:t},e)=>fI(r,t,e),vI=({values:r,valueOffsets:t},e)=>{const n=fI(r,t,e);return n!==null?rk(n):null},SU=({values:r},t)=>r[t],TU=({type:r,values:t},e)=>r.precision!==jr.HALF?t[e]:tg(t[e]),IU=(r,t)=>r.type.unit===Zi.DAY?pI(r,t):mI(r,t),_I=({values:r},t)=>1e3*wr(r[t]),bI=({values:r},t)=>wr(r[t]),xI=({values:r},t)=>yT(r[t],BigInt(1e3)),wI=({values:r},t)=>yT(r[t],BigInt(1e6)),MU=(r,t)=>{switch(r.type.unit){case ne.SECOND:return _I(r,t);case ne.MILLISECOND:return bI(r,t);case ne.MICROSECOND:return xI(r,t);case ne.NANOSECOND:return wI(r,t)}},SI=({values:r},t)=>r[t],TI=({values:r},t)=>r[t],II=({values:r},t)=>r[t],MI=({values:r},t)=>r[t],EU=(r,t)=>{switch(r.type.unit){case ne.SECOND:return SI(r,t);case ne.MILLISECOND:return TI(r,t);case ne.MICROSECOND:return II(r,t);case ne.NANOSECOND:return MI(r,t)}},AU=({values:r,stride:t},e)=>ih.decimal(r.subarray(t*e,t*(e+1))),CU=(r,t)=>{const{valueOffsets:e,stride:n,children:i}=r,{[t*n]:s,[t*n+1]:o}=e,l=i[0].slice(s,o-s);return new lr([l])},OU=(r,t)=>{const{valueOffsets:e,children:n}=r,{[t]:i,[t+1]:s}=e,o=n[0];return new ng(o.slice(i,s-i))},PU=(r,t)=>new rg(r,t),RU=(r,t)=>r.type.mode===Zn.Dense?EI(r,t):AI(r,t),EI=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return pn.visit(n,r.valueOffsets[t])},AI=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return pn.visit(n,t)},FU=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},DU=(r,t)=>r.type.unit===js.DAY_TIME?CI(r,t):OI(r,t),CI=({values:r},t)=>r.subarray(2*t,2*(t+1)),OI=({values:r},t)=>{const e=r[t],n=new Int32Array(2);return n[0]=Math.trunc(e/12),n[1]=Math.trunc(e%12),n},PI=({values:r},t)=>r[t],RI=({values:r},t)=>r[t],FI=({values:r},t)=>r[t],DI=({values:r},t)=>r[t],LU=(r,t)=>{switch(r.type.unit){case ne.SECOND:return PI(r,t);case ne.MILLISECOND:return RI(r,t);case ne.MICROSECOND:return FI(r,t);case ne.NANOSECOND:return DI(r,t)}},NU=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new lr([s])};Ut.prototype.visitNull=Yt(_U);Ut.prototype.visitBool=Yt(bU);Ut.prototype.visitInt=Yt(SU);Ut.prototype.visitInt8=Yt(es);Ut.prototype.visitInt16=Yt(es);Ut.prototype.visitInt32=Yt(es);Ut.prototype.visitInt64=Yt(gI);Ut.prototype.visitUint8=Yt(es);Ut.prototype.visitUint16=Yt(es);Ut.prototype.visitUint32=Yt(es);Ut.prototype.visitUint64=Yt(gI);Ut.prototype.visitFloat=Yt(TU);Ut.prototype.visitFloat16=Yt(xU);Ut.prototype.visitFloat32=Yt(es);Ut.prototype.visitFloat64=Yt(es);Ut.prototype.visitUtf8=Yt(vI);Ut.prototype.visitLargeUtf8=Yt(vI);Ut.prototype.visitBinary=Yt(yI);Ut.prototype.visitLargeBinary=Yt(yI);Ut.prototype.visitFixedSizeBinary=Yt(wU);Ut.prototype.visitDate=Yt(IU);Ut.prototype.visitDateDay=Yt(pI);Ut.prototype.visitDateMillisecond=Yt(mI);Ut.prototype.visitTimestamp=Yt(MU);Ut.prototype.visitTimestampSecond=Yt(_I);Ut.prototype.visitTimestampMillisecond=Yt(bI);Ut.prototype.visitTimestampMicrosecond=Yt(xI);Ut.prototype.visitTimestampNanosecond=Yt(wI);Ut.prototype.visitTime=Yt(EU);Ut.prototype.visitTimeSecond=Yt(SI);Ut.prototype.visitTimeMillisecond=Yt(TI);Ut.prototype.visitTimeMicrosecond=Yt(II);Ut.prototype.visitTimeNanosecond=Yt(MI);Ut.prototype.visitDecimal=Yt(AU);Ut.prototype.visitList=Yt(CU);Ut.prototype.visitStruct=Yt(PU);Ut.prototype.visitUnion=Yt(RU);Ut.prototype.visitDenseUnion=Yt(EI);Ut.prototype.visitSparseUnion=Yt(AI);Ut.prototype.visitDictionary=Yt(FU);Ut.prototype.visitInterval=Yt(DU);Ut.prototype.visitIntervalDayTime=Yt(CI);Ut.prototype.visitIntervalYearMonth=Yt(OI);Ut.prototype.visitDuration=Yt(LU);Ut.prototype.visitDurationSecond=Yt(PI);Ut.prototype.visitDurationMillisecond=Yt(RI);Ut.prototype.visitDurationMicrosecond=Yt(FI);Ut.prototype.visitDurationNanosecond=Yt(DI);Ut.prototype.visitFixedSizeList=Yt(NU);Ut.prototype.visitMap=Yt(OU);const pn=new Ut,Mo=Symbol.for("keys"),$o=Symbol.for("vals"),Eo=Symbol.for("kKeysAsStrings"),Dp=Symbol.for("_kKeysAsStrings");class ng{constructor(t){return this[Mo]=new lr([t.children[0]]).memoize(),this[$o]=t.children[1],new Proxy(this,new kU)}get[Eo](){return this[Dp]||(this[Dp]=Array.from(this[Mo].toArray(),String))}[Symbol.iterator](){return new BU(this[Mo],this[$o])}get size(){return this[Mo].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Mo],e=this[$o],n={};for(let i=-1,s=t.length;++i`${Ko(t)}: ${Ko(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class BU{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),pn.visit(this.vals,t)]})}}class kU{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Eo]}has(t,e){return t[Eo].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Eo].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[Eo].indexOf(e);if(n!==-1){const i=pn.visit(Reflect.get(t,$o),n);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[Eo].indexOf(e);return i!==-1?(Kn.visit(Reflect.get(t,$o),i,n),Reflect.set(t,e,n)):Reflect.has(t,e)?Reflect.set(t,e,n):!1}}Object.defineProperties(ng.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Mo]:{writable:!0,enumerable:!1,configurable:!1,value:null},[$o]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Dp]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let q0;function LI(r,t,e,n){const{length:i=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?i:e;return s<0&&(s=(s%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),n?n(r,s,o):[s,o]}const NI=(r,t)=>r<0?t+r:r,Q0=r=>r!==r;function Zs(r){if(typeof r!=="object"||r===null)return Q0(r)?Q0:e=>e===r;if(r instanceof Date){const e=r.valueOf();return n=>n instanceof Date?n.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?gT(r,e):!1:r instanceof Map?zU(r):Array.isArray(r)?UU(r):r instanceof lr?VU(r):jU(r,!0)}function UU(r){const t=[];for(let e=-1,n=r.length;++e!1;const n=[];for(let i=-1,s=e.length;++i{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return $U(r,e);case Map:return Z0(r,e,e.keys());case ng:case rg:case Object:case void 0:return Z0(r,e,t||Object.keys(e))}return e instanceof lr?GU(r,e):!1}}function $U(r,t){const e=r.length;if(t.length!==e)return!1;for(let n=-1;++n>n}function HU(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):kI(new oh(e,r,t,null,ig)).subarray(0,n)),i}return e}function kI(r){const t=[];let e=0,n=0,i=0;for(const o of r)o&&(i|=1<0)&&(t[e++]=i);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}class oh{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8===0?0:8-t%8);return Tc(r,t,i)+Tc(r,n,e)+UI(r,i>>3,n-i>>3)}function UI(r,t,e){let n=0,i=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:i+e;for(;o-i>=4;)n+=Eu(s.getUint32(i)),i+=4;for(;o-i>=2;)n+=Eu(s.getUint16(i)),i+=2;for(;o-i>=1;)n+=Eu(s.getUint8(i)),i+=1;return n}function Eu(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 XU=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:oh,getBit:BI,getBool:ig,packBools:kI,popcnt_array:UI,popcnt_bit_range:Tc,popcnt_uint32:Eu,setBool:HU,truncateBitmap:Lp},Symbol.toStringTag,{value:"Module"})),YU=-1;class ml{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 Pt.isSparseUnion(t)?this.children.some(e=>e.nullable):Pt.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this;return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Pt.isUnion(this.type))return this.children.reduce((n,i)=>n+i.nullCount,0);let t=this._nullCount,e;return t<=YU&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Tc(e,this.offset,this.offset+this.length)),t}constructor(t,e,n,i,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;s instanceof ml?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=jT(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(Pt.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===Zn.Dense?this.valueOffsets[t]:t;return i.getValid(s)}if(this.nullable&&this.nullCount>0){const n=this.offset+t;return(this.nullBitmap[n>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(Lp(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];n=(h&u)!==0,s[c]=e?h|u:h&~u}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new ml(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(this._nullCount===0)-1,a=i===16?n:1,l=this._sliceBuffers(t,e,n,i);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===H.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);i[e>>3]=(1<0&&i.set(Lp(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[pi.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s;const{buffers:o}=this;return(s=o[pi.TYPE])&&(o[pi.TYPE]=s.subarray(t,t+e)),(s=o[pi.OFFSET])&&(o[pi.OFFSET]=s.subarray(t,t+e+1))||(s=o[pi.DATA])&&(o[pi.DATA]=i===6?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map(i=>i.slice(e,n))}}ml.prototype.children=Object.freeze([]);class K0{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function QU(r){return r.reduce((t,e)=>t+e.nullCount,0)}function ZU(r){return r.reduce((t,e,n)=>(t[n+1]=t[n]+e.length,t),new Uint32Array(r.length+1))}function KU(r,t,e,n){const i=[];for(let s=-1,o=r.length;++s=n)break;if(e>=l+u)continue;if(l>=e&&l+u<=n){i.push(a);continue}const c=Math.max(0,e-l),h=Math.min(n-l,u);i.push(a.slice(c,h-c))}return i.length===0&&i.push(r[0].slice(0,0)),i}function sg(r,t,e,n){let i=0,s=0,o=t.length-1;do{if(i>=o-1)return e0?0:-1}function r4(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let n=0;for(const i of new oh(e,r.offset+(t||0),r.length,e,ig)){if(!i)return n;++n}return-1}function ee(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case H.Union:break;case H.Dictionary:break;default:return r4(r,e)}const n=pn.getVisitFn(r),i=Zs(t);for(let s=(e||0)-1,o=r.length;++s{const i=r.data[n];return i.values.subarray(0,i.length)[Symbol.iterator]()});let e=0;return new K0(r.data.length,n=>{const s=r.data[n].length,o=r.slice(e,e+s);return e+=s,new n4(o)})}class n4{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof ml)))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}=$I[o.typeId],c=s[0];this.isValid=h=>zI(c,h),this.get=h=>a(c,h),this.set=(h,f)=>l(c,h,f),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,GI[o.typeId]),this._offsets=ZU(s);break}this.data=s,this.type=o,this.stride=jT(o),this.numChildren=(i=(n=o.children)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return qU(this.data)}get nullCount(){return QU(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${H[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(NI(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return i4.visit(this)}concat(...t){return new lr(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new lr(LI(this,t,e,({data:n,_offsets:i},s,o)=>KU(n,i,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this;switch(t.typeId){case H.Int:case H.Float:case H.Decimal:case H.Time:case H.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,n*i);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Pt.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Pt.isDictionary(this.type)){const t=new Ic(this.data[0].dictionary),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new lr(e)}return new Ic(this)}unmemoize(){if(Pt.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new lr(e)}return this}}jI=Symbol.toStringTag;lr[jI]=(r=>{r.type=Pt.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const t=Object.keys(H).map(e=>H[e]).filter(e=>typeof e=="number"&&e!==H.NONE);for(const e of t){const n=pn.getVisitFnByTypeId(e),i=Kn.getVisitFnByTypeId(e),s=t_.getVisitFnByTypeId(e);$I[e]={get:n,set:i,indexOf:s},GI[e]=Object.create(r,{isValid:{value:J0(zI)},get:{value:J0(pn.getVisitFnByTypeId(e))},set:{value:JU(Kn.getVisitFnByTypeId(e))},indexOf:{value:t4(t_.getVisitFnByTypeId(e))}})}return"Vector"})(lr.prototype);class Ic extends lr{constructor(t){super(t.data);const e=this.get,n=this.set,i=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){n.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new Ic(i.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new lr(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}const s4=65536;function Po(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const ta=8,og=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class ag{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let i=e[3]*n[3];this.buffer[0]=i&65535;let s=i>>>16;return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${Po(this.buffer[3])} ${Po(this.buffer[2])} ${Po(this.buffer[1])} ${Po(this.buffer[0])}`}static multiply(t,e){return new Dn(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new Dn(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return Dn.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return Dn.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new Dn(e);for(let o=n?1:0;othis.compareFields(n,e[i]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function Tr(r,t){return t instanceof r.constructor}function Ks(r,t){return r===t||Tr(r,t)}function Mi(r,t){return r===t||Tr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function ah(r,t){return r===t||Tr(r,t)&&r.precision===t.precision}function a4(r,t){return r===t||Tr(r,t)&&r.byteWidth===t.byteWidth}function lg(r,t){return r===t||Tr(r,t)&&r.unit===t.unit}function Ol(r,t){return r===t||Tr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function Pl(r,t){return r===t||Tr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function l4(r,t){return r===t||Tr(r,t)&&r.children.length===t.children.length&&Jn.compareManyFields(r.children,t.children)}function u4(r,t){return r===t||Tr(r,t)&&r.children.length===t.children.length&&Jn.compareManyFields(r.children,t.children)}function ug(r,t){return r===t||Tr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,n)=>e===t.typeIds[n])&&Jn.compareManyFields(r.children,t.children)}function c4(r,t){return r===t||Tr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Jn.visit(r.indices,t.indices)&&Jn.visit(r.dictionary,t.dictionary)}function cg(r,t){return r===t||Tr(r,t)&&r.unit===t.unit}function Rl(r,t){return r===t||Tr(r,t)&&r.unit===t.unit}function h4(r,t){return r===t||Tr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Jn.compareManyFields(r.children,t.children)}function d4(r,t){return r===t||Tr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Jn.compareManyFields(r.children,t.children)}jt.prototype.visitNull=Ks;jt.prototype.visitBool=Ks;jt.prototype.visitInt=Mi;jt.prototype.visitInt8=Mi;jt.prototype.visitInt16=Mi;jt.prototype.visitInt32=Mi;jt.prototype.visitInt64=Mi;jt.prototype.visitUint8=Mi;jt.prototype.visitUint16=Mi;jt.prototype.visitUint32=Mi;jt.prototype.visitUint64=Mi;jt.prototype.visitFloat=ah;jt.prototype.visitFloat16=ah;jt.prototype.visitFloat32=ah;jt.prototype.visitFloat64=ah;jt.prototype.visitUtf8=Ks;jt.prototype.visitLargeUtf8=Ks;jt.prototype.visitBinary=Ks;jt.prototype.visitLargeBinary=Ks;jt.prototype.visitFixedSizeBinary=a4;jt.prototype.visitDate=lg;jt.prototype.visitDateDay=lg;jt.prototype.visitDateMillisecond=lg;jt.prototype.visitTimestamp=Ol;jt.prototype.visitTimestampSecond=Ol;jt.prototype.visitTimestampMillisecond=Ol;jt.prototype.visitTimestampMicrosecond=Ol;jt.prototype.visitTimestampNanosecond=Ol;jt.prototype.visitTime=Pl;jt.prototype.visitTimeSecond=Pl;jt.prototype.visitTimeMillisecond=Pl;jt.prototype.visitTimeMicrosecond=Pl;jt.prototype.visitTimeNanosecond=Pl;jt.prototype.visitDecimal=Ks;jt.prototype.visitList=l4;jt.prototype.visitStruct=u4;jt.prototype.visitUnion=ug;jt.prototype.visitDenseUnion=ug;jt.prototype.visitSparseUnion=ug;jt.prototype.visitDictionary=c4;jt.prototype.visitInterval=cg;jt.prototype.visitIntervalDayTime=cg;jt.prototype.visitIntervalYearMonth=cg;jt.prototype.visitDuration=Rl;jt.prototype.visitDurationSecond=Rl;jt.prototype.visitDurationMillisecond=Rl;jt.prototype.visitDurationMicrosecond=Rl;jt.prototype.visitDurationNanosecond=Rl;jt.prototype.visitFixedSizeList=h4;jt.prototype.visitMap=d4;const Jn=new jt;function f4(r,t){return Jn.compareSchemas(r,t)}function p4(r,t){return Jn.compareFields(r,t)}function m4(r,t){return Jn.visit(r,t)}const e_=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Wk),o4),XU),Yk),zk),WU),jk),{compareSchemas:f4,compareFields:p4,compareTypes:m4}),WI=6048e5,g4=864e5,r_=Symbol.for("constructDateFrom");function vi(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&r_ in r?r[r_](t):r instanceof Date?new r.constructor(t):new Date(t)}function mn(r,t){return vi(t||r,r)}let y4={};function lh(){return y4}function gl(r,t){var a,l,u,c;const e=lh(),n=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=mn(r,t==null?void 0:t.in),s=i.getDay(),o=(s=s.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function n_(r){const t=mn(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 v4(r,...t){const e=vi.bind(null,t.find(n=>typeof n=="object"));return t.map(e)}function i_(r,t){const e=mn(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function _4(r,t,e){const[n,i]=v4(e==null?void 0:e.in,r,t),s=i_(n),o=i_(i),a=+s-n_(s),l=+o-n_(o);return Math.round((a-l)/g4)}function b4(r,t){const e=HI(r,t),n=vi(r,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Mc(n)}function x4(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function w4(r){return!(!x4(r)&&typeof r!="number"||isNaN(+mn(r)))}function S4(r,t){const e=mn(r,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const T4={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"}},I4=(r,t,e)=>{let n;const i=T4[r];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+n:n+" ago":n};function ef(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const M4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},E4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},A4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},C4={date:ef({formats:M4,defaultWidth:"full"}),time:ef({formats:E4,defaultWidth:"full"}),dateTime:ef({formats:A4,defaultWidth:"full"})},O4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},P4=(r,t,e,n)=>O4[r];function Aa(r){return(t,e)=>{const n=e!=null&&e.context?String(e.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,a=e!=null&&e.width?String(e.width):o;i=r.formattingValues[a]||r.formattingValues[o]}else{const o=r.defaultWidth,a=e!=null&&e.width?String(e.width):r.defaultWidth;i=r.values[a]||r.values[o]}const s=r.argumentCallback?r.argumentCallback(t):t;return i[s]}}const R4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},F4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},D4={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"]},L4={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"]},N4={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"}},B4={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"}},k4=(r,t)=>{const e=Number(r),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},U4={ordinalNumber:k4,era:Aa({values:R4,defaultWidth:"wide"}),quarter:Aa({values:F4,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Aa({values:D4,defaultWidth:"wide"}),day:Aa({values:L4,defaultWidth:"wide"}),dayPeriod:Aa({values:N4,defaultWidth:"wide",formattingValues:B4,defaultFormattingWidth:"wide"})};function Ca(r){return(t,e={})=>{const n=e.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(a)?V4(a,h=>h.test(o)):z4(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 z4(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function V4(r,t){for(let e=0;e{const n=t.match(r.matchPattern);if(!n)return null;const i=n[0],s=t.match(r.parsePattern);if(!s)return null;let o=r.valueCallback?r.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const $4=/^(\d+)(th|st|nd|rd)?/i,G4=/\d+/i,W4={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},H4={any:[/^b/i,/^(a|c)/i]},X4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Y4={any:[/1/i,/2/i,/3/i,/4/i]},q4={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},Q4={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]},Z4={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},K4={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]},J4={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},t6={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}},e6={ordinalNumber:j4({matchPattern:$4,parsePattern:G4,valueCallback:r=>parseInt(r,10)}),era:Ca({matchPatterns:W4,defaultMatchWidth:"wide",parsePatterns:H4,defaultParseWidth:"any"}),quarter:Ca({matchPatterns:X4,defaultMatchWidth:"wide",parsePatterns:Y4,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ca({matchPatterns:q4,defaultMatchWidth:"wide",parsePatterns:Q4,defaultParseWidth:"any"}),day:Ca({matchPatterns:Z4,defaultMatchWidth:"wide",parsePatterns:K4,defaultParseWidth:"any"}),dayPeriod:Ca({matchPatterns:J4,defaultMatchWidth:"any",parsePatterns:t6,defaultParseWidth:"any"})},r6={code:"en-US",formatDistance:I4,formatLong:C4,formatRelative:P4,localize:U4,match:e6,options:{weekStartsOn:0,firstWeekContainsDate:1}};function n6(r,t){const e=mn(r,t==null?void 0:t.in);return _4(e,S4(e))+1}function i6(r,t){const e=mn(r,t==null?void 0:t.in),n=+Mc(e)-+b4(e);return Math.round(n/WI)+1}function XI(r,t){var c,h,f,d;const e=mn(r,t==null?void 0:t.in),n=e.getFullYear(),i=lh(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((d=(f=i.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,o=vi((t==null?void 0:t.in)||r,0);o.setFullYear(n+1,0,s),o.setHours(0,0,0,0);const a=gl(o,t),l=vi((t==null?void 0:t.in)||r,0);l.setFullYear(n,0,s),l.setHours(0,0,0,0);const u=gl(l,t);return+e>=+a?n+1:+e>=+u?n:n-1}function s6(r,t){var a,l,u,c;const e=lh(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=XI(r,t),s=vi((t==null?void 0:t.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),gl(s,t)}function o6(r,t){const e=mn(r,t==null?void 0:t.in),n=+gl(e,t)-+s6(e,t);return Math.round(n/WI)+1}function Ie(r,t){const e=r<0?"-":"",n=Math.abs(r).toString().padStart(t,"0");return e+n}const Ri={y(r,t){const e=r.getFullYear(),n=e>0?e:1-e;return Ie(t==="yy"?n%100:n,t.length)},M(r,t){const e=r.getMonth();return t==="M"?String(e+1):Ie(e+1,2)},d(r,t){return Ie(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 Ie(r.getHours()%12||12,t.length)},H(r,t){return Ie(r.getHours(),t.length)},m(r,t){return Ie(r.getMinutes(),t.length)},s(r,t){return Ie(r.getSeconds(),t.length)},S(r,t){const e=t.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,e-3));return Ie(i,t.length)}},co={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},s_={G:function(r,t,e){const n=r.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(n,{width:"abbreviated"});case"GGGGG":return e.era(n,{width:"narrow"});case"GGGG":default:return e.era(n,{width:"wide"})}},y:function(r,t,e){if(t==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return e.ordinalNumber(i,{unit:"year"})}return Ri.y(r,t)},Y:function(r,t,e,n){const i=XI(r,n),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Ie(o,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):Ie(s,t.length)},R:function(r,t){const e=HI(r);return Ie(e,t.length)},u:function(r,t){const e=r.getFullYear();return Ie(e,t.length)},Q:function(r,t,e){const n=Math.ceil((r.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Ie(n,2);case"Qo":return e.ordinalNumber(n,{unit:"quarter"});case"QQQ":return e.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,t,e){const n=Math.ceil((r.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Ie(n,2);case"qo":return e.ordinalNumber(n,{unit:"quarter"});case"qqq":return e.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,t,e){const n=r.getMonth();switch(t){case"M":case"MM":return Ri.M(r,t);case"Mo":return e.ordinalNumber(n+1,{unit:"month"});case"MMM":return e.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(n,{width:"wide",context:"formatting"})}},L:function(r,t,e){const n=r.getMonth();switch(t){case"L":return String(n+1);case"LL":return Ie(n+1,2);case"Lo":return e.ordinalNumber(n+1,{unit:"month"});case"LLL":return e.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(n,{width:"wide",context:"standalone"})}},w:function(r,t,e,n){const i=o6(r,n);return t==="wo"?e.ordinalNumber(i,{unit:"week"}):Ie(i,t.length)},I:function(r,t,e){const n=i6(r);return t==="Io"?e.ordinalNumber(n,{unit:"week"}):Ie(n,t.length)},d:function(r,t,e){return t==="do"?e.ordinalNumber(r.getDate(),{unit:"date"}):Ri.d(r,t)},D:function(r,t,e){const n=n6(r);return t==="Do"?e.ordinalNumber(n,{unit:"dayOfYear"}):Ie(n,t.length)},E:function(r,t,e){const n=r.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(n,{width:"short",context:"formatting"});case"EEEE":default:return e.day(n,{width:"wide",context:"formatting"})}},e:function(r,t,e,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ie(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(i,{width:"short",context:"formatting"});case"eeee":default:return e.day(i,{width:"wide",context:"formatting"})}},c:function(r,t,e,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ie(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(i,{width:"narrow",context:"standalone"});case"cccccc":return e.day(i,{width:"short",context:"standalone"});case"cccc":default:return e.day(i,{width:"wide",context:"standalone"})}},i:function(r,t,e){const n=r.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return Ie(i,t.length);case"io":return e.ordinalNumber(i,{unit:"day"});case"iii":return e.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(n,{width:"short",context:"formatting"});case"iiii":default:return e.day(n,{width:"wide",context:"formatting"})}},a:function(r,t,e){const i=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,t,e){const n=r.getHours();let i;switch(n===12?i=co.noon:n===0?i=co.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,t,e){const n=r.getHours();let i;switch(n>=17?i=co.evening:n>=12?i=co.afternoon:n>=4?i=co.morning:i=co.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,t,e){if(t==="ho"){let n=r.getHours()%12;return n===0&&(n=12),e.ordinalNumber(n,{unit:"hour"})}return Ri.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):Ri.H(r,t)},K:function(r,t,e){const n=r.getHours()%12;return t==="Ko"?e.ordinalNumber(n,{unit:"hour"}):Ie(n,t.length)},k:function(r,t,e){let n=r.getHours();return n===0&&(n=24),t==="ko"?e.ordinalNumber(n,{unit:"hour"}):Ie(n,t.length)},m:function(r,t,e){return t==="mo"?e.ordinalNumber(r.getMinutes(),{unit:"minute"}):Ri.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):Ri.s(r,t)},S:function(r,t){return Ri.S(r,t)},X:function(r,t,e){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return a_(n);case"XXXX":case"XX":return Is(n);case"XXXXX":case"XXX":default:return Is(n,":")}},x:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"x":return a_(n);case"xxxx":case"xx":return Is(n);case"xxxxx":case"xxx":default:return Is(n,":")}},O:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+o_(n,":");case"OOOO":default:return"GMT"+Is(n,":")}},z:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+o_(n,":");case"zzzz":default:return"GMT"+Is(n,":")}},t:function(r,t,e){const n=Math.trunc(+r/1e3);return Ie(n,t.length)},T:function(r,t,e){return Ie(+r,t.length)}};function o_(r,t=""){const e=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?e+String(i):e+String(i)+t+Ie(s,2)}function a_(r,t){return r%60===0?(r>0?"-":"+")+Ie(Math.abs(r)/60,2):Is(r,t)}function Is(r,t=""){const e=r>0?"-":"+",n=Math.abs(r),i=Ie(Math.trunc(n/60),2),s=Ie(n%60,2);return e+i+t+s}const l_=(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"})}},YI=(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"})}},a6=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],n=e[1],i=e[2];if(!i)return l_(r,t);let s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",l_(n,t)).replace("{{time}}",YI(i,t))},l6={p:YI,P:a6},u6=/^D+$/,c6=/^Y+$/,h6=["D","DD","YY","YYYY"];function d6(r){return u6.test(r)}function f6(r){return c6.test(r)}function p6(r,t,e){const n=m6(r,t,e);if(console.warn(n),h6.includes(r))throw new RangeError(n)}function m6(r,t,e){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${t}\`) for formatting ${n} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const g6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,y6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,v6=/^'([^]*?)'?$/,_6=/''/g,b6=/[a-zA-Z]/;function qI(r,t,e){var c,h,f,d;const n=lh(),i=n.locale??r6,s=n.firstWeekContainsDate??((h=(c=n.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,o=n.weekStartsOn??((d=(f=n.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??0,a=mn(r,e==null?void 0:e.in);if(!w4(a))throw new RangeError("Invalid time value");let l=t.match(y6).map(m=>{const g=m[0];if(g==="p"||g==="P"){const p=l6[g];return p(m,i.formatLong)}return m}).join("").match(g6).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:x6(m)};if(s_[g])return{isToken:!0,value:m};if(g.match(b6))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(f6(g)||d6(g))&&p6(g,t,String(r));const p=s_[g[0]];return p(a,g,i.localize,u)}).join("")}function x6(r){const t=r.match(v6);return t?t[1].replace(_6,"'"):r}function w6(r,t){return mn(r*1e3,t==null?void 0:t.in)}function S6(r,t){const e=T6(t)?new t(0):vi(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function T6(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function I6(r,t){let e=r.length;switch("string"){case"string":{for(;e>0&&r[e-1]===t;)e--;break}}return r.substring(0,e)}function Rr(r){return r==null}function M6(r){return r!=null}async function QI(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await Bi(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function E6(r){return Rr(r)?!1:Pt.isInt(r.type)&&!ZI(r)||A6(r)}function A6(r){return Rr(r)?!1:Pt.isInt(r.type)&&r.type.isSigned===!1}function C6(r){return Rr(r)?!1:Pt.isFloat(r.type)??!1}function O6(r){return Rr(r)?!1:Pt.isDecimal(r.type)}function P6(r){return Rr(r)?!1:Pt.isBool(r.type)}function R6(r){return Rr(r)?!1:Pt.isDuration(r.type)}function ZI(r){return Rr(r)?!1:Pt.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function F6(r){return Rr(r)?!1:Pt.isTimestamp(r.type)}function D6(r){return Rr(r)?!1:Pt.isDate(r.type)}function L6(r){return Rr(r)?!1:Pt.isTime(r.type)}function N6(r){return Rr(r)?!1:Pt.isList(r.type)||Pt.isFixedSizeList(r.type)}function B6(r){return Rr(r)?!1:Pt.isStruct(r.type)||Pt.isMap(r.type)}function k6(r){return Rr(r)?!1:Pt.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Pt.isInterval(r.type)}function U6(r,t){let e;if(t===ne.MILLISECOND)e=1e3;else if(t===ne.MICROSECOND)e=1e3*1e3;else if(t===ne.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 z6(r,t){var n;const e=U6(r,((n=t==null?void 0:t.type)==null?void 0:n.unit)??ne.SECOND);return w6(e)}function V6(r,t){const e=z6(r,t);return qI(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function j6(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?qI(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function $6(r,t){var i;if(!(r instanceof Date||typeof r=="number"&&Number.isFinite(r)))return console.warn(`Unsupported datetime value: ${r}`),null;let e;const n=(i=t==null?void 0:t.type)==null?void 0:i.timezone;return typeof r=="number"?n?e=new Vr(r,n):e=new Vr(r):n?e=new Vr(r,n):e=new Vr(r),S6(e,Date)}function G6(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let n=e_.bigNumToString(new e_.BN(r)).padStart(e,"0");if(e===0)return n;let i="";n.startsWith("-")&&(i="-",n=n.slice(1));const s=n.slice(0,-e)||"0",o=I6(n.slice(-e),"0")||"";return`${i}${s}${o?`.${o}`:""}`}function W6(r){const t=r[0],e=r[1],n=[];return t!==0&&n.push(`${t} year${t>1?"s":""}`),e!==0&&n.push(`${e} month${e>1?"s":""}`),n.length?n.join(" "):"0 months"}function H6(r,t){var n,i,s,o;if(Pt.isInterval(t==null?void 0:t.type))return W6(r);const e=t&&t.metadata.get("ARROW:extension:name");if(e&&e==="pandas.interval"){const a=JSON.parse(t.metadata.get("ARROW:extension:metadata")),{closed:l}=a,u=r.toJSON(),c=l==="both"||l==="left"?"[":"(",h=l==="both"||l==="right"?"]":")",f=Np(u.left,(i=(n=t.type)==null?void 0:n.children)==null?void 0:i[0]),d=Np(u.right,(o=(s=t.type)==null?void 0:s.children)==null?void 0:o[1]);return`${c+f}, ${d+h}`}return String(r)}function X6(r,t){return(t==null?void 0:t.type)instanceof Fp?JSON.parse(JSON.stringify(r,(e,n)=>{if(M6(n))return typeof n=="bigint"?Number(n):n})):JSON.parse(JSON.stringify(r,(e,n)=>typeof n=="bigint"?Number(n):n))}function Np(r,t){if(Rr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&D6(t))return j6(r);if(typeof r=="bigint"&&L6(t))return V6(Number(r),t);if(e&&F6(t))return $6(r,t);if(ZI(t))throw new Error("Period type is not supported yet");if(k6(t))return H6(r,t);if(R6(t))throw new Error("Duration type is not supported yet");return O6(t)?G6(r,t):C6(t)&&Number.isFinite(r)||E6(t)?r:B6(t)||N6(t)?X6(r,t):P6(t)?!!r:String(r)}function u_(r){return((r.toArray()||[]).map(n=>n.toJSON())||[]).map(n=>(r.schema.fields.forEach(i=>n[i.name]=Np(n[i.name],i)),n))}var yl=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(yl||{});async function KI(r){const t=rE(r,{logger:!1});let e,n;const i=await QI();if(i==="browser"){if(typeof t.bundles>"u"){const{getBundles:l}=await Bi(async()=>{const{getBundles:u}=await import("./default-browser-BrgSDbLD.js");return{getBundles:u}},[]);t.bundles=await l()}n=await I0(await t.bundles),e=new Worker(n.mainWorker)}else if(i==="node"){if(typeof t.bundles>"u"){const{getBundles:c}=await Bi(async()=>{const{getBundles:h}=await import("./default-node-DRTvwjMK.js");return{getBundles:h}},__vite__mapDeps([0,1,2]));t.bundles=await c()}n=await I0(await t.bundles);let l=n.mainWorker;l.startsWith("/@fs/")&&(l=l.replace("/@fs/","file://"));const u=await Bi(()=>import("./index-Cp8iQ_hy.js"),[]);e=new u.default(l,{type:"module"})}else throw new Error(`Unsupported environment: ${i}`);let s;t.logger===!0?s=new hT:t.logger===!1?s=new NB:s=t.logger;const o=new $B(s,e);if(await o.instantiate(n.mainModule,n.pthreadWorker),t.storage)switch(t.storage.type){case yl.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 yl.NODE_FS:{try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(l){throw await o.terminate(),await e.terminate(),l}break}}const a=await o.connect();return{worker:e,db:o,conn:a,query:async(l,u=[])=>{if(!u||u.length===0){const d=await a.query(l);return u_(d)}const c=await a.prepare(l),h=await c.query(...u),f=u_(h);return c.close(),f},close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function Y6(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 q6(r,t,e){await(await r).conn.send(`SAVEPOINT ${t}`);try{const n=await e(r);return await(await r).conn.send(`RELEASE SAVEPOINT ${t}`),n}catch(n){throw await(await r).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),n}}const It=Symbol.for("drizzle:entityKind");function lt(r,t){if(!r||typeof r!="object")return!1;if(r instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,It))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(It in e&&e[It]===t[It])return!0;e=Object.getPrototypeOf(e)}return!1}var b_;b_=It;class ur{constructor(t,e){W(this,"name");W(this,"keyAsName");W(this,"primary");W(this,"notNull");W(this,"default");W(this,"defaultFn");W(this,"onUpdateFn");W(this,"hasDefault");W(this,"isUnique");W(this,"uniqueName");W(this,"uniqueType");W(this,"dataType");W(this,"columnType");W(this,"enumValues");W(this,"generated");W(this,"generatedIdentity");W(this,"config");this.table=t,this.config=e,this.name=e.name,this.keyAsName=e.keyAsName,this.notNull=e.notNull,this.default=e.default,this.defaultFn=e.defaultFn,this.onUpdateFn=e.onUpdateFn,this.hasDefault=e.hasDefault,this.primary=e.primaryKey,this.isUnique=e.isUnique,this.uniqueName=e.uniqueName,this.uniqueType=e.uniqueType,this.dataType=e.dataType,this.columnType=e.columnType,this.generated=e.generated,this.generatedIdentity=e.generatedIdentity}mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}W(ur,b_,"Column");const Go=Symbol.for("drizzle:Name");function Q6(r,t){return`${r[Go]}_${t.join("_")}_unique`}var x_,w_;class $r extends(w_=ur,x_=It,w_){constructor(t,e){e.uniqueName||(e.uniqueName=Q6(t,[e.name])),super(t,e),this.table=t}}W($r,x_,"PgColumn");const c_=Symbol.for("drizzle:isPgEnum");function Z6(r){return!!r&&typeof r=="function"&&c_ in r&&r[c_]===!0}var S_;S_=It;class Gr{constructor(t,e,n,i=!1){this._={brand:"Subquery",sql:t,selectedFields:e,alias:n,isWith:i}}}W(Gr,S_,"Subquery");var T_,I_;class hg extends(I_=Gr,T_=It,I_){}W(hg,T_,"WithSubquery");const Hr={startActiveSpan(r,t){return t()}},er=Symbol.for("drizzle:ViewBaseConfig"),Au=Symbol.for("drizzle:Schema"),Bp=Symbol.for("drizzle:Columns"),h_=Symbol.for("drizzle:ExtraConfigColumns"),rf=Symbol.for("drizzle:OriginalName"),nf=Symbol.for("drizzle:BaseName"),Ec=Symbol.for("drizzle:IsAlias"),d_=Symbol.for("drizzle:ExtraConfigBuilder"),K6=Symbol.for("drizzle:IsDrizzleTable");var M_,E_,A_,C_,O_,P_,R_,F_,D_,L_;L_=It,D_=Go,F_=rf,R_=Au,P_=Bp,O_=h_,C_=nf,A_=Ec,E_=K6,M_=d_;class Mt{constructor(t,e,n){W(this,D_);W(this,F_);W(this,R_);W(this,P_);W(this,O_);W(this,C_);W(this,A_,!1);W(this,E_,!0);W(this,M_);this[Go]=this[rf]=t,this[Au]=e,this[nf]=n}}W(Mt,L_,"Table"),W(Mt,"Symbol",{Name:Go,Schema:Au,OriginalName:rf,Columns:Bp,ExtraConfigColumns:h_,BaseName:nf,IsAlias:Ec,ExtraConfigBuilder:d_});function Rs(r){return r[Go]}function vl(r){return`${r[Au]??"public"}.${r[Go]}`}function JI(r){return r!=null&&typeof r.getSQL=="function"}function J6(r){var e;const t={sql:"",params:[]};for(const n of r)t.sql+=n.sql,t.params.push(...n.params),(e=n.typings)!=null&&e.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var N_;N_=It;class nr{constructor(t){W(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Ft([this])}}W(nr,N_,"StringChunk");var B_;B_=It;const As=class As{constructor(t){W(this,"decoder",tM);W(this,"shouldInlineParams",!1);this.queryChunks=t}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Hr.startActiveSpan("drizzle.buildSQL",e=>{const n=this.buildQueryFromSourceParams(this.queryChunks,t);return e==null||e.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(t,e){const n=Object.assign({},e,{inlineParams:e.inlineParams||this.shouldInlineParams,paramStartIndex:e.paramStartIndex||{value:0}}),{casing:i,escapeName:s,escapeParam:o,prepareTyping:a,inlineParams:l,paramStartIndex:u}=n;return J6(t.map(c=>{var h;if(lt(c,nr))return{sql:c.value.join(""),params:[]};if(lt(c,Ac))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const f=[new nr("(")];for(const[d,m]of c.entries())f.push(m),dr},eM={mapToDriverValue:r=>r};({...tM,...eM});var U_;U_=It;class _i{constructor(t,e=eM){W(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Ft([this])}}W(_i,U_,"Param");function Y(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new nr(r[0]));for(const[n,i]of t.entries())e.push(i,new nr(r[n+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 n(l){return new Ft([new nr(l)])}r.raw=n;function i(l,u){const c=[];for(const[h,f]of l.entries())h>0&&u!==void 0&&c.push(u),c.push(f);return new Ft(c)}r.join=i;function s(l){return new Ac(l)}r.identifier=s;function o(l){return new $s(l)}r.placeholder=o;function a(l,u){return new _i(l,u)}r.param=a})(Y||(Y={}));(r=>{var e;e=It;const n=class n{constructor(s,o){W(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new n(this.sql,this.fieldAlias)}};W(n,e,"SQL.Aliased");let t=n;r.Aliased=t})(Ft||(Ft={}));var z_;z_=It;class $s{constructor(t){this.name=t}getSQL(){return new Ft([this])}}W($s,z_,"Placeholder");function f_(r,t){return r.map(e=>{if(lt(e,$s)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(lt(e,_i)&<(e.value,$s)){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 e5=Symbol.for("drizzle:IsDrizzleView");var V_,j_,$_;$_=It,j_=er,V_=e5;class rs{constructor({name:t,schema:e,selectedFields:n,query:i}){W(this,j_);W(this,V_,!0);this[er]={name:t,originalName:t,schema:e,selectedFields:n,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new Ft([this])}}W(rs,$_,"View");ur.prototype.getSQL=function(){return new Ft([this])};Mt.prototype.getSQL=function(){return new Ft([this])};Gr.prototype.getSQL=function(){return new Ft([this])};var G_;G_=It;class _l{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}W(_l,G_,"ColumnAliasProxyHandler");var W_;W_=It;class uh{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===Mt.Symbol.IsAlias)return!0;if(e===Mt.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===Mt.Symbol.OriginalName)return this.alias;if(e===er)return{...t[er],name:this.alias,isAlias:!0};if(e===Mt.Symbol.Columns){const i=t[Mt.Symbol.Columns];if(!i)return i;const s={};return Object.keys(i).map(o=>{s[o]=new Proxy(i[o],new _l(new Proxy(t,this)))}),s}const n=t[e];return lt(n,ur)?new Proxy(n,new _l(new Proxy(t,this))):n}}W(uh,W_,"TableAliasProxyHandler");function sf(r,t){return new Proxy(r,new uh(t,!1))}function ci(r,t){return new Proxy(r,new _l(new Proxy(r.table,new uh(t,!1))))}function rM(r,t){return new Ft.Aliased(Cc(r.sql,t),r.fieldAlias)}function Cc(r,t){return Y.join(r.queryChunks.map(e=>lt(e,ur)?ci(e,t):lt(e,Ft)?Cc(e,t):lt(e,Ft.Aliased)?rM(e,t):e))}var H_,X_;class dg extends(X_=Error,H_=It,X_){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}W(dg,H_,"DrizzleError");var Y_,q_;class nM extends(q_=dg,Y_=It,q_){constructor(){super({message:"Rollback"})}}W(nM,Y_,"TransactionRollbackError");function Pr(r,t){return t5(t)&&!JI(r)&&!lt(r,_i)&&!lt(r,$s)&&!lt(r,ur)&&!lt(r,Mt)&&!lt(r,rs)?new _i(r,t):r}const iM=(r,t)=>Y`${r} = ${Pr(t,r)}`,r5=(r,t)=>Y`${r} <> ${Pr(t,r)}`;function kp(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new nr("("),Y.join(t,new nr(" and ")),new nr(")")])}function n5(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new nr("("),Y.join(t,new nr(" or ")),new nr(")")])}function i5(r){return Y`not ${r}`}const s5=(r,t)=>Y`${r} > ${Pr(t,r)}`,o5=(r,t)=>Y`${r} >= ${Pr(t,r)}`,a5=(r,t)=>Y`${r} < ${Pr(t,r)}`,l5=(r,t)=>Y`${r} <= ${Pr(t,r)}`;function u5(r,t){return Array.isArray(t)?t.length===0?Y`false`:Y`${r} in ${t.map(e=>Pr(e,r))}`:Y`${r} in ${Pr(t,r)}`}function c5(r,t){return Array.isArray(t)?t.length===0?Y`true`:Y`${r} not in ${t.map(e=>Pr(e,r))}`:Y`${r} not in ${Pr(t,r)}`}function h5(r){return Y`${r} is null`}function d5(r){return Y`${r} is not null`}function f5(r){return Y`exists ${r}`}function p5(r){return Y`not exists ${r}`}function m5(r,t,e){return Y`${r} between ${Pr(t,r)} and ${Pr(e,r)}`}function g5(r,t,e){return Y`${r} not between ${Pr(t,r)} and ${Pr(e,r)}`}function y5(r,t){return Y`${r} like ${t}`}function v5(r,t){return Y`${r} not like ${t}`}function _5(r,t){return Y`${r} ilike ${t}`}function b5(r,t){return Y`${r} not ilike ${t}`}function x5(r){return Y`${r} asc`}function w5(r){return Y`${r} desc`}var Q_;Q_=It;class sM{write(t){console.log(t)}}W(sM,Q_,"ConsoleLogWriter");var Z_;Z_=It;class oM{constructor(t){W(this,"writer");this.writer=(t==null?void 0:t.writer)??new sM}logQuery(t,e){const n=e.map(s=>{try{return JSON.stringify(s)}catch{return String(s)}}),i=n.length?` -- params: [${n.join(", ")}]`:"";this.writer.write(`Query: ${t}${i}`)}}W(oM,Z_,"DefaultLogger");var K_;K_=It;class aM{logQuery(){}}W(aM,K_,"NoopLogger");var J_,tb;tb=It,J_=Symbol.toStringTag;class ns{constructor(){W(this,J_,"QueryPromise")}catch(t){return this.then(void 0,t)}finally(t){return this.then(e=>(t==null||t(),e),e=>{throw t==null||t(),e})}then(t,e){return this.execute().then(t,e)}}W(ns,tb,"QueryPromise");function Gs(r,t){return Object.entries(r).reduce((e,[n,i])=>{if(typeof n!="string")return e;const s=t?[...t,n]:[n];return lt(i,ur)||lt(i,Ft)||lt(i,Ft.Aliased)?e.push({path:s,field:i}):lt(i,Mt)?e.push(...Gs(i[Mt.Symbol.Columns],s)):e.push(...Gs(i,s)),e},[])}function fg(r,t){const e=Object.keys(r),n=Object.keys(t);if(e.length!==n.length)return!1;for(const[i,s]of e.entries())if(s!==n[i])return!1;return!0}function lM(r,t){const e=Object.entries(t).filter(([,n])=>n!==void 0).map(([n,i])=>lt(i,Ft)||lt(i,ur)?[n,i]:[n,new _i(i,r[Mt.Symbol.Columns][n])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function S5(r,t){for(const e of t)for(const n of Object.getOwnPropertyNames(e.prototype))n!=="constructor"&&Object.defineProperty(r.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n)||Object.create(null))}function T5(r){return r[Mt.Symbol.Columns]}function Es(r){return lt(r,Gr)?r._.alias:lt(r,rs)?r[er].name:lt(r,Ft)?void 0:r[Mt.Symbol.IsAlias]?r[Mt.Symbol.Name]:r[Mt.Symbol.BaseName]}function I5(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.logger;return!(t!=="object"&&t!=="undefined")}if("casing"in r){const t=typeof r.logger;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 eb,rb;class uM extends(rb=$r,eb=It,rb){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}W(uM,eb,"PgDate");var nb,ib;class cM extends(ib=$r,nb=It,ib){getSQLType(){return"date"}}W(cM,nb,"PgDateString");var sb,ob;class hM extends(ob=$r,sb=It,ob){constructor(t,e){super(t,e)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}W(hM,sb,"PgJson");var ab,lb;class dM extends(lb=$r,ab=It,lb){constructor(t,e){super(t,e)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}W(dM,ab,"PgJsonb");var ub,cb;class fM extends(cb=$r,ub=It,cb){constructor(e,n){super(e,n);W(this,"precision");W(this,"scale");this.precision=n.precision,this.scale=n.scale}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}W(fM,ub,"PgNumeric");var hb,db;class pM extends(db=$r,hb=It,db){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(pM,hb,"PgTime");var fb,pb;class mM extends(pb=$r,fb=It,pb){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");W(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));W(this,"mapToDriverValue",e=>e.toISOString());this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(mM,fb,"PgTimestamp");var mb,gb;class gM extends(gb=$r,mb=It,gb){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(gM,mb,"PgTimestampString");var yb,vb;class yM extends(vb=$r,yb=It,vb){getSQLType(){return"uuid"}}W(yM,yb,"PgUUID");const p_=Symbol.for("drizzle:PgInlineForeignKeys"),m_=Symbol.for("drizzle:EnableRLS");var _b,bb,xb,wb,Sb,Tb;class en extends(Tb=Mt,Sb=It,wb=p_,xb=m_,bb=Mt.Symbol.ExtraConfigBuilder,_b=Mt.Symbol.ExtraConfigColumns,Tb){constructor(){super(...arguments);W(this,wb,[]);W(this,xb,!1);W(this,bb);W(this,_b,{})}}W(en,Sb,"PgTable"),W(en,"Symbol",Object.assign({},Mt.Symbol,{InlineForeignKeys:p_,EnableRLS:m_}));var Ib;Ib=It;class vM{constructor(t,e){W(this,"columns");W(this,"name");this.columns=t,this.name=e}build(t){return new _M(t,this.columns,this.name)}}W(vM,Ib,"PgPrimaryKeyBuilder");var Mb;Mb=It;class _M{constructor(t,e,n){W(this,"columns");W(this,"name");this.table=t,this.columns=e,this.name=n}getName(){return this.name??`${this.table[en.Symbol.Name]}_${this.columns.map(t=>t.name).join("_")}_pk`}}W(_M,Mb,"PgPrimaryKey");var Eb;Eb=It;class pg{constructor(t,e,n){W(this,"referencedTableName");W(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=n,this.referencedTableName=e[Mt.Symbol.Name]}}W(pg,Eb,"Relation");var Ab;Ab=It;class bM{constructor(t,e){this.table=t,this.config=e}}W(bM,Ab,"Relations");var Cb,Ob;const Rc=class Rc extends(Ob=pg,Cb=It,Ob){constructor(t,e,n,i){super(t,e,n==null?void 0:n.relationName),this.config=n,this.isNullable=i}withFieldName(t){const e=new Rc(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};W(Rc,Cb,"One");let Ws=Rc;var Pb,Rb;const Fc=class Fc extends(Rb=pg,Pb=It,Rb){constructor(t,e,n){super(t,e,n==null?void 0:n.relationName),this.config=n}withFieldName(t){const e=new Fc(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};W(Fc,Pb,"Many");let Oc=Fc;function M5(){return{and:kp,between:m5,eq:iM,exists:f5,gt:s5,gte:o5,ilike:_5,inArray:u5,isNull:h5,isNotNull:d5,like:y5,lt:a5,lte:l5,ne:r5,not:i5,notBetween:g5,notExists:p5,notLike:v5,notIlike:b5,notInArray:c5,or:n5,sql:Y}}function E5(){return{sql:Y,asc:x5,desc:w5}}function A5(r,t){var s;Object.keys(r).length===1&&"default"in r&&!lt(r.default,Mt)&&(r=r.default);const e={},n={},i={};for(const[o,a]of Object.entries(r))if(lt(a,Mt)){const l=vl(a),u=n[l];e[l]=o,i[o]={tsName:o,dbName:a[Mt.Symbol.Name],schema:a[Mt.Symbol.Schema],columns:a[Mt.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[Mt.Symbol.Columns]))h.primary&&i[o].primaryKey.push(h);const c=(s=a[Mt.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[Mt.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))lt(h,vM)&&i[o].primaryKey.push(...h.columns)}else if(lt(a,bM)){const l=vl(a.table),u=e[l],c=a.config(t(a.table));let h;for(const[f,d]of Object.entries(c))if(u){const m=i[u];m.relations[f]=d}else l in n||(n[l]={relations:{},primaryKey:h}),n[l].relations[f]=d}return{tables:i,tableNamesMap:e}}function C5(r){return function(e,n){return new Ws(r,e,n,(n==null?void 0:n.fields.reduce((i,s)=>i&&s.notNull,!0))??!1)}}function O5(r){return function(e,n){return new Oc(r,e,n)}}function P5(r,t,e){if(lt(e,Ws)&&e.config)return{fields:e.config.fields,references:e.config.references};const n=t[vl(e.referencedTable)];if(!n)throw new Error(`Table "${e.referencedTable[Mt.Symbol.Name]}" not found in schema`);const i=r[n];if(!i)throw new Error(`Table "${n}" not found in schema`);const s=e.sourceTable,o=t[vl(s)];if(!o)throw new Error(`Table "${s[Mt.Symbol.Name]}" not found in schema`);const a=[];for(const l of Object.values(i.relations))(e.relationName&&e!==l&&l.relationName===e.relationName||!e.relationName&&l.referencedTable===e.sourceTable)&&a.push(l);if(a.length>1)throw e.relationName?new Error(`There are multiple relations with name "${e.relationName}" in table "${n}"`):new Error(`There are multiple relations between "${n}" and "${e.sourceTable[Mt.Symbol.Name]}". Please specify relation name`);if(a[0]&<(a[0],Ws)&&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 R5(r){return{one:C5(r),many:O5(r)}}function Up(r,t,e,n,i=s=>s){const s={};for(const[o,a]of n.entries())if(a.isJson){const l=t.relations[a.tsKey],u=e[o],c=typeof u=="string"?JSON.parse(u):u;s[a.tsKey]=lt(l,Ws)?c&&Up(r,r[a.relationTableTsKey],c,a.selection,i):c.map(h=>Up(r,r[a.relationTableTsKey],h,a.selection,i))}else{const l=i(e[o]),u=a.field;let c;lt(u,ur)?c=u:lt(u,Ft)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var Fb;Fb=It;const Dc=class Dc{constructor(t){W(this,"config");this.config={...t}}get(t,e){if(e==="_")return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(e===er)return{...t[er],selectedFields:new Proxy(t[er].selectedFields,this)};if(typeof e=="symbol")return t[e];const i=(lt(t,Gr)?t._.selectedFields:lt(t,rs)?t[er].selectedFields:t)[e];if(lt(i,Ft.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!i.isSelectionField)return i.sql;const s=i.clone();return s.isSelectionField=!0,s}if(lt(i,Ft)){if(this.config.sqlBehavior==="sql")return i;throw new Error(`You tried to reference "${e}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return lt(i,ur)?this.config.alias?new Proxy(i,new _l(new Proxy(i.table,new uh(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!="object"||i===null?i:new Proxy(i,new Dc(this.config))}};W(Dc,Fb,"SelectionProxyHandler");let pr=Dc;var Db,Lb;class zp extends(Lb=ns,Db=It,Lb){constructor(e,n,i,s){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=i,this.config={table:e,withList:s}}where(e){return this.config.where=e,this}returning(e=this.config.table[Mt.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=Gs(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Hr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new pr({alias:Rs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(zp,Db,"PgDelete");function F5(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function D5(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,n,i)=>{const s=i===0?n.toLowerCase():`${n[0].toUpperCase()}${n.slice(1)}`;return e+s},"")}function L5(r){return r}var Nb;Nb=It;class xM{constructor(t){W(this,"cache",{});W(this,"cachedTables",{});W(this,"convert");this.convert=t==="snake_case"?F5:t==="camelCase"?D5:L5}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[Mt.Symbol.Schema]??"public",n=t.table[Mt.Symbol.OriginalName],i=`${e}.${n}.${t.name}`;return this.cache[i]||this.cacheTable(t.table),this.cache[i]}cacheTable(t){const e=t[Mt.Symbol.Schema]??"public",n=t[Mt.Symbol.OriginalName],i=`${e}.${n}`;if(!this.cachedTables[i]){for(const s of Object.values(t[Mt.Symbol.Columns])){const o=`${i}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[i]=!0}}clearCache(){this.cache={},this.cachedTables={}}}W(xM,Nb,"CasingCache");var Bb,kb;class mg extends(kb=rs,Bb=It,kb){}W(mg,Bb,"PgViewBase");var Ub;Ub=It;class Qa{constructor(t){W(this,"casing");this.casing=new xM(t==null?void 0:t.casing)}async migrate(t,e,n){const i=typeof n=="string"?"__drizzle_migrations":n.migrationsTable??"__drizzle_migrations",s=typeof n=="string"?"drizzle":n.migrationsSchema??"drizzle",o=Y` +]`}concat(...t){const e=this.schema,n=this.data.concat(t.flatMap(({data:i})=>i));return new Ts(e,n.map(i=>new Er(e,i)))}slice(t,e){const n=this.schema;[t,e]=LS({length:this.numRows},t,e);const i=kS(this.data,this._offsets,t,e);return new Ts(n,i.map(s=>new Er(n,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&tn.children[t]);if(e.length===0){const{type:n}=this.schema.fields[t],i=he({type:n,length:0,nullCount:0});e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new ze(e)}return null}setChild(t,e){var n;return this.setChildAt((n=this.schema.fields)===null||n===void 0?void 0:n.findIndex(i=>i.name===t),e)}setChildAt(t,e){let n=this.schema,i=[...this.batches];if(t>-1&&tthis.getChildAt(u));[s[t],a[t]]=[o,e],[n,i]=Hd(n,a)}return new Ts(n,i)}select(t){const e=this.schema.fields.reduce((n,i,s)=>n.set(i.name,s),new Map);return this.selectAt(t.map(n=>e.get(n)).filter(n=>n>-1))}selectAt(t){const e=this.schema.selectAt(t),n=this.batches.map(i=>i.selectAt(t));return new Ts(e,n)}assign(t){const e=this.schema.fields,[n,i]=t.schema.fields.reduce((a,l,u)=>{const[c,h]=a,f=e.findIndex(d=>d.name===l.name);return~f?h[f]=u:c.push(u),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,l)=>[l,i[l]]).map(([a,l])=>l===void 0?this.getChildAt(a):t.getChildAt(l)),...n.map(a=>t.getChildAt(a))].filter(Boolean);return new Ts(...Hd(s,o))}};YS=Symbol.toStringTag;qi[YS]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=gc(Dm),r.get=gc(Or.getVisitFn(z.Struct)),r.set=US(fn.getVisitFn(z.Struct)),r.indexOf=zS(yc.getVisitFn(z.Struct)),"Table"))(qi.prototype);var qS;let Er=class $a{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof Ue))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=he({nullCount:0,type:new br(this.schema.fields),children:this.schema.fields.map(e=>he({type:e.type,nullCount:0}))})]=t,!(this.data instanceof Pe))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=g0(this.schema,this.data.children);break}case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce((l,u,c)=>(l.children[c]=e[u],l.length=Math.max(l.length,e[u].length),l.fields[c]=De.new({name:u,type:e[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new Ue(n),a=he({type:new br(n),length:s,children:i,nullCount:0});[this.schema,this.data]=g0(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=QS(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 Or.visit(this.data,t)}at(t){return this.get(Rm(t,this.numRows))}set(t,e){return fn.visit(this.data,t,e)}indexOf(t,e){return yc.visit(this.data,t,e)}[Symbol.iterator](){return Nm.visit(new ze([this.data]))}toArray(){return[...this]}concat(...t){return new qi(this.schema,[this,...t])}slice(t,e){const[n]=new ze([this.data]).slice(t,e).data;return new $a(this.schema,n)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&ti.name===t),e)}setChildAt(t,e){let n=this.schema,i=this.data;if(t>-1&&ta.name===s);~o&&(i[o]=this.data.children[o])}return new $a(e,he({type:n,length:this.numRows,children:i}))}selectAt(t){const e=this.schema.selectAt(t),n=t.map(s=>this.data.children[s]).filter(Boolean),i=he({type:new br(e.fields),length:this.numRows,children:n});return new $a(e,i)}};qS=Symbol.toStringTag;Er[qS]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(Er.prototype);function g0(r,t,e=t.reduce((n,i)=>Math.max(n,i.length),0)){var n;const i=[...r.fields],s=[...t],o=(e+63&-64)>>3;for(const[a,l]of r.fields.entries()){const u=t[a];(!u||u.length!==e)&&(i[a]=l.clone({nullable:!0}),s[a]=(n=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&n!==void 0?n:he({type:l.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(i),he({type:new br(i),length:e,children:s})]}function QS(r,t,e=new Map){var n,i;if(((n=r==null?void 0:r.length)!==null&&n!==void 0?n:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++she({type:i.type})),n=he({type:new br(t.fields),nullCount:0,children:e});super(t,n)}}let Pi=class Pn{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 Pn).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+Se),(e||new Pn).__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):He.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):ve.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12);return n?(e||new tr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,He.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,ve.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(t,e,n,i,s,o){return Pn.startMessage(t),Pn.addVersion(t,e),Pn.addHeaderType(t,n),Pn.addHeader(t,i),Pn.addBodyLength(t,s),Pn.addCustomMetadata(t,o),Pn.endMessage(t)}};class B3 extends le{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return o0.startNull(e),o0.endNull(e)}visitInt(t,e){return Br.startInt(e),Br.addBitWidth(e,t.bitWidth),Br.addIsSigned(e,t.isSigned),Br.endInt(e)}visitFloat(t,e){return Vn.startFloatingPoint(e),Vn.addPrecision(e,t.precision),Vn.endFloatingPoint(e)}visitBinary(t,e){return e0.startBinary(e),e0.endBinary(e)}visitLargeBinary(t,e){return n0.startLargeBinary(e),n0.endLargeBinary(e)}visitBool(t,e){return r0.startBool(e),r0.endBool(e)}visitUtf8(t,e){return a0.startUtf8(e),a0.endUtf8(e)}visitLargeUtf8(t,e){return i0.startLargeUtf8(e),i0.endLargeUtf8(e)}visitDecimal(t,e){return yo.startDecimal(e),yo.addScale(e,t.scale),yo.addPrecision(e,t.precision),yo.addBitWidth(e,t.bitWidth),yo.endDecimal(e)}visitDate(t,e){return yu.startDate(e),yu.addUnit(e,t.unit),yu.endDate(e)}visitTime(t,e){return on.startTime(e),on.addUnit(e,t.unit),on.addBitWidth(e,t.bitWidth),on.endTime(e)}visitTimestamp(t,e){const n=t.timezone&&e.createString(t.timezone)||void 0;return an.startTimestamp(e),an.addUnit(e,t.unit),n!==void 0&&an.addTimezone(e,n),an.endTimestamp(e)}visitInterval(t,e){return jn.startInterval(e),jn.addUnit(e,t.unit),jn.endInterval(e)}visitDuration(t,e){return vu.startDuration(e),vu.addUnit(e,t.unit),vu.endDuration(e)}visitList(t,e){return s0.startList(e),s0.endList(e)}visitStruct(t,e){return Ps.startStruct_(e),Ps.endStruct_(e)}visitUnion(t,e){Mr.startTypeIdsVector(e,t.typeIds.length);const n=Mr.createTypeIdsVector(e,t.typeIds);return Mr.startUnion(e),Mr.addMode(e,t.mode),Mr.addTypeIds(e,n),Mr.endUnion(e)}visitDictionary(t,e){const n=this.visit(t.indices,e);return gi.startDictionaryEncoding(e),gi.addId(e,BigInt(t.id)),gi.addIsOrdered(e,t.isOrdered),n!==void 0&&gi.addIndexType(e,n),gi.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return _u.startFixedSizeBinary(e),_u.addByteWidth(e,t.byteWidth),_u.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return bu.startFixedSizeList(e),bu.addListSize(e,t.listSize),bu.endFixedSizeList(e)}visitMap(t,e){return xu.startMap(e),xu.addKeysSorted(e,t.keysSorted),xu.endMap(e)}}const Xd=new B3;function k3(r,t=new Map){return new Ue(z3(r,t),Tu(r.metadata),t)}function ZS(r){return new Wr(r.count,KS(r.columns),JS(r.columns))}function U3(r){return new Qn(ZS(r.data),r.id,r.isDelta)}function z3(r,t){return(r.fields||[]).filter(Boolean).map(e=>De.fromJSON(e,t))}function y0(r,t){return(r.children||[]).filter(Boolean).map(e=>De.fromJSON(e,t))}function KS(r){return(r||[]).reduce((t,e)=>[...t,new Qi(e.count,V3(e.VALIDITY)),...KS(e.children)],[])}function JS(r,t=[]){for(let e=-1,n=(r||[]).length;++et+ +(e===0),0)}function j3(r,t){let e,n,i,s,o,a;return!t||!(s=r.dictionary)?(o=_0(r,y0(r,t)),i=new De(r.name,o,r.nullable,Tu(r.metadata))):t.has(e=s.id)?(n=(n=s.indexType)?v0(n):new hl,a=new qo(t.get(e),n,e,s.isOrdered),i=new De(r.name,a,r.nullable,Tu(r.metadata))):(n=(n=s.indexType)?v0(n):new hl,t.set(e,o=_0(r,y0(r,t))),a=new qo(o,n,e,s.isOrdered),i=new De(r.name,a,r.nullable,Tu(r.metadata))),i||null}function Tu(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function v0(r){return new Vs(r.isSigned,r.bitWidth)}function _0(r,t){const e=r.type.name;switch(e){case"NONE":return new Hi;case"null":return new Hi;case"binary":return new Ku;case"largebinary":return new Ju;case"utf8":return new tc;case"largeutf8":return new ec;case"bool":return new rc;case"list":return new uc((t||[])[0]);case"struct":return new br(t||[]);case"struct_":return new br(t||[])}switch(e){case"int":{const n=r.type;return new Vs(n.isSigned,n.bitWidth)}case"floatingpoint":{const n=r.type;return new Zu(mr[n.precision])}case"decimal":{const n=r.type;return new nc(n.scale,n.precision,n.bitWidth)}case"date":{const n=r.type;return new ic(dn[n.unit])}case"time":{const n=r.type;return new sc($t[n.unit],n.bitWidth)}case"timestamp":{const n=r.type;return new oc($t[n.unit],n.timezone)}case"interval":{const n=r.type;return new ac(qn[n.unit])}case"duration":{const n=r.type;return new lc($t[n.unit])}case"union":{const n=r.type,[i,...s]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("");return new cc(gr[o],n.typeIds||[],t||[])}case"fixedsizebinary":{const n=r.type;return new hc(n.byteWidth)}case"fixedsizelist":{const n=r.type;return new dc(n.listSize,(t||[])[0])}case"map":{const n=r.type;return new fc((t||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var $3=f1,G3=Xo;class xr{static fromJSON(t,e){const n=new xr(0,He.V5,e);return n._createHeader=W3(t,e),n}static decode(t){t=new G3(fe(t));const e=Pi.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new xr(n,i,s);return o._createHeader=H3(e,s),o}static encode(t){const e=new $3;let n=-1;return t.isSchema()?n=Ue.encode(e,t.header()):t.isRecordBatch()?n=Wr.encode(e,t.header()):t.isDictionaryBatch()&&(n=Qn.encode(e,t.header())),Pi.startMessage(e),Pi.addVersion(e,He.V5),Pi.addHeader(e,n),Pi.addHeaderType(e,t.headerType),Pi.addBodyLength(e,BigInt(t.bodyLength)),Pi.finishMessageBuffer(e,Pi.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof Ue)return new xr(0,He.V5,ve.Schema,t);if(t instanceof Wr)return new xr(e,He.V5,ve.RecordBatch,t);if(t instanceof Qn)return new xr(e,He.V5,ve.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===ve.Schema}isRecordBatch(){return this.headerType===ve.RecordBatch}isDictionaryBatch(){return this.headerType===ve.DictionaryBatch}constructor(t,e,n,i){this._version=e,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=Ae(t)}}class Wr{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,n){this._nodes=e,this._buffers=n,this._length=Ae(t)}}class Qn{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,n=!1){this._data=t,this._isDelta=n,this._id=Ae(e)}}class Gn{constructor(t,e){this.offset=Ae(t),this.length=Ae(e)}}class Qi{constructor(t,e){this.length=Ae(t),this.nullCount=Ae(e)}}function W3(r,t){return()=>{switch(t){case ve.Schema:return Ue.fromJSON(r);case ve.RecordBatch:return Wr.fromJSON(r);case ve.DictionaryBatch:return Qn.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${ve[t]}, type: ${t} }`)}}function H3(r,t){return()=>{switch(t){case ve.Schema:return Ue.decode(r.header(new Fn),new Map,r.version());case ve.RecordBatch:return Wr.decode(r.header(new hi),r.version());case ve.DictionaryBatch:return Qn.decode(r.header(new mo),r.version())}throw new Error(`Unrecognized Message type: { name: ${ve[t]}, type: ${t} }`)}}De.encode=nB;De.decode=eB;De.fromJSON=j3;Ue.encode=rB;Ue.decode=X3;Ue.fromJSON=k3;Wr.encode=iB;Wr.decode=Y3;Wr.fromJSON=ZS;Qn.encode=sB;Qn.decode=q3;Qn.fromJSON=U3;Qi.encode=oB;Qi.decode=Z3;Gn.encode=aB;Gn.decode=Q3;function X3(r,t=new Map,e=He.V5){const n=tB(r,t);return new Ue(n,Iu(r),t,e)}function Y3(r,t=He.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Wr(r.length(),K3(r),J3(r,t))}function q3(r,t=He.V5){return new Qn(Wr.decode(r.data(),t),r.id(),r.isDelta())}function Q3(r){return new Gn(r.offset(),r.length())}function Z3(r){return new Qi(r.length(),r.nullCount())}function K3(r){const t=[];for(let e,n=-1,i=-1,s=r.nodesLength();++nDe.encode(r,s));Fn.startFieldsVector(r,e.length);const n=Fn.createFieldsVector(r,e),i=t.metadata&&t.metadata.size>0?Fn.createCustomMetadataVector(r,[...t.metadata].map(([s,o])=>{const a=r.createString(`${s}`),l=r.createString(`${o}`);return tr.startKeyValue(r),tr.addKey(r,a),tr.addValue(r,l),tr.endKeyValue(r)})):-1;return Fn.startSchema(r),Fn.addFields(r,n),Fn.addEndianness(r,lB?Yo.Little:Yo.Big),i!==-1&&Fn.addCustomMetadata(r,i),Fn.endSchema(r)}function nB(r,t){let e=-1,n=-1,i=-1;const s=t.type;let o=t.typeId;Rt.isDictionary(s)?(o=s.dictionary.typeId,i=Xd.visit(s,r),n=Xd.visit(s.dictionary,r)):n=Xd.visit(s,r);const a=(s.children||[]).map(c=>De.encode(r,c)),l=Jr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Jr.createCustomMetadataVector(r,[...t.metadata].map(([c,h])=>{const f=r.createString(`${c}`),d=r.createString(`${h}`);return tr.startKeyValue(r),tr.addKey(r,f),tr.addValue(r,d),tr.endKeyValue(r)})):-1;return t.name&&(e=r.createString(t.name)),Jr.startField(r),Jr.addType(r,n),Jr.addTypeType(r,o),Jr.addChildren(r,l),Jr.addNullable(r,!!t.nullable),e!==-1&&Jr.addName(r,e),i!==-1&&Jr.addDictionary(r,i),u!==-1&&Jr.addCustomMetadata(r,u),Jr.endField(r)}function iB(r,t){const e=t.nodes||[],n=t.buffers||[];hi.startNodesVector(r,e.length);for(const o of e.slice().reverse())Qi.encode(r,o);const i=r.endVector();hi.startBuffersVector(r,n.length);for(const o of n.slice().reverse())Gn.encode(r,o);const s=r.endVector();return hi.startRecordBatch(r),hi.addLength(r,BigInt(t.length)),hi.addNodes(r,i),hi.addBuffers(r,s),hi.endRecordBatch(r)}function sB(r,t){const e=Wr.encode(r,t.data);return mo.startDictionaryBatch(r),mo.addId(r,BigInt(t.id)),mo.addIsDelta(r,t.isDelta),mo.addData(r,e),mo.endDictionaryBatch(r)}function oB(r,t){return g1.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function aB(r,t){return m1.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const lB=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),$m=r=>`Expected ${ve[r]} Message in stream, but was null or length 0.`,Gm=r=>`Header pointer of flatbuffer-encoded ${ve[r]} Message is null or length 0.`,tT=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,eT=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class rT{constructor(t){this.source=t instanceof vc?t:new vc(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?Ve: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($m(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=fe(this.source.read(t));if(e.byteLength[...i,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE_ID&&[s.TYPE_ID]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...e(s.children)],[])}}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error($m(t));return e.value}readSchema(){const t=ve.Schema,e=this.readMessage(t),n=e==null?void 0:e.header();if(!e||!n)throw new Error(Gm(t));return n}}const rh=4,Ep="ARROW1",fl=new Uint8Array(Ep.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 rn.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return rn.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 un?t:mp(t)?mB(t):a1(t)?vB(t):zs(t)?re(this,void 0,void 0,function*(){return yield un.from(yield t)}):l1(t)||Em(t)||u1(t)||oa(t)?yB(new Qo(t)):gB(new vc(t))}static readAll(t){return t instanceof un?t.isSync()?S0(t):T0(t):mp(t)||ArrayBuffer.isView(t)||Tl(t)||o1(t)?S0(t):T0(t)}}class bc extends un{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Ar(this,arguments,function*(){yield Lt(yield*ks(Hn(this[Symbol.iterator]())))})}}class xc extends un{constructor(t){super(t),this._impl=t}readAll(){return re(this,void 0,void 0,function*(){var t,e,n,i;const s=new Array;try{for(var o=!0,a=Hn(this),l;l=yield a.next(),t=l.done,!t;o=!0){i=l.value,o=!1;const u=i;s.push(u)}}catch(u){e={error:u}}finally{try{!o&&!t&&(n=a.return)&&(yield n.call(a))}finally{if(e)throw e.error}}return s})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class iT extends bc{constructor(t){super(t),this._impl=t}}class dB extends xc{constructor(t){super(t),this._impl=t}}class sT{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const n=this._loadVectors(t,e,this.schema.fields),i=he({type:new br(this.schema.fields),length:t.length,children:n});return new Er(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,a=s.get(n),l=o.dictionaries.get(n),u=this._loadVectors(t.data,e,[l]);return(a&&i?a.concat(new ze(u)):new ze(u)).memoize()}_loadVectors(t,e,n){return new XS(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class wc extends sT{constructor(t,e){super(e),this._reader=mp(t)?new cB(this._handle=t):new rT(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=aT(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):Ve}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):Ve}next(){if(this.closed)return Ve;let t;const{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const n=t.header(),i=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const n=t.header(),i=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new jm(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class Sc extends sT{constructor(t,e){super(e),this._reader=new uB(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return re(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 re(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=aT(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return re(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):Ve})}return(t){return re(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):Ve})}next(){return re(this,void 0,void 0,function*(){if(this.closed)return Ve;let t;const{_reader:e}=this;for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const n=t.header(),i=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const n=t.header(),i=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new jm(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return re(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class oT extends wc{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 m0?t:new m0(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e;if(this.closed)return null;this._footer||this.open();const n=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(ve.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null}_readDictionaryBatch(t){var e;const n=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(ve.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){const{_handle:t}=this,e=t.size-nT,n=t.readInt32(e),i=t.readAt(e-n,n);return dl.decode(i)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return re(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const n of this._footer.dictionaryBatches())n&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return re(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());const n=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(ve.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null})}_readDictionaryBatch(t){return re(this,void 0,void 0,function*(){var e;const n=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(ve.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return re(this,void 0,void 0,function*(){const{_handle:t}=this;t._pending&&(yield t._pending);const e=t.size-nT,n=yield t.readInt32(e),i=yield t.readAt(e-n,n);return dl.decode(i)})}_readNextMessageAndValidate(t){return re(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?Wm(t)?new iT(new oT(r.read())):new bc(new wc(r)):new bc(new wc(function*(){}()))}function yB(r){return re(this,void 0,void 0,function*(){const t=yield r.peek(Al+7&-8);return t&&t.byteLength>=4?Wm(t)?new iT(new oT(yield r.read())):new xc(new Sc(r)):new xc(new Sc(function(){return Ar(this,arguments,function*(){})}()))})}function vB(r){return re(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new _c(r,t);return t>=hB&&Wm(yield e.readAt(0,Al+7&-8))?new dB(new fB(e)):new xc(new Sc(e))})}class $e extends le{static assemble(...t){const e=i=>i.flatMap(s=>Array.isArray(s)?e(s):s instanceof Er?s.data.children:s.data),n=new $e;return n.visitMany(e(t)),n}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof ze)return this.visitMany(t.data),this;const{type:e}=t;if(!Rt.isDictionary(e)){const{length:n}=t;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(Rt.isUnion(e))this.nodes.push(new Qi(n,0));else{const{nullCount:i}=t;Rt.isNull(e)||bn.call(this,i<=0?new Uint8Array(0):pc(t.offset,n,t.nullBitmap)),this.nodes.push(new Qi(n,i))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function bn(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new Gn(this._byteLength,t)),this._byteLength+=t,this}function _B(r){var t;const{type:e,length:n,typeIds:i,valueOffsets:s}=r;if(bn.call(this,i),e.mode===gr.Sparse)return Ap.call(this,r);if(e.mode===gr.Dense){if(r.offset<=0)return bn.call(this,s),Ap.call(this,r);{const o=new Int32Array(n),a=Object.create(null),l=Object.create(null);for(let u,c,h=-1;++h{const h=e.typeIds[c],f=a[h],d=l[h];return u.slice(f,Math.min(n,d))}))}}return this}function bB(r){let t;return r.nullCount>=r.length?bn.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?bn.call(this,pc(r.offset,r.length,t)):bn.call(this,mc(r.values))}function Ti(r){return bn.call(this,r.values.subarray(0,r.length*r.stride))}function nh(r){const{length:t,values:e,valueOffsets:n}=r,i=Ae(n[0]),s=Ae(n[t]),o=Math.min(s-i,e.byteLength-i);return bn.call(this,h1(-i,t+1,n)),bn.call(this,e.subarray(i,i+o)),this}function Hm(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:n,[t]:i}=e;return bn.call(this,h1(-n,t+1,e)),this.visit(r.children[0].slice(n,i-n))}return this.visit(r.children[0])}function Ap(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}$e.prototype.visitBool=bB;$e.prototype.visitInt=Ti;$e.prototype.visitFloat=Ti;$e.prototype.visitUtf8=nh;$e.prototype.visitLargeUtf8=nh;$e.prototype.visitBinary=nh;$e.prototype.visitLargeBinary=nh;$e.prototype.visitFixedSizeBinary=Ti;$e.prototype.visitDate=Ti;$e.prototype.visitTimestamp=Ti;$e.prototype.visitTime=Ti;$e.prototype.visitDecimal=Ti;$e.prototype.visitList=Hm;$e.prototype.visitStruct=Ap;$e.prototype.visitUnion=_B;$e.prototype.visitInterval=Ti;$e.prototype.visitDuration=Ti;$e.prototype.visitFixedSizeList=Hm;$e.prototype.visitMap=Hm;class lT extends Bm{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 Su,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Cr(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 zs(t)?t.then(e=>this.writeAll(e)):oa(t)?Qm(this,t):qm(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 Su?this._sink=t:(this._sink=new Su,t&&qD(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&QD(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||!Mp(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 qi&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof Er&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!Mp(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof Er?t instanceof jm||this._writeRecordBatch(t):t instanceof qi?this.writeAll(t.batches):Tl(t)&&this.writeAll(t)}_writeMessage(t,e=8){const n=e-1,i=xr.encode(t),s=i.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+n&~n,l=a-s-o;return t.headerType===ve.RecordBatch?this._recordBatchBlocks.push(new Xi(a,t.bodyLength,this._position)):t.headerType===ve.DictionaryBatch&&this._dictionaryBlocks.push(new Xi(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(i),this._writePadding(l)}_write(t){if(this._started){const e=fe(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(xr.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(fl)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){const{byteLength:e,nodes:n,bufferRegions:i,buffers:s}=$e.assemble(t),o=new Wr(t.numRows,n,i),a=xr.from(o,e);return this._writeDictionaries(t)._writeMessage(a)._writeBodyBuffers(s)}_writeDictionaryBatch(t,e,n=!1){const{byteLength:i,nodes:s,bufferRegions:o,buffers:a}=$e.assemble(new ze([t])),l=new Wr(t.length,s,o),u=new Qn(l,e,n),c=xr.from(u,i);return this._writeMessage(c)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e,n,i;for(let s=-1,o=t.length;++s0&&(this._write(e),(i=(n+7&-8)-n)>0&&this._writePadding(i));return this}_writeDictionaries(t){var e,n;for(const[i,s]of t.dictionaries){const o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(i),l=(n=this._dictionaryDeltaOffsets.get(i))!==null&&n!==void 0?n:0;if(!a||a.data[0]!==o[0])for(const[u,c]of o.entries())this._writeDictionaryBatch(c,i,u>0);else if(ln.writeAll(i)):oa(t)?Qm(n,t):qm(n,t)}}class Ym extends lT{static writeAll(t){const e=new Ym;return zs(t)?t.then(n=>e.writeAll(n)):oa(t)?Qm(e,t):qm(e,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,n=!1){if(!n&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,n)}_writeFooter(t){const e=dl.encode(new dl(t,He.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function qm(r,t){let e=t;t instanceof qi&&(e=t.batches,r.reset(void 0,t.schema));for(const n of e)r.write(n);return r.finish()}function Qm(r,t){return re(this,void 0,void 0,function*(){var e,n,i,s,o,a,l;try{for(e=!0,n=Hn(t);i=yield n.next(),s=i.done,!s;e=!0){l=i.value,e=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!e&&!s&&(a=n.return)&&(yield a.call(n))}finally{if(o)throw o.error}}return r.finish()})}function xB(r,t="stream"){return(t==="stream"?Xm:Ym).writeAll(r).toUint8Array(!0)}var wB=Object.create,uT=Object.defineProperty,SB=Object.getOwnPropertyDescriptor,TB=Object.getOwnPropertyNames,IB=Object.getPrototypeOf,MB=Object.prototype.hasOwnProperty,EB=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),AB=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of TB(t))!MB.call(r,i)&&i!==e&&uT(r,i,{get:()=>t[i],enumerable:!(n=SB(t,i))||n.enumerable});return r},CB=(r,t,e)=>(e=r!=null?wB(IB(r)):{},AB(!r||!r.__esModule?uT(e,"default",{value:r,enumerable:!0}):e,r)),OB=EB((r,t)=>{t.exports=Worker}),cT=(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))(cT||{}),PB=(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))(PB||{}),RB=(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))(RB||{}),FB=(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))(FB||{}),LB=(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))(LB||{}),DB=(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))(DB||{}),NB=class{log(r){}},hT=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},BB=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(BB||{}),kB=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=un.from(t);return console.assert(e.isSync(),"Reader is not sync"),console.assert(e.isFile(),"Reader is not file"),new qi(e)}async send(r,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.startPendingQuery(this._conn,r,t);for(;e==null;)e=await this._bindings.pollPendingQuery(this._conn);let n=new dT(this._bindings,this._conn,e),i=await un.from(n);return console.assert(i.isAsync()),console.assert(i.isStream()),i}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(r){return await this._bindings.getTableNames(this._conn,r)}async prepare(r){let t=await this._bindings.createPrepared(this._conn,r);return new UB(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=xB(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)}},dT=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}},UB=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=un.from(t);return console.assert(e.isSync()),console.assert(e.isFile()),new qi(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new dT(this.bindings,this.connectionId,t),n=await un.from(e);return console.assert(n.isAsync()),console.assert(n.isStream()),n}},zB=(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))(zB||{}),VB=(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))(VB||{}),me=class{constructor(r,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=r,this.data=t,this.promise=new Promise((e,n)=>{this.promiseResolver=e,this.promiseRejecter=n})}};function Mu(r){switch(r.typeId){case z.Binary:return{sqlType:"binary"};case z.Bool:return{sqlType:"bool"};case z.Date:return{sqlType:"date"};case z.DateDay:return{sqlType:"date32[d]"};case z.DateMillisecond:return{sqlType:"date64[ms]"};case z.Decimal:{let t=r;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case z.Float:return{sqlType:"float"};case z.Float16:return{sqlType:"float16"};case z.Float32:return{sqlType:"float32"};case z.Float64:return{sqlType:"float64"};case z.Int:return{sqlType:"int32"};case z.Int16:return{sqlType:"int16"};case z.Int32:return{sqlType:"int32"};case z.Int64:return{sqlType:"int64"};case z.Uint16:return{sqlType:"uint16"};case z.Uint32:return{sqlType:"uint32"};case z.Uint64:return{sqlType:"uint64"};case z.Uint8:return{sqlType:"uint8"};case z.IntervalDayTime:return{sqlType:"interval[dt]"};case z.IntervalYearMonth:return{sqlType:"interval[m]"};case z.List:return{sqlType:"list",valueType:Mu(r.valueType)};case z.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case z.Null:return{sqlType:"null"};case z.Utf8:return{sqlType:"utf8"};case z.Struct:return{sqlType:"struct",fields:r.children.map(t=>Cp(t.name,t.type))};case z.Map:{let t=r;return{sqlType:"map",keyType:Mu(t.keyType),valueType:Mu(t.valueType)}}case z.Time:return{sqlType:"time[s]"};case z.TimeMicrosecond:return{sqlType:"time[us]"};case z.TimeMillisecond:return{sqlType:"time[ms]"};case z.TimeNanosecond:return{sqlType:"time[ns]"};case z.TimeSecond:return{sqlType:"time[s]"};case z.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case z.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case z.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case z.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case z.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function Cp(r,t){let e=Mu(t);return e.name=r,e}var jB=new TextEncoder,$B=class{constructor(r,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=r,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),t!=null&&this.attach(t)}get logger(){return this._logger}attach(r){this._worker=r,this._worker.addEventListener("message",this._onMessageHandler),this._worker.addEventListener("error",this._onErrorHandler),this._worker.addEventListener("close",this._onCloseHandler),this._workerShutdownPromise=new Promise((t,e)=>{this._workerShutdownResolver=t})}detach(){this._worker&&(this._worker.removeEventListener("message",this._onMessageHandler),this._worker.removeEventListener("error",this._onErrorHandler),this._worker.removeEventListener("close",this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(r,t=[]){if(!this._worker){console.error("cannot send a message since the worker is not set!");return}let e=this._nextMessageId++;return this._pendingRequests.set(e,r),this._worker.postMessage({messageId:e,type:r.type,data:r.data},t),await r.promise}onMessage(r){var t;let e=r.data;switch(e.type){case"LOG":{this._logger.log(e.data);return}case"INSTANTIATE_PROGRESS":{for(let i of this._onInstantiationProgress)i(e.data);return}}let n=this._pendingRequests.get(e.requestId);if(!n){console.warn("unassociated response: [".concat(e.requestId,", ").concat(e.type.toString(),"]"));return}if(this._pendingRequests.delete(e.requestId),e.type=="ERROR"){let i=new Error(e.data.message);i.name=e.data.name,(t=Object.getOwnPropertyDescriptor(i,"stack"))!=null&&t.writable&&(i.stack=e.data.stack),n.promiseRejecter(i);return}switch(n.type){case"CLOSE_PREPARED":case"COLLECT_FILE_STATISTICS":case"REGISTER_OPFS_FILE_NAME":case"COPY_FILE_TO_PATH":case"DISCONNECT":case"DROP_FILE":case"DROP_FILES":case"FLUSH_FILES":case"INSERT_ARROW_FROM_IPC_STREAM":case"IMPORT_CSV_FROM_PATH":case"IMPORT_JSON_FROM_PATH":case"OPEN":case"PING":case"REGISTER_FILE_BUFFER":case"REGISTER_FILE_HANDLE":case"REGISTER_FILE_URL":case"RESET":if(e.type=="OK"){n.promiseResolver(e.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],e.type=="OK"){n.promiseResolver(e.data);return}break;case"GLOB_FILE_INFOS":if(e.type=="FILE_INFOS"){n.promiseResolver(e.data);return}break;case"GET_VERSION":if(e.type=="VERSION_STRING"){n.promiseResolver(e.data);return}break;case"GET_FEATURE_FLAGS":if(e.type=="FEATURE_FLAGS"){n.promiseResolver(e.data);return}break;case"GET_TABLE_NAMES":if(e.type=="TABLE_NAMES"){n.promiseResolver(e.data);return}break;case"TOKENIZE":if(e.type=="SCRIPT_TOKENS"){n.promiseResolver(e.data);return}break;case"COPY_FILE_TO_BUFFER":if(e.type=="FILE_BUFFER"){n.promiseResolver(e.data);return}break;case"EXPORT_FILE_STATISTICS":if(e.type=="FILE_STATISTICS"){n.promiseResolver(e.data);return}break;case"CONNECT":if(e.type=="CONNECTION_INFO"){n.promiseResolver(e.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(e.type=="QUERY_RESULT"){n.promiseResolver(e.data);return}break;case"SEND_PREPARED":if(e.type=="QUERY_RESULT_HEADER"){n.promiseResolver(e.data);return}break;case"START_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(e.data);return}break;case"POLL_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(e.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],e.type=="SUCCESS"){n.promiseResolver(e.data);return}break;case"FETCH_QUERY_RESULTS":if(e.type=="QUERY_RESULT_CHUNK"){n.promiseResolver(e.data);return}break;case"CREATE_PREPARED":if(e.type=="PREPARED_STATEMENT_ID"){n.promiseResolver(e.data);return}break}n.promiseRejecter(new Error("unexpected response type: ".concat(e.type.toString())))}onError(r){console.error(r),console.error("error in duckdb worker: ".concat(r.message)),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn("worker terminated with ".concat(this._pendingRequests.size," pending requests"));return}this._pendingRequests.clear()}async reset(){let r=new me("RESET",null);return await this.postTask(r)}async ping(){let r=new me("PING",null);await this.postTask(r)}async dropFile(r){let t=new me("DROP_FILE",r);return await this.postTask(t)}async dropFiles(){let r=new me("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new me("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,t=null,e=n=>{}){this._onInstantiationProgress.push(e);let n=new me("INSTANTIATE",[r,t]);return await this.postTask(n)}async getVersion(){let r=new me("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new me("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let t=new me("OPEN",r);await this.postTask(t)}async tokenize(r){let t=new me("TOKENIZE",r);return await this.postTask(t)}async connectInternal(){let r=new me("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new kB(this,r)}async disconnect(r){let t=new me("DISCONNECT",r);await this.postTask(t)}async runQuery(r,t){let e=new me("RUN_QUERY",[r,t]);return await this.postTask(e)}async startPendingQuery(r,t,e=!1){let n=new me("START_PENDING_QUERY",[r,t,e]);return await this.postTask(n)}async pollPendingQuery(r){let t=new me("POLL_PENDING_QUERY",r);return await this.postTask(t)}async cancelPendingQuery(r){let t=new me("CANCEL_PENDING_QUERY",r);return await this.postTask(t)}async fetchQueryResults(r){let t=new me("FETCH_QUERY_RESULTS",r);return await this.postTask(t)}async getTableNames(r,t){let e=new me("GET_TABLE_NAMES",[r,t]);return await this.postTask(e)}async createPrepared(r,t){let e=new me("CREATE_PREPARED",[r,t]);return await this.postTask(e)}async closePrepared(r,t){let e=new me("CLOSE_PREPARED",[r,t]);await this.postTask(e)}async runPrepared(r,t,e){let n=new me("RUN_PREPARED",[r,t,e]);return await this.postTask(n)}async sendPrepared(r,t,e){let n=new me("SEND_PREPARED",[r,t,e]);return await this.postTask(n)}async globFiles(r){let t=new me("GLOB_FILE_INFOS",r);return await this.postTask(t)}async registerFileText(r,t){let e=jB.encode(t);await this.registerFileBuffer(r,e)}async registerFileURL(r,t,e,n){t===void 0&&(t=r);let i=new me("REGISTER_FILE_URL",[r,t,e,n]);await this.postTask(i)}async registerEmptyFileBuffer(r){}async registerFileBuffer(r,t){let e=new me("REGISTER_FILE_BUFFER",[r,t]);await this.postTask(e,[t.buffer])}async registerFileHandle(r,t,e,n){let i=new me("REGISTER_FILE_HANDLE",[r,t,e,n]);await this.postTask(i,[])}async registerOPFSFileName(r){let t=new me("REGISTER_OPFS_FILE_NAME",[r]);await this.postTask(t,[])}async collectFileStatistics(r,t){let e=new me("COLLECT_FILE_STATISTICS",[r,t]);await this.postTask(e,[])}async exportFileStatistics(r){let t=new me("EXPORT_FILE_STATISTICS",r);return await this.postTask(t,[])}async copyFileToBuffer(r){let t=new me("COPY_FILE_TO_BUFFER",r);return await this.postTask(t)}async copyFileToPath(r,t){let e=new me("COPY_FILE_TO_PATH",[r,t]);await this.postTask(e)}async insertArrowFromIPCStream(r,t,e){if(t.length==0)return;let n=new me("INSERT_ARROW_FROM_IPC_STREAM",[r,t,e]);await this.postTask(n,[t.buffer])}async insertCSVFromPath(r,t,e){if(e.columns!==void 0){let i=[];for(let s in e.columns){let o=e.columns[s];i.push(Cp(s,o))}e.columnsFlat=i,delete e.columns}let n=new me("IMPORT_CSV_FROM_PATH",[r,t,e]);await this.postTask(n)}async insertJSONFromPath(r,t,e){if(e.columns!==void 0){let i=[];for(let s in e.columns){let o=e.columns[s];i.push(Cp(s,o))}e.columnsFlat=i,delete e.columns}let n=new me("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(n)}};function GB(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}GB();var WB=(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))(WB||{}),HB=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])),XB=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])),YB=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])),qB=()=>(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])),QB={version:"1.29.1-dev68.0"},Zm=QB.version.split(".");Zm[0];Zm[1];Zm[2];var ZB=()=>typeof navigator>"u",Yd=null,qd=null,Qd=null,Zd=null,Kd=null;async function KB(){return Yd==null&&(Yd=typeof BigInt64Array<"u"),qd==null&&(qd=await XB()),Qd==null&&(Qd=await qB()),Zd==null&&(Zd=await YB()),Kd==null&&(Kd=await HB()),{bigInt64Array:Yd,crossOriginIsolated:ZB()||globalThis.crossOriginIsolated||!1,wasmExceptions:qd,wasmSIMD:Zd,wasmThreads:Qd,wasmBulkMemory:Kd}}async function I0(r){let t=await KB();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}}CB(OB());const Jd={},Ga={};function qa(r,t){try{const n=(Jd[r]||(Jd[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return n in Ga?Ga[n]:M0(n,n.split(":"))}catch{if(r in Ga)return Ga[r];const e=r==null?void 0:r.match(JB);return e?M0(r,e.slice(1)):NaN}}const JB=/([+-]\d\d):?(\d\d)?/;function M0(r,t){const e=+t[0],n=+(t[1]||0);return Ga[r]=e>0?e*60+n:e*60-n}class Vr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(qa(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)),fT(this),Op(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Vr(...e,t):new Vr(Date.now(),t)}withTimeZone(t){return new Vr(+this,t)}getTimezoneOffset(){return-qa(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Op(this),+this}[Symbol.for("constructDateFrom")](t){return new Vr(+new Date(t),this.timeZone)}}const E0=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!E0.test(r))return;const t=r.replace(E0,"$1UTC");Vr.prototype[t]&&(r.startsWith("get")?Vr.prototype[r]=function(){return this.internal[t]()}:(Vr.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),tk(this),+this},Vr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Op(this),+this}))});function Op(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function tk(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()),fT(r)}function fT(r){const t=qa(r.timeZone,r),e=new Date(+r);e.setUTCHours(e.getUTCHours()-1);const n=-new Date(+r).getTimezoneOffset(),i=-new Date(+e).getTimezoneOffset(),s=n-i,o=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();s&&o&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+s);const a=n-t;a&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+a);const l=qa(r.timeZone,r),c=-new Date(+r).getTimezoneOffset()-l,h=l!==t,f=c-a;if(h&&f){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+f);const d=qa(r.timeZone,r),m=l-d;m&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+m),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+m))}}const ek=new TextDecoder("utf-8"),rk=r=>ek.decode(r),nk=new TextEncoder,pT=r=>nk.encode(r),Dn=r=>typeof r=="function",Cl=r=>r!=null&&Object(r)===r,ik=r=>Cl(r)&&Dn(r.then),mT=r=>Cl(r)&&Dn(r[Symbol.iterator]),sk=r=>Cl(r)&&Dn(r[Symbol.asyncIterator]),ok=r=>Cl(r)&&"done"in r&&"value"in r,ak=r=>Cl(r)&&Dn(r.clear)&&Dn(r.bytes)&&Dn(r.position)&&Dn(r.setPosition)&&Dn(r.capacity)&&Dn(r.getBufferIdentifier)&&Dn(r.createLong),Km=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function lk(r){const t=r[0]?[r[0]]:[];let e,n,i,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let i,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,n);for(const c=e.length;++lyr(Int8Array,r),hk=r=>yr(Int16Array,r),dk=r=>yr(Int32Array,r),fk=r=>yr(BigInt64Array,r),pk=r=>yr(Uint8Array,r),mk=r=>yr(Uint16Array,r),gk=r=>yr(Uint32Array,r),yk=r=>yr(BigUint64Array,r),vk=r=>yr(Float32Array,r),_k=r=>yr(Float64Array,r),bk=r=>yr(Uint8ClampedArray,r),Rp=r=>(r.next(),r);function*ri(r,t){const e=function*(i){yield i},n=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Km?e(t):mT(t)?t:e(t);return yield*Rp(function*(i){let s=null;do s=i.next(yield yr(r,s));while(!s.done)}(n[Symbol.iterator]())),new r}const xk=r=>ri(Int8Array,r),wk=r=>ri(Int16Array,r),Sk=r=>ri(Int32Array,r),Tk=r=>ri(Uint8Array,r),Ik=r=>ri(Uint16Array,r),Mk=r=>ri(Uint32Array,r),Ek=r=>ri(Float32Array,r),Ak=r=>ri(Float64Array,r),Ck=r=>ri(Uint8ClampedArray,r);function Sn(r,t){return Ar(this,arguments,function*(){if(ik(t))return yield Lt(yield Lt(yield*ks(Hn(Sn(r,yield Lt(t))))));const n=function(o){return Ar(this,arguments,function*(){yield yield Lt(yield Lt(o))})},i=function(o){return Ar(this,arguments,function*(){yield Lt(yield*ks(Hn(Rp(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 Km?n(t):mT(t)?i(t):sk(t)?t:n(t);return yield Lt(yield*ks(Hn(Rp(function(o){return Ar(this,arguments,function*(){let a=null;do a=yield Lt(o.next(yield yield Lt(yr(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Lt(new r)})}const Ok=r=>Sn(Int8Array,r),Pk=r=>Sn(Int16Array,r),Rk=r=>Sn(Int32Array,r),Fk=r=>Sn(Uint8Array,r),Lk=r=>Sn(Uint16Array,r),Dk=r=>Sn(Uint32Array,r),Nk=r=>Sn(Float32Array,r),Bk=r=>Sn(Float64Array,r),kk=r=>Sn(Uint8ClampedArray,r);function Uk(r,t,e){if(r!==0){e=e.slice(0,t);for(let n=-1,i=e.length;++n0)do if(r[e]!==t[e])return!1;while(++eKo(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const jk=Object.freeze(Object.defineProperty({__proto__:null,valueToString:Ko},Symbol.toStringTag,{value:"Module"}));function wr(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 yT(r,t){return wr(r/t)+wr(r%t)/wr(t)}const vT=Symbol.for("isArrowBigNum");function Tn(r,...t){return t.length===0?Object.setPrototypeOf(yr(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}Tn.prototype[vT]=!0;Tn.prototype.toJSON=function(){return`"${Jo(this)}"`};Tn.prototype.valueOf=function(r){return Jm(this,r)};Tn.prototype.toString=function(){return Jo(this)};Tn.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Jm(this);case"string":return Jo(this);case"default":return _T(this)}return Jo(this)};function zo(...r){return Tn.apply(this,r)}function Vo(...r){return Tn.apply(this,r)}function pl(...r){return Tn.apply(this,r)}Object.setPrototypeOf(zo.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Vo.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(pl.prototype,Object.create(Uint32Array.prototype));Object.assign(zo.prototype,Tn.prototype,{constructor:zo,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Vo.prototype,Tn.prototype,{constructor:Vo,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(pl.prototype,Tn.prototype,{constructor:pl,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const $k=BigInt(4294967296)*BigInt(4294967296),Gk=$k-BigInt(1);function Jm(r,t){const{buffer:e,byteOffset:n,byteLength:i,signed:s}=r,o=new BigUint64Array(e,n,i/8),a=s&&o.at(-1)&BigInt(1)<=0)return tf(r);t=t.slice();let n=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Pt.prototype);class A0 extends Pt{constructor(){super(H.Null)}toString(){return"Null"}}xT=Symbol.toStringTag;A0[xT]=(r=>r[Symbol.toStringTag]="Null")(A0.prototype);class C0 extends Pt{constructor(t,e){super(H.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}wT=Symbol.toStringTag;C0[wT]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(C0.prototype);class O0 extends Pt{constructor(t){super(H.Float),this.precision=t}get ArrayType(){switch(this.precision){case jr.HALF:return Uint16Array;case jr.SINGLE:return Float32Array;case jr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}ST=Symbol.toStringTag;O0[ST]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(O0.prototype);class P0 extends Pt{constructor(){super(H.Binary)}toString(){return"Binary"}}TT=Symbol.toStringTag;P0[TT]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(P0.prototype);class R0 extends Pt{constructor(){super(H.LargeBinary)}toString(){return"LargeBinary"}}IT=Symbol.toStringTag;R0[IT]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(R0.prototype);class F0 extends Pt{constructor(){super(H.Utf8)}toString(){return"Utf8"}}MT=Symbol.toStringTag;F0[MT]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(F0.prototype);class L0 extends Pt{constructor(){super(H.LargeUtf8)}toString(){return"LargeUtf8"}}ET=Symbol.toStringTag;L0[ET]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(L0.prototype);class D0 extends Pt{constructor(){super(H.Bool)}toString(){return"Bool"}}AT=Symbol.toStringTag;D0[AT]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(D0.prototype);class N0 extends Pt{constructor(t,e,n=128){super(H.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}CT=Symbol.toStringTag;N0[CT]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(N0.prototype);class B0 extends Pt{constructor(t){super(H.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${Zi[this.unit]}>`}get ArrayType(){return this.unit===Zi.DAY?Int32Array:BigInt64Array}}OT=Symbol.toStringTag;B0[OT]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(B0.prototype);class k0 extends Pt{constructor(t,e){super(H.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${ne[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}PT=Symbol.toStringTag;k0[PT]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(k0.prototype);class U0 extends Pt{constructor(t,e){super(H.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${ne[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}RT=Symbol.toStringTag;U0[RT]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(U0.prototype);class z0 extends Pt{constructor(t){super(H.Interval),this.unit=t}toString(){return`Interval<${js[this.unit]}>`}}FT=Symbol.toStringTag;z0[FT]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(z0.prototype);class V0 extends Pt{constructor(t){super(H.Duration),this.unit=t}toString(){return`Duration<${ne[this.unit]}>`}}LT=Symbol.toStringTag;V0[LT]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(V0.prototype);class j0 extends Pt{constructor(t){super(H.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}DT=Symbol.toStringTag;j0[DT]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(j0.prototype);class Fp extends Pt{constructor(t){super(H.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}NT=Symbol.toStringTag;Fp[NT]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(Fp.prototype);class $0 extends Pt{constructor(t,e,n){super(H.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((i,s,o)=>(i[s]=o)&&i||i,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}}BT=Symbol.toStringTag;$0[BT]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))($0.prototype);class G0 extends Pt{constructor(t){super(H.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}kT=Symbol.toStringTag;G0[kT]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(G0.prototype);class W0 extends Pt{constructor(t,e){super(H.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}UT=Symbol.toStringTag;W0[UT]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(W0.prototype);class H0 extends Pt{constructor(t,e=!1){var n,i,s;if(super(H.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((n=t==null?void 0:t.type)===null||n===void 0)&&n.children)){const o=(i=t==null?void 0:t.type)===null||i===void 0?void 0:i.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}zT=Symbol.toStringTag;H0[zT]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(H0.prototype);const Hk=(r=>()=>++r)(-1);class X0 extends Pt{constructor(t,e,n,i){super(H.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=n==null?Hk():wr(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}VT=Symbol.toStringTag;X0[VT]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(X0.prototype);function jT(r){const t=r;switch(r.typeId){case H.Decimal:return r.bitWidth/32;case H.Interval:return 1+t.unit;case H.FixedSizeList:return t.listSize;case H.FixedSizeBinary:return t.byteWidth;default:return 1}}class pe{visitMany(t,...e){return t.map((n,i)=>this.visit(n,...e.map(s=>s[i])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return Xk(this,t,e)}getVisitFnByTypeId(t,e=!0){return Io(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function Xk(r,t,e=!0){return typeof t=="number"?Io(r,t,e):typeof t=="string"&&t in H?Io(r,H[t],e):t&&t instanceof Pt?Io(r,Y0(t),e):t!=null&&t.type&&t.type instanceof Pt?Io(r,Y0(t.type),e):Io(r,H.NONE,e)}function Io(r,t,e=!0){let n=null;switch(t){case H.Null:n=r.visitNull;break;case H.Bool:n=r.visitBool;break;case H.Int:n=r.visitInt;break;case H.Int8:n=r.visitInt8||r.visitInt;break;case H.Int16:n=r.visitInt16||r.visitInt;break;case H.Int32:n=r.visitInt32||r.visitInt;break;case H.Int64:n=r.visitInt64||r.visitInt;break;case H.Uint8:n=r.visitUint8||r.visitInt;break;case H.Uint16:n=r.visitUint16||r.visitInt;break;case H.Uint32:n=r.visitUint32||r.visitInt;break;case H.Uint64:n=r.visitUint64||r.visitInt;break;case H.Float:n=r.visitFloat;break;case H.Float16:n=r.visitFloat16||r.visitFloat;break;case H.Float32:n=r.visitFloat32||r.visitFloat;break;case H.Float64:n=r.visitFloat64||r.visitFloat;break;case H.Utf8:n=r.visitUtf8;break;case H.LargeUtf8:n=r.visitLargeUtf8;break;case H.Binary:n=r.visitBinary;break;case H.LargeBinary:n=r.visitLargeBinary;break;case H.FixedSizeBinary:n=r.visitFixedSizeBinary;break;case H.Date:n=r.visitDate;break;case H.DateDay:n=r.visitDateDay||r.visitDate;break;case H.DateMillisecond:n=r.visitDateMillisecond||r.visitDate;break;case H.Timestamp:n=r.visitTimestamp;break;case H.TimestampSecond:n=r.visitTimestampSecond||r.visitTimestamp;break;case H.TimestampMillisecond:n=r.visitTimestampMillisecond||r.visitTimestamp;break;case H.TimestampMicrosecond:n=r.visitTimestampMicrosecond||r.visitTimestamp;break;case H.TimestampNanosecond:n=r.visitTimestampNanosecond||r.visitTimestamp;break;case H.Time:n=r.visitTime;break;case H.TimeSecond:n=r.visitTimeSecond||r.visitTime;break;case H.TimeMillisecond:n=r.visitTimeMillisecond||r.visitTime;break;case H.TimeMicrosecond:n=r.visitTimeMicrosecond||r.visitTime;break;case H.TimeNanosecond:n=r.visitTimeNanosecond||r.visitTime;break;case H.Decimal:n=r.visitDecimal;break;case H.List:n=r.visitList;break;case H.Struct:n=r.visitStruct;break;case H.Union:n=r.visitUnion;break;case H.DenseUnion:n=r.visitDenseUnion||r.visitUnion;break;case H.SparseUnion:n=r.visitSparseUnion||r.visitUnion;break;case H.Dictionary:n=r.visitDictionary;break;case H.Interval:n=r.visitInterval;break;case H.IntervalDayTime:n=r.visitIntervalDayTime||r.visitInterval;break;case H.IntervalYearMonth:n=r.visitIntervalYearMonth||r.visitInterval;break;case H.Duration:n=r.visitDuration;break;case H.DurationSecond:n=r.visitDurationSecond||r.visitDuration;break;case H.DurationMillisecond:n=r.visitDurationMillisecond||r.visitDuration;break;case H.DurationMicrosecond:n=r.visitDurationMicrosecond||r.visitDuration;break;case H.DurationNanosecond:n=r.visitDurationNanosecond||r.visitDuration;break;case H.FixedSizeList:n=r.visitFixedSizeList;break;case H.Map:n=r.visitMap;break}if(typeof n=="function")return n;if(!e)return()=>null;throw new Error(`Unrecognized type '${H[t]}'`)}function Y0(r){switch(r.typeId){case H.Null:return H.Null;case H.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?H.Int8:H.Uint8;case 16:return e?H.Int16:H.Uint16;case 32:return e?H.Int32:H.Uint32;case 64:return e?H.Int64:H.Uint64}return H.Int}case H.Float:switch(r.precision){case jr.HALF:return H.Float16;case jr.SINGLE:return H.Float32;case jr.DOUBLE:return H.Float64}return H.Float;case H.Binary:return H.Binary;case H.LargeBinary:return H.LargeBinary;case H.Utf8:return H.Utf8;case H.LargeUtf8:return H.LargeUtf8;case H.Bool:return H.Bool;case H.Decimal:return H.Decimal;case H.Time:switch(r.unit){case ne.SECOND:return H.TimeSecond;case ne.MILLISECOND:return H.TimeMillisecond;case ne.MICROSECOND:return H.TimeMicrosecond;case ne.NANOSECOND:return H.TimeNanosecond}return H.Time;case H.Timestamp:switch(r.unit){case ne.SECOND:return H.TimestampSecond;case ne.MILLISECOND:return H.TimestampMillisecond;case ne.MICROSECOND:return H.TimestampMicrosecond;case ne.NANOSECOND:return H.TimestampNanosecond}return H.Timestamp;case H.Date:switch(r.unit){case Zi.DAY:return H.DateDay;case Zi.MILLISECOND:return H.DateMillisecond}return H.Date;case H.Interval:switch(r.unit){case js.DAY_TIME:return H.IntervalDayTime;case js.YEAR_MONTH:return H.IntervalYearMonth}return H.Interval;case H.Duration:switch(r.unit){case ne.SECOND:return H.DurationSecond;case ne.MILLISECOND:return H.DurationMillisecond;case ne.MICROSECOND:return H.DurationMicrosecond;case ne.NANOSECOND:return H.DurationNanosecond}return H.Duration;case H.Map:return H.Map;case H.List:return H.List;case H.Struct:return H.Struct;case H.Union:switch(r.mode){case Zn.Dense:return H.DenseUnion;case Zn.Sparse:return H.SparseUnion}return H.Union;case H.FixedSizeBinary:return H.FixedSizeBinary;case H.FixedSizeList:return H.FixedSizeList;case H.Dictionary:return H.Dictionary}throw new Error(`Unrecognized type '${H[r.typeId]}'`)}pe.prototype.visitInt8=null;pe.prototype.visitInt16=null;pe.prototype.visitInt32=null;pe.prototype.visitInt64=null;pe.prototype.visitUint8=null;pe.prototype.visitUint16=null;pe.prototype.visitUint32=null;pe.prototype.visitUint64=null;pe.prototype.visitFloat16=null;pe.prototype.visitFloat32=null;pe.prototype.visitFloat64=null;pe.prototype.visitDateDay=null;pe.prototype.visitDateMillisecond=null;pe.prototype.visitTimestampSecond=null;pe.prototype.visitTimestampMillisecond=null;pe.prototype.visitTimestampMicrosecond=null;pe.prototype.visitTimestampNanosecond=null;pe.prototype.visitTimeSecond=null;pe.prototype.visitTimeMillisecond=null;pe.prototype.visitTimeMicrosecond=null;pe.prototype.visitTimeNanosecond=null;pe.prototype.visitDenseUnion=null;pe.prototype.visitSparseUnion=null;pe.prototype.visitIntervalDayTime=null;pe.prototype.visitIntervalYearMonth=null;pe.prototype.visitDuration=null;pe.prototype.visitDurationSecond=null;pe.prototype.visitDurationMillisecond=null;pe.prototype.visitDurationMicrosecond=null;pe.prototype.visitDurationNanosecond=null;const $T=new Float64Array(1),uo=new Uint32Array($T.buffer);function tg(r){const t=(r&31744)>>10,e=(r&1023)/1024,n=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return n*(e?Number.NaN:1/0);case 0:return n*(e?6103515625e-14*e:0)}return n*Math.pow(2,t-15)*(1+e)}function GT(r){if(r!==r)return 32256;$T[0]=r;const t=(uo[1]&2147483648)>>16&65535;let e=uo[1]&2146435072,n=0;return e>=1089470464?uo[0]>0?e=31744:(e=(e&2080374784)>>16,n=(uo[1]&1048575)>>10):e<=1056964608?(n=1048576+(uo[1]&1048575),n=1048576+(n<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,n=(uo[1]&1048575)+512>>10),t|e|n&65535}const Yk=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:GT,uint16ToFloat64:tg},Symbol.toStringTag,{value:"Module"}));class Xt extends pe{}function Kt(r){return(t,e,n)=>{if(t.setValid(e,n!=null))return r(t,e,n)}}const qk=(r,t,e)=>{r[t]=Math.floor(e/864e5)},WT=(r,t,e,n)=>{if(e+1{const i=r+e;n?t[i>>3]|=1<>3]&=~(1<{r[t]=e},eg=({values:r},t,e)=>{r[t]=e},HT=({values:r},t,e)=>{r[t]=GT(e)},Zk=(r,t,e)=>{switch(r.type.precision){case jr.HALF:return HT(r,t,e);case jr.SINGLE:case jr.DOUBLE:return eg(r,t,e)}},XT=({values:r},t,e)=>{qk(r,t,e.valueOf())},YT=({values:r},t,e)=>{r[t]=BigInt(e)},Kk=({stride:r,values:t},e,n)=>{t.set(n.subarray(0,r),r*e)},qT=({values:r,valueOffsets:t},e,n)=>WT(r,t,e,n),QT=({values:r,valueOffsets:t},e,n)=>WT(r,t,e,pT(n)),Jk=(r,t,e)=>{r.type.unit===Zi.DAY?XT(r,t,e):YT(r,t,e)},ZT=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},KT=({values:r},t,e)=>{r[t]=BigInt(e)},JT=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},tI=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},tU=(r,t,e)=>{switch(r.type.unit){case ne.SECOND:return ZT(r,t,e);case ne.MILLISECOND:return KT(r,t,e);case ne.MICROSECOND:return JT(r,t,e);case ne.NANOSECOND:return tI(r,t,e)}},eI=({values:r},t,e)=>{r[t]=e},rI=({values:r},t,e)=>{r[t]=e},nI=({values:r},t,e)=>{r[t]=e},iI=({values:r},t,e)=>{r[t]=e},eU=(r,t,e)=>{switch(r.type.unit){case ne.SECOND:return eI(r,t,e);case ne.MILLISECOND:return rI(r,t,e);case ne.MICROSECOND:return nI(r,t,e);case ne.NANOSECOND:return iI(r,t,e)}},rU=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},nU=(r,t,e)=>{const n=r.children[0],i=r.valueOffsets,s=Kn.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=i[t],l=i[t+1];a{const n=r.children[0],{valueOffsets:i}=r,s=Kn.getVisitFn(n);let{[t]:o,[t+1]:a}=i;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(n,o,u),++o>=a)break},sU=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),oU=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),aU=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),lU=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),uU=(r,t,e)=>{const n=r.type.children.map(s=>Kn.getVisitFn(s.type)),i=e instanceof Map?aU(t,e):e instanceof lr?oU(t,e):Array.isArray(e)?sU(t,e):lU(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},cU=(r,t,e)=>{r.type.mode===Zn.Dense?sI(r,t,e):oI(r,t,e)},sI=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];Kn.visit(i,r.valueOffsets[t],e)},oI=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];Kn.visit(i,t,e)},hU=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},dU=(r,t,e)=>{r.type.unit===js.DAY_TIME?aI(r,t,e):lI(r,t,e)},aI=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},lI=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},uI=({values:r},t,e)=>{r[t]=e},cI=({values:r},t,e)=>{r[t]=e},hI=({values:r},t,e)=>{r[t]=e},dI=({values:r},t,e)=>{r[t]=e},fU=(r,t,e)=>{switch(r.type.unit){case ne.SECOND:return uI(r,t,e);case ne.MILLISECOND:return cI(r,t,e);case ne.MICROSECOND:return hI(r,t,e);case ne.NANOSECOND:return dI(r,t,e)}},pU=(r,t,e)=>{const{stride:n}=r,i=r.children[0],s=Kn.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=t*n;++o`${Ko(t)}: ${Ko(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new mU(this[vn],this[jo])}}class mU{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[vn].type.children.some(n=>n.name===e)}getOwnPropertyDescriptor(t,e){if(t[vn].type.children.some(n=>n.name===e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[vn].type.children.findIndex(i=>i.name===e);if(n!==-1){const i=pn.visit(t[vn].children[n],t[jo]);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[vn].type.children.findIndex(s=>s.name===e);return i!==-1?(Kn.visit(t[vn].children[i],t[jo],n),Reflect.set(t,e,n)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,n):!1}}const yU=new gU;class Ut extends pe{}function Yt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const vU=(r,t)=>864e5*r[t],_U=(r,t)=>null,fI=(r,t,e)=>{if(e+1>=t.length)return null;const n=wr(t[e]),i=wr(t[e+1]);return r.subarray(n,i)},bU=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<vU(r,t),mI=({values:r},t)=>wr(r[t]),es=({stride:r,values:t},e)=>t[r*e],xU=({stride:r,values:t},e)=>tg(t[r*e]),gI=({values:r},t)=>r[t],wU=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),yI=({values:r,valueOffsets:t},e)=>fI(r,t,e),vI=({values:r,valueOffsets:t},e)=>{const n=fI(r,t,e);return n!==null?rk(n):null},SU=({values:r},t)=>r[t],TU=({type:r,values:t},e)=>r.precision!==jr.HALF?t[e]:tg(t[e]),IU=(r,t)=>r.type.unit===Zi.DAY?pI(r,t):mI(r,t),_I=({values:r},t)=>1e3*wr(r[t]),bI=({values:r},t)=>wr(r[t]),xI=({values:r},t)=>yT(r[t],BigInt(1e3)),wI=({values:r},t)=>yT(r[t],BigInt(1e6)),MU=(r,t)=>{switch(r.type.unit){case ne.SECOND:return _I(r,t);case ne.MILLISECOND:return bI(r,t);case ne.MICROSECOND:return xI(r,t);case ne.NANOSECOND:return wI(r,t)}},SI=({values:r},t)=>r[t],TI=({values:r},t)=>r[t],II=({values:r},t)=>r[t],MI=({values:r},t)=>r[t],EU=(r,t)=>{switch(r.type.unit){case ne.SECOND:return SI(r,t);case ne.MILLISECOND:return TI(r,t);case ne.MICROSECOND:return II(r,t);case ne.NANOSECOND:return MI(r,t)}},AU=({values:r,stride:t},e)=>ih.decimal(r.subarray(t*e,t*(e+1))),CU=(r,t)=>{const{valueOffsets:e,stride:n,children:i}=r,{[t*n]:s,[t*n+1]:o}=e,l=i[0].slice(s,o-s);return new lr([l])},OU=(r,t)=>{const{valueOffsets:e,children:n}=r,{[t]:i,[t+1]:s}=e,o=n[0];return new ng(o.slice(i,s-i))},PU=(r,t)=>new rg(r,t),RU=(r,t)=>r.type.mode===Zn.Dense?EI(r,t):AI(r,t),EI=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return pn.visit(n,r.valueOffsets[t])},AI=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return pn.visit(n,t)},FU=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},LU=(r,t)=>r.type.unit===js.DAY_TIME?CI(r,t):OI(r,t),CI=({values:r},t)=>r.subarray(2*t,2*(t+1)),OI=({values:r},t)=>{const e=r[t],n=new Int32Array(2);return n[0]=Math.trunc(e/12),n[1]=Math.trunc(e%12),n},PI=({values:r},t)=>r[t],RI=({values:r},t)=>r[t],FI=({values:r},t)=>r[t],LI=({values:r},t)=>r[t],DU=(r,t)=>{switch(r.type.unit){case ne.SECOND:return PI(r,t);case ne.MILLISECOND:return RI(r,t);case ne.MICROSECOND:return FI(r,t);case ne.NANOSECOND:return LI(r,t)}},NU=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new lr([s])};Ut.prototype.visitNull=Yt(_U);Ut.prototype.visitBool=Yt(bU);Ut.prototype.visitInt=Yt(SU);Ut.prototype.visitInt8=Yt(es);Ut.prototype.visitInt16=Yt(es);Ut.prototype.visitInt32=Yt(es);Ut.prototype.visitInt64=Yt(gI);Ut.prototype.visitUint8=Yt(es);Ut.prototype.visitUint16=Yt(es);Ut.prototype.visitUint32=Yt(es);Ut.prototype.visitUint64=Yt(gI);Ut.prototype.visitFloat=Yt(TU);Ut.prototype.visitFloat16=Yt(xU);Ut.prototype.visitFloat32=Yt(es);Ut.prototype.visitFloat64=Yt(es);Ut.prototype.visitUtf8=Yt(vI);Ut.prototype.visitLargeUtf8=Yt(vI);Ut.prototype.visitBinary=Yt(yI);Ut.prototype.visitLargeBinary=Yt(yI);Ut.prototype.visitFixedSizeBinary=Yt(wU);Ut.prototype.visitDate=Yt(IU);Ut.prototype.visitDateDay=Yt(pI);Ut.prototype.visitDateMillisecond=Yt(mI);Ut.prototype.visitTimestamp=Yt(MU);Ut.prototype.visitTimestampSecond=Yt(_I);Ut.prototype.visitTimestampMillisecond=Yt(bI);Ut.prototype.visitTimestampMicrosecond=Yt(xI);Ut.prototype.visitTimestampNanosecond=Yt(wI);Ut.prototype.visitTime=Yt(EU);Ut.prototype.visitTimeSecond=Yt(SI);Ut.prototype.visitTimeMillisecond=Yt(TI);Ut.prototype.visitTimeMicrosecond=Yt(II);Ut.prototype.visitTimeNanosecond=Yt(MI);Ut.prototype.visitDecimal=Yt(AU);Ut.prototype.visitList=Yt(CU);Ut.prototype.visitStruct=Yt(PU);Ut.prototype.visitUnion=Yt(RU);Ut.prototype.visitDenseUnion=Yt(EI);Ut.prototype.visitSparseUnion=Yt(AI);Ut.prototype.visitDictionary=Yt(FU);Ut.prototype.visitInterval=Yt(LU);Ut.prototype.visitIntervalDayTime=Yt(CI);Ut.prototype.visitIntervalYearMonth=Yt(OI);Ut.prototype.visitDuration=Yt(DU);Ut.prototype.visitDurationSecond=Yt(PI);Ut.prototype.visitDurationMillisecond=Yt(RI);Ut.prototype.visitDurationMicrosecond=Yt(FI);Ut.prototype.visitDurationNanosecond=Yt(LI);Ut.prototype.visitFixedSizeList=Yt(NU);Ut.prototype.visitMap=Yt(OU);const pn=new Ut,Mo=Symbol.for("keys"),$o=Symbol.for("vals"),Eo=Symbol.for("kKeysAsStrings"),Lp=Symbol.for("_kKeysAsStrings");class ng{constructor(t){return this[Mo]=new lr([t.children[0]]).memoize(),this[$o]=t.children[1],new Proxy(this,new kU)}get[Eo](){return this[Lp]||(this[Lp]=Array.from(this[Mo].toArray(),String))}[Symbol.iterator](){return new BU(this[Mo],this[$o])}get size(){return this[Mo].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Mo],e=this[$o],n={};for(let i=-1,s=t.length;++i`${Ko(t)}: ${Ko(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class BU{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),pn.visit(this.vals,t)]})}}class kU{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Eo]}has(t,e){return t[Eo].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Eo].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[Eo].indexOf(e);if(n!==-1){const i=pn.visit(Reflect.get(t,$o),n);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[Eo].indexOf(e);return i!==-1?(Kn.visit(Reflect.get(t,$o),i,n),Reflect.set(t,e,n)):Reflect.has(t,e)?Reflect.set(t,e,n):!1}}Object.defineProperties(ng.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Mo]:{writable:!0,enumerable:!1,configurable:!1,value:null},[$o]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Lp]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let q0;function DI(r,t,e,n){const{length:i=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?i:e;return s<0&&(s=(s%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),n?n(r,s,o):[s,o]}const NI=(r,t)=>r<0?t+r:r,Q0=r=>r!==r;function Zs(r){if(typeof r!=="object"||r===null)return Q0(r)?Q0:e=>e===r;if(r instanceof Date){const e=r.valueOf();return n=>n instanceof Date?n.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?gT(r,e):!1:r instanceof Map?zU(r):Array.isArray(r)?UU(r):r instanceof lr?VU(r):jU(r,!0)}function UU(r){const t=[];for(let e=-1,n=r.length;++e!1;const n=[];for(let i=-1,s=e.length;++i{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return $U(r,e);case Map:return Z0(r,e,e.keys());case ng:case rg:case Object:case void 0:return Z0(r,e,t||Object.keys(e))}return e instanceof lr?GU(r,e):!1}}function $U(r,t){const e=r.length;if(t.length!==e)return!1;for(let n=-1;++n>n}function HU(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):kI(new oh(e,r,t,null,ig)).subarray(0,n)),i}return e}function kI(r){const t=[];let e=0,n=0,i=0;for(const o of r)o&&(i|=1<0)&&(t[e++]=i);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}class oh{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8===0?0:8-t%8);return Tc(r,t,i)+Tc(r,n,e)+UI(r,i>>3,n-i>>3)}function UI(r,t,e){let n=0,i=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:i+e;for(;o-i>=4;)n+=Eu(s.getUint32(i)),i+=4;for(;o-i>=2;)n+=Eu(s.getUint16(i)),i+=2;for(;o-i>=1;)n+=Eu(s.getUint8(i)),i+=1;return n}function Eu(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 XU=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:oh,getBit:BI,getBool:ig,packBools:kI,popcnt_array:UI,popcnt_bit_range:Tc,popcnt_uint32:Eu,setBool:HU,truncateBitmap:Dp},Symbol.toStringTag,{value:"Module"})),YU=-1;class ml{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 Pt.isSparseUnion(t)?this.children.some(e=>e.nullable):Pt.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this;return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Pt.isUnion(this.type))return this.children.reduce((n,i)=>n+i.nullCount,0);let t=this._nullCount,e;return t<=YU&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Tc(e,this.offset,this.offset+this.length)),t}constructor(t,e,n,i,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;s instanceof ml?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=jT(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(Pt.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===Zn.Dense?this.valueOffsets[t]:t;return i.getValid(s)}if(this.nullable&&this.nullCount>0){const n=this.offset+t;return(this.nullBitmap[n>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(Dp(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];n=(h&u)!==0,s[c]=e?h|u:h&~u}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new ml(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(this._nullCount===0)-1,a=i===16?n:1,l=this._sliceBuffers(t,e,n,i);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===H.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);i[e>>3]=(1<0&&i.set(Dp(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[pi.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s;const{buffers:o}=this;return(s=o[pi.TYPE])&&(o[pi.TYPE]=s.subarray(t,t+e)),(s=o[pi.OFFSET])&&(o[pi.OFFSET]=s.subarray(t,t+e+1))||(s=o[pi.DATA])&&(o[pi.DATA]=i===6?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map(i=>i.slice(e,n))}}ml.prototype.children=Object.freeze([]);class K0{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function QU(r){return r.reduce((t,e)=>t+e.nullCount,0)}function ZU(r){return r.reduce((t,e,n)=>(t[n+1]=t[n]+e.length,t),new Uint32Array(r.length+1))}function KU(r,t,e,n){const i=[];for(let s=-1,o=r.length;++s=n)break;if(e>=l+u)continue;if(l>=e&&l+u<=n){i.push(a);continue}const c=Math.max(0,e-l),h=Math.min(n-l,u);i.push(a.slice(c,h-c))}return i.length===0&&i.push(r[0].slice(0,0)),i}function sg(r,t,e,n){let i=0,s=0,o=t.length-1;do{if(i>=o-1)return e0?0:-1}function r4(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let n=0;for(const i of new oh(e,r.offset+(t||0),r.length,e,ig)){if(!i)return n;++n}return-1}function ee(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case H.Union:break;case H.Dictionary:break;default:return r4(r,e)}const n=pn.getVisitFn(r),i=Zs(t);for(let s=(e||0)-1,o=r.length;++s{const i=r.data[n];return i.values.subarray(0,i.length)[Symbol.iterator]()});let e=0;return new K0(r.data.length,n=>{const s=r.data[n].length,o=r.slice(e,e+s);return e+=s,new n4(o)})}class n4{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof ml)))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}=$I[o.typeId],c=s[0];this.isValid=h=>zI(c,h),this.get=h=>a(c,h),this.set=(h,f)=>l(c,h,f),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,GI[o.typeId]),this._offsets=ZU(s);break}this.data=s,this.type=o,this.stride=jT(o),this.numChildren=(i=(n=o.children)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return qU(this.data)}get nullCount(){return QU(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${H[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(NI(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return i4.visit(this)}concat(...t){return new lr(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new lr(DI(this,t,e,({data:n,_offsets:i},s,o)=>KU(n,i,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this;switch(t.typeId){case H.Int:case H.Float:case H.Decimal:case H.Time:case H.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,n*i);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Pt.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Pt.isDictionary(this.type)){const t=new Ic(this.data[0].dictionary),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new lr(e)}return new Ic(this)}unmemoize(){if(Pt.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new lr(e)}return this}}jI=Symbol.toStringTag;lr[jI]=(r=>{r.type=Pt.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const t=Object.keys(H).map(e=>H[e]).filter(e=>typeof e=="number"&&e!==H.NONE);for(const e of t){const n=pn.getVisitFnByTypeId(e),i=Kn.getVisitFnByTypeId(e),s=t_.getVisitFnByTypeId(e);$I[e]={get:n,set:i,indexOf:s},GI[e]=Object.create(r,{isValid:{value:J0(zI)},get:{value:J0(pn.getVisitFnByTypeId(e))},set:{value:JU(Kn.getVisitFnByTypeId(e))},indexOf:{value:t4(t_.getVisitFnByTypeId(e))}})}return"Vector"})(lr.prototype);class Ic extends lr{constructor(t){super(t.data);const e=this.get,n=this.set,i=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){n.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new Ic(i.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new lr(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}const s4=65536;function Po(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const ta=8,og=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class ag{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let i=e[3]*n[3];this.buffer[0]=i&65535;let s=i>>>16;return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${Po(this.buffer[3])} ${Po(this.buffer[2])} ${Po(this.buffer[1])} ${Po(this.buffer[0])}`}static multiply(t,e){return new Ln(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new Ln(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return Ln.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return Ln.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new Ln(e);for(let o=n?1:0;othis.compareFields(n,e[i]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function Tr(r,t){return t instanceof r.constructor}function Ks(r,t){return r===t||Tr(r,t)}function Mi(r,t){return r===t||Tr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function ah(r,t){return r===t||Tr(r,t)&&r.precision===t.precision}function a4(r,t){return r===t||Tr(r,t)&&r.byteWidth===t.byteWidth}function lg(r,t){return r===t||Tr(r,t)&&r.unit===t.unit}function Ol(r,t){return r===t||Tr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function Pl(r,t){return r===t||Tr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function l4(r,t){return r===t||Tr(r,t)&&r.children.length===t.children.length&&Jn.compareManyFields(r.children,t.children)}function u4(r,t){return r===t||Tr(r,t)&&r.children.length===t.children.length&&Jn.compareManyFields(r.children,t.children)}function ug(r,t){return r===t||Tr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,n)=>e===t.typeIds[n])&&Jn.compareManyFields(r.children,t.children)}function c4(r,t){return r===t||Tr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Jn.visit(r.indices,t.indices)&&Jn.visit(r.dictionary,t.dictionary)}function cg(r,t){return r===t||Tr(r,t)&&r.unit===t.unit}function Rl(r,t){return r===t||Tr(r,t)&&r.unit===t.unit}function h4(r,t){return r===t||Tr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Jn.compareManyFields(r.children,t.children)}function d4(r,t){return r===t||Tr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Jn.compareManyFields(r.children,t.children)}jt.prototype.visitNull=Ks;jt.prototype.visitBool=Ks;jt.prototype.visitInt=Mi;jt.prototype.visitInt8=Mi;jt.prototype.visitInt16=Mi;jt.prototype.visitInt32=Mi;jt.prototype.visitInt64=Mi;jt.prototype.visitUint8=Mi;jt.prototype.visitUint16=Mi;jt.prototype.visitUint32=Mi;jt.prototype.visitUint64=Mi;jt.prototype.visitFloat=ah;jt.prototype.visitFloat16=ah;jt.prototype.visitFloat32=ah;jt.prototype.visitFloat64=ah;jt.prototype.visitUtf8=Ks;jt.prototype.visitLargeUtf8=Ks;jt.prototype.visitBinary=Ks;jt.prototype.visitLargeBinary=Ks;jt.prototype.visitFixedSizeBinary=a4;jt.prototype.visitDate=lg;jt.prototype.visitDateDay=lg;jt.prototype.visitDateMillisecond=lg;jt.prototype.visitTimestamp=Ol;jt.prototype.visitTimestampSecond=Ol;jt.prototype.visitTimestampMillisecond=Ol;jt.prototype.visitTimestampMicrosecond=Ol;jt.prototype.visitTimestampNanosecond=Ol;jt.prototype.visitTime=Pl;jt.prototype.visitTimeSecond=Pl;jt.prototype.visitTimeMillisecond=Pl;jt.prototype.visitTimeMicrosecond=Pl;jt.prototype.visitTimeNanosecond=Pl;jt.prototype.visitDecimal=Ks;jt.prototype.visitList=l4;jt.prototype.visitStruct=u4;jt.prototype.visitUnion=ug;jt.prototype.visitDenseUnion=ug;jt.prototype.visitSparseUnion=ug;jt.prototype.visitDictionary=c4;jt.prototype.visitInterval=cg;jt.prototype.visitIntervalDayTime=cg;jt.prototype.visitIntervalYearMonth=cg;jt.prototype.visitDuration=Rl;jt.prototype.visitDurationSecond=Rl;jt.prototype.visitDurationMillisecond=Rl;jt.prototype.visitDurationMicrosecond=Rl;jt.prototype.visitDurationNanosecond=Rl;jt.prototype.visitFixedSizeList=h4;jt.prototype.visitMap=d4;const Jn=new jt;function f4(r,t){return Jn.compareSchemas(r,t)}function p4(r,t){return Jn.compareFields(r,t)}function m4(r,t){return Jn.visit(r,t)}const e_=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Wk),o4),XU),Yk),zk),WU),jk),{compareSchemas:f4,compareFields:p4,compareTypes:m4}),WI=6048e5,g4=864e5,r_=Symbol.for("constructDateFrom");function vi(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&r_ in r?r[r_](t):r instanceof Date?new r.constructor(t):new Date(t)}function mn(r,t){return vi(t||r,r)}let y4={};function lh(){return y4}function gl(r,t){var a,l,u,c;const e=lh(),n=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=mn(r,t==null?void 0:t.in),s=i.getDay(),o=(s=s.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function n_(r){const t=mn(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 v4(r,...t){const e=vi.bind(null,t.find(n=>typeof n=="object"));return t.map(e)}function i_(r,t){const e=mn(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function _4(r,t,e){const[n,i]=v4(e==null?void 0:e.in,r,t),s=i_(n),o=i_(i),a=+s-n_(s),l=+o-n_(o);return Math.round((a-l)/g4)}function b4(r,t){const e=HI(r,t),n=vi(r,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Mc(n)}function x4(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function w4(r){return!(!x4(r)&&typeof r!="number"||isNaN(+mn(r)))}function S4(r,t){const e=mn(r,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const T4={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"}},I4=(r,t,e)=>{let n;const i=T4[r];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+n:n+" ago":n};function ef(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const M4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},E4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},A4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},C4={date:ef({formats:M4,defaultWidth:"full"}),time:ef({formats:E4,defaultWidth:"full"}),dateTime:ef({formats:A4,defaultWidth:"full"})},O4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},P4=(r,t,e,n)=>O4[r];function Aa(r){return(t,e)=>{const n=e!=null&&e.context?String(e.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,a=e!=null&&e.width?String(e.width):o;i=r.formattingValues[a]||r.formattingValues[o]}else{const o=r.defaultWidth,a=e!=null&&e.width?String(e.width):r.defaultWidth;i=r.values[a]||r.values[o]}const s=r.argumentCallback?r.argumentCallback(t):t;return i[s]}}const R4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},F4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},L4={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"]},D4={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"]},N4={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"}},B4={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"}},k4=(r,t)=>{const e=Number(r),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},U4={ordinalNumber:k4,era:Aa({values:R4,defaultWidth:"wide"}),quarter:Aa({values:F4,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Aa({values:L4,defaultWidth:"wide"}),day:Aa({values:D4,defaultWidth:"wide"}),dayPeriod:Aa({values:N4,defaultWidth:"wide",formattingValues:B4,defaultFormattingWidth:"wide"})};function Ca(r){return(t,e={})=>{const n=e.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(a)?V4(a,h=>h.test(o)):z4(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 z4(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function V4(r,t){for(let e=0;e{const n=t.match(r.matchPattern);if(!n)return null;const i=n[0],s=t.match(r.parsePattern);if(!s)return null;let o=r.valueCallback?r.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const $4=/^(\d+)(th|st|nd|rd)?/i,G4=/\d+/i,W4={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},H4={any:[/^b/i,/^(a|c)/i]},X4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Y4={any:[/1/i,/2/i,/3/i,/4/i]},q4={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},Q4={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]},Z4={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},K4={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]},J4={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},t6={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}},e6={ordinalNumber:j4({matchPattern:$4,parsePattern:G4,valueCallback:r=>parseInt(r,10)}),era:Ca({matchPatterns:W4,defaultMatchWidth:"wide",parsePatterns:H4,defaultParseWidth:"any"}),quarter:Ca({matchPatterns:X4,defaultMatchWidth:"wide",parsePatterns:Y4,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ca({matchPatterns:q4,defaultMatchWidth:"wide",parsePatterns:Q4,defaultParseWidth:"any"}),day:Ca({matchPatterns:Z4,defaultMatchWidth:"wide",parsePatterns:K4,defaultParseWidth:"any"}),dayPeriod:Ca({matchPatterns:J4,defaultMatchWidth:"any",parsePatterns:t6,defaultParseWidth:"any"})},r6={code:"en-US",formatDistance:I4,formatLong:C4,formatRelative:P4,localize:U4,match:e6,options:{weekStartsOn:0,firstWeekContainsDate:1}};function n6(r,t){const e=mn(r,t==null?void 0:t.in);return _4(e,S4(e))+1}function i6(r,t){const e=mn(r,t==null?void 0:t.in),n=+Mc(e)-+b4(e);return Math.round(n/WI)+1}function XI(r,t){var c,h,f,d;const e=mn(r,t==null?void 0:t.in),n=e.getFullYear(),i=lh(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((d=(f=i.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,o=vi((t==null?void 0:t.in)||r,0);o.setFullYear(n+1,0,s),o.setHours(0,0,0,0);const a=gl(o,t),l=vi((t==null?void 0:t.in)||r,0);l.setFullYear(n,0,s),l.setHours(0,0,0,0);const u=gl(l,t);return+e>=+a?n+1:+e>=+u?n:n-1}function s6(r,t){var a,l,u,c;const e=lh(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=XI(r,t),s=vi((t==null?void 0:t.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),gl(s,t)}function o6(r,t){const e=mn(r,t==null?void 0:t.in),n=+gl(e,t)-+s6(e,t);return Math.round(n/WI)+1}function Ie(r,t){const e=r<0?"-":"",n=Math.abs(r).toString().padStart(t,"0");return e+n}const Ri={y(r,t){const e=r.getFullYear(),n=e>0?e:1-e;return Ie(t==="yy"?n%100:n,t.length)},M(r,t){const e=r.getMonth();return t==="M"?String(e+1):Ie(e+1,2)},d(r,t){return Ie(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 Ie(r.getHours()%12||12,t.length)},H(r,t){return Ie(r.getHours(),t.length)},m(r,t){return Ie(r.getMinutes(),t.length)},s(r,t){return Ie(r.getSeconds(),t.length)},S(r,t){const e=t.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,e-3));return Ie(i,t.length)}},co={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},s_={G:function(r,t,e){const n=r.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(n,{width:"abbreviated"});case"GGGGG":return e.era(n,{width:"narrow"});case"GGGG":default:return e.era(n,{width:"wide"})}},y:function(r,t,e){if(t==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return e.ordinalNumber(i,{unit:"year"})}return Ri.y(r,t)},Y:function(r,t,e,n){const i=XI(r,n),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Ie(o,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):Ie(s,t.length)},R:function(r,t){const e=HI(r);return Ie(e,t.length)},u:function(r,t){const e=r.getFullYear();return Ie(e,t.length)},Q:function(r,t,e){const n=Math.ceil((r.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Ie(n,2);case"Qo":return e.ordinalNumber(n,{unit:"quarter"});case"QQQ":return e.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,t,e){const n=Math.ceil((r.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Ie(n,2);case"qo":return e.ordinalNumber(n,{unit:"quarter"});case"qqq":return e.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,t,e){const n=r.getMonth();switch(t){case"M":case"MM":return Ri.M(r,t);case"Mo":return e.ordinalNumber(n+1,{unit:"month"});case"MMM":return e.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(n,{width:"wide",context:"formatting"})}},L:function(r,t,e){const n=r.getMonth();switch(t){case"L":return String(n+1);case"LL":return Ie(n+1,2);case"Lo":return e.ordinalNumber(n+1,{unit:"month"});case"LLL":return e.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(n,{width:"wide",context:"standalone"})}},w:function(r,t,e,n){const i=o6(r,n);return t==="wo"?e.ordinalNumber(i,{unit:"week"}):Ie(i,t.length)},I:function(r,t,e){const n=i6(r);return t==="Io"?e.ordinalNumber(n,{unit:"week"}):Ie(n,t.length)},d:function(r,t,e){return t==="do"?e.ordinalNumber(r.getDate(),{unit:"date"}):Ri.d(r,t)},D:function(r,t,e){const n=n6(r);return t==="Do"?e.ordinalNumber(n,{unit:"dayOfYear"}):Ie(n,t.length)},E:function(r,t,e){const n=r.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(n,{width:"short",context:"formatting"});case"EEEE":default:return e.day(n,{width:"wide",context:"formatting"})}},e:function(r,t,e,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ie(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(i,{width:"short",context:"formatting"});case"eeee":default:return e.day(i,{width:"wide",context:"formatting"})}},c:function(r,t,e,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ie(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(i,{width:"narrow",context:"standalone"});case"cccccc":return e.day(i,{width:"short",context:"standalone"});case"cccc":default:return e.day(i,{width:"wide",context:"standalone"})}},i:function(r,t,e){const n=r.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return Ie(i,t.length);case"io":return e.ordinalNumber(i,{unit:"day"});case"iii":return e.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(n,{width:"short",context:"formatting"});case"iiii":default:return e.day(n,{width:"wide",context:"formatting"})}},a:function(r,t,e){const i=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,t,e){const n=r.getHours();let i;switch(n===12?i=co.noon:n===0?i=co.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,t,e){const n=r.getHours();let i;switch(n>=17?i=co.evening:n>=12?i=co.afternoon:n>=4?i=co.morning:i=co.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,t,e){if(t==="ho"){let n=r.getHours()%12;return n===0&&(n=12),e.ordinalNumber(n,{unit:"hour"})}return Ri.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):Ri.H(r,t)},K:function(r,t,e){const n=r.getHours()%12;return t==="Ko"?e.ordinalNumber(n,{unit:"hour"}):Ie(n,t.length)},k:function(r,t,e){let n=r.getHours();return n===0&&(n=24),t==="ko"?e.ordinalNumber(n,{unit:"hour"}):Ie(n,t.length)},m:function(r,t,e){return t==="mo"?e.ordinalNumber(r.getMinutes(),{unit:"minute"}):Ri.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):Ri.s(r,t)},S:function(r,t){return Ri.S(r,t)},X:function(r,t,e){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return a_(n);case"XXXX":case"XX":return Is(n);case"XXXXX":case"XXX":default:return Is(n,":")}},x:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"x":return a_(n);case"xxxx":case"xx":return Is(n);case"xxxxx":case"xxx":default:return Is(n,":")}},O:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+o_(n,":");case"OOOO":default:return"GMT"+Is(n,":")}},z:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+o_(n,":");case"zzzz":default:return"GMT"+Is(n,":")}},t:function(r,t,e){const n=Math.trunc(+r/1e3);return Ie(n,t.length)},T:function(r,t,e){return Ie(+r,t.length)}};function o_(r,t=""){const e=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?e+String(i):e+String(i)+t+Ie(s,2)}function a_(r,t){return r%60===0?(r>0?"-":"+")+Ie(Math.abs(r)/60,2):Is(r,t)}function Is(r,t=""){const e=r>0?"-":"+",n=Math.abs(r),i=Ie(Math.trunc(n/60),2),s=Ie(n%60,2);return e+i+t+s}const l_=(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"})}},YI=(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"})}},a6=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],n=e[1],i=e[2];if(!i)return l_(r,t);let s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",l_(n,t)).replace("{{time}}",YI(i,t))},l6={p:YI,P:a6},u6=/^D+$/,c6=/^Y+$/,h6=["D","DD","YY","YYYY"];function d6(r){return u6.test(r)}function f6(r){return c6.test(r)}function p6(r,t,e){const n=m6(r,t,e);if(console.warn(n),h6.includes(r))throw new RangeError(n)}function m6(r,t,e){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${t}\`) for formatting ${n} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const g6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,y6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,v6=/^'([^]*?)'?$/,_6=/''/g,b6=/[a-zA-Z]/;function qI(r,t,e){var c,h,f,d;const n=lh(),i=n.locale??r6,s=n.firstWeekContainsDate??((h=(c=n.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,o=n.weekStartsOn??((d=(f=n.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??0,a=mn(r,e==null?void 0:e.in);if(!w4(a))throw new RangeError("Invalid time value");let l=t.match(y6).map(m=>{const g=m[0];if(g==="p"||g==="P"){const p=l6[g];return p(m,i.formatLong)}return m}).join("").match(g6).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:x6(m)};if(s_[g])return{isToken:!0,value:m};if(g.match(b6))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(f6(g)||d6(g))&&p6(g,t,String(r));const p=s_[g[0]];return p(a,g,i.localize,u)}).join("")}function x6(r){const t=r.match(v6);return t?t[1].replace(_6,"'"):r}function w6(r,t){return mn(r*1e3,t==null?void 0:t.in)}function S6(r,t){const e=T6(t)?new t(0):vi(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function T6(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function I6(r,t){let e=r.length;switch("string"){case"string":{for(;e>0&&r[e-1]===t;)e--;break}}return r.substring(0,e)}function Rr(r){return r==null}function M6(r){return r!=null}async function QI(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await Bi(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function E6(r){return Rr(r)?!1:Pt.isInt(r.type)&&!ZI(r)||A6(r)}function A6(r){return Rr(r)?!1:Pt.isInt(r.type)&&r.type.isSigned===!1}function C6(r){return Rr(r)?!1:Pt.isFloat(r.type)??!1}function O6(r){return Rr(r)?!1:Pt.isDecimal(r.type)}function P6(r){return Rr(r)?!1:Pt.isBool(r.type)}function R6(r){return Rr(r)?!1:Pt.isDuration(r.type)}function ZI(r){return Rr(r)?!1:Pt.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function F6(r){return Rr(r)?!1:Pt.isTimestamp(r.type)}function L6(r){return Rr(r)?!1:Pt.isDate(r.type)}function D6(r){return Rr(r)?!1:Pt.isTime(r.type)}function N6(r){return Rr(r)?!1:Pt.isList(r.type)||Pt.isFixedSizeList(r.type)}function B6(r){return Rr(r)?!1:Pt.isStruct(r.type)||Pt.isMap(r.type)}function k6(r){return Rr(r)?!1:Pt.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Pt.isInterval(r.type)}function U6(r,t){let e;if(t===ne.MILLISECOND)e=1e3;else if(t===ne.MICROSECOND)e=1e3*1e3;else if(t===ne.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 z6(r,t){var n;const e=U6(r,((n=t==null?void 0:t.type)==null?void 0:n.unit)??ne.SECOND);return w6(e)}function V6(r,t){const e=z6(r,t);return qI(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function j6(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?qI(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function $6(r,t){var i;if(!(r instanceof Date||typeof r=="number"&&Number.isFinite(r)))return console.warn(`Unsupported datetime value: ${r}`),null;let e;const n=(i=t==null?void 0:t.type)==null?void 0:i.timezone;return typeof r=="number"?n?e=new Vr(r,n):e=new Vr(r):n?e=new Vr(r,n):e=new Vr(r),S6(e,Date)}function G6(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let n=e_.bigNumToString(new e_.BN(r)).padStart(e,"0");if(e===0)return n;let i="";n.startsWith("-")&&(i="-",n=n.slice(1));const s=n.slice(0,-e)||"0",o=I6(n.slice(-e),"0")||"";return`${i}${s}${o?`.${o}`:""}`}function W6(r){const t=r[0],e=r[1],n=[];return t!==0&&n.push(`${t} year${t>1?"s":""}`),e!==0&&n.push(`${e} month${e>1?"s":""}`),n.length?n.join(" "):"0 months"}function H6(r,t){var n,i,s,o;if(Pt.isInterval(t==null?void 0:t.type))return W6(r);const e=t&&t.metadata.get("ARROW:extension:name");if(e&&e==="pandas.interval"){const a=JSON.parse(t.metadata.get("ARROW:extension:metadata")),{closed:l}=a,u=r.toJSON(),c=l==="both"||l==="left"?"[":"(",h=l==="both"||l==="right"?"]":")",f=Np(u.left,(i=(n=t.type)==null?void 0:n.children)==null?void 0:i[0]),d=Np(u.right,(o=(s=t.type)==null?void 0:s.children)==null?void 0:o[1]);return`${c+f}, ${d+h}`}return String(r)}function X6(r,t){return(t==null?void 0:t.type)instanceof Fp?JSON.parse(JSON.stringify(r,(e,n)=>{if(M6(n))return typeof n=="bigint"?Number(n):n})):JSON.parse(JSON.stringify(r,(e,n)=>typeof n=="bigint"?Number(n):n))}function Np(r,t){if(Rr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&L6(t))return j6(r);if(typeof r=="bigint"&&D6(t))return V6(Number(r),t);if(e&&F6(t))return $6(r,t);if(ZI(t))throw new Error("Period type is not supported yet");if(k6(t))return H6(r,t);if(R6(t))throw new Error("Duration type is not supported yet");return O6(t)?G6(r,t):C6(t)&&Number.isFinite(r)||E6(t)?r:B6(t)||N6(t)?X6(r,t):P6(t)?!!r:String(r)}function u_(r){return((r.toArray()||[]).map(n=>n.toJSON())||[]).map(n=>(r.schema.fields.forEach(i=>n[i.name]=Np(n[i.name],i)),n))}var yl=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(yl||{});async function KI(r){const t=rE(r,{logger:!1});let e,n;const i=await QI();if(i==="browser"){if(typeof t.bundles>"u"){const{getBundles:l}=await Bi(async()=>{const{getBundles:u}=await import("./default-browser-BrgSDbLD.js");return{getBundles:u}},[]);t.bundles=await l()}n=await I0(await t.bundles),e=new Worker(n.mainWorker)}else if(i==="node"){if(typeof t.bundles>"u"){const{getBundles:c}=await Bi(async()=>{const{getBundles:h}=await import("./default-node-DJABTJPz.js");return{getBundles:h}},__vite__mapDeps([0,1,2]));t.bundles=await c()}n=await I0(await t.bundles);let l=n.mainWorker;l.startsWith("/@fs/")&&(l=l.replace("/@fs/","file://"));const u=await Bi(()=>import("./index-Cp8iQ_hy.js"),[]);e=new u.default(l,{type:"module"})}else throw new Error(`Unsupported environment: ${i}`);let s;t.logger===!0?s=new hT:t.logger===!1?s=new NB:s=t.logger;const o=new $B(s,e);if(await o.instantiate(n.mainModule,n.pthreadWorker),t.storage)switch(t.storage.type){case yl.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 yl.NODE_FS:{try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(l){throw await o.terminate(),await e.terminate(),l}break}}const a=await o.connect();return{worker:e,db:o,conn:a,query:async(l,u=[])=>{if(!u||u.length===0){const d=await a.query(l);return u_(d)}const c=await a.prepare(l),h=await c.query(...u),f=u_(h);return c.close(),f},close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function Y6(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 q6(r,t,e){await(await r).conn.send(`SAVEPOINT ${t}`);try{const n=await e(r);return await(await r).conn.send(`RELEASE SAVEPOINT ${t}`),n}catch(n){throw await(await r).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),n}}const It=Symbol.for("drizzle:entityKind");function lt(r,t){if(!r||typeof r!="object")return!1;if(r instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,It))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(It in e&&e[It]===t[It])return!0;e=Object.getPrototypeOf(e)}return!1}var b_;b_=It;class ur{constructor(t,e){W(this,"name");W(this,"keyAsName");W(this,"primary");W(this,"notNull");W(this,"default");W(this,"defaultFn");W(this,"onUpdateFn");W(this,"hasDefault");W(this,"isUnique");W(this,"uniqueName");W(this,"uniqueType");W(this,"dataType");W(this,"columnType");W(this,"enumValues");W(this,"generated");W(this,"generatedIdentity");W(this,"config");this.table=t,this.config=e,this.name=e.name,this.keyAsName=e.keyAsName,this.notNull=e.notNull,this.default=e.default,this.defaultFn=e.defaultFn,this.onUpdateFn=e.onUpdateFn,this.hasDefault=e.hasDefault,this.primary=e.primaryKey,this.isUnique=e.isUnique,this.uniqueName=e.uniqueName,this.uniqueType=e.uniqueType,this.dataType=e.dataType,this.columnType=e.columnType,this.generated=e.generated,this.generatedIdentity=e.generatedIdentity}mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}W(ur,b_,"Column");const Go=Symbol.for("drizzle:Name");function Q6(r,t){return`${r[Go]}_${t.join("_")}_unique`}var x_,w_;class $r extends(w_=ur,x_=It,w_){constructor(t,e){e.uniqueName||(e.uniqueName=Q6(t,[e.name])),super(t,e),this.table=t}}W($r,x_,"PgColumn");const c_=Symbol.for("drizzle:isPgEnum");function Z6(r){return!!r&&typeof r=="function"&&c_ in r&&r[c_]===!0}var S_;S_=It;class Gr{constructor(t,e,n,i=!1){this._={brand:"Subquery",sql:t,selectedFields:e,alias:n,isWith:i}}}W(Gr,S_,"Subquery");var T_,I_;class hg extends(I_=Gr,T_=It,I_){}W(hg,T_,"WithSubquery");const Hr={startActiveSpan(r,t){return t()}},er=Symbol.for("drizzle:ViewBaseConfig"),Au=Symbol.for("drizzle:Schema"),Bp=Symbol.for("drizzle:Columns"),h_=Symbol.for("drizzle:ExtraConfigColumns"),rf=Symbol.for("drizzle:OriginalName"),nf=Symbol.for("drizzle:BaseName"),Ec=Symbol.for("drizzle:IsAlias"),d_=Symbol.for("drizzle:ExtraConfigBuilder"),K6=Symbol.for("drizzle:IsDrizzleTable");var M_,E_,A_,C_,O_,P_,R_,F_,L_,D_;D_=It,L_=Go,F_=rf,R_=Au,P_=Bp,O_=h_,C_=nf,A_=Ec,E_=K6,M_=d_;class Mt{constructor(t,e,n){W(this,L_);W(this,F_);W(this,R_);W(this,P_);W(this,O_);W(this,C_);W(this,A_,!1);W(this,E_,!0);W(this,M_);this[Go]=this[rf]=t,this[Au]=e,this[nf]=n}}W(Mt,D_,"Table"),W(Mt,"Symbol",{Name:Go,Schema:Au,OriginalName:rf,Columns:Bp,ExtraConfigColumns:h_,BaseName:nf,IsAlias:Ec,ExtraConfigBuilder:d_});function Rs(r){return r[Go]}function vl(r){return`${r[Au]??"public"}.${r[Go]}`}function JI(r){return r!=null&&typeof r.getSQL=="function"}function J6(r){var e;const t={sql:"",params:[]};for(const n of r)t.sql+=n.sql,t.params.push(...n.params),(e=n.typings)!=null&&e.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var N_;N_=It;class nr{constructor(t){W(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Ft([this])}}W(nr,N_,"StringChunk");var B_;B_=It;const As=class As{constructor(t){W(this,"decoder",tM);W(this,"shouldInlineParams",!1);this.queryChunks=t}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Hr.startActiveSpan("drizzle.buildSQL",e=>{const n=this.buildQueryFromSourceParams(this.queryChunks,t);return e==null||e.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(t,e){const n=Object.assign({},e,{inlineParams:e.inlineParams||this.shouldInlineParams,paramStartIndex:e.paramStartIndex||{value:0}}),{casing:i,escapeName:s,escapeParam:o,prepareTyping:a,inlineParams:l,paramStartIndex:u}=n;return J6(t.map(c=>{var h;if(lt(c,nr))return{sql:c.value.join(""),params:[]};if(lt(c,Ac))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const f=[new nr("(")];for(const[d,m]of c.entries())f.push(m),dr},eM={mapToDriverValue:r=>r};({...tM,...eM});var U_;U_=It;class _i{constructor(t,e=eM){W(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Ft([this])}}W(_i,U_,"Param");function Y(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new nr(r[0]));for(const[n,i]of t.entries())e.push(i,new nr(r[n+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 n(l){return new Ft([new nr(l)])}r.raw=n;function i(l,u){const c=[];for(const[h,f]of l.entries())h>0&&u!==void 0&&c.push(u),c.push(f);return new Ft(c)}r.join=i;function s(l){return new Ac(l)}r.identifier=s;function o(l){return new $s(l)}r.placeholder=o;function a(l,u){return new _i(l,u)}r.param=a})(Y||(Y={}));(r=>{var e;e=It;const n=class n{constructor(s,o){W(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new n(this.sql,this.fieldAlias)}};W(n,e,"SQL.Aliased");let t=n;r.Aliased=t})(Ft||(Ft={}));var z_;z_=It;class $s{constructor(t){this.name=t}getSQL(){return new Ft([this])}}W($s,z_,"Placeholder");function f_(r,t){return r.map(e=>{if(lt(e,$s)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(lt(e,_i)&<(e.value,$s)){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 e5=Symbol.for("drizzle:IsDrizzleView");var V_,j_,$_;$_=It,j_=er,V_=e5;class rs{constructor({name:t,schema:e,selectedFields:n,query:i}){W(this,j_);W(this,V_,!0);this[er]={name:t,originalName:t,schema:e,selectedFields:n,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new Ft([this])}}W(rs,$_,"View");ur.prototype.getSQL=function(){return new Ft([this])};Mt.prototype.getSQL=function(){return new Ft([this])};Gr.prototype.getSQL=function(){return new Ft([this])};var G_;G_=It;class _l{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}W(_l,G_,"ColumnAliasProxyHandler");var W_;W_=It;class uh{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===Mt.Symbol.IsAlias)return!0;if(e===Mt.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===Mt.Symbol.OriginalName)return this.alias;if(e===er)return{...t[er],name:this.alias,isAlias:!0};if(e===Mt.Symbol.Columns){const i=t[Mt.Symbol.Columns];if(!i)return i;const s={};return Object.keys(i).map(o=>{s[o]=new Proxy(i[o],new _l(new Proxy(t,this)))}),s}const n=t[e];return lt(n,ur)?new Proxy(n,new _l(new Proxy(t,this))):n}}W(uh,W_,"TableAliasProxyHandler");function sf(r,t){return new Proxy(r,new uh(t,!1))}function ci(r,t){return new Proxy(r,new _l(new Proxy(r.table,new uh(t,!1))))}function rM(r,t){return new Ft.Aliased(Cc(r.sql,t),r.fieldAlias)}function Cc(r,t){return Y.join(r.queryChunks.map(e=>lt(e,ur)?ci(e,t):lt(e,Ft)?Cc(e,t):lt(e,Ft.Aliased)?rM(e,t):e))}var H_,X_;class dg extends(X_=Error,H_=It,X_){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}W(dg,H_,"DrizzleError");var Y_,q_;class nM extends(q_=dg,Y_=It,q_){constructor(){super({message:"Rollback"})}}W(nM,Y_,"TransactionRollbackError");function Pr(r,t){return t5(t)&&!JI(r)&&!lt(r,_i)&&!lt(r,$s)&&!lt(r,ur)&&!lt(r,Mt)&&!lt(r,rs)?new _i(r,t):r}const iM=(r,t)=>Y`${r} = ${Pr(t,r)}`,r5=(r,t)=>Y`${r} <> ${Pr(t,r)}`;function kp(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new nr("("),Y.join(t,new nr(" and ")),new nr(")")])}function n5(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new nr("("),Y.join(t,new nr(" or ")),new nr(")")])}function i5(r){return Y`not ${r}`}const s5=(r,t)=>Y`${r} > ${Pr(t,r)}`,o5=(r,t)=>Y`${r} >= ${Pr(t,r)}`,a5=(r,t)=>Y`${r} < ${Pr(t,r)}`,l5=(r,t)=>Y`${r} <= ${Pr(t,r)}`;function u5(r,t){return Array.isArray(t)?t.length===0?Y`false`:Y`${r} in ${t.map(e=>Pr(e,r))}`:Y`${r} in ${Pr(t,r)}`}function c5(r,t){return Array.isArray(t)?t.length===0?Y`true`:Y`${r} not in ${t.map(e=>Pr(e,r))}`:Y`${r} not in ${Pr(t,r)}`}function h5(r){return Y`${r} is null`}function d5(r){return Y`${r} is not null`}function f5(r){return Y`exists ${r}`}function p5(r){return Y`not exists ${r}`}function m5(r,t,e){return Y`${r} between ${Pr(t,r)} and ${Pr(e,r)}`}function g5(r,t,e){return Y`${r} not between ${Pr(t,r)} and ${Pr(e,r)}`}function y5(r,t){return Y`${r} like ${t}`}function v5(r,t){return Y`${r} not like ${t}`}function _5(r,t){return Y`${r} ilike ${t}`}function b5(r,t){return Y`${r} not ilike ${t}`}function x5(r){return Y`${r} asc`}function w5(r){return Y`${r} desc`}var Q_;Q_=It;class sM{write(t){console.log(t)}}W(sM,Q_,"ConsoleLogWriter");var Z_;Z_=It;class oM{constructor(t){W(this,"writer");this.writer=(t==null?void 0:t.writer)??new sM}logQuery(t,e){const n=e.map(s=>{try{return JSON.stringify(s)}catch{return String(s)}}),i=n.length?` -- params: [${n.join(", ")}]`:"";this.writer.write(`Query: ${t}${i}`)}}W(oM,Z_,"DefaultLogger");var K_;K_=It;class aM{logQuery(){}}W(aM,K_,"NoopLogger");var J_,tb;tb=It,J_=Symbol.toStringTag;class ns{constructor(){W(this,J_,"QueryPromise")}catch(t){return this.then(void 0,t)}finally(t){return this.then(e=>(t==null||t(),e),e=>{throw t==null||t(),e})}then(t,e){return this.execute().then(t,e)}}W(ns,tb,"QueryPromise");function Gs(r,t){return Object.entries(r).reduce((e,[n,i])=>{if(typeof n!="string")return e;const s=t?[...t,n]:[n];return lt(i,ur)||lt(i,Ft)||lt(i,Ft.Aliased)?e.push({path:s,field:i}):lt(i,Mt)?e.push(...Gs(i[Mt.Symbol.Columns],s)):e.push(...Gs(i,s)),e},[])}function fg(r,t){const e=Object.keys(r),n=Object.keys(t);if(e.length!==n.length)return!1;for(const[i,s]of e.entries())if(s!==n[i])return!1;return!0}function lM(r,t){const e=Object.entries(t).filter(([,n])=>n!==void 0).map(([n,i])=>lt(i,Ft)||lt(i,ur)?[n,i]:[n,new _i(i,r[Mt.Symbol.Columns][n])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function S5(r,t){for(const e of t)for(const n of Object.getOwnPropertyNames(e.prototype))n!=="constructor"&&Object.defineProperty(r.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n)||Object.create(null))}function T5(r){return r[Mt.Symbol.Columns]}function Es(r){return lt(r,Gr)?r._.alias:lt(r,rs)?r[er].name:lt(r,Ft)?void 0:r[Mt.Symbol.IsAlias]?r[Mt.Symbol.Name]:r[Mt.Symbol.BaseName]}function I5(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.logger;return!(t!=="object"&&t!=="undefined")}if("casing"in r){const t=typeof r.logger;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 eb,rb;class uM extends(rb=$r,eb=It,rb){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}W(uM,eb,"PgDate");var nb,ib;class cM extends(ib=$r,nb=It,ib){getSQLType(){return"date"}}W(cM,nb,"PgDateString");var sb,ob;class hM extends(ob=$r,sb=It,ob){constructor(t,e){super(t,e)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}W(hM,sb,"PgJson");var ab,lb;class dM extends(lb=$r,ab=It,lb){constructor(t,e){super(t,e)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}W(dM,ab,"PgJsonb");var ub,cb;class fM extends(cb=$r,ub=It,cb){constructor(e,n){super(e,n);W(this,"precision");W(this,"scale");this.precision=n.precision,this.scale=n.scale}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}W(fM,ub,"PgNumeric");var hb,db;class pM extends(db=$r,hb=It,db){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(pM,hb,"PgTime");var fb,pb;class mM extends(pb=$r,fb=It,pb){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");W(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));W(this,"mapToDriverValue",e=>e.toISOString());this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(mM,fb,"PgTimestamp");var mb,gb;class gM extends(gb=$r,mb=It,gb){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(gM,mb,"PgTimestampString");var yb,vb;class yM extends(vb=$r,yb=It,vb){getSQLType(){return"uuid"}}W(yM,yb,"PgUUID");const p_=Symbol.for("drizzle:PgInlineForeignKeys"),m_=Symbol.for("drizzle:EnableRLS");var _b,bb,xb,wb,Sb,Tb;class en extends(Tb=Mt,Sb=It,wb=p_,xb=m_,bb=Mt.Symbol.ExtraConfigBuilder,_b=Mt.Symbol.ExtraConfigColumns,Tb){constructor(){super(...arguments);W(this,wb,[]);W(this,xb,!1);W(this,bb);W(this,_b,{})}}W(en,Sb,"PgTable"),W(en,"Symbol",Object.assign({},Mt.Symbol,{InlineForeignKeys:p_,EnableRLS:m_}));var Ib;Ib=It;class vM{constructor(t,e){W(this,"columns");W(this,"name");this.columns=t,this.name=e}build(t){return new _M(t,this.columns,this.name)}}W(vM,Ib,"PgPrimaryKeyBuilder");var Mb;Mb=It;class _M{constructor(t,e,n){W(this,"columns");W(this,"name");this.table=t,this.columns=e,this.name=n}getName(){return this.name??`${this.table[en.Symbol.Name]}_${this.columns.map(t=>t.name).join("_")}_pk`}}W(_M,Mb,"PgPrimaryKey");var Eb;Eb=It;class pg{constructor(t,e,n){W(this,"referencedTableName");W(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=n,this.referencedTableName=e[Mt.Symbol.Name]}}W(pg,Eb,"Relation");var Ab;Ab=It;class bM{constructor(t,e){this.table=t,this.config=e}}W(bM,Ab,"Relations");var Cb,Ob;const Rc=class Rc extends(Ob=pg,Cb=It,Ob){constructor(t,e,n,i){super(t,e,n==null?void 0:n.relationName),this.config=n,this.isNullable=i}withFieldName(t){const e=new Rc(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};W(Rc,Cb,"One");let Ws=Rc;var Pb,Rb;const Fc=class Fc extends(Rb=pg,Pb=It,Rb){constructor(t,e,n){super(t,e,n==null?void 0:n.relationName),this.config=n}withFieldName(t){const e=new Fc(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};W(Fc,Pb,"Many");let Oc=Fc;function M5(){return{and:kp,between:m5,eq:iM,exists:f5,gt:s5,gte:o5,ilike:_5,inArray:u5,isNull:h5,isNotNull:d5,like:y5,lt:a5,lte:l5,ne:r5,not:i5,notBetween:g5,notExists:p5,notLike:v5,notIlike:b5,notInArray:c5,or:n5,sql:Y}}function E5(){return{sql:Y,asc:x5,desc:w5}}function A5(r,t){var s;Object.keys(r).length===1&&"default"in r&&!lt(r.default,Mt)&&(r=r.default);const e={},n={},i={};for(const[o,a]of Object.entries(r))if(lt(a,Mt)){const l=vl(a),u=n[l];e[l]=o,i[o]={tsName:o,dbName:a[Mt.Symbol.Name],schema:a[Mt.Symbol.Schema],columns:a[Mt.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[Mt.Symbol.Columns]))h.primary&&i[o].primaryKey.push(h);const c=(s=a[Mt.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[Mt.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))lt(h,vM)&&i[o].primaryKey.push(...h.columns)}else if(lt(a,bM)){const l=vl(a.table),u=e[l],c=a.config(t(a.table));let h;for(const[f,d]of Object.entries(c))if(u){const m=i[u];m.relations[f]=d}else l in n||(n[l]={relations:{},primaryKey:h}),n[l].relations[f]=d}return{tables:i,tableNamesMap:e}}function C5(r){return function(e,n){return new Ws(r,e,n,(n==null?void 0:n.fields.reduce((i,s)=>i&&s.notNull,!0))??!1)}}function O5(r){return function(e,n){return new Oc(r,e,n)}}function P5(r,t,e){if(lt(e,Ws)&&e.config)return{fields:e.config.fields,references:e.config.references};const n=t[vl(e.referencedTable)];if(!n)throw new Error(`Table "${e.referencedTable[Mt.Symbol.Name]}" not found in schema`);const i=r[n];if(!i)throw new Error(`Table "${n}" not found in schema`);const s=e.sourceTable,o=t[vl(s)];if(!o)throw new Error(`Table "${s[Mt.Symbol.Name]}" not found in schema`);const a=[];for(const l of Object.values(i.relations))(e.relationName&&e!==l&&l.relationName===e.relationName||!e.relationName&&l.referencedTable===e.sourceTable)&&a.push(l);if(a.length>1)throw e.relationName?new Error(`There are multiple relations with name "${e.relationName}" in table "${n}"`):new Error(`There are multiple relations between "${n}" and "${e.sourceTable[Mt.Symbol.Name]}". Please specify relation name`);if(a[0]&<(a[0],Ws)&&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 R5(r){return{one:C5(r),many:O5(r)}}function Up(r,t,e,n,i=s=>s){const s={};for(const[o,a]of n.entries())if(a.isJson){const l=t.relations[a.tsKey],u=e[o],c=typeof u=="string"?JSON.parse(u):u;s[a.tsKey]=lt(l,Ws)?c&&Up(r,r[a.relationTableTsKey],c,a.selection,i):c.map(h=>Up(r,r[a.relationTableTsKey],h,a.selection,i))}else{const l=i(e[o]),u=a.field;let c;lt(u,ur)?c=u:lt(u,Ft)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var Fb;Fb=It;const Lc=class Lc{constructor(t){W(this,"config");this.config={...t}}get(t,e){if(e==="_")return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(e===er)return{...t[er],selectedFields:new Proxy(t[er].selectedFields,this)};if(typeof e=="symbol")return t[e];const i=(lt(t,Gr)?t._.selectedFields:lt(t,rs)?t[er].selectedFields:t)[e];if(lt(i,Ft.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!i.isSelectionField)return i.sql;const s=i.clone();return s.isSelectionField=!0,s}if(lt(i,Ft)){if(this.config.sqlBehavior==="sql")return i;throw new Error(`You tried to reference "${e}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return lt(i,ur)?this.config.alias?new Proxy(i,new _l(new Proxy(i.table,new uh(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!="object"||i===null?i:new Proxy(i,new Lc(this.config))}};W(Lc,Fb,"SelectionProxyHandler");let pr=Lc;var Lb,Db;class zp extends(Db=ns,Lb=It,Db){constructor(e,n,i,s){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=i,this.config={table:e,withList:s}}where(e){return this.config.where=e,this}returning(e=this.config.table[Mt.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=Gs(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Hr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new pr({alias:Rs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(zp,Lb,"PgDelete");function F5(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function L5(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,n,i)=>{const s=i===0?n.toLowerCase():`${n[0].toUpperCase()}${n.slice(1)}`;return e+s},"")}function D5(r){return r}var Nb;Nb=It;class xM{constructor(t){W(this,"cache",{});W(this,"cachedTables",{});W(this,"convert");this.convert=t==="snake_case"?F5:t==="camelCase"?L5:D5}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[Mt.Symbol.Schema]??"public",n=t.table[Mt.Symbol.OriginalName],i=`${e}.${n}.${t.name}`;return this.cache[i]||this.cacheTable(t.table),this.cache[i]}cacheTable(t){const e=t[Mt.Symbol.Schema]??"public",n=t[Mt.Symbol.OriginalName],i=`${e}.${n}`;if(!this.cachedTables[i]){for(const s of Object.values(t[Mt.Symbol.Columns])){const o=`${i}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[i]=!0}}clearCache(){this.cache={},this.cachedTables={}}}W(xM,Nb,"CasingCache");var Bb,kb;class mg extends(kb=rs,Bb=It,kb){}W(mg,Bb,"PgViewBase");var Ub;Ub=It;class Qa{constructor(t){W(this,"casing");this.casing=new xM(t==null?void 0:t.casing)}async migrate(t,e,n){const i=typeof n=="string"?"__drizzle_migrations":n.migrationsTable??"__drizzle_migrations",s=typeof n=="string"?"drizzle":n.migrationsSchema??"drizzle",o=Y` CREATE TABLE IF NOT EXISTS ${Y.identifier(s)}.${Y.identifier(i)} ( id SERIAL PRIMARY KEY, hash text NOT NULL, created_at bigint ) - `;await e.execute(Y`CREATE SCHEMA IF NOT EXISTS ${Y.identifier(s)}`),await e.execute(o);const l=(await e.all(Y`select id, hash, created_at from ${Y.identifier(s)}.${Y.identifier(i)} order by created_at desc limit 1`))[0];await e.transaction(async u=>{for await(const c of t)if(!l||Number(l.created_at){var a;return e[o]!==void 0||((a=n[o])==null?void 0:a.onUpdateFn)!==void 0}),s=i.length;return Y.join(i.flatMap((o,a)=>{const l=n[o],u=e[o]??Y.param(l.onUpdateFn(),l),c=Y`${Y.identifier(this.casing.getColumnCasing(l))} = ${u}`;return a{const a=[];if(lt(s,Ft.Aliased)&&s.isSelectionField)a.push(Y.identifier(s.fieldAlias));else if(lt(s,Ft.Aliased)||lt(s,Ft)){const l=lt(s,Ft.Aliased)?s.sql:s;e?a.push(new Ft(l.queryChunks.map(u=>lt(u,$r)?Y.identifier(this.casing.getColumnCasing(u)):u))):a.push(l),lt(s,Ft.Aliased)&&a.push(Y` as ${Y.identifier(s.fieldAlias)}`)}else lt(s,ur)&&(e?a.push(Y.identifier(this.casing.getColumnCasing(s))):a.push(s));return oa==null?void 0:a.some(({alias:P})=>P===(nt[Mt.Symbol.IsAlias]?Rs(nt):nt[Mt.Symbol.BaseName])))(w.field.table)){const nt=Rs(w.field.table);throw new Error(`Your "${w.path.join("->")}" field references a column "${nt}"."${w.field.name}", but the table "${nt}" is not part of the query! Did you forget to join it?`)}const p=!a||a.length===0,y=this.buildWithCTE(t);let v;d&&(v=d===!0?Y` distinct`:Y` distinct on (${Y.join(d.on,Y`, `)})`);const S=this.buildSelection(g,{isSingleTable:p}),T=this.buildFromTable(o),_=this.buildJoins(a),M=i?Y` where ${i}`:void 0,x=s?Y` having ${s}`:void 0;let N;l&&l.length>0&&(N=Y` order by ${Y.join(l,Y`, `)}`);let L;u&&u.length>0&&(L=Y` group by ${Y.join(u,Y`, `)}`);const j=typeof c=="object"||typeof c=="number"&&c>=0?Y` limit ${c}`:void 0,it=h?Y` offset ${h}`:void 0,I=Y.empty();if(f){const w=Y` for ${Y.raw(f.strength)}`;f.config.of&&w.append(Y` of ${Y.join(Array.isArray(f.config.of)?f.config.of:[f.config.of],Y`, `)}`),f.config.noWait?w.append(Y` no wait`):f.config.skipLocked&&w.append(Y` skip locked`),I.append(w)}const Q=Y`${y}select${v} ${S} from ${T}${_}${M}${L}${x}${N}${j}${it}${I}`;return m.length>0?this.buildSetOperations(Q,m):Q}buildSetOperations(t,e){const[n,...i]=e;if(!n)throw new Error("Cannot pass undefined values to any set operator");return i.length===0?this.buildSetOperationQuery({leftSelect:t,setOperator:n}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:t,setOperator:n}),i)}buildSetOperationQuery({leftSelect:t,setOperator:{type:e,isAll:n,rightSelect:i,limit:s,orderBy:o,offset:a}}){const l=Y`(${t.getSQL()}) `,u=Y`(${i.getSQL()})`;let c;if(o&&o.length>0){const m=[];for(const g of o)if(lt(g,$r))m.push(Y.identifier(g.name));else if(lt(g,Ft)){for(let p=0;p=0?Y` limit ${s}`:void 0,f=Y.raw(`${e} ${n?"all ":""}`),d=a?Y` offset ${a}`:void 0;return Y`${l}${f}${u}${c}${h}${d}`}buildInsertQuery({table:t,values:e,onConflict:n,returning:i,withList:s,select:o,overridingSystemValue_:a}){const l=[],u=t[Mt.Symbol.Columns],c=Object.entries(u).filter(([y,v])=>!v.shouldDisableInsert()),h=c.map(([,y])=>Y.identifier(this.casing.getColumnCasing(y)));if(o){const y=e;lt(y,Ft)?l.push(y):l.push(y.getSQL())}else{const y=e;l.push(Y.raw("values "));for(const[v,S]of y.entries()){const T=[];for(const[_,M]of c){const x=S[_];if(x===void 0||lt(x,_i)&&x.value===void 0)if(M.defaultFn!==void 0){const N=M.defaultFn(),L=lt(N,Ft)?N:Y.param(N,M);T.push(L)}else if(!M.default&&M.onUpdateFn!==void 0){const N=M.onUpdateFn(),L=lt(N,Ft)?N:Y.param(N,M);T.push(L)}else T.push(Y`default`);else T.push(x)}l.push(T),v({dbKey:S.name,tsKey:v,field:ci(S,a),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{const y=Object.fromEntries(Object.entries(s.columns).map(([x,N])=>[x,ci(N,a)]));if(o.where){const x=typeof o.where=="function"?o.where(y,M5()):o.where;m=x&&Cc(x,a)}const v=[];let S=[];if(o.columns){let x=!1;for(const[N,L]of Object.entries(o.columns))L!==void 0&&N in s.columns&&(!x&&L===!0&&(x=!0),S.push(N));S.length>0&&(S=x?S.filter(N=>{var L;return((L=o.columns)==null?void 0:L[N])===!0}):Object.keys(s.columns).filter(N=>!S.includes(N)))}else S=Object.keys(s.columns);for(const x of S){const N=s.columns[x];v.push({tsKey:x,value:N})}let T=[];o.with&&(T=Object.entries(o.with).filter(x=>!!x[1]).map(([x,N])=>({tsKey:x,queryConfig:N,relation:s.relations[x]})));let _;if(o.extras){_=typeof o.extras=="function"?o.extras(y,{sql:Y}):o.extras;for(const[x,N]of Object.entries(_))v.push({tsKey:x,value:rM(N,a)})}for(const{tsKey:x,value:N}of v)c.push({dbKey:lt(N,Ft.Aliased)?N.fieldAlias:s.columns[x].name,tsKey:x,field:lt(N,ur)?ci(N,a):N,relationTableTsKey:void 0,isJson:!1,selection:[]});let M=typeof o.orderBy=="function"?o.orderBy(y,E5()):o.orderBy??[];Array.isArray(M)||(M=[M]),d=M.map(x=>lt(x,ur)?ci(x,a):Cc(x,a)),h=o.limit,f=o.offset;for(const{tsKey:x,queryConfig:N,relation:L}of T){const j=P5(e,n,L),it=vl(L.referencedTable),I=n[it],Q=`${a}_${x}`,w=kp(...j.fields.map((C,R)=>iM(ci(j.references[R],Q),ci(C,a)))),nt=this.buildRelationalQueryWithoutPK({fullSchema:t,schema:e,tableNamesMap:n,table:t[I],tableConfig:e[I],queryConfig:lt(L,Ws)?N===!0?{limit:1}:{...N,limit:1}:N,tableAlias:Q,joinOn:w,nestedQueryRelation:L}),P=Y`${Y.identifier(Q)}.${Y.identifier("data")}`.as(x);g.push({on:Y`true`,table:new Gr(nt.sql,{},Q),alias:Q,joinType:"left",lateral:!0}),c.push({dbKey:x,tsKey:x,field:P,relationTableTsKey:I,isJson:!0,selection:nt.selection})}}if(c.length===0)throw new dg({message:`No fields selected for table "${s.tsName}" ("${a}")`});let p;if(m=kp(u,m),l){let y=Y`json_build_array(${Y.join(c.map(({field:T,tsKey:_,isJson:M})=>M?Y`${Y.identifier(`${a}_${_}`)}.${Y.identifier("data")}`:lt(T,Ft.Aliased)?T.sql:T),Y`, `)})`;lt(l,Oc)&&(y=Y`coalesce(json_agg(${y}${d.length>0?Y` order by ${Y.join(d,Y`, `)}`:void 0}), '[]'::json)`);const v=[{dbKey:"data",tsKey:"data",field:y.as("data"),isJson:!0,relationTableTsKey:s.tsName,selection:c}];h!==void 0||f!==void 0||d.length>0?(p=this.buildSelectQuery({table:sf(i,a),fields:{},fieldsFlat:[{path:[],field:Y.raw("*")}],where:m,limit:h,offset:f,orderBy:d,setOperators:[]}),m=void 0,h=void 0,f=void 0,d=[]):p=sf(i,a),p=this.buildSelectQuery({table:lt(p,en)?p:new Gr(p,{},a),fields:{},fieldsFlat:v.map(({field:T})=>({path:[],field:lt(T,ur)?ci(T,a):T})),joins:g,where:m,limit:h,offset:f,orderBy:d,setOperators:[]})}else p=this.buildSelectQuery({table:sf(i,a),fields:{},fieldsFlat:c.map(({field:y})=>({path:[],field:lt(y,ur)?ci(y,a):y})),joins:g,where:m,limit:h,offset:f,orderBy:d,setOperators:[]});return{tableTsKey:s.tsName,sql:p,selection:c}}}W(Qa,Ub,"PgDialect");var zb;zb=It;class wM{getSelectedFields(){return this._.selectedFields}}W(wM,zb,"TypedQueryBuilder");var Vb;Vb=It;class kr{constructor(t){W(this,"fields");W(this,"session");W(this,"dialect");W(this,"withList",[]);W(this,"distinct");W(this,"authToken");this.fields=t.fields,this.session=t.session,this.dialect=t.dialect,t.withList&&(this.withList=t.withList),this.distinct=t.distinct}setToken(t){return this.authToken=t,this}from(t){const e=!!this.fields,n=t;let i;return this.fields?i=this.fields:lt(n,Gr)?i=Object.fromEntries(Object.keys(n._.selectedFields).map(s=>[s,n[s]])):lt(n,mg)?i=n[er].selectedFields:lt(n,Ft)?i={}:i=T5(n),new gg({table:n,fields:i,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}W(kr,Vb,"PgSelectBuilder");var jb,$b;class SM extends($b=wM,jb=It,$b){constructor({table:e,fields:n,isPartialSelect:i,session:s,dialect:o,withList:a,distinct:l}){super();W(this,"_");W(this,"config");W(this,"joinsNotNullableMap");W(this,"tableName");W(this,"isPartialSelect");W(this,"session");W(this,"dialect");W(this,"leftJoin",this.createJoin("left"));W(this,"rightJoin",this.createJoin("right"));W(this,"innerJoin",this.createJoin("inner"));W(this,"fullJoin",this.createJoin("full"));W(this,"union",this.createSetOperator("union",!1));W(this,"unionAll",this.createSetOperator("union",!0));W(this,"intersect",this.createSetOperator("intersect",!1));W(this,"intersectAll",this.createSetOperator("intersect",!0));W(this,"except",this.createSetOperator("except",!1));W(this,"exceptAll",this.createSetOperator("except",!0));this.config={withList:a,table:e,fields:{...n},distinct:l,setOperators:[]},this.isPartialSelect=i,this.session=s,this.dialect=o,this._={selectedFields:n},this.tableName=Es(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}createJoin(e){return(n,i)=>{var a;const s=this.tableName,o=Es(n);if(typeof o=="string"&&((a=this.config.joins)!=null&&a.some(l=>l.alias===o)))throw new Error(`Alias "${o}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof s=="string"&&(this.config.fields={[s]:this.config.fields}),typeof o=="string"&&!lt(n,Ft))){const l=lt(n,Gr)?n._.selectedFields:lt(n,rs)?n[er].selectedFields:n[Mt.Symbol.Columns];this.config.fields[o]=l}if(typeof i=="function"&&(i=i(new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:i,table:n,joinType:e,alias:o}),typeof o=="string")switch(e){case"left":{this.joinsNotNullableMap[o]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!0;break}case"inner":{this.joinsNotNullableMap[o]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!1;break}}return this}}createSetOperator(e,n){return i=>{const s=typeof i=="function"?i(N5()):i;if(!fg(this.getSelectedFields(),s.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:e,isAll:n,rightSelect:s}),this}}addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){const n=e[0](new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(n)?n:[n]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){const n=e[0](new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),i=Array.isArray(n)?n:[n];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=i:this.config.orderBy=i}else{const n=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=n:this.config.orderBy=n}return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}for(e,n={}){return this.config.lockingClause={strength:e,config:n},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}as(e){return new Proxy(new Gr(this.getSQL(),this.config.fields,e),new pr({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new pr({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}}W(SM,jb,"PgSelectQueryBuilder");var Gb,Wb;class gg extends(Wb=SM,Gb=It,Wb){constructor(){super(...arguments);W(this,"authToken");W(this,"execute",e=>Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)))}_prepare(e){const{session:n,config:i,dialect:s,joinsNotNullableMap:o,authToken:a}=this;if(!n)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");return Hr.startActiveSpan("drizzle.prepareQuery",()=>{const l=Gs(i.fields),u=n.prepareQuery(s.sqlToQuery(this.getSQL()),l,e,!0);return u.joinsNotNullableMap=o,u.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}W(gg,Gb,"PgSelect");S5(gg,[ns]);function la(r,t){return(e,n,...i)=>{const s=[n,...i].map(o=>({type:r,isAll:t,rightSelect:o}));for(const o of s)if(!fg(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 N5=()=>({union:B5,unionAll:k5,intersect:U5,intersectAll:z5,except:V5,exceptAll:j5}),B5=la("union",!1),k5=la("union",!0),U5=la("intersect",!1),z5=la("intersect",!0),V5=la("except",!1),j5=la("except",!0);var Hb;Hb=It;class yg{constructor(t){W(this,"dialect");W(this,"dialectConfig");W(this,"$with",(t,e)=>{const n=this;return{as:s=>(typeof s=="function"&&(s=s(n)),new Proxy(new hg(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new pr({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});this.dialect=lt(t,Qa)?t:void 0,this.dialectConfig=lt(t,Qa)?void 0:t}with(...t){const e=this;function n(o){return new kr({fields:o??void 0,session:void 0,dialect:e.getDialect(),withList:t})}function i(o){return new kr({fields:o??void 0,session:void 0,dialect:e.getDialect(),distinct:!0})}function s(o,a){return new kr({fields:a??void 0,session:void 0,dialect:e.getDialect(),distinct:{on:o}})}return{select:n,selectDistinct:i,selectDistinctOn:s}}select(t){return new kr({fields:t??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(t){return new kr({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(t,e){return new kr({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:t}})}getDialect(){return this.dialect||(this.dialect=new Qa(this.dialectConfig)),this.dialect}}W(yg,Hb,"PgQueryBuilder");var Xb;Xb=It;class Vp{constructor(t,e,n,i,s){W(this,"authToken");this.table=t,this.session=e,this.dialect=n,this.withList=i,this.overridingSystemValue_=s}setToken(t){return this.authToken=t,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values(t){if(t=Array.isArray(t)?t:[t],t.length===0)throw new Error("values() must be called with at least one value");const e=t.map(n=>{const i={},s=this.table[Mt.Symbol.Columns];for(const o of Object.keys(n)){const a=n[o];i[o]=lt(a,Ft)?a:new _i(a,s[o])}return i});return new jp(this.table,e,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(t){const e=typeof t=="function"?t(new yg):t;if(!lt(e,Ft)&&!fg(this.table[Bp],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 jp(this.table,e,this.session,this.dialect,this.withList,!0)}}W(Vp,Xb,"PgInsertBuilder");var Yb,qb;class jp extends(qb=ns,Yb=It,qb){constructor(e,n,i,s,o,a,l){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=s,this.config={table:e,values:n,withList:o,select:a,overridingSystemValue_:l}}returning(e=this.config.table[Mt.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=Gs(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=Y`do nothing`;else{let n="";n=Array.isArray(e.target)?e.target.map(s=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(s))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target));const i=e.where?Y` where ${e.where}`:void 0;this.config.onConflict=Y`(${Y.raw(n)})${i} do nothing`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw new Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');const n=e.where?Y` where ${e.where}`:void 0,i=e.targetWhere?Y` where ${e.targetWhere}`:void 0,s=e.setWhere?Y` where ${e.setWhere}`:void 0,o=this.dialect.buildUpdateSet(this.config.table,lM(this.config.table,e.set));let a="";return a=Array.isArray(e.target)?e.target.map(l=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(l))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target)),this.config.onConflict=Y`(${Y.raw(a)})${i} do update set ${o}${n}${s}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Hr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new pr({alias:Rs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(jp,Yb,"PgInsert");var Qb,Zb;class TM extends(Zb=ns,Qb=It,Zb){constructor(e,n,i){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=i,this.config={view:e}}concurrently(){if(this.config.withNoData!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Hr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}W(TM,Qb,"PgRefreshMaterializedView");var Kb;Kb=It;class $p{constructor(t,e,n,i){W(this,"authToken");this.table=t,this.session=e,this.dialect=n,this.withList=i}setToken(t){return this.authToken=t,this}set(t){return new IM(this.table,lM(this.table,t),this.session,this.dialect,this.withList).setToken(this.authToken)}}W($p,Kb,"PgUpdateBuilder");var Jb,tx;class IM extends(tx=ns,Jb=It,tx){constructor(e,n,i,s,o){super();W(this,"config");W(this,"tableName");W(this,"joinsNotNullableMap");W(this,"leftJoin",this.createJoin("left"));W(this,"rightJoin",this.createJoin("right"));W(this,"innerJoin",this.createJoin("inner"));W(this,"fullJoin",this.createJoin("full"));W(this,"authToken");W(this,"execute",e=>this._prepare().execute(e,this.authToken));this.session=i,this.dialect=s,this.config={set:n,table:e,withList:o,joins:[]},this.tableName=Es(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}from(e){const n=e,i=Es(n);return typeof i=="string"&&(this.joinsNotNullableMap[i]=!0),this.config.from=n,this}getTableLikeFields(e){return lt(e,en)?e[Mt.Symbol.Columns]:lt(e,Gr)?e._.selectedFields:e[er].selectedFields}createJoin(e){return(n,i)=>{const s=Es(n);if(typeof s=="string"&&this.config.joins.some(o=>o.alias===s))throw new Error(`Alias "${s}" is already used in this query`);if(typeof i=="function"){const o=this.config.from&&!lt(this.config.from,Ft)?this.getTableLikeFields(this.config.from):void 0;i=i(new Proxy(this.config.table[Mt.Symbol.Columns],new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),o&&new Proxy(o,new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:i,table:n,joinType:e,alias:s}),typeof s=="string")switch(e){case"left":{this.joinsNotNullableMap[s]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!0;break}case"inner":{this.joinsNotNullableMap[s]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!1;break}}return this}}where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[Mt.Symbol.Columns]),this.config.from)){const n=Es(this.config.from);if(typeof n=="string"&&this.config.from&&!lt(this.config.from,Ft)){const i=this.getTableLikeFields(this.config.from);e[n]=i}for(const i of this.config.joins){const s=Es(i.table);if(typeof s=="string"&&!lt(i.table,Ft)){const o=this.getTableLikeFields(i.table);e[s]=o}}}return this.config.returningFields=e,this.config.returning=Gs(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){const n=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0);return n.joinsNotNullableMap=this.joinsNotNullableMap,n}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new pr({alias:Rs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(IM,Jb,"PgUpdate");var ex,rx,nx;const Ka=class Ka extends(nx=Ft,rx=It,ex=Symbol.toStringTag,nx){constructor(e){super(Ka.buildEmbeddedCount(e.source,e.filters).queryChunks);W(this,"sql");W(this,"token");W(this,ex,"PgCountBuilder");W(this,"session");this.params=e,this.mapWith(Number),this.session=e.session,this.sql=Ka.buildCount(e.source,e.filters)}static buildEmbeddedCount(e,n){return Y`(select count(*) from ${e}${Y.raw(" where ").if(n)}${n})`}static buildCount(e,n){return Y`select count(*) as count from ${e}${Y.raw(" where ").if(n)}${n};`}setToken(e){return this.token=e,this}then(e,n){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,n)}catch(e){return this.then(void 0,e)}finally(e){return this.then(n=>(e==null||e(),n),n=>{throw e==null||e(),n})}};W(Ka,rx,"PgCountBuilder");let Gp=Ka;var ix;ix=It;class MM{constructor(t,e,n,i,s,o,a){this.fullSchema=t,this.schema=e,this.tableNamesMap=n,this.table=i,this.tableConfig=s,this.dialect=o,this.session=a}findMany(t){return new Wp(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t||{},"many")}findFirst(t){return new Wp(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t?{...t,limit:1}:{limit:1},"first")}}W(MM,ix,"PgRelationalQueryBuilder");var sx,ox;class Wp extends(ox=ns,sx=It,ox){constructor(e,n,i,s,o,a,l,u,c){super();W(this,"authToken");this.fullSchema=e,this.schema=n,this.tableNamesMap=i,this.table=s,this.tableConfig=o,this.dialect=a,this.session=l,this.config=u,this.mode=c}_prepare(e){return Hr.startActiveSpan("drizzle.prepareQuery",()=>{const{query:n,builtQuery:i}=this._toSQL();return this.session.prepareQuery(i,void 0,e,!0,(s,o)=>{const a=s.map(l=>Up(this.schema,this.tableConfig,l,n.selection,o));return this.mode==="first"?a[0]:a})})}prepare(e){return this._prepare(e)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){const e=this._getQuery(),n=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:n}}toSQL(){return this._toSQL().builtQuery}setToken(e){return this.authToken=e,this}execute(){return Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(void 0,this.authToken))}}W(Wp,sx,"PgRelationalQuery");var ax,lx;class EM extends(lx=ns,ax=It,lx){constructor(t,e,n,i){super(),this.execute=t,this.sql=e,this.query=n,this.mapBatchResult=i}getSQL(){return this.sql}getQuery(){return this.query}mapResult(t,e){return e?this.mapBatchResult(t):t}_prepare(){return this}isResponseInArrayMode(){return!1}}W(EM,ax,"PgRaw");var ux;ux=It;class vg{constructor(t,e,n){W(this,"query");W(this,"$with",(t,e)=>{const n=this;return{as:s=>(typeof s=="function"&&(s=s(new yg(n.dialect))),new Proxy(new hg(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new pr({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});W(this,"authToken");if(this.dialect=t,this.session=e,this._=n?{schema:n.schema,fullSchema:n.fullSchema,tableNamesMap:n.tableNamesMap,session:e}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:e},this.query={},this._.schema)for(const[i,s]of Object.entries(this._.schema))this.query[i]=new MM(n.fullSchema,this._.schema,this._.tableNamesMap,n.fullSchema[i],s,t,e)}$count(t,e){return new Gp({source:t,filters:e,session:this.session})}with(...t){const e=this;function n(u){return new kr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t})}function i(u){return new kr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:!0})}function s(u,c){return new kr({fields:c??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:{on:u}})}function o(u){return new $p(u,e.session,e.dialect,t)}function a(u){return new Vp(u,e.session,e.dialect,t)}function l(u){return new zp(u,e.session,e.dialect,t)}return{select:n,selectDistinct:i,selectDistinctOn:s,update:o,insert:a,delete:l}}select(t){return new kr({fields:t??void 0,session:this.session,dialect:this.dialect})}selectDistinct(t){return new kr({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(t,e){return new kr({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:{on:t}})}update(t){return new $p(t,this.session,this.dialect)}insert(t){return new Vp(t,this.session,this.dialect)}delete(t){return new zp(t,this.session,this.dialect)}refreshMaterializedView(t){return new TM(t,this.session,this.dialect)}execute(t){const e=typeof t=="string"?Y.raw(t):t.getSQL(),n=this.dialect.sqlToQuery(e),i=this.session.prepareQuery(n,void 0,void 0,!1);return new EM(()=>i.execute(void 0,this.authToken),e,n,s=>i.mapResult(s,!0))}transaction(t,e){return this.session.transaction(t,e)}}W(vg,ux,"PgDatabase");var cx;cx=It;class AM{constructor(t){W(this,"authToken");W(this,"joinsNotNullableMap");this.query=t}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}}W(AM,cx,"PgPreparedQuery");var hx;hx=It;class CM{constructor(t){this.dialect=t}execute(t,e){return Hr.startActiveSpan("drizzle.operation",()=>Hr.startActiveSpan("drizzle.prepareQuery",()=>this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1)).setToken(e).execute(void 0,e))}all(t){return this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1).all()}async count(t,e){const n=await this.execute(t,e);return Number(n[0].count)}}W(CM,hx,"PgSession");var dx,fx;class OM extends(fx=vg,dx=It,fx){constructor(t,e,n,i=0){super(t,e,n),this.schema=n,this.nestedIndex=i}rollback(){throw new nM}getTransactionConfigSQL(t){const e=[];return t.isolationLevel&&e.push(`isolation level ${t.isolationLevel}`),t.accessMode&&e.push(t.accessMode),typeof t.deferrable=="boolean"&&e.push(t.deferrable?"deferrable":"not deferrable"),Y.raw(e.join(" "))}setTransaction(t){return this.session.execute(Y`set transaction ${this.getTransactionConfigSQL(t)}`)}}W(OM,dx,"PgTransaction");function g_(r){return typeof r=="string"&&/^true$/i.test(r)}function $5(r){const t={scheme:"duckdb-wasm:"},e=new URL(r);if(!e.protocol.startsWith("duckdb-wasm:"))throw new Error(`Expected scheme to be "duckdb-wasm:" but got "${e.protocol}"`);e.searchParams.get("bundles")==="import-url"&&(t.bundles="import-url");const n=e.searchParams.get("logger");n&&g_(n)&&(t.logger=!0);const i=e.searchParams.get("storage");switch(i){case yl.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:yl.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&g_(s)&&{accessMode:cT.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var px,mx;class PM extends(mx=AM,px=It,mx){constructor(t,e,n,i,s,o){super({sql:e,params:n}),this.client=t,this.queryString=e,this.params=n,this.logger=i,this.fields=s,this.customResultMapper=o}async execute(t={}){const e=f_(this.params,t);this.logger.logQuery(this.queryString,e);const{fields:n,queryString:i,client:s,customResultMapper:o}=this,a=await s;return a.query(i,e)}async all(t={}){const e=f_(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}W(PM,px,"DuckDBWasmPreparedQuery");var gx,yx;const Lc=class Lc extends(yx=CM,gx=It,yx){constructor(e,n,i,s={}){super(n);W(this,"logger");this.client=e,this.schema=i,this.options=s,this.logger=s.logger??new aM}prepareQuery(e,n,i,s,o){return new PM(this.client,e.sql,e.params,this.logger,n,o)}async query(e,n){return this.logger.logQuery(e,n),(await this.client).query(e,n)}async queryObjects(e,n){return this.logger.logQuery(e,n),(await this.client).query(e,n)}transaction(e,n){return Y6(this.client,async i=>{const s=new Lc(i,this.dialect,this.schema,this.options),o=new Hp(this.dialect,s,this.schema);return n&&await o.setTransaction(n),e(o)})}};W(Lc,gx,"DuckDBWasmSession");let Pc=Lc;var vx,_x;const Nc=class Nc extends(_x=OM,vx=It,_x){constructor(e,n,i,s=0){super(e,n,i,s);W(this,"dialect");W(this,"session");this.dialect=e,this.session=n}async transaction(e){return q6(this.session.client,"",async n=>{const i=new Pc(n,this.dialect,this.schema,this.session.options),s=new Nc(this.dialect,i,this.schema);return e(s)})}};W(Nc,vx,"DuckDBWasmTransaction");let Hp=Nc;var bx,xx;class RM extends(xx=vg,bx=It,xx){}W(RM,bx,"DuckDBWasmDatabase");function Za(r,t={}){const e=new Qa({casing:t.casing});let n;t.logger===!0?n=new oM:t.logger!==!1&&(n=t.logger);let i;if(t.schema){const a=A5(t.schema,R5);i={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new Pc(r,e,i,{logger:n}),o=new RM(e,s,i);return o.$client=r,o}async function G5(r=!1){const t=await QI();switch(t){case"browser":return r?(await Bi(async()=>{const{getImportUrlBundles:e}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:e}},__vite__mapDeps([3,4]))).getImportUrlBundles():(await Bi(async()=>{const{getBundles:e}=await import("./default-browser-BrgSDbLD.js");return{getBundles:e}},[])).getBundles();case"node":return r?await(await Bi(async()=>{const{getImportUrlBundles:e}=await import("./import-url-node-BfNoxhRr.js");return{getImportUrlBundles:e}},__vite__mapDeps([5,4]))).getImportUrlBundles():await(await Bi(async()=>{const{getBundles:e}=await import("./default-node-DRTvwjMK.js");return{getBundles:e}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${t}"`)}}function y_(r,t){const e=$5(r);return Za(KI({bundles:G5(e.bundles==="import-url"),logger:e.logger?new hT:void 0,storage:e.storage}),t)}function v_(...r){if(typeof r[0]=="string")return y_(r[0],r[1]);if(I5(r[0])){const{connection:t,client:e,...n}=r[0];if(e)return Za(e,n);if(typeof t=="string")return y_(t,n);if(typeof t>"u")throw new Error("connection option is required");return Za(KI({bundles:t.bundles,logger:t.logger,storage:t.storage}),n)}return Za(r[0],r[1])}(r=>{function t(e){return Za({options:{parsers:{},serializers:{}}},e)}r.mock=t})(v_||(v_={}));var of={exports:{}};/*! + `;await e.execute(Y`CREATE SCHEMA IF NOT EXISTS ${Y.identifier(s)}`),await e.execute(o);const l=(await e.all(Y`select id, hash, created_at from ${Y.identifier(s)}.${Y.identifier(i)} order by created_at desc limit 1`))[0];await e.transaction(async u=>{for await(const c of t)if(!l||Number(l.created_at){var a;return e[o]!==void 0||((a=n[o])==null?void 0:a.onUpdateFn)!==void 0}),s=i.length;return Y.join(i.flatMap((o,a)=>{const l=n[o],u=e[o]??Y.param(l.onUpdateFn(),l),c=Y`${Y.identifier(this.casing.getColumnCasing(l))} = ${u}`;return a{const a=[];if(lt(s,Ft.Aliased)&&s.isSelectionField)a.push(Y.identifier(s.fieldAlias));else if(lt(s,Ft.Aliased)||lt(s,Ft)){const l=lt(s,Ft.Aliased)?s.sql:s;e?a.push(new Ft(l.queryChunks.map(u=>lt(u,$r)?Y.identifier(this.casing.getColumnCasing(u)):u))):a.push(l),lt(s,Ft.Aliased)&&a.push(Y` as ${Y.identifier(s.fieldAlias)}`)}else lt(s,ur)&&(e?a.push(Y.identifier(this.casing.getColumnCasing(s))):a.push(s));return oa==null?void 0:a.some(({alias:P})=>P===(nt[Mt.Symbol.IsAlias]?Rs(nt):nt[Mt.Symbol.BaseName])))(w.field.table)){const nt=Rs(w.field.table);throw new Error(`Your "${w.path.join("->")}" field references a column "${nt}"."${w.field.name}", but the table "${nt}" is not part of the query! Did you forget to join it?`)}const p=!a||a.length===0,y=this.buildWithCTE(t);let v;d&&(v=d===!0?Y` distinct`:Y` distinct on (${Y.join(d.on,Y`, `)})`);const S=this.buildSelection(g,{isSingleTable:p}),T=this.buildFromTable(o),_=this.buildJoins(a),M=i?Y` where ${i}`:void 0,x=s?Y` having ${s}`:void 0;let N;l&&l.length>0&&(N=Y` order by ${Y.join(l,Y`, `)}`);let D;u&&u.length>0&&(D=Y` group by ${Y.join(u,Y`, `)}`);const j=typeof c=="object"||typeof c=="number"&&c>=0?Y` limit ${c}`:void 0,it=h?Y` offset ${h}`:void 0,I=Y.empty();if(f){const w=Y` for ${Y.raw(f.strength)}`;f.config.of&&w.append(Y` of ${Y.join(Array.isArray(f.config.of)?f.config.of:[f.config.of],Y`, `)}`),f.config.noWait?w.append(Y` no wait`):f.config.skipLocked&&w.append(Y` skip locked`),I.append(w)}const Q=Y`${y}select${v} ${S} from ${T}${_}${M}${D}${x}${N}${j}${it}${I}`;return m.length>0?this.buildSetOperations(Q,m):Q}buildSetOperations(t,e){const[n,...i]=e;if(!n)throw new Error("Cannot pass undefined values to any set operator");return i.length===0?this.buildSetOperationQuery({leftSelect:t,setOperator:n}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:t,setOperator:n}),i)}buildSetOperationQuery({leftSelect:t,setOperator:{type:e,isAll:n,rightSelect:i,limit:s,orderBy:o,offset:a}}){const l=Y`(${t.getSQL()}) `,u=Y`(${i.getSQL()})`;let c;if(o&&o.length>0){const m=[];for(const g of o)if(lt(g,$r))m.push(Y.identifier(g.name));else if(lt(g,Ft)){for(let p=0;p=0?Y` limit ${s}`:void 0,f=Y.raw(`${e} ${n?"all ":""}`),d=a?Y` offset ${a}`:void 0;return Y`${l}${f}${u}${c}${h}${d}`}buildInsertQuery({table:t,values:e,onConflict:n,returning:i,withList:s,select:o,overridingSystemValue_:a}){const l=[],u=t[Mt.Symbol.Columns],c=Object.entries(u).filter(([y,v])=>!v.shouldDisableInsert()),h=c.map(([,y])=>Y.identifier(this.casing.getColumnCasing(y)));if(o){const y=e;lt(y,Ft)?l.push(y):l.push(y.getSQL())}else{const y=e;l.push(Y.raw("values "));for(const[v,S]of y.entries()){const T=[];for(const[_,M]of c){const x=S[_];if(x===void 0||lt(x,_i)&&x.value===void 0)if(M.defaultFn!==void 0){const N=M.defaultFn(),D=lt(N,Ft)?N:Y.param(N,M);T.push(D)}else if(!M.default&&M.onUpdateFn!==void 0){const N=M.onUpdateFn(),D=lt(N,Ft)?N:Y.param(N,M);T.push(D)}else T.push(Y`default`);else T.push(x)}l.push(T),v({dbKey:S.name,tsKey:v,field:ci(S,a),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{const y=Object.fromEntries(Object.entries(s.columns).map(([x,N])=>[x,ci(N,a)]));if(o.where){const x=typeof o.where=="function"?o.where(y,M5()):o.where;m=x&&Cc(x,a)}const v=[];let S=[];if(o.columns){let x=!1;for(const[N,D]of Object.entries(o.columns))D!==void 0&&N in s.columns&&(!x&&D===!0&&(x=!0),S.push(N));S.length>0&&(S=x?S.filter(N=>{var D;return((D=o.columns)==null?void 0:D[N])===!0}):Object.keys(s.columns).filter(N=>!S.includes(N)))}else S=Object.keys(s.columns);for(const x of S){const N=s.columns[x];v.push({tsKey:x,value:N})}let T=[];o.with&&(T=Object.entries(o.with).filter(x=>!!x[1]).map(([x,N])=>({tsKey:x,queryConfig:N,relation:s.relations[x]})));let _;if(o.extras){_=typeof o.extras=="function"?o.extras(y,{sql:Y}):o.extras;for(const[x,N]of Object.entries(_))v.push({tsKey:x,value:rM(N,a)})}for(const{tsKey:x,value:N}of v)c.push({dbKey:lt(N,Ft.Aliased)?N.fieldAlias:s.columns[x].name,tsKey:x,field:lt(N,ur)?ci(N,a):N,relationTableTsKey:void 0,isJson:!1,selection:[]});let M=typeof o.orderBy=="function"?o.orderBy(y,E5()):o.orderBy??[];Array.isArray(M)||(M=[M]),d=M.map(x=>lt(x,ur)?ci(x,a):Cc(x,a)),h=o.limit,f=o.offset;for(const{tsKey:x,queryConfig:N,relation:D}of T){const j=P5(e,n,D),it=vl(D.referencedTable),I=n[it],Q=`${a}_${x}`,w=kp(...j.fields.map((C,R)=>iM(ci(j.references[R],Q),ci(C,a)))),nt=this.buildRelationalQueryWithoutPK({fullSchema:t,schema:e,tableNamesMap:n,table:t[I],tableConfig:e[I],queryConfig:lt(D,Ws)?N===!0?{limit:1}:{...N,limit:1}:N,tableAlias:Q,joinOn:w,nestedQueryRelation:D}),P=Y`${Y.identifier(Q)}.${Y.identifier("data")}`.as(x);g.push({on:Y`true`,table:new Gr(nt.sql,{},Q),alias:Q,joinType:"left",lateral:!0}),c.push({dbKey:x,tsKey:x,field:P,relationTableTsKey:I,isJson:!0,selection:nt.selection})}}if(c.length===0)throw new dg({message:`No fields selected for table "${s.tsName}" ("${a}")`});let p;if(m=kp(u,m),l){let y=Y`json_build_array(${Y.join(c.map(({field:T,tsKey:_,isJson:M})=>M?Y`${Y.identifier(`${a}_${_}`)}.${Y.identifier("data")}`:lt(T,Ft.Aliased)?T.sql:T),Y`, `)})`;lt(l,Oc)&&(y=Y`coalesce(json_agg(${y}${d.length>0?Y` order by ${Y.join(d,Y`, `)}`:void 0}), '[]'::json)`);const v=[{dbKey:"data",tsKey:"data",field:y.as("data"),isJson:!0,relationTableTsKey:s.tsName,selection:c}];h!==void 0||f!==void 0||d.length>0?(p=this.buildSelectQuery({table:sf(i,a),fields:{},fieldsFlat:[{path:[],field:Y.raw("*")}],where:m,limit:h,offset:f,orderBy:d,setOperators:[]}),m=void 0,h=void 0,f=void 0,d=[]):p=sf(i,a),p=this.buildSelectQuery({table:lt(p,en)?p:new Gr(p,{},a),fields:{},fieldsFlat:v.map(({field:T})=>({path:[],field:lt(T,ur)?ci(T,a):T})),joins:g,where:m,limit:h,offset:f,orderBy:d,setOperators:[]})}else p=this.buildSelectQuery({table:sf(i,a),fields:{},fieldsFlat:c.map(({field:y})=>({path:[],field:lt(y,ur)?ci(y,a):y})),joins:g,where:m,limit:h,offset:f,orderBy:d,setOperators:[]});return{tableTsKey:s.tsName,sql:p,selection:c}}}W(Qa,Ub,"PgDialect");var zb;zb=It;class wM{getSelectedFields(){return this._.selectedFields}}W(wM,zb,"TypedQueryBuilder");var Vb;Vb=It;class kr{constructor(t){W(this,"fields");W(this,"session");W(this,"dialect");W(this,"withList",[]);W(this,"distinct");W(this,"authToken");this.fields=t.fields,this.session=t.session,this.dialect=t.dialect,t.withList&&(this.withList=t.withList),this.distinct=t.distinct}setToken(t){return this.authToken=t,this}from(t){const e=!!this.fields,n=t;let i;return this.fields?i=this.fields:lt(n,Gr)?i=Object.fromEntries(Object.keys(n._.selectedFields).map(s=>[s,n[s]])):lt(n,mg)?i=n[er].selectedFields:lt(n,Ft)?i={}:i=T5(n),new gg({table:n,fields:i,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}W(kr,Vb,"PgSelectBuilder");var jb,$b;class SM extends($b=wM,jb=It,$b){constructor({table:e,fields:n,isPartialSelect:i,session:s,dialect:o,withList:a,distinct:l}){super();W(this,"_");W(this,"config");W(this,"joinsNotNullableMap");W(this,"tableName");W(this,"isPartialSelect");W(this,"session");W(this,"dialect");W(this,"leftJoin",this.createJoin("left"));W(this,"rightJoin",this.createJoin("right"));W(this,"innerJoin",this.createJoin("inner"));W(this,"fullJoin",this.createJoin("full"));W(this,"union",this.createSetOperator("union",!1));W(this,"unionAll",this.createSetOperator("union",!0));W(this,"intersect",this.createSetOperator("intersect",!1));W(this,"intersectAll",this.createSetOperator("intersect",!0));W(this,"except",this.createSetOperator("except",!1));W(this,"exceptAll",this.createSetOperator("except",!0));this.config={withList:a,table:e,fields:{...n},distinct:l,setOperators:[]},this.isPartialSelect=i,this.session=s,this.dialect=o,this._={selectedFields:n},this.tableName=Es(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}createJoin(e){return(n,i)=>{var a;const s=this.tableName,o=Es(n);if(typeof o=="string"&&((a=this.config.joins)!=null&&a.some(l=>l.alias===o)))throw new Error(`Alias "${o}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof s=="string"&&(this.config.fields={[s]:this.config.fields}),typeof o=="string"&&!lt(n,Ft))){const l=lt(n,Gr)?n._.selectedFields:lt(n,rs)?n[er].selectedFields:n[Mt.Symbol.Columns];this.config.fields[o]=l}if(typeof i=="function"&&(i=i(new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:i,table:n,joinType:e,alias:o}),typeof o=="string")switch(e){case"left":{this.joinsNotNullableMap[o]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!0;break}case"inner":{this.joinsNotNullableMap[o]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!1;break}}return this}}createSetOperator(e,n){return i=>{const s=typeof i=="function"?i(N5()):i;if(!fg(this.getSelectedFields(),s.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:e,isAll:n,rightSelect:s}),this}}addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){const n=e[0](new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(n)?n:[n]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){const n=e[0](new Proxy(this.config.fields,new pr({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),i=Array.isArray(n)?n:[n];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=i:this.config.orderBy=i}else{const n=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=n:this.config.orderBy=n}return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}for(e,n={}){return this.config.lockingClause={strength:e,config:n},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}as(e){return new Proxy(new Gr(this.getSQL(),this.config.fields,e),new pr({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new pr({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}}W(SM,jb,"PgSelectQueryBuilder");var Gb,Wb;class gg extends(Wb=SM,Gb=It,Wb){constructor(){super(...arguments);W(this,"authToken");W(this,"execute",e=>Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)))}_prepare(e){const{session:n,config:i,dialect:s,joinsNotNullableMap:o,authToken:a}=this;if(!n)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");return Hr.startActiveSpan("drizzle.prepareQuery",()=>{const l=Gs(i.fields),u=n.prepareQuery(s.sqlToQuery(this.getSQL()),l,e,!0);return u.joinsNotNullableMap=o,u.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}W(gg,Gb,"PgSelect");S5(gg,[ns]);function la(r,t){return(e,n,...i)=>{const s=[n,...i].map(o=>({type:r,isAll:t,rightSelect:o}));for(const o of s)if(!fg(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 N5=()=>({union:B5,unionAll:k5,intersect:U5,intersectAll:z5,except:V5,exceptAll:j5}),B5=la("union",!1),k5=la("union",!0),U5=la("intersect",!1),z5=la("intersect",!0),V5=la("except",!1),j5=la("except",!0);var Hb;Hb=It;class yg{constructor(t){W(this,"dialect");W(this,"dialectConfig");W(this,"$with",(t,e)=>{const n=this;return{as:s=>(typeof s=="function"&&(s=s(n)),new Proxy(new hg(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new pr({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});this.dialect=lt(t,Qa)?t:void 0,this.dialectConfig=lt(t,Qa)?void 0:t}with(...t){const e=this;function n(o){return new kr({fields:o??void 0,session:void 0,dialect:e.getDialect(),withList:t})}function i(o){return new kr({fields:o??void 0,session:void 0,dialect:e.getDialect(),distinct:!0})}function s(o,a){return new kr({fields:a??void 0,session:void 0,dialect:e.getDialect(),distinct:{on:o}})}return{select:n,selectDistinct:i,selectDistinctOn:s}}select(t){return new kr({fields:t??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(t){return new kr({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(t,e){return new kr({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:t}})}getDialect(){return this.dialect||(this.dialect=new Qa(this.dialectConfig)),this.dialect}}W(yg,Hb,"PgQueryBuilder");var Xb;Xb=It;class Vp{constructor(t,e,n,i,s){W(this,"authToken");this.table=t,this.session=e,this.dialect=n,this.withList=i,this.overridingSystemValue_=s}setToken(t){return this.authToken=t,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values(t){if(t=Array.isArray(t)?t:[t],t.length===0)throw new Error("values() must be called with at least one value");const e=t.map(n=>{const i={},s=this.table[Mt.Symbol.Columns];for(const o of Object.keys(n)){const a=n[o];i[o]=lt(a,Ft)?a:new _i(a,s[o])}return i});return new jp(this.table,e,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(t){const e=typeof t=="function"?t(new yg):t;if(!lt(e,Ft)&&!fg(this.table[Bp],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 jp(this.table,e,this.session,this.dialect,this.withList,!0)}}W(Vp,Xb,"PgInsertBuilder");var Yb,qb;class jp extends(qb=ns,Yb=It,qb){constructor(e,n,i,s,o,a,l){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=s,this.config={table:e,values:n,withList:o,select:a,overridingSystemValue_:l}}returning(e=this.config.table[Mt.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=Gs(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=Y`do nothing`;else{let n="";n=Array.isArray(e.target)?e.target.map(s=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(s))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target));const i=e.where?Y` where ${e.where}`:void 0;this.config.onConflict=Y`(${Y.raw(n)})${i} do nothing`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw new Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');const n=e.where?Y` where ${e.where}`:void 0,i=e.targetWhere?Y` where ${e.targetWhere}`:void 0,s=e.setWhere?Y` where ${e.setWhere}`:void 0,o=this.dialect.buildUpdateSet(this.config.table,lM(this.config.table,e.set));let a="";return a=Array.isArray(e.target)?e.target.map(l=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(l))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target)),this.config.onConflict=Y`(${Y.raw(a)})${i} do update set ${o}${n}${s}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Hr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new pr({alias:Rs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(jp,Yb,"PgInsert");var Qb,Zb;class TM extends(Zb=ns,Qb=It,Zb){constructor(e,n,i){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=i,this.config={view:e}}concurrently(){if(this.config.withNoData!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Hr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}W(TM,Qb,"PgRefreshMaterializedView");var Kb;Kb=It;class $p{constructor(t,e,n,i){W(this,"authToken");this.table=t,this.session=e,this.dialect=n,this.withList=i}setToken(t){return this.authToken=t,this}set(t){return new IM(this.table,lM(this.table,t),this.session,this.dialect,this.withList).setToken(this.authToken)}}W($p,Kb,"PgUpdateBuilder");var Jb,tx;class IM extends(tx=ns,Jb=It,tx){constructor(e,n,i,s,o){super();W(this,"config");W(this,"tableName");W(this,"joinsNotNullableMap");W(this,"leftJoin",this.createJoin("left"));W(this,"rightJoin",this.createJoin("right"));W(this,"innerJoin",this.createJoin("inner"));W(this,"fullJoin",this.createJoin("full"));W(this,"authToken");W(this,"execute",e=>this._prepare().execute(e,this.authToken));this.session=i,this.dialect=s,this.config={set:n,table:e,withList:o,joins:[]},this.tableName=Es(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}from(e){const n=e,i=Es(n);return typeof i=="string"&&(this.joinsNotNullableMap[i]=!0),this.config.from=n,this}getTableLikeFields(e){return lt(e,en)?e[Mt.Symbol.Columns]:lt(e,Gr)?e._.selectedFields:e[er].selectedFields}createJoin(e){return(n,i)=>{const s=Es(n);if(typeof s=="string"&&this.config.joins.some(o=>o.alias===s))throw new Error(`Alias "${s}" is already used in this query`);if(typeof i=="function"){const o=this.config.from&&!lt(this.config.from,Ft)?this.getTableLikeFields(this.config.from):void 0;i=i(new Proxy(this.config.table[Mt.Symbol.Columns],new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),o&&new Proxy(o,new pr({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:i,table:n,joinType:e,alias:s}),typeof s=="string")switch(e){case"left":{this.joinsNotNullableMap[s]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!0;break}case"inner":{this.joinsNotNullableMap[s]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!1;break}}return this}}where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[Mt.Symbol.Columns]),this.config.from)){const n=Es(this.config.from);if(typeof n=="string"&&this.config.from&&!lt(this.config.from,Ft)){const i=this.getTableLikeFields(this.config.from);e[n]=i}for(const i of this.config.joins){const s=Es(i.table);if(typeof s=="string"&&!lt(i.table,Ft)){const o=this.getTableLikeFields(i.table);e[s]=o}}}return this.config.returningFields=e,this.config.returning=Gs(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){const n=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0);return n.joinsNotNullableMap=this.joinsNotNullableMap,n}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new pr({alias:Rs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(IM,Jb,"PgUpdate");var ex,rx,nx;const Ka=class Ka extends(nx=Ft,rx=It,ex=Symbol.toStringTag,nx){constructor(e){super(Ka.buildEmbeddedCount(e.source,e.filters).queryChunks);W(this,"sql");W(this,"token");W(this,ex,"PgCountBuilder");W(this,"session");this.params=e,this.mapWith(Number),this.session=e.session,this.sql=Ka.buildCount(e.source,e.filters)}static buildEmbeddedCount(e,n){return Y`(select count(*) from ${e}${Y.raw(" where ").if(n)}${n})`}static buildCount(e,n){return Y`select count(*) as count from ${e}${Y.raw(" where ").if(n)}${n};`}setToken(e){return this.token=e,this}then(e,n){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,n)}catch(e){return this.then(void 0,e)}finally(e){return this.then(n=>(e==null||e(),n),n=>{throw e==null||e(),n})}};W(Ka,rx,"PgCountBuilder");let Gp=Ka;var ix;ix=It;class MM{constructor(t,e,n,i,s,o,a){this.fullSchema=t,this.schema=e,this.tableNamesMap=n,this.table=i,this.tableConfig=s,this.dialect=o,this.session=a}findMany(t){return new Wp(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t||{},"many")}findFirst(t){return new Wp(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t?{...t,limit:1}:{limit:1},"first")}}W(MM,ix,"PgRelationalQueryBuilder");var sx,ox;class Wp extends(ox=ns,sx=It,ox){constructor(e,n,i,s,o,a,l,u,c){super();W(this,"authToken");this.fullSchema=e,this.schema=n,this.tableNamesMap=i,this.table=s,this.tableConfig=o,this.dialect=a,this.session=l,this.config=u,this.mode=c}_prepare(e){return Hr.startActiveSpan("drizzle.prepareQuery",()=>{const{query:n,builtQuery:i}=this._toSQL();return this.session.prepareQuery(i,void 0,e,!0,(s,o)=>{const a=s.map(l=>Up(this.schema,this.tableConfig,l,n.selection,o));return this.mode==="first"?a[0]:a})})}prepare(e){return this._prepare(e)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){const e=this._getQuery(),n=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:n}}toSQL(){return this._toSQL().builtQuery}setToken(e){return this.authToken=e,this}execute(){return Hr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(void 0,this.authToken))}}W(Wp,sx,"PgRelationalQuery");var ax,lx;class EM extends(lx=ns,ax=It,lx){constructor(t,e,n,i){super(),this.execute=t,this.sql=e,this.query=n,this.mapBatchResult=i}getSQL(){return this.sql}getQuery(){return this.query}mapResult(t,e){return e?this.mapBatchResult(t):t}_prepare(){return this}isResponseInArrayMode(){return!1}}W(EM,ax,"PgRaw");var ux;ux=It;class vg{constructor(t,e,n){W(this,"query");W(this,"$with",(t,e)=>{const n=this;return{as:s=>(typeof s=="function"&&(s=s(new yg(n.dialect))),new Proxy(new hg(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new pr({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});W(this,"authToken");if(this.dialect=t,this.session=e,this._=n?{schema:n.schema,fullSchema:n.fullSchema,tableNamesMap:n.tableNamesMap,session:e}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:e},this.query={},this._.schema)for(const[i,s]of Object.entries(this._.schema))this.query[i]=new MM(n.fullSchema,this._.schema,this._.tableNamesMap,n.fullSchema[i],s,t,e)}$count(t,e){return new Gp({source:t,filters:e,session:this.session})}with(...t){const e=this;function n(u){return new kr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t})}function i(u){return new kr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:!0})}function s(u,c){return new kr({fields:c??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:{on:u}})}function o(u){return new $p(u,e.session,e.dialect,t)}function a(u){return new Vp(u,e.session,e.dialect,t)}function l(u){return new zp(u,e.session,e.dialect,t)}return{select:n,selectDistinct:i,selectDistinctOn:s,update:o,insert:a,delete:l}}select(t){return new kr({fields:t??void 0,session:this.session,dialect:this.dialect})}selectDistinct(t){return new kr({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(t,e){return new kr({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:{on:t}})}update(t){return new $p(t,this.session,this.dialect)}insert(t){return new Vp(t,this.session,this.dialect)}delete(t){return new zp(t,this.session,this.dialect)}refreshMaterializedView(t){return new TM(t,this.session,this.dialect)}execute(t){const e=typeof t=="string"?Y.raw(t):t.getSQL(),n=this.dialect.sqlToQuery(e),i=this.session.prepareQuery(n,void 0,void 0,!1);return new EM(()=>i.execute(void 0,this.authToken),e,n,s=>i.mapResult(s,!0))}transaction(t,e){return this.session.transaction(t,e)}}W(vg,ux,"PgDatabase");var cx;cx=It;class AM{constructor(t){W(this,"authToken");W(this,"joinsNotNullableMap");this.query=t}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}}W(AM,cx,"PgPreparedQuery");var hx;hx=It;class CM{constructor(t){this.dialect=t}execute(t,e){return Hr.startActiveSpan("drizzle.operation",()=>Hr.startActiveSpan("drizzle.prepareQuery",()=>this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1)).setToken(e).execute(void 0,e))}all(t){return this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1).all()}async count(t,e){const n=await this.execute(t,e);return Number(n[0].count)}}W(CM,hx,"PgSession");var dx,fx;class OM extends(fx=vg,dx=It,fx){constructor(t,e,n,i=0){super(t,e,n),this.schema=n,this.nestedIndex=i}rollback(){throw new nM}getTransactionConfigSQL(t){const e=[];return t.isolationLevel&&e.push(`isolation level ${t.isolationLevel}`),t.accessMode&&e.push(t.accessMode),typeof t.deferrable=="boolean"&&e.push(t.deferrable?"deferrable":"not deferrable"),Y.raw(e.join(" "))}setTransaction(t){return this.session.execute(Y`set transaction ${this.getTransactionConfigSQL(t)}`)}}W(OM,dx,"PgTransaction");function g_(r){return typeof r=="string"&&/^true$/i.test(r)}function $5(r){const t={scheme:"duckdb-wasm:"},e=new URL(r);if(!e.protocol.startsWith("duckdb-wasm:"))throw new Error(`Expected scheme to be "duckdb-wasm:" but got "${e.protocol}"`);e.searchParams.get("bundles")==="import-url"&&(t.bundles="import-url");const n=e.searchParams.get("logger");n&&g_(n)&&(t.logger=!0);const i=e.searchParams.get("storage");switch(i){case yl.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:yl.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&g_(s)&&{accessMode:cT.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var px,mx;class PM extends(mx=AM,px=It,mx){constructor(t,e,n,i,s,o){super({sql:e,params:n}),this.client=t,this.queryString=e,this.params=n,this.logger=i,this.fields=s,this.customResultMapper=o}async execute(t={}){const e=f_(this.params,t);this.logger.logQuery(this.queryString,e);const{fields:n,queryString:i,client:s,customResultMapper:o}=this,a=await s;return a.query(i,e)}async all(t={}){const e=f_(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}W(PM,px,"DuckDBWasmPreparedQuery");var gx,yx;const Dc=class Dc extends(yx=CM,gx=It,yx){constructor(e,n,i,s={}){super(n);W(this,"logger");this.client=e,this.schema=i,this.options=s,this.logger=s.logger??new aM}prepareQuery(e,n,i,s,o){return new PM(this.client,e.sql,e.params,this.logger,n,o)}async query(e,n){return this.logger.logQuery(e,n),(await this.client).query(e,n)}async queryObjects(e,n){return this.logger.logQuery(e,n),(await this.client).query(e,n)}transaction(e,n){return Y6(this.client,async i=>{const s=new Dc(i,this.dialect,this.schema,this.options),o=new Hp(this.dialect,s,this.schema);return n&&await o.setTransaction(n),e(o)})}};W(Dc,gx,"DuckDBWasmSession");let Pc=Dc;var vx,_x;const Nc=class Nc extends(_x=OM,vx=It,_x){constructor(e,n,i,s=0){super(e,n,i,s);W(this,"dialect");W(this,"session");this.dialect=e,this.session=n}async transaction(e){return q6(this.session.client,"",async n=>{const i=new Pc(n,this.dialect,this.schema,this.session.options),s=new Nc(this.dialect,i,this.schema);return e(s)})}};W(Nc,vx,"DuckDBWasmTransaction");let Hp=Nc;var bx,xx;class RM extends(xx=vg,bx=It,xx){}W(RM,bx,"DuckDBWasmDatabase");function Za(r,t={}){const e=new Qa({casing:t.casing});let n;t.logger===!0?n=new oM:t.logger!==!1&&(n=t.logger);let i;if(t.schema){const a=A5(t.schema,R5);i={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new Pc(r,e,i,{logger:n}),o=new RM(e,s,i);return o.$client=r,o}async function G5(r=!1){const t=await QI();switch(t){case"browser":return r?(await Bi(async()=>{const{getImportUrlBundles:e}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:e}},__vite__mapDeps([3,4]))).getImportUrlBundles():(await Bi(async()=>{const{getBundles:e}=await import("./default-browser-BrgSDbLD.js");return{getBundles:e}},[])).getBundles();case"node":return r?await(await Bi(async()=>{const{getImportUrlBundles:e}=await import("./import-url-node-BfNoxhRr.js");return{getImportUrlBundles:e}},__vite__mapDeps([5,4]))).getImportUrlBundles():await(await Bi(async()=>{const{getBundles:e}=await import("./default-node-DJABTJPz.js");return{getBundles:e}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${t}"`)}}function y_(r,t){const e=$5(r);return Za(KI({bundles:G5(e.bundles==="import-url"),logger:e.logger?new hT:void 0,storage:e.storage}),t)}function v_(...r){if(typeof r[0]=="string")return y_(r[0],r[1]);if(I5(r[0])){const{connection:t,client:e,...n}=r[0];if(e)return Za(e,n);if(typeof t=="string")return y_(t,n);if(typeof t>"u")throw new Error("connection option is required");return Za(KI({bundles:t.bundles,logger:t.logger,storage:t.storage}),n)}return Za(r[0],r[1])}(r=>{function t(e){return Za({options:{parsers:{},serializers:{}}},e)}r.mock=t})(v_||(v_={}));var of={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -4088,5 +4088,5 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE -*/var __;function W5(){return __||(__=1,function(r,t){(function(e){r.exports=e()})(function(){return function e(n,i,s){function o(u,c){if(!i[u]){if(!n[u]){var h=typeof ki=="function"&&ki;if(!c&&h)return h(u,!0);if(a)return a(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var d=i[u]={exports:{}};n[u][0].call(d.exports,function(m){var g=n[u][1][m];return o(g||m)},d,d.exports,e,n,i,s)}return i[u].exports}for(var a=typeof ki=="function"&&ki,l=0;l>2,d=(3&u)<<4|c>>4,m=1>6:64,g=2>4,c=(15&f)<<4|(d=a.indexOf(l.charAt(g++)))>>2,h=(3&d)<<6|(m=a.indexOf(l.charAt(g++))),v[p++]=u,d!==64&&(v[p++]=c),m!==64&&(v[p++]=h);return v}},{"./support":30,"./utils":32}],2:[function(e,n,i){var s=e("./external"),o=e("./stream/DataWorker"),a=e("./stream/Crc32Probe"),l=e("./stream/DataLengthProbe");function u(c,h,f,d,m){this.compressedSize=c,this.uncompressedSize=h,this.crc32=f,this.compression=d,this.compressedContent=m}u.prototype={getContentWorker:function(){var c=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),h=this;return c.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),c},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(c,h,f){return c.pipe(new a).pipe(new l("uncompressedSize")).pipe(h.compressWorker(f)).pipe(new l("compressedSize")).withStreamInfo("compression",h)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,n,i){var s=e("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,n,i){var s=e("./utils"),o=function(){for(var a,l=[],u=0;u<256;u++){a=u;for(var c=0;c<8;c++)a=1&a?3988292384^a>>>1:a>>>1;l[u]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?function(u,c,h,f){var d=o,m=f+h;u^=-1;for(var g=f;g>>8^d[255&(u^c[g])];return-1^u}(0|l,a,a.length,0):function(u,c,h,f){var d=o,m=f+h;u^=-1;for(var g=f;g>>8^d[255&(u^c.charCodeAt(g))];return-1^u}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(e,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(e,n,i){var s=null;s=typeof Promise<"u"?Promise:e("lie"),n.exports={Promise:s}},{lie:37}],7:[function(e,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=e("pako"),a=e("./utils"),l=e("./stream/GenericWorker"),u=s?"uint8array":"array";function c(h,f){l.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=f,this.meta={}}i.magic="\b\0",a.inherits(c,l),c.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,h.data),!1)},c.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(f){h.push({data:f,meta:h.meta})}},i.compressWorker=function(h){return new c("Deflate",h)},i.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,n,i){function s(d,m){var g,p="";for(g=0;g>>=8;return p}function o(d,m,g,p,y,v){var S,T,_=d.file,M=d.compression,x=v!==u.utf8encode,N=a.transformTo("string",v(_.name)),L=a.transformTo("string",u.utf8encode(_.name)),j=_.comment,it=a.transformTo("string",v(j)),I=a.transformTo("string",u.utf8encode(j)),Q=L.length!==_.name.length,w=I.length!==j.length,nt="",P="",C="",R=_.dir,U=_.date,k={crc32:0,compressedSize:0,uncompressedSize:0};m&&!g||(k.crc32=d.crc32,k.compressedSize=d.compressedSize,k.uncompressedSize=d.uncompressedSize);var A=0;m&&(A|=8),x||!Q&&!w||(A|=2048);var O=0,$=0;R&&(O|=16),y==="UNIX"?($=798,O|=function(et,yt){var _t=et;return et||(_t=yt?16893:33204),(65535&_t)<<16}(_.unixPermissions,R)):($=20,O|=function(et){return 63&(et||0)}(_.dosPermissions)),S=U.getUTCHours(),S<<=6,S|=U.getUTCMinutes(),S<<=5,S|=U.getUTCSeconds()/2,T=U.getUTCFullYear()-1980,T<<=4,T|=U.getUTCMonth()+1,T<<=5,T|=U.getUTCDate(),Q&&(P=s(1,1)+s(c(N),4)+L,nt+="up"+s(P.length,2)+P),w&&(C=s(1,1)+s(c(it),4)+I,nt+="uc"+s(C.length,2)+C);var tt="";return tt+=` -\0`,tt+=s(A,2),tt+=M.magic,tt+=s(S,2),tt+=s(T,2),tt+=s(k.crc32,4),tt+=s(k.compressedSize,4),tt+=s(k.uncompressedSize,4),tt+=s(N.length,2),tt+=s(nt.length,2),{fileRecord:h.LOCAL_FILE_HEADER+tt+N+nt,dirRecord:h.CENTRAL_FILE_HEADER+s($,2)+tt+s(it.length,2)+"\0\0\0\0"+s(O,4)+s(p,4)+N+nt+it}}var a=e("../utils"),l=e("../stream/GenericWorker"),u=e("../utf8"),c=e("../crc32"),h=e("../signature");function f(d,m,g,p){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=g,this.encodeFileName=p,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(f,l),f.prototype.push=function(d){var m=d.meta.percent||0,g=this.entriesCount,p=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,l.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:g?(m+100*(g-p-1))/g:100}}))},f.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var m=this.streamFiles&&!d.file.dir;if(m){var g=o(d,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},f.prototype.closedSource=function(d){this.accumulate=!1;var m=this.streamFiles&&!d.file.dir,g=o(d,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),m)this.push({data:function(p){return h.DATA_DESCRIPTOR+s(p.crc32,4)+s(p.compressedSize,4)+s(p.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},f.prototype.flush=function(){for(var d=this.bytesWritten,m=0;m=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))}},n.exports=o},{"../utils":32}],19:[function(e,n,i){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},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,n,i){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},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,n,i){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},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,n,i){var s=e("../utils"),o=e("../support"),a=e("./ArrayReader"),l=e("./StringReader"),u=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");n.exports=function(h){var f=s.getTypeOf(h);return s.checkSupport(f),f!=="string"||o.uint8array?f==="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,n,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,n,i){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})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,n,i){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)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,n,i){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)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,n,i){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}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,n,i){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}},n.exports=s},{}],29:[function(e,n,i){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 f(m,g){return new c.Promise(function(p,y){var v=[],S=m._internalType,T=m._outputType,_=m._mimeType;m.on("data",function(M,x){v.push(M),g&&g(x)}).on("error",function(M){v=[],y(M)}).on("end",function(){try{var M=function(x,N,L){switch(x){case"blob":return s.newBlob(s.transformTo("arraybuffer",N),L);case"base64":return l.encode(N);default:return s.transformTo(x,N)}}(T,function(x,N){var L,j=0,it=null,I=0;for(L=0;L"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.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),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!e("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(e,n,i){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 f(){l.call(this,"utf-8 encode")}i.utf8encode=function(d){return o.nodebuffer?a.newBufferFrom(d,"utf-8"):function(m){var g,p,y,v,S,T=m.length,_=0;for(v=0;v>>6:(p<65536?g[S++]=224|p>>>12:(g[S++]=240|p>>>18,g[S++]=128|p>>>12&63),g[S++]=128|p>>>6&63),g[S++]=128|63&p);return g}(d)},i.utf8decode=function(d){return o.nodebuffer?s.transformTo("nodebuffer",d).toString("utf-8"):function(m){var g,p,y,v,S=m.length,T=new Array(2*S);for(g=p=0;g>10&1023,T[p++]=56320|1023&y)}return T.length!==p&&(T.subarray?T=T.subarray(0,p):T.length=p),s.applyFromCharCode(T)}(d=s.transformTo(o.uint8array?"uint8array":"array",d))},s.inherits(h,l),h.prototype.processChunk=function(d){var m=s.transformTo(o.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=m;(m=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),m.set(g,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var p=function(v,S){var T;for((S=S||v.length)>v.length&&(S=v.length),T=S-1;0<=T&&(192&v[T])==128;)T--;return T<0||T===0?S:T+u[v[T]]>S?T:S}(m),y=m;p!==m.length&&(o.uint8array?(y=m.subarray(0,p),this.leftOver=m.subarray(p,m.length)):(y=m.slice(0,p),this.leftOver=m.slice(p,m.length))),this.push({data:i.utf8decode(y),meta:d.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=h,s.inherits(f,l),f.prototype.processChunk=function(d){this.push({data:i.utf8encode(d.data),meta:d.meta})},i.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,n,i){var s=e("./support"),o=e("./base64"),a=e("./nodejsUtils"),l=e("./external");function u(g){return g}function c(g,p){for(var y=0;y>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var m,g,p,y=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4>>6:(d<65536?f[p++]=224|d>>>12:(f[p++]=240|d>>>18,f[p++]=128|d>>>12&63),f[p++]=128|d>>>6&63),f[p++]=128|63&d);return f},i.buf2binstring=function(h){return c(h,h.length)},i.binstring2buf=function(h){for(var f=new s.Buf8(h.length),d=0,m=f.length;d>10&1023,v[m++]=56320|1023&g)}return c(v,m)},i.utf8border=function(h,f){var d;for((f=f||h.length)>h.length&&(f=h.length),d=f-1;0<=d&&(192&h[d])==128;)d--;return d<0||d===0?f:d+l[h[d]]>f?d:f}},{"./common":41}],43:[function(e,n,i){n.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}();n.exports=function(o,a,l,u){var c=s,h=u+l;o^=-1;for(var f=u;f>>8^c[255&(o^a[f])];return-1^o}},{}],46:[function(e,n,i){var s,o=e("../utils/common"),a=e("./trees"),l=e("./adler32"),u=e("./crc32"),c=e("./messages"),h=0,f=4,d=0,m=-2,g=-1,p=4,y=2,v=8,S=9,T=286,_=30,M=19,x=2*T+1,N=15,L=3,j=258,it=j+L+1,I=42,Q=113,w=1,nt=2,P=3,C=4;function R(b,K){return b.msg=c[K],K}function U(b){return(b<<1)-(4b.avail_out&&(Z=b.avail_out),Z!==0&&(o.arraySet(b.output,K.pending_buf,K.pending_out,Z,b.next_out),b.next_out+=Z,K.pending_out+=Z,b.total_out+=Z,b.avail_out-=Z,K.pending-=Z,K.pending===0&&(K.pending_out=0))}function O(b,K){a._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,K),b.block_start=b.strstart,A(b.strm)}function $(b,K){b.pending_buf[b.pending++]=K}function tt(b,K){b.pending_buf[b.pending++]=K>>>8&255,b.pending_buf[b.pending++]=255&K}function et(b,K){var Z,B,D=b.max_chain_length,q=b.strstart,ot=b.prev_length,at=b.nice_match,rt=b.strstart>b.w_size-it?b.strstart-(b.w_size-it):0,ht=b.window,St=b.w_mask,pt=b.prev,Ot=b.strstart+j,_e=ht[q+ot-1],ue=ht[q+ot];b.prev_length>=b.good_match&&(D>>=2),at>b.lookahead&&(at=b.lookahead);do if(ht[(Z=K)+ot]===ue&&ht[Z+ot-1]===_e&&ht[Z]===ht[q]&&ht[++Z]===ht[q+1]){q+=2,Z++;do;while(ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&qrt&&--D!=0);return ot<=b.lookahead?ot:b.lookahead}function yt(b){var K,Z,B,D,q,ot,at,rt,ht,St,pt=b.w_size;do{if(D=b.window_size-b.lookahead-b.strstart,b.strstart>=pt+(pt-it)){for(o.arraySet(b.window,b.window,pt,pt,0),b.match_start-=pt,b.strstart-=pt,b.block_start-=pt,K=Z=b.hash_size;B=b.head[--K],b.head[K]=pt<=B?B-pt:0,--Z;);for(K=Z=pt;B=b.prev[--K],b.prev[K]=pt<=B?B-pt:0,--Z;);D+=pt}if(b.strm.avail_in===0)break;if(ot=b.strm,at=b.window,rt=b.strstart+b.lookahead,ht=D,St=void 0,St=ot.avail_in,ht=L)for(q=b.strstart-b.insert,b.ins_h=b.window[q],b.ins_h=(b.ins_h<=L&&(b.ins_h=(b.ins_h<=L)if(B=a._tr_tally(b,b.strstart-b.match_start,b.match_length-L),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=L){for(b.match_length--;b.strstart++,b.ins_h=(b.ins_h<=L&&(b.ins_h=(b.ins_h<=L&&b.match_length<=b.prev_length){for(D=b.strstart+b.lookahead-L,B=a._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-L),b.lookahead-=b.prev_length-1,b.prev_length-=2;++b.strstart<=D&&(b.ins_h=(b.ins_h<b.pending_buf_size-5&&(Z=b.pending_buf_size-5);;){if(b.lookahead<=1){if(yt(b),b.lookahead===0&&K===h)return w;if(b.lookahead===0)break}b.strstart+=b.lookahead,b.lookahead=0;var B=b.block_start+Z;if((b.strstart===0||b.strstart>=B)&&(b.lookahead=b.strstart-B,b.strstart=B,O(b,!1),b.strm.avail_out===0)||b.strstart-b.block_start>=b.w_size-it&&(O(b,!1),b.strm.avail_out===0))return w}return b.insert=0,K===f?(O(b,!0),b.strm.avail_out===0?P:C):(b.strstart>b.block_start&&(O(b,!1),b.strm.avail_out),w)}),new xt(4,4,8,4,_t),new xt(4,5,16,8,_t),new xt(4,6,32,32,_t),new xt(4,4,16,16,ct),new xt(8,16,32,32,ct),new xt(8,16,128,128,ct),new xt(8,32,128,256,ct),new xt(32,128,258,1024,ct),new xt(32,258,258,4096,ct)],i.deflateInit=function(b,K){return de(b,K,v,15,8,0)},i.deflateInit2=de,i.deflateReset=se,i.deflateResetKeep=At,i.deflateSetHeader=function(b,K){return b&&b.state?b.state.wrap!==2?m:(b.state.gzhead=K,d):m},i.deflate=function(b,K){var Z,B,D,q;if(!b||!b.state||5>8&255),$(B,B.gzhead.time>>16&255),$(B,B.gzhead.time>>24&255),$(B,B.level===9?2:2<=B.strategy||B.level<2?4:0),$(B,255&B.gzhead.os),B.gzhead.extra&&B.gzhead.extra.length&&($(B,255&B.gzhead.extra.length),$(B,B.gzhead.extra.length>>8&255)),B.gzhead.hcrc&&(b.adler=u(b.adler,B.pending_buf,B.pending,0)),B.gzindex=0,B.status=69):($(B,0),$(B,0),$(B,0),$(B,0),$(B,0),$(B,B.level===9?2:2<=B.strategy||B.level<2?4:0),$(B,3),B.status=Q);else{var ot=v+(B.w_bits-8<<4)<<8;ot|=(2<=B.strategy||B.level<2?0:B.level<6?1:B.level===6?2:3)<<6,B.strstart!==0&&(ot|=32),ot+=31-ot%31,B.status=Q,tt(B,ot),B.strstart!==0&&(tt(B,b.adler>>>16),tt(B,65535&b.adler)),b.adler=1}if(B.status===69)if(B.gzhead.extra){for(D=B.pending;B.gzindex<(65535&B.gzhead.extra.length)&&(B.pending!==B.pending_buf_size||(B.gzhead.hcrc&&B.pending>D&&(b.adler=u(b.adler,B.pending_buf,B.pending-D,D)),A(b),D=B.pending,B.pending!==B.pending_buf_size));)$(B,255&B.gzhead.extra[B.gzindex]),B.gzindex++;B.gzhead.hcrc&&B.pending>D&&(b.adler=u(b.adler,B.pending_buf,B.pending-D,D)),B.gzindex===B.gzhead.extra.length&&(B.gzindex=0,B.status=73)}else B.status=73;if(B.status===73)if(B.gzhead.name){D=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>D&&(b.adler=u(b.adler,B.pending_buf,B.pending-D,D)),A(b),D=B.pending,B.pending===B.pending_buf_size)){q=1;break}q=B.gzindexD&&(b.adler=u(b.adler,B.pending_buf,B.pending-D,D)),q===0&&(B.gzindex=0,B.status=91)}else B.status=91;if(B.status===91)if(B.gzhead.comment){D=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>D&&(b.adler=u(b.adler,B.pending_buf,B.pending-D,D)),A(b),D=B.pending,B.pending===B.pending_buf_size)){q=1;break}q=B.gzindexD&&(b.adler=u(b.adler,B.pending_buf,B.pending-D,D)),q===0&&(B.status=103)}else B.status=103;if(B.status===103&&(B.gzhead.hcrc?(B.pending+2>B.pending_buf_size&&A(b),B.pending+2<=B.pending_buf_size&&($(B,255&b.adler),$(B,b.adler>>8&255),b.adler=0,B.status=Q)):B.status=Q),B.pending!==0){if(A(b),b.avail_out===0)return B.last_flush=-1,d}else if(b.avail_in===0&&U(K)<=U(Z)&&K!==f)return R(b,-5);if(B.status===666&&b.avail_in!==0)return R(b,-5);if(b.avail_in!==0||B.lookahead!==0||K!==h&&B.status!==666){var at=B.strategy===2?function(rt,ht){for(var St;;){if(rt.lookahead===0&&(yt(rt),rt.lookahead===0)){if(ht===h)return w;break}if(rt.match_length=0,St=a._tr_tally(rt,0,rt.window[rt.strstart]),rt.lookahead--,rt.strstart++,St&&(O(rt,!1),rt.strm.avail_out===0))return w}return rt.insert=0,ht===f?(O(rt,!0),rt.strm.avail_out===0?P:C):rt.last_lit&&(O(rt,!1),rt.strm.avail_out===0)?w:nt}(B,K):B.strategy===3?function(rt,ht){for(var St,pt,Ot,_e,ue=rt.window;;){if(rt.lookahead<=j){if(yt(rt),rt.lookahead<=j&&ht===h)return w;if(rt.lookahead===0)break}if(rt.match_length=0,rt.lookahead>=L&&0rt.lookahead&&(rt.match_length=rt.lookahead)}if(rt.match_length>=L?(St=a._tr_tally(rt,1,rt.match_length-L),rt.lookahead-=rt.match_length,rt.strstart+=rt.match_length,rt.match_length=0):(St=a._tr_tally(rt,0,rt.window[rt.strstart]),rt.lookahead--,rt.strstart++),St&&(O(rt,!1),rt.strm.avail_out===0))return w}return rt.insert=0,ht===f?(O(rt,!0),rt.strm.avail_out===0?P:C):rt.last_lit&&(O(rt,!1),rt.strm.avail_out===0)?w:nt}(B,K):s[B.level].func(B,K);if(at!==P&&at!==C||(B.status=666),at===w||at===P)return b.avail_out===0&&(B.last_flush=-1),d;if(at===nt&&(K===1?a._tr_align(B):K!==5&&(a._tr_stored_block(B,0,0,!1),K===3&&(k(B.head),B.lookahead===0&&(B.strstart=0,B.block_start=0,B.insert=0))),A(b),b.avail_out===0))return B.last_flush=-1,d}return K!==f?d:B.wrap<=0?1:(B.wrap===2?($(B,255&b.adler),$(B,b.adler>>8&255),$(B,b.adler>>16&255),$(B,b.adler>>24&255),$(B,255&b.total_in),$(B,b.total_in>>8&255),$(B,b.total_in>>16&255),$(B,b.total_in>>24&255)):(tt(B,b.adler>>>16),tt(B,65535&b.adler)),A(b),0=Z.w_size&&(q===0&&(k(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),ht=new o.Buf8(Z.w_size),o.arraySet(ht,K,St-Z.w_size,Z.w_size,0),K=ht,St=Z.w_size),ot=b.avail_in,at=b.next_in,rt=b.input,b.avail_in=St,b.next_in=0,b.input=K,yt(Z);Z.lookahead>=L;){for(B=Z.strstart,D=Z.lookahead-(L-1);Z.ins_h=(Z.ins_h<>>=L=N>>>24,S-=L,(L=N>>>16&255)===0)nt[c++]=65535&N;else{if(!(16&L)){if((64&L)==0){N=T[(65535&N)+(v&(1<>>=L,S-=L),S<15&&(v+=w[l++]<>>=L=N>>>24,S-=L,!(16&(L=N>>>16&255))){if((64&L)==0){N=_[(65535&N)+(v&(1<>>=L,S-=L,(L=c-h)>3,v&=(1<<(S-=j<<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 v(){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 Q;return I&&I.state?(Q=I.state,I.total_in=I.total_out=Q.total=0,I.msg="",Q.wrap&&(I.adler=1&Q.wrap),Q.mode=m,Q.last=0,Q.havedict=0,Q.dmax=32768,Q.head=null,Q.hold=0,Q.bits=0,Q.lencode=Q.lendyn=new s.Buf32(g),Q.distcode=Q.distdyn=new s.Buf32(p),Q.sane=1,Q.back=-1,f):d}function T(I){var Q;return I&&I.state?((Q=I.state).wsize=0,Q.whave=0,Q.wnext=0,S(I)):d}function _(I,Q){var w,nt;return I&&I.state?(nt=I.state,Q<0?(w=0,Q=-Q):(w=1+(Q>>4),Q<48&&(Q&=15)),Q&&(Q<8||15=C.wsize?(s.arraySet(C.window,Q,w-C.wsize,C.wsize,0),C.wnext=0,C.whave=C.wsize):(nt<(P=C.wsize-C.wnext)&&(P=nt),s.arraySet(C.window,Q,w-nt,P,C.wnext),(nt-=P)?(s.arraySet(C.window,Q,w-nt,nt,0),C.wnext=nt,C.whave=C.wsize):(C.wnext+=P,C.wnext===C.wsize&&(C.wnext=0),C.whave>>8&255,w.check=a(w.check,q,2,0),O=A=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&A)<<8)+(A>>8))%31){I.msg="incorrect header check",w.mode=30;break}if((15&A)!=8){I.msg="unknown compression method",w.mode=30;break}if(O-=4,b=8+(15&(A>>>=4)),w.wbits===0)w.wbits=b;else if(b>w.wbits){I.msg="invalid window size",w.mode=30;break}w.dmax=1<>8&1),512&w.flags&&(q[0]=255&A,q[1]=A>>>8&255,w.check=a(w.check,q,2,0)),O=A=0,w.mode=3;case 3:for(;O<32;){if(U===0)break t;U--,A+=nt[C++]<>>8&255,q[2]=A>>>16&255,q[3]=A>>>24&255,w.check=a(w.check,q,4,0)),O=A=0,w.mode=4;case 4:for(;O<16;){if(U===0)break t;U--,A+=nt[C++]<>8),512&w.flags&&(q[0]=255&A,q[1]=A>>>8&255,w.check=a(w.check,q,2,0)),O=A=0,w.mode=5;case 5:if(1024&w.flags){for(;O<16;){if(U===0)break t;U--,A+=nt[C++]<>>8&255,w.check=a(w.check,q,2,0)),O=A=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(U<(et=w.length)&&(et=U),et&&(w.head&&(b=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),s.arraySet(w.head.extra,nt,C,et,b)),512&w.flags&&(w.check=a(w.check,nt,et,C)),U-=et,C+=et,w.length-=et),w.length))break t;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(U===0)break t;for(et=0;b=nt[C+et++],w.head&&b&&w.length<65536&&(w.head.name+=String.fromCharCode(b)),b&&et>9&1,w.head.done=!0),I.adler=w.check=0,w.mode=12;break;case 10:for(;O<32;){if(U===0)break t;U--,A+=nt[C++]<>>=7&O,O-=7&O,w.mode=27;break}for(;O<3;){if(U===0)break t;U--,A+=nt[C++]<>>=1)){case 0:w.mode=14;break;case 1:if(j(w),w.mode=20,Q!==6)break;A>>>=2,O-=2;break t;case 2:w.mode=17;break;case 3:I.msg="invalid block type",w.mode=30}A>>>=2,O-=2;break;case 14:for(A>>>=7&O,O-=7&O;O<32;){if(U===0)break t;U--,A+=nt[C++]<>>16^65535)){I.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&A,O=A=0,w.mode=15,Q===6)break t;case 15:w.mode=16;case 16:if(et=w.length){if(U>>=5,O-=5,w.ndist=1+(31&A),A>>>=5,O-=5,w.ncode=4+(15&A),A>>>=4,O-=4,286>>=3,O-=3}for(;w.have<19;)w.lens[ot[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,Z={bits:w.lenbits},K=u(0,w.lens,0,19,w.lencode,0,w.work,Z),w.lenbits=Z.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,bt=65535&D,!((ct=D>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>>=ct,O-=ct,w.lens[w.have++]=bt;else{if(bt===16){for(B=ct+2;O>>=ct,O-=ct,w.have===0){I.msg="invalid bit length repeat",w.mode=30;break}b=w.lens[w.have-1],et=3+(3&A),A>>>=2,O-=2}else if(bt===17){for(B=ct+3;O>>=ct)),A>>>=3,O-=3}else{for(B=ct+7;O>>=ct)),A>>>=7,O-=7}if(w.have+et>w.nlen+w.ndist){I.msg="invalid bit length repeat",w.mode=30;break}for(;et--;)w.lens[w.have++]=b}}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,Z={bits:w.lenbits},K=u(c,w.lens,0,w.nlen,w.lencode,0,w.work,Z),w.lenbits=Z.bits,K){I.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,Z={bits:w.distbits},K=u(h,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,Z),w.distbits=Z.bits,K){I.msg="invalid distances set",w.mode=30;break}if(w.mode=20,Q===6)break t;case 20:w.mode=21;case 21:if(6<=U&&258<=k){I.next_out=R,I.avail_out=k,I.next_in=C,I.avail_in=U,w.hold=A,w.bits=O,l(I,tt),R=I.next_out,P=I.output,k=I.avail_out,C=I.next_in,nt=I.input,U=I.avail_in,A=w.hold,O=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;xt=(D=w.lencode[A&(1<>>16&255,bt=65535&D,!((ct=D>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>At)])>>>16&255,bt=65535&D,!(At+(ct=D>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>>=At,O-=At,w.back+=At}if(A>>>=ct,O-=ct,w.back+=ct,w.length=bt,xt===0){w.mode=26;break}if(32&xt){w.back=-1,w.mode=12;break}if(64&xt){I.msg="invalid literal/length code",w.mode=30;break}w.extra=15&xt,w.mode=22;case 22:if(w.extra){for(B=w.extra;O>>=w.extra,O-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;xt=(D=w.distcode[A&(1<>>16&255,bt=65535&D,!((ct=D>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>At)])>>>16&255,bt=65535&D,!(At+(ct=D>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>>=At,O-=At,w.back+=At}if(A>>>=ct,O-=ct,w.back+=ct,64&xt){I.msg="invalid distance code",w.mode=30;break}w.offset=bt,w.extra=15&xt,w.mode=24;case 24:if(w.extra){for(B=w.extra;O>>=w.extra,O-=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(et=tt-k,w.offset>et){if((et=w.offset-et)>w.whave&&w.sane){I.msg="invalid distance too far back",w.mode=30;break}yt=et>w.wnext?(et-=w.wnext,w.wsize-et):w.wnext-et,et>w.length&&(et=w.length),_t=w.window}else _t=P,yt=R-w.offset,et=w.length;for(kx?(L=yt[_t+p[Q]],O[$+p[Q]]):(L=96,0),v=1<>R)+(S-=v)]=N<<24|L<<16|j|0,S!==0;);for(v=1<>=1;if(v!==0?(A&=v-1,A+=v):A=0,Q++,--tt[I]==0){if(I===nt)break;I=h[f+p[Q]]}if(P>>7)]}function $(D,q){D.pending_buf[D.pending++]=255&q,D.pending_buf[D.pending++]=q>>>8&255}function tt(D,q,ot){D.bi_valid>y-ot?(D.bi_buf|=q<>y-D.bi_valid,D.bi_valid+=ot-y):(D.bi_buf|=q<>>=1,ot<<=1,0<--q;);return ot>>>1}function _t(D,q,ot){var at,rt,ht=new Array(p+1),St=0;for(at=1;at<=p;at++)ht[at]=St=St+ot[at-1]<<1;for(rt=0;rt<=q;rt++){var pt=D[2*rt+1];pt!==0&&(D[2*rt]=yt(ht[pt]++,pt))}}function ct(D){var q;for(q=0;q>1;1<=ot;ot--)At(D,ht,ot);for(rt=Ot;ot=D.heap[1],D.heap[1]=D.heap[D.heap_len--],At(D,ht,1),at=D.heap[1],D.heap[--D.heap_max]=ot,D.heap[--D.heap_max]=at,ht[2*rt]=ht[2*ot]+ht[2*at],D.depth[rt]=(D.depth[ot]>=D.depth[at]?D.depth[ot]:D.depth[at])+1,ht[2*ot+1]=ht[2*at+1]=rt,D.heap[1]=rt++,At(D,ht,1),2<=D.heap_len;);D.heap[--D.heap_max]=D.heap[1],function(ue,sr){var fr,vr,gn,Ce,In,Ei,Fr=sr.dyn_tree,Ai=sr.max_code,is=sr.stat_desc.static_tree,ua=sr.stat_desc.has_stree,Xr=sr.stat_desc.extra_bits,ss=sr.stat_desc.extra_base,ni=sr.stat_desc.max_length,Yr=0;for(Ce=0;Ce<=p;Ce++)ue.bl_count[Ce]=0;for(Fr[2*ue.heap[ue.heap_max]+1]=0,fr=ue.heap_max+1;fr>=7;rt>>=1)if(1&_e&&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=D.static_len+3+7>>>3)<=rt&&(rt=ht)):rt=ht=ot+5,ot+4<=rt&&q!==-1?B(D,q,ot,at):D.strategy===4||ht===rt?(tt(D,2+(at?1:0),3),se(D,it,I)):(tt(D,4+(at?1:0),3),function(pt,Ot,_e,ue){var sr;for(tt(pt,Ot-257,5),tt(pt,_e-1,5),tt(pt,ue-4,4),sr=0;sr>>8&255,D.pending_buf[D.d_buf+2*D.last_lit+1]=255&q,D.pending_buf[D.l_buf+D.last_lit]=255&ot,D.last_lit++,q===0?D.dyn_ltree[2*ot]++:(D.matches++,q--,D.dyn_ltree[2*(w[ot]+h+1)]++,D.dyn_dtree[2*O(q)]++),D.last_lit===D.lit_bufsize-1},i._tr_align=function(D){tt(D,2,3),et(D,S,it),function(q){q.bi_valid===16?($(q,q.bi_buf),q.bi_buf=0,q.bi_valid=0):8<=q.bi_valid&&(q.pending_buf[q.pending++]=255&q.bi_buf,q.bi_buf>>=8,q.bi_valid-=8)}(D)}},{"../utils/common":41}],53:[function(e,n,i){n.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,n,i){(function(s){(function(o,a){if(!o.setImmediate){var l,u,c,h,f=1,d={},m=!1,g=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,l={}.toString.call(o.process)==="[object process]"?function(T){process.nextTick(function(){v(T)})}:function(){if(o.postMessage&&!o.importScripts){var T=!0,_=o.onmessage;return o.onmessage=function(){T=!1},o.postMessage("","*"),o.onmessage=_,T}}()?(h="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",S,!1):o.attachEvent("onmessage",S),function(T){o.postMessage(h+T,"*")}):o.MessageChannel?((c=new MessageChannel).port1.onmessage=function(T){v(T.data)},function(T){c.port2.postMessage(T)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(T){var _=g.createElement("script");_.onreadystatechange=function(){v(T),_.onreadystatechange=null,u.removeChild(_),_=null},u.appendChild(_)}):function(T){setTimeout(v,0,T)},p.setImmediate=function(T){typeof T!="function"&&(T=new Function(""+T));for(var _=new Array(arguments.length-1),M=0;M<_.length;M++)_[M]=arguments[M+1];var x={callback:T,args:_};return d[f]=x,l(f),f++},p.clearImmediate=y}function y(T){delete d[T]}function v(T){if(m)setTimeout(v,0,T);else{var _=d[T];if(_){m=!0;try{(function(M){var x=M.callback,N=M.args;switch(N.length){case 0:x();break;case 1:x(N[0]);break;case 2:x(N[0],N[1]);break;case 3:x(N[0],N[1],N[2]);break;default:x.apply(a,N)}})(_)}finally{y(T),m=!1}}}}function S(T){T.source===o&&typeof T.data=="string"&&T.data.indexOf(h)===0&&v(+T.data.slice(h.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof $n<"u"?$n:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(of)),of.exports}var H5=W5();const X5=Xp(H5);ei.zipReader=(r,t)=>X5.loadAsync(r);const Y5=ei.createSettings;ei.createSettings=async r=>{const t=Object.keys(r.files);return t.find(e=>q5(e))?Y5(r):K5(t)};function q5(r){return r.endsWith("model3.json")}function Q5(r){return r.endsWith(".moc3")}function Z5(r){return r.split(/[\\/]/).pop()}function K5(r){const t=r.filter(u=>Q5(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],n=Z5(e).replace(/\.moc3?/,""),i=r.filter(u=>u.endsWith(".png"));if(!i.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 Ns({url:`${n}.model3.json`,Version:3,FileReferences:{Moc:e,Textures:i,Physics:o,Pose:a,Motions:s.length?{"":s.map(u=>({File:u}))}:void 0}});return l.name=n,l._objectURL=`example://${l.url}`,l}ei.readText=(r,t)=>{const e=r.file(t);if(!e)throw new Error(`Cannot find file: ${t}`);return e.async("text")};ei.getFilePaths=r=>{const t=[];return r.forEach(e=>t.push(e)),Promise.resolve(t)};ei.getFiles=(r,t)=>Promise.all(t.map(async e=>{const n=e.slice(e.lastIndexOf("/")+1),i=await r.file(e).async("blob");return new File([i],n)}));export{h2 as A,s8 as D,n8 as I,X5 as J,OC as L,vf as M,r8 as T,a8 as V,Nn as a,je as b,QC as c,u8 as d,bl as e,l8 as f,sa as g,Xv as h,v_ as i,i8 as l,o8 as r,Y as s}; +*/var __;function W5(){return __||(__=1,function(r,t){(function(e){r.exports=e()})(function(){return function e(n,i,s){function o(u,c){if(!i[u]){if(!n[u]){var h=typeof ki=="function"&&ki;if(!c&&h)return h(u,!0);if(a)return a(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var d=i[u]={exports:{}};n[u][0].call(d.exports,function(m){var g=n[u][1][m];return o(g||m)},d,d.exports,e,n,i,s)}return i[u].exports}for(var a=typeof ki=="function"&&ki,l=0;l>2,d=(3&u)<<4|c>>4,m=1>6:64,g=2>4,c=(15&f)<<4|(d=a.indexOf(l.charAt(g++)))>>2,h=(3&d)<<6|(m=a.indexOf(l.charAt(g++))),v[p++]=u,d!==64&&(v[p++]=c),m!==64&&(v[p++]=h);return v}},{"./support":30,"./utils":32}],2:[function(e,n,i){var s=e("./external"),o=e("./stream/DataWorker"),a=e("./stream/Crc32Probe"),l=e("./stream/DataLengthProbe");function u(c,h,f,d,m){this.compressedSize=c,this.uncompressedSize=h,this.crc32=f,this.compression=d,this.compressedContent=m}u.prototype={getContentWorker:function(){var c=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),h=this;return c.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),c},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(c,h,f){return c.pipe(new a).pipe(new l("uncompressedSize")).pipe(h.compressWorker(f)).pipe(new l("compressedSize")).withStreamInfo("compression",h)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,n,i){var s=e("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,n,i){var s=e("./utils"),o=function(){for(var a,l=[],u=0;u<256;u++){a=u;for(var c=0;c<8;c++)a=1&a?3988292384^a>>>1:a>>>1;l[u]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?function(u,c,h,f){var d=o,m=f+h;u^=-1;for(var g=f;g>>8^d[255&(u^c[g])];return-1^u}(0|l,a,a.length,0):function(u,c,h,f){var d=o,m=f+h;u^=-1;for(var g=f;g>>8^d[255&(u^c.charCodeAt(g))];return-1^u}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(e,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(e,n,i){var s=null;s=typeof Promise<"u"?Promise:e("lie"),n.exports={Promise:s}},{lie:37}],7:[function(e,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=e("pako"),a=e("./utils"),l=e("./stream/GenericWorker"),u=s?"uint8array":"array";function c(h,f){l.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=f,this.meta={}}i.magic="\b\0",a.inherits(c,l),c.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,h.data),!1)},c.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(f){h.push({data:f,meta:h.meta})}},i.compressWorker=function(h){return new c("Deflate",h)},i.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,n,i){function s(d,m){var g,p="";for(g=0;g>>=8;return p}function o(d,m,g,p,y,v){var S,T,_=d.file,M=d.compression,x=v!==u.utf8encode,N=a.transformTo("string",v(_.name)),D=a.transformTo("string",u.utf8encode(_.name)),j=_.comment,it=a.transformTo("string",v(j)),I=a.transformTo("string",u.utf8encode(j)),Q=D.length!==_.name.length,w=I.length!==j.length,nt="",P="",C="",R=_.dir,U=_.date,k={crc32:0,compressedSize:0,uncompressedSize:0};m&&!g||(k.crc32=d.crc32,k.compressedSize=d.compressedSize,k.uncompressedSize=d.uncompressedSize);var A=0;m&&(A|=8),x||!Q&&!w||(A|=2048);var O=0,$=0;R&&(O|=16),y==="UNIX"?($=798,O|=function(et,yt){var _t=et;return et||(_t=yt?16893:33204),(65535&_t)<<16}(_.unixPermissions,R)):($=20,O|=function(et){return 63&(et||0)}(_.dosPermissions)),S=U.getUTCHours(),S<<=6,S|=U.getUTCMinutes(),S<<=5,S|=U.getUTCSeconds()/2,T=U.getUTCFullYear()-1980,T<<=4,T|=U.getUTCMonth()+1,T<<=5,T|=U.getUTCDate(),Q&&(P=s(1,1)+s(c(N),4)+D,nt+="up"+s(P.length,2)+P),w&&(C=s(1,1)+s(c(it),4)+I,nt+="uc"+s(C.length,2)+C);var tt="";return tt+=` +\0`,tt+=s(A,2),tt+=M.magic,tt+=s(S,2),tt+=s(T,2),tt+=s(k.crc32,4),tt+=s(k.compressedSize,4),tt+=s(k.uncompressedSize,4),tt+=s(N.length,2),tt+=s(nt.length,2),{fileRecord:h.LOCAL_FILE_HEADER+tt+N+nt,dirRecord:h.CENTRAL_FILE_HEADER+s($,2)+tt+s(it.length,2)+"\0\0\0\0"+s(O,4)+s(p,4)+N+nt+it}}var a=e("../utils"),l=e("../stream/GenericWorker"),u=e("../utf8"),c=e("../crc32"),h=e("../signature");function f(d,m,g,p){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=g,this.encodeFileName=p,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(f,l),f.prototype.push=function(d){var m=d.meta.percent||0,g=this.entriesCount,p=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,l.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:g?(m+100*(g-p-1))/g:100}}))},f.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var m=this.streamFiles&&!d.file.dir;if(m){var g=o(d,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},f.prototype.closedSource=function(d){this.accumulate=!1;var m=this.streamFiles&&!d.file.dir,g=o(d,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),m)this.push({data:function(p){return h.DATA_DESCRIPTOR+s(p.crc32,4)+s(p.compressedSize,4)+s(p.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},f.prototype.flush=function(){for(var d=this.bytesWritten,m=0;m=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))}},n.exports=o},{"../utils":32}],19:[function(e,n,i){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},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,n,i){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},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,n,i){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},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,n,i){var s=e("../utils"),o=e("../support"),a=e("./ArrayReader"),l=e("./StringReader"),u=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");n.exports=function(h){var f=s.getTypeOf(h);return s.checkSupport(f),f!=="string"||o.uint8array?f==="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,n,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,n,i){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})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,n,i){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)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,n,i){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)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,n,i){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}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,n,i){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}},n.exports=s},{}],29:[function(e,n,i){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 f(m,g){return new c.Promise(function(p,y){var v=[],S=m._internalType,T=m._outputType,_=m._mimeType;m.on("data",function(M,x){v.push(M),g&&g(x)}).on("error",function(M){v=[],y(M)}).on("end",function(){try{var M=function(x,N,D){switch(x){case"blob":return s.newBlob(s.transformTo("arraybuffer",N),D);case"base64":return l.encode(N);default:return s.transformTo(x,N)}}(T,function(x,N){var D,j=0,it=null,I=0;for(D=0;D"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.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),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!e("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(e,n,i){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 f(){l.call(this,"utf-8 encode")}i.utf8encode=function(d){return o.nodebuffer?a.newBufferFrom(d,"utf-8"):function(m){var g,p,y,v,S,T=m.length,_=0;for(v=0;v>>6:(p<65536?g[S++]=224|p>>>12:(g[S++]=240|p>>>18,g[S++]=128|p>>>12&63),g[S++]=128|p>>>6&63),g[S++]=128|63&p);return g}(d)},i.utf8decode=function(d){return o.nodebuffer?s.transformTo("nodebuffer",d).toString("utf-8"):function(m){var g,p,y,v,S=m.length,T=new Array(2*S);for(g=p=0;g>10&1023,T[p++]=56320|1023&y)}return T.length!==p&&(T.subarray?T=T.subarray(0,p):T.length=p),s.applyFromCharCode(T)}(d=s.transformTo(o.uint8array?"uint8array":"array",d))},s.inherits(h,l),h.prototype.processChunk=function(d){var m=s.transformTo(o.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=m;(m=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),m.set(g,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var p=function(v,S){var T;for((S=S||v.length)>v.length&&(S=v.length),T=S-1;0<=T&&(192&v[T])==128;)T--;return T<0||T===0?S:T+u[v[T]]>S?T:S}(m),y=m;p!==m.length&&(o.uint8array?(y=m.subarray(0,p),this.leftOver=m.subarray(p,m.length)):(y=m.slice(0,p),this.leftOver=m.slice(p,m.length))),this.push({data:i.utf8decode(y),meta:d.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=h,s.inherits(f,l),f.prototype.processChunk=function(d){this.push({data:i.utf8encode(d.data),meta:d.meta})},i.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,n,i){var s=e("./support"),o=e("./base64"),a=e("./nodejsUtils"),l=e("./external");function u(g){return g}function c(g,p){for(var y=0;y>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var m,g,p,y=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4>>6:(d<65536?f[p++]=224|d>>>12:(f[p++]=240|d>>>18,f[p++]=128|d>>>12&63),f[p++]=128|d>>>6&63),f[p++]=128|63&d);return f},i.buf2binstring=function(h){return c(h,h.length)},i.binstring2buf=function(h){for(var f=new s.Buf8(h.length),d=0,m=f.length;d>10&1023,v[m++]=56320|1023&g)}return c(v,m)},i.utf8border=function(h,f){var d;for((f=f||h.length)>h.length&&(f=h.length),d=f-1;0<=d&&(192&h[d])==128;)d--;return d<0||d===0?f:d+l[h[d]]>f?d:f}},{"./common":41}],43:[function(e,n,i){n.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}();n.exports=function(o,a,l,u){var c=s,h=u+l;o^=-1;for(var f=u;f>>8^c[255&(o^a[f])];return-1^o}},{}],46:[function(e,n,i){var s,o=e("../utils/common"),a=e("./trees"),l=e("./adler32"),u=e("./crc32"),c=e("./messages"),h=0,f=4,d=0,m=-2,g=-1,p=4,y=2,v=8,S=9,T=286,_=30,M=19,x=2*T+1,N=15,D=3,j=258,it=j+D+1,I=42,Q=113,w=1,nt=2,P=3,C=4;function R(b,K){return b.msg=c[K],K}function U(b){return(b<<1)-(4b.avail_out&&(Z=b.avail_out),Z!==0&&(o.arraySet(b.output,K.pending_buf,K.pending_out,Z,b.next_out),b.next_out+=Z,K.pending_out+=Z,b.total_out+=Z,b.avail_out-=Z,K.pending-=Z,K.pending===0&&(K.pending_out=0))}function O(b,K){a._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,K),b.block_start=b.strstart,A(b.strm)}function $(b,K){b.pending_buf[b.pending++]=K}function tt(b,K){b.pending_buf[b.pending++]=K>>>8&255,b.pending_buf[b.pending++]=255&K}function et(b,K){var Z,B,L=b.max_chain_length,q=b.strstart,ot=b.prev_length,at=b.nice_match,rt=b.strstart>b.w_size-it?b.strstart-(b.w_size-it):0,ht=b.window,St=b.w_mask,pt=b.prev,Ot=b.strstart+j,_e=ht[q+ot-1],ue=ht[q+ot];b.prev_length>=b.good_match&&(L>>=2),at>b.lookahead&&(at=b.lookahead);do if(ht[(Z=K)+ot]===ue&&ht[Z+ot-1]===_e&&ht[Z]===ht[q]&&ht[++Z]===ht[q+1]){q+=2,Z++;do;while(ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&ht[++q]===ht[++Z]&&qrt&&--L!=0);return ot<=b.lookahead?ot:b.lookahead}function yt(b){var K,Z,B,L,q,ot,at,rt,ht,St,pt=b.w_size;do{if(L=b.window_size-b.lookahead-b.strstart,b.strstart>=pt+(pt-it)){for(o.arraySet(b.window,b.window,pt,pt,0),b.match_start-=pt,b.strstart-=pt,b.block_start-=pt,K=Z=b.hash_size;B=b.head[--K],b.head[K]=pt<=B?B-pt:0,--Z;);for(K=Z=pt;B=b.prev[--K],b.prev[K]=pt<=B?B-pt:0,--Z;);L+=pt}if(b.strm.avail_in===0)break;if(ot=b.strm,at=b.window,rt=b.strstart+b.lookahead,ht=L,St=void 0,St=ot.avail_in,ht=D)for(q=b.strstart-b.insert,b.ins_h=b.window[q],b.ins_h=(b.ins_h<=D&&(b.ins_h=(b.ins_h<=D)if(B=a._tr_tally(b,b.strstart-b.match_start,b.match_length-D),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=D){for(b.match_length--;b.strstart++,b.ins_h=(b.ins_h<=D&&(b.ins_h=(b.ins_h<=D&&b.match_length<=b.prev_length){for(L=b.strstart+b.lookahead-D,B=a._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-D),b.lookahead-=b.prev_length-1,b.prev_length-=2;++b.strstart<=L&&(b.ins_h=(b.ins_h<b.pending_buf_size-5&&(Z=b.pending_buf_size-5);;){if(b.lookahead<=1){if(yt(b),b.lookahead===0&&K===h)return w;if(b.lookahead===0)break}b.strstart+=b.lookahead,b.lookahead=0;var B=b.block_start+Z;if((b.strstart===0||b.strstart>=B)&&(b.lookahead=b.strstart-B,b.strstart=B,O(b,!1),b.strm.avail_out===0)||b.strstart-b.block_start>=b.w_size-it&&(O(b,!1),b.strm.avail_out===0))return w}return b.insert=0,K===f?(O(b,!0),b.strm.avail_out===0?P:C):(b.strstart>b.block_start&&(O(b,!1),b.strm.avail_out),w)}),new xt(4,4,8,4,_t),new xt(4,5,16,8,_t),new xt(4,6,32,32,_t),new xt(4,4,16,16,ct),new xt(8,16,32,32,ct),new xt(8,16,128,128,ct),new xt(8,32,128,256,ct),new xt(32,128,258,1024,ct),new xt(32,258,258,4096,ct)],i.deflateInit=function(b,K){return de(b,K,v,15,8,0)},i.deflateInit2=de,i.deflateReset=se,i.deflateResetKeep=At,i.deflateSetHeader=function(b,K){return b&&b.state?b.state.wrap!==2?m:(b.state.gzhead=K,d):m},i.deflate=function(b,K){var Z,B,L,q;if(!b||!b.state||5>8&255),$(B,B.gzhead.time>>16&255),$(B,B.gzhead.time>>24&255),$(B,B.level===9?2:2<=B.strategy||B.level<2?4:0),$(B,255&B.gzhead.os),B.gzhead.extra&&B.gzhead.extra.length&&($(B,255&B.gzhead.extra.length),$(B,B.gzhead.extra.length>>8&255)),B.gzhead.hcrc&&(b.adler=u(b.adler,B.pending_buf,B.pending,0)),B.gzindex=0,B.status=69):($(B,0),$(B,0),$(B,0),$(B,0),$(B,0),$(B,B.level===9?2:2<=B.strategy||B.level<2?4:0),$(B,3),B.status=Q);else{var ot=v+(B.w_bits-8<<4)<<8;ot|=(2<=B.strategy||B.level<2?0:B.level<6?1:B.level===6?2:3)<<6,B.strstart!==0&&(ot|=32),ot+=31-ot%31,B.status=Q,tt(B,ot),B.strstart!==0&&(tt(B,b.adler>>>16),tt(B,65535&b.adler)),b.adler=1}if(B.status===69)if(B.gzhead.extra){for(L=B.pending;B.gzindex<(65535&B.gzhead.extra.length)&&(B.pending!==B.pending_buf_size||(B.gzhead.hcrc&&B.pending>L&&(b.adler=u(b.adler,B.pending_buf,B.pending-L,L)),A(b),L=B.pending,B.pending!==B.pending_buf_size));)$(B,255&B.gzhead.extra[B.gzindex]),B.gzindex++;B.gzhead.hcrc&&B.pending>L&&(b.adler=u(b.adler,B.pending_buf,B.pending-L,L)),B.gzindex===B.gzhead.extra.length&&(B.gzindex=0,B.status=73)}else B.status=73;if(B.status===73)if(B.gzhead.name){L=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>L&&(b.adler=u(b.adler,B.pending_buf,B.pending-L,L)),A(b),L=B.pending,B.pending===B.pending_buf_size)){q=1;break}q=B.gzindexL&&(b.adler=u(b.adler,B.pending_buf,B.pending-L,L)),q===0&&(B.gzindex=0,B.status=91)}else B.status=91;if(B.status===91)if(B.gzhead.comment){L=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>L&&(b.adler=u(b.adler,B.pending_buf,B.pending-L,L)),A(b),L=B.pending,B.pending===B.pending_buf_size)){q=1;break}q=B.gzindexL&&(b.adler=u(b.adler,B.pending_buf,B.pending-L,L)),q===0&&(B.status=103)}else B.status=103;if(B.status===103&&(B.gzhead.hcrc?(B.pending+2>B.pending_buf_size&&A(b),B.pending+2<=B.pending_buf_size&&($(B,255&b.adler),$(B,b.adler>>8&255),b.adler=0,B.status=Q)):B.status=Q),B.pending!==0){if(A(b),b.avail_out===0)return B.last_flush=-1,d}else if(b.avail_in===0&&U(K)<=U(Z)&&K!==f)return R(b,-5);if(B.status===666&&b.avail_in!==0)return R(b,-5);if(b.avail_in!==0||B.lookahead!==0||K!==h&&B.status!==666){var at=B.strategy===2?function(rt,ht){for(var St;;){if(rt.lookahead===0&&(yt(rt),rt.lookahead===0)){if(ht===h)return w;break}if(rt.match_length=0,St=a._tr_tally(rt,0,rt.window[rt.strstart]),rt.lookahead--,rt.strstart++,St&&(O(rt,!1),rt.strm.avail_out===0))return w}return rt.insert=0,ht===f?(O(rt,!0),rt.strm.avail_out===0?P:C):rt.last_lit&&(O(rt,!1),rt.strm.avail_out===0)?w:nt}(B,K):B.strategy===3?function(rt,ht){for(var St,pt,Ot,_e,ue=rt.window;;){if(rt.lookahead<=j){if(yt(rt),rt.lookahead<=j&&ht===h)return w;if(rt.lookahead===0)break}if(rt.match_length=0,rt.lookahead>=D&&0rt.lookahead&&(rt.match_length=rt.lookahead)}if(rt.match_length>=D?(St=a._tr_tally(rt,1,rt.match_length-D),rt.lookahead-=rt.match_length,rt.strstart+=rt.match_length,rt.match_length=0):(St=a._tr_tally(rt,0,rt.window[rt.strstart]),rt.lookahead--,rt.strstart++),St&&(O(rt,!1),rt.strm.avail_out===0))return w}return rt.insert=0,ht===f?(O(rt,!0),rt.strm.avail_out===0?P:C):rt.last_lit&&(O(rt,!1),rt.strm.avail_out===0)?w:nt}(B,K):s[B.level].func(B,K);if(at!==P&&at!==C||(B.status=666),at===w||at===P)return b.avail_out===0&&(B.last_flush=-1),d;if(at===nt&&(K===1?a._tr_align(B):K!==5&&(a._tr_stored_block(B,0,0,!1),K===3&&(k(B.head),B.lookahead===0&&(B.strstart=0,B.block_start=0,B.insert=0))),A(b),b.avail_out===0))return B.last_flush=-1,d}return K!==f?d:B.wrap<=0?1:(B.wrap===2?($(B,255&b.adler),$(B,b.adler>>8&255),$(B,b.adler>>16&255),$(B,b.adler>>24&255),$(B,255&b.total_in),$(B,b.total_in>>8&255),$(B,b.total_in>>16&255),$(B,b.total_in>>24&255)):(tt(B,b.adler>>>16),tt(B,65535&b.adler)),A(b),0=Z.w_size&&(q===0&&(k(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),ht=new o.Buf8(Z.w_size),o.arraySet(ht,K,St-Z.w_size,Z.w_size,0),K=ht,St=Z.w_size),ot=b.avail_in,at=b.next_in,rt=b.input,b.avail_in=St,b.next_in=0,b.input=K,yt(Z);Z.lookahead>=D;){for(B=Z.strstart,L=Z.lookahead-(D-1);Z.ins_h=(Z.ins_h<>>=D=N>>>24,S-=D,(D=N>>>16&255)===0)nt[c++]=65535&N;else{if(!(16&D)){if((64&D)==0){N=T[(65535&N)+(v&(1<>>=D,S-=D),S<15&&(v+=w[l++]<>>=D=N>>>24,S-=D,!(16&(D=N>>>16&255))){if((64&D)==0){N=_[(65535&N)+(v&(1<>>=D,S-=D,(D=c-h)>3,v&=(1<<(S-=j<<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 v(){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 Q;return I&&I.state?(Q=I.state,I.total_in=I.total_out=Q.total=0,I.msg="",Q.wrap&&(I.adler=1&Q.wrap),Q.mode=m,Q.last=0,Q.havedict=0,Q.dmax=32768,Q.head=null,Q.hold=0,Q.bits=0,Q.lencode=Q.lendyn=new s.Buf32(g),Q.distcode=Q.distdyn=new s.Buf32(p),Q.sane=1,Q.back=-1,f):d}function T(I){var Q;return I&&I.state?((Q=I.state).wsize=0,Q.whave=0,Q.wnext=0,S(I)):d}function _(I,Q){var w,nt;return I&&I.state?(nt=I.state,Q<0?(w=0,Q=-Q):(w=1+(Q>>4),Q<48&&(Q&=15)),Q&&(Q<8||15=C.wsize?(s.arraySet(C.window,Q,w-C.wsize,C.wsize,0),C.wnext=0,C.whave=C.wsize):(nt<(P=C.wsize-C.wnext)&&(P=nt),s.arraySet(C.window,Q,w-nt,P,C.wnext),(nt-=P)?(s.arraySet(C.window,Q,w-nt,nt,0),C.wnext=nt,C.whave=C.wsize):(C.wnext+=P,C.wnext===C.wsize&&(C.wnext=0),C.whave>>8&255,w.check=a(w.check,q,2,0),O=A=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&A)<<8)+(A>>8))%31){I.msg="incorrect header check",w.mode=30;break}if((15&A)!=8){I.msg="unknown compression method",w.mode=30;break}if(O-=4,b=8+(15&(A>>>=4)),w.wbits===0)w.wbits=b;else if(b>w.wbits){I.msg="invalid window size",w.mode=30;break}w.dmax=1<>8&1),512&w.flags&&(q[0]=255&A,q[1]=A>>>8&255,w.check=a(w.check,q,2,0)),O=A=0,w.mode=3;case 3:for(;O<32;){if(U===0)break t;U--,A+=nt[C++]<>>8&255,q[2]=A>>>16&255,q[3]=A>>>24&255,w.check=a(w.check,q,4,0)),O=A=0,w.mode=4;case 4:for(;O<16;){if(U===0)break t;U--,A+=nt[C++]<>8),512&w.flags&&(q[0]=255&A,q[1]=A>>>8&255,w.check=a(w.check,q,2,0)),O=A=0,w.mode=5;case 5:if(1024&w.flags){for(;O<16;){if(U===0)break t;U--,A+=nt[C++]<>>8&255,w.check=a(w.check,q,2,0)),O=A=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(U<(et=w.length)&&(et=U),et&&(w.head&&(b=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),s.arraySet(w.head.extra,nt,C,et,b)),512&w.flags&&(w.check=a(w.check,nt,et,C)),U-=et,C+=et,w.length-=et),w.length))break t;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(U===0)break t;for(et=0;b=nt[C+et++],w.head&&b&&w.length<65536&&(w.head.name+=String.fromCharCode(b)),b&&et>9&1,w.head.done=!0),I.adler=w.check=0,w.mode=12;break;case 10:for(;O<32;){if(U===0)break t;U--,A+=nt[C++]<>>=7&O,O-=7&O,w.mode=27;break}for(;O<3;){if(U===0)break t;U--,A+=nt[C++]<>>=1)){case 0:w.mode=14;break;case 1:if(j(w),w.mode=20,Q!==6)break;A>>>=2,O-=2;break t;case 2:w.mode=17;break;case 3:I.msg="invalid block type",w.mode=30}A>>>=2,O-=2;break;case 14:for(A>>>=7&O,O-=7&O;O<32;){if(U===0)break t;U--,A+=nt[C++]<>>16^65535)){I.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&A,O=A=0,w.mode=15,Q===6)break t;case 15:w.mode=16;case 16:if(et=w.length){if(U>>=5,O-=5,w.ndist=1+(31&A),A>>>=5,O-=5,w.ncode=4+(15&A),A>>>=4,O-=4,286>>=3,O-=3}for(;w.have<19;)w.lens[ot[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,Z={bits:w.lenbits},K=u(0,w.lens,0,19,w.lencode,0,w.work,Z),w.lenbits=Z.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,bt=65535&L,!((ct=L>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>>=ct,O-=ct,w.lens[w.have++]=bt;else{if(bt===16){for(B=ct+2;O>>=ct,O-=ct,w.have===0){I.msg="invalid bit length repeat",w.mode=30;break}b=w.lens[w.have-1],et=3+(3&A),A>>>=2,O-=2}else if(bt===17){for(B=ct+3;O>>=ct)),A>>>=3,O-=3}else{for(B=ct+7;O>>=ct)),A>>>=7,O-=7}if(w.have+et>w.nlen+w.ndist){I.msg="invalid bit length repeat",w.mode=30;break}for(;et--;)w.lens[w.have++]=b}}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,Z={bits:w.lenbits},K=u(c,w.lens,0,w.nlen,w.lencode,0,w.work,Z),w.lenbits=Z.bits,K){I.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,Z={bits:w.distbits},K=u(h,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,Z),w.distbits=Z.bits,K){I.msg="invalid distances set",w.mode=30;break}if(w.mode=20,Q===6)break t;case 20:w.mode=21;case 21:if(6<=U&&258<=k){I.next_out=R,I.avail_out=k,I.next_in=C,I.avail_in=U,w.hold=A,w.bits=O,l(I,tt),R=I.next_out,P=I.output,k=I.avail_out,C=I.next_in,nt=I.input,U=I.avail_in,A=w.hold,O=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;xt=(L=w.lencode[A&(1<>>16&255,bt=65535&L,!((ct=L>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>At)])>>>16&255,bt=65535&L,!(At+(ct=L>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>>=At,O-=At,w.back+=At}if(A>>>=ct,O-=ct,w.back+=ct,w.length=bt,xt===0){w.mode=26;break}if(32&xt){w.back=-1,w.mode=12;break}if(64&xt){I.msg="invalid literal/length code",w.mode=30;break}w.extra=15&xt,w.mode=22;case 22:if(w.extra){for(B=w.extra;O>>=w.extra,O-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;xt=(L=w.distcode[A&(1<>>16&255,bt=65535&L,!((ct=L>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>At)])>>>16&255,bt=65535&L,!(At+(ct=L>>>24)<=O);){if(U===0)break t;U--,A+=nt[C++]<>>=At,O-=At,w.back+=At}if(A>>>=ct,O-=ct,w.back+=ct,64&xt){I.msg="invalid distance code",w.mode=30;break}w.offset=bt,w.extra=15&xt,w.mode=24;case 24:if(w.extra){for(B=w.extra;O>>=w.extra,O-=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(et=tt-k,w.offset>et){if((et=w.offset-et)>w.whave&&w.sane){I.msg="invalid distance too far back",w.mode=30;break}yt=et>w.wnext?(et-=w.wnext,w.wsize-et):w.wnext-et,et>w.length&&(et=w.length),_t=w.window}else _t=P,yt=R-w.offset,et=w.length;for(kx?(D=yt[_t+p[Q]],O[$+p[Q]]):(D=96,0),v=1<>R)+(S-=v)]=N<<24|D<<16|j|0,S!==0;);for(v=1<>=1;if(v!==0?(A&=v-1,A+=v):A=0,Q++,--tt[I]==0){if(I===nt)break;I=h[f+p[Q]]}if(P>>7)]}function $(L,q){L.pending_buf[L.pending++]=255&q,L.pending_buf[L.pending++]=q>>>8&255}function tt(L,q,ot){L.bi_valid>y-ot?(L.bi_buf|=q<>y-L.bi_valid,L.bi_valid+=ot-y):(L.bi_buf|=q<>>=1,ot<<=1,0<--q;);return ot>>>1}function _t(L,q,ot){var at,rt,ht=new Array(p+1),St=0;for(at=1;at<=p;at++)ht[at]=St=St+ot[at-1]<<1;for(rt=0;rt<=q;rt++){var pt=L[2*rt+1];pt!==0&&(L[2*rt]=yt(ht[pt]++,pt))}}function ct(L){var q;for(q=0;q>1;1<=ot;ot--)At(L,ht,ot);for(rt=Ot;ot=L.heap[1],L.heap[1]=L.heap[L.heap_len--],At(L,ht,1),at=L.heap[1],L.heap[--L.heap_max]=ot,L.heap[--L.heap_max]=at,ht[2*rt]=ht[2*ot]+ht[2*at],L.depth[rt]=(L.depth[ot]>=L.depth[at]?L.depth[ot]:L.depth[at])+1,ht[2*ot+1]=ht[2*at+1]=rt,L.heap[1]=rt++,At(L,ht,1),2<=L.heap_len;);L.heap[--L.heap_max]=L.heap[1],function(ue,sr){var fr,vr,gn,Ce,In,Ei,Fr=sr.dyn_tree,Ai=sr.max_code,is=sr.stat_desc.static_tree,ua=sr.stat_desc.has_stree,Xr=sr.stat_desc.extra_bits,ss=sr.stat_desc.extra_base,ni=sr.stat_desc.max_length,Yr=0;for(Ce=0;Ce<=p;Ce++)ue.bl_count[Ce]=0;for(Fr[2*ue.heap[ue.heap_max]+1]=0,fr=ue.heap_max+1;fr>=7;rt>>=1)if(1&_e&&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=L.static_len+3+7>>>3)<=rt&&(rt=ht)):rt=ht=ot+5,ot+4<=rt&&q!==-1?B(L,q,ot,at):L.strategy===4||ht===rt?(tt(L,2+(at?1:0),3),se(L,it,I)):(tt(L,4+(at?1:0),3),function(pt,Ot,_e,ue){var sr;for(tt(pt,Ot-257,5),tt(pt,_e-1,5),tt(pt,ue-4,4),sr=0;sr>>8&255,L.pending_buf[L.d_buf+2*L.last_lit+1]=255&q,L.pending_buf[L.l_buf+L.last_lit]=255&ot,L.last_lit++,q===0?L.dyn_ltree[2*ot]++:(L.matches++,q--,L.dyn_ltree[2*(w[ot]+h+1)]++,L.dyn_dtree[2*O(q)]++),L.last_lit===L.lit_bufsize-1},i._tr_align=function(L){tt(L,2,3),et(L,S,it),function(q){q.bi_valid===16?($(q,q.bi_buf),q.bi_buf=0,q.bi_valid=0):8<=q.bi_valid&&(q.pending_buf[q.pending++]=255&q.bi_buf,q.bi_buf>>=8,q.bi_valid-=8)}(L)}},{"../utils/common":41}],53:[function(e,n,i){n.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,n,i){(function(s){(function(o,a){if(!o.setImmediate){var l,u,c,h,f=1,d={},m=!1,g=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,l={}.toString.call(o.process)==="[object process]"?function(T){process.nextTick(function(){v(T)})}:function(){if(o.postMessage&&!o.importScripts){var T=!0,_=o.onmessage;return o.onmessage=function(){T=!1},o.postMessage("","*"),o.onmessage=_,T}}()?(h="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",S,!1):o.attachEvent("onmessage",S),function(T){o.postMessage(h+T,"*")}):o.MessageChannel?((c=new MessageChannel).port1.onmessage=function(T){v(T.data)},function(T){c.port2.postMessage(T)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(T){var _=g.createElement("script");_.onreadystatechange=function(){v(T),_.onreadystatechange=null,u.removeChild(_),_=null},u.appendChild(_)}):function(T){setTimeout(v,0,T)},p.setImmediate=function(T){typeof T!="function"&&(T=new Function(""+T));for(var _=new Array(arguments.length-1),M=0;M<_.length;M++)_[M]=arguments[M+1];var x={callback:T,args:_};return d[f]=x,l(f),f++},p.clearImmediate=y}function y(T){delete d[T]}function v(T){if(m)setTimeout(v,0,T);else{var _=d[T];if(_){m=!0;try{(function(M){var x=M.callback,N=M.args;switch(N.length){case 0:x();break;case 1:x(N[0]);break;case 2:x(N[0],N[1]);break;case 3:x(N[0],N[1],N[2]);break;default:x.apply(a,N)}})(_)}finally{y(T),m=!1}}}}function S(T){T.source===o&&typeof T.data=="string"&&T.data.indexOf(h)===0&&v(+T.data.slice(h.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof $n<"u"?$n:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(of)),of.exports}var H5=W5();const X5=Xp(H5);ei.zipReader=(r,t)=>X5.loadAsync(r);const Y5=ei.createSettings;ei.createSettings=async r=>{const t=Object.keys(r.files);return t.find(e=>q5(e))?Y5(r):K5(t)};function q5(r){return r.endsWith("model3.json")}function Q5(r){return r.endsWith(".moc3")}function Z5(r){return r.split(/[\\/]/).pop()}function K5(r){const t=r.filter(u=>Q5(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],n=Z5(e).replace(/\.moc3?/,""),i=r.filter(u=>u.endsWith(".png"));if(!i.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 Ns({url:`${n}.model3.json`,Version:3,FileReferences:{Moc:e,Textures:i,Physics:o,Pose:a,Motions:s.length?{"":s.map(u=>({File:u}))}:void 0}});return l.name=n,l._objectURL=`example://${l.url}`,l}ei.readText=(r,t)=>{const e=r.file(t);if(!e)throw new Error(`Cannot find file: ${t}`);return e.async("text")};ei.getFilePaths=r=>{const t=[];return r.forEach(e=>t.push(e)),Promise.resolve(t)};ei.getFiles=(r,t)=>Promise.all(t.map(async e=>{const n=e.slice(e.lastIndexOf("/")+1),i=await r.file(e).async("blob");return new File([i],n)}));export{h2 as A,s8 as D,n8 as I,X5 as J,OC as L,vf as M,r8 as T,a8 as V,Nn as a,je as b,QC as c,u8 as d,bl as e,l8 as f,sa as g,Xv as h,v_ as i,i8 as l,o8 as r,Y as s}; diff --git a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js similarity index 93% rename from assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js rename to assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js index 03c6c4145131c3ebabcecdc54d21bcc91f80882d..6042c686c973f063f5733b576c279affd6636ed2 100644 --- a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js +++ b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js @@ -1 +1 @@ -import{d as T,j as l,o as m,T as B,k as b,f as v}from"./index-SpDrDth7.js";const n="0px",W=T({__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)=>(m(),l(B,{css:!1,onEnter:u,onLeave:f},{default:b(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; +import{d as T,j as l,o as m,T as B,k as b,f as v}from"./index-lQIQ1Nea.js";const n="0px",W=T({__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)=>(m(),l(B,{css:!1,onEnter:u,onLeave:f},{default:b(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; diff --git a/assets/_...all_-WLrcdQxR.js b/assets/_...all_-DuBG0OD_.js similarity index 64% rename from assets/_...all_-WLrcdQxR.js rename to assets/_...all_-DuBG0OD_.js index c3f95005e3889e9a2c9d9d85e9ccf9c6ad456917..d3b85caf8830b1022a6221e9bc5e570f4a2c4395 100644 --- a/assets/_...all_-WLrcdQxR.js +++ b/assets/_...all_-DuBG0OD_.js @@ -1 +1 @@ -import{_ as e,c as _,o as c}from"./index-SpDrDth7.js";const n={};function o(t,r){return c(),_("div",null," 404 - Page not found ")}const s=e(n,[["render",o]]);export{s as default}; +import{_ as e,c as _,o as c}from"./index-lQIQ1Nea.js";const n={};function o(t,r){return c(),_("div",null," 404 - Page not found ")}const s=e(n,[["render",o]]);export{s as default}; diff --git a/assets/audio-B_mSU470.js b/assets/audio-f__i9FT_.js similarity index 88% rename from assets/audio-B_mSU470.js rename to assets/audio-f__i9FT_.js index 8ae011395ec29c912351abe30f1345515058482c..d9b09a129fdf67eef7f3552897c80a4e7efcbc2a 100644 --- a/assets/audio-B_mSU470.js +++ b/assets/audio-f__i9FT_.js @@ -1 +1 @@ -import{d as s,g as f,c as d,o as p,a as t}from"./index-SpDrDth7.js";const R=s({__name:"audio",setup(_){const a=f(),l=f();function u(o){var r,c,i;if(!o)return;const n=(c=(r=l.value)==null?void 0:r.files)==null?void 0:c[0];if(!n)return;const e=document.createElement("audio");(i=a.value)==null||i.appendChild(e),e.src=URL.createObjectURL(n),e.controls=!0,e.load(),e.play()}return(o,n)=>(p(),d("div",null,[t("div",null,[t("div",{ref_key:"containerRef",ref:a},null,512),t("input",{ref_key:"fileInputRef",ref:l,type:"file",onChange:u},null,544)])]))}});export{R as default}; +import{d as s,g as f,c as d,o as p,a as t}from"./index-lQIQ1Nea.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/consciousness-BqZoJErm.js b/assets/consciousness-BqZoJErm.js deleted file mode 100644 index b3f2061793d7c73f0d474503f75ee3ba05adc89f..0000000000000000000000000000000000000000 --- a/assets/consciousness-BqZoJErm.js +++ /dev/null @@ -1 +0,0 @@ -import{d as N,g as L,c as i,o as r,q as m,a as e,m as f,t as n,b as A,k as T,D as I,E as Q,G as E,h as y,w as G,x as B,s as H,p as J,e as s,F as C,C as F,H as K,z as D,I as R,B as P,j as U}from"./index-SpDrDth7.js";import{_ as O}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js";import"./Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js";import"./emotions-D2WM87AE.js";import{u as q}from"./providers-CpyZMi_V.js";import{b as j}from"./route-block-B_A1xBdJ.js";const W=["checked","name","value"],X={class:"relative mr-3 mt-0.5 flex-shrink-0"},Y={class:"w-full flex flex-col gap-2"},Z={class:"flex items-center"},_={key:0,class:"relative"},ee=["title"],te={key:1,class:"mt-2"},le=["value","placeholder"],oe=N({__name:"RadioCardDetail",props:{id:null,name:null,value:null,title:null,description:null,modelValue:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},emits:["update:modelValue","update:customInputValue"],setup(t,{emit:d}){const u=d,v=L(!1);function k(){v.value=!v.value}function c(x){const b=x.target;u("update:customInputValue",b.value)}return(x,b)=>(r(),i("label",{key:t.id,class:m(["relative flex cursor-pointer items-start rounded-lg p-3 pr-[20px] transition-all duration-200 ease-in-out",[t.modelValue===t.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-500 dark:border-primary-400":"bg-white dark:bg-neutral-900/20 border-neutral-200 dark:border-neutral-700 hover:border-primary-500/30 dark:hover:border-primary-400/30",t.deprecated?"opacity-60":""]]),border:"2 solid"},[e("input",{checked:t.modelValue===t.value,type:"radio",name:t.name,value:t.value,class:"absolute opacity-0",onChange:b[0]||(b[0]=p=>x.$emit("update:modelValue",t.value))},null,40,W),e("div",X,[e("div",{class:m(["size-5 border-2 rounded-full transition-colors duration-200",[t.modelValue===t.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[e("div",{class:m(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[t.modelValue===t.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),e("div",Y,[e("div",Z,[e("span",{class:m(["line-clamp-1 font-medium",[t.modelValue===t.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},n(t.title),3)]),t.description?(r(),i("div",_,[A(O,null,{default:T(()=>[v.value?(r(),i("div",{key:1,class:m(["cursor-pointer text-xs",[t.modelValue===t.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:I(k,["prevent"])},n(t.description),3)):(r(),i("div",{key:0,class:m(["line-clamp-2 cursor-pointer text-xs",[t.modelValue===t.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:t.description,onClick:I(k,["prevent"])},n(t.description),11,ee))]),_:1}),t.showExpandCollapse&&t.description.length>t.expandCollapseThreshold?(r(),i("button",{key:0,class:"text-primary-500 dark:text-primary-400 mt-0.5 inline-flex items-center text-xs",onClick:I(k,["prevent"])},[e("span",null,n(v.value?"Show less":"Show more"),1),e("div",{class:m([{"rotate-180":v.value},"transition-transform duration-200"])},b[1]||(b[1]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):f("",!0)])):f("",!0),t.showCustomInput&&t.modelValue===t.value?(r(),i("div",te,[e("input",{value:t.customInputValue,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:t.customInputPlaceholder,onInput:c},null,40,le)])):f("",!0)])],2))}}),se=["checked","name","value"],re={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},ae=N({__name:"RadioCardSimple",props:{id:null,name:null,value:null,title:null,description:null,modelValue:null},emits:["update:modelValue"],setup(t){return(d,u)=>(r(),i("label",{key:t.id,border:"2px solid",class:m(["relative transition-all duration-200 ease-in-out",[t.modelValue===t.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-500 dark:border-primary-400":"bg-white dark:bg-neutral-900/20 border-neutral-200 dark:border-neutral-700 hover:border-primary-500/30 dark:hover:border-primary-400/30"]]),flex:"~ col",block:"","min-w-50":"","w-fit":"","cursor-pointer":"","items-start":"","rounded-lg":"","p-4":"","text-left":""},[e("input",{checked:t.modelValue===t.value,type:"radio",name:t.name,value:t.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100",onChange:u[0]||(u[0]=v=>d.$emit("update:modelValue",t.value))},null,40,se),u[1]||(u[1]=e("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"},[e("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)),e("div",re,[e("span",{class:m(["radio-item-name font-bold",[t.modelValue===t.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-500"]]),text:"md",transition:"all duration-200 ease-in-out"},n(t.title),3),t.description?(r(),i("span",{key:0,class:m(["radio-item-description",[t.modelValue===t.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},n(t.description),3)):f("",!0)]),u[2]||(u[2]=e("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))}}),ne=Q("consciousness",()=>{const t=q(),d=E("settings/consciousness/active-provider",""),u=E("settings/consciousness/active-model",""),v=E("settings/consciousness/active-custom-model",""),k=L({}),c=L(""),x=y(()=>t.availableProviders.map(o=>t.getProviderMetadata(o))),b=y(()=>t.supportsModelListing(d.value)),p=y(()=>t.getModelsForProvider(d.value)),S=y(()=>t.isLoadingModels[d.value]||!1),$=y(()=>t.modelLoadError[d.value]||null),h=y(()=>{if(!c.value.trim())return p.value;const o=c.value.toLowerCase().trim();return p.value.filter(g=>g.name.toLowerCase().includes(o)||g.id.toLowerCase().includes(o)||g.description&&g.description.toLowerCase().includes(o))});function M(o){d.value=o}function V(o){u.value=o}function w(o){v.value=o}function z(o){c.value=o}function a(){u.value="",v.value="",k.value={},c.value=""}async function l(o){o&&t.supportsModelListing(o)&&t.getModelsForProvider(o).length===0&&await t.fetchModelsForProvider(o)}return G(d,async o=>{await l(o),a()}),{activeProvider:d,activeModel:u,customModelName:v,expandedDescriptions:k,modelSearchQuery:c,availableProvidersMetadata:x,supportsModelListing:b,providerModels:p,isLoadingActiveProviderModels:S,activeProviderModelError:$,filteredModels:h,setActiveProvider:M,setActiveModel:V,setCustomModelName:w,setModelSearchQuery:z,resetModelSelection:a,loadModelsForProvider:l}}),ie={flex:"~ row","items-center":"","gap-2":""},de={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},ue={flex:"~ col gap-4"},ce={"max-w-full":""},me={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},ve={key:1},pe={key:0},xe={flex:"~ col gap-4"},be={class:"text-lg md:text-2xl"},ge={text:"neutral-400 dark:neutral-400"},fe={key:0,class:"flex items-center justify-center py-4"},ke={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"},ye={class:"flex flex-col"},he={class:"font-medium"},we={class:"text-sm text-red-600 dark:text-red-400"},$e={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"},Me={class:"flex flex-col"},Ve={class:"font-medium"},Ce={class:"text-sm text-amber-600 dark:text-amber-400"},Pe={class:"relative"},Le=["placeholder"],Se={class:"space-y-2"},ze={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},Ie={key:1,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"},Ee={class:"flex flex-col"},Ne={class:"font-medium"},Be={class:"text-sm text-amber-600 dark:text-amber-400"},Fe={class:"relative"},De={key:1},Re={flex:"~ col gap-4"},Ue={class:"text-lg md:text-2xl"},je={text:"neutral-400 dark:neutral-400"},Ae={class:"bg-primary-50 border-primary-200 dark:bg-primary-900/20 dark:border-primary-800 flex items-center gap-3 border rounded-lg p-4"},Te={class:"flex flex-col"},qe={class:"font-medium"},Qe={class:"dark:text-primary-400 text-primary-600 text-sm"},Ge={class:"mt-2"},He={class:"mb-1 block text-sm font-medium"},Je=["placeholder"],Ke=N({__name:"consciousness",setup(t){const d=L(!1),u=q(),v=ne(),{availableProviders:k}=B(u),{activeProvider:c,activeModel:x,customModelName:b,modelSearchQuery:p,availableProvidersMetadata:S,supportsModelListing:$,providerModels:h,isLoadingActiveProviderModels:M,activeProviderModelError:V,filteredModels:w}=B(v),z=H();return J(async()=>{await v.loadModelsForProvider(c.value)}),(a,l)=>(r(),i(C,null,[e("div",ie,[e("button",{onClick:l[0]||(l[0]=o=>s(z).back())},l[8]||(l[8]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-xl":""},null,-1)])),l[9]||(l[9]=e("h1",{relative:""},[e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Modules")]),e("div",{"text-3xl":"","font-semibold":""}," Consciousness ")],-1))]),e("div",de,[e("div",null,[e("div",ue,[l[11]||(l[11]=e("div",null,[e("h2",{class:"text-lg md:text-2xl"}," Provider "),e("div",{text:"neutral-400 dark:neutral-400"},[e("span",null,"Select the suitable LLM provider for consciousness")])],-1)),e("div",ce,[s(k).length>0?(r(),i("fieldset",me,[(r(!0),i(C,null,F(s(S),o=>(r(),U(s(ae),{id:o.id,key:o.id,modelValue:s(c),"onUpdate:modelValue":l[1]||(l[1]=g=>P(c)?c.value=g:null),name:"provider",value:o.id,title:o.localizedName,description:o.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(r(),i("div",ve,[A(s(K),{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(()=>l[10]||(l[10]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])])]),s(c)&&s($)?(r(),i("div",pe,[e("div",xe,[e("div",null,[e("h2",be,n(a.$t("settings.modules.consciousness.provider-model-selection.title")),1),e("div",ge,[e("span",null,n(a.$t("settings.modules.consciousness.provider-model-selection.subtitle")),1)])]),s(M)?(r(),i("div",fe,[l[12]||(l[12]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,n(a.$t("settings.modules.consciousness.provider-model-selection.loading")),1)])):s(V)?(r(),i("div",ke,[l[13]||(l[13]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",ye,[e("span",he,n(a.$t("settings.modules.consciousness.provider-model-selection.error")),1),e("span",we,n(s(V)),1)])])):s(h).length===0&&!s(M)?(r(),i("div",$e,[l[14]||(l[14]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",Me,[e("span",Ve,n(a.$t("settings.modules.consciousness.provider-model-selection.no_models")),1),e("span",Ce,n(a.$t("settings.modules.consciousness.provider-model-selection.no_models_description")),1)])])):s(h).length>0?(r(),i(C,{key:3},[e("div",Pe,[l[16]||(l[16]=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)),D(e("input",{"onUpdate:modelValue":l[2]||(l[2]=o=>P(p)?p.value=o:null),type:"search",class:"w-full rounded-lg p-2.5 pl-10 text-sm outline-none",border:"focus:primary-500 dark:focus:primary-400 ~ neutral-300 dark:neutral-700 2",transition:"all duration-200 ease-in-out",ring:"focus:primary-500 dark:focus:primary-400 0 focus:2 focus:offset-0 focus:opacity-50",bg:"white dark:neutral-900",placeholder:a.$t("settings.modules.consciousness.provider-model-selection.search_placeholder")},null,8,Le),[[R,s(p)]]),s(p)?(r(),i("button",{key:0,type:"button",class:"absolute inset-y-0 right-0 flex items-center pr-3",onClick:l[3]||(l[3]=o=>p.value="")},l[15]||(l[15]=[e("div",{"i-solar:close-circle-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200"},null,-1)]))):f("",!0)]),e("div",Se,[s(p)?(r(),i("div",ze,n(a.$t("settings.modules.consciousness.provider-model-selection.search_results",{count:s(w).length,total:s(h).length})),1)):f("",!0),s(p)&&s(w).length===0?(r(),i("div",Ie,[l[17]||(l[17]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",Ee,[e("span",Ne,n(a.$t("settings.modules.consciousness.provider-model-selection.no_search_results")),1),e("span",Be,n(a.$t("settings.modules.consciousness.provider-model-selection.no_search_results_description",{query:s(p)})),1)])])):f("",!0),e("div",Fe,[e("div",{class:m(["scrollbar-hide grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto pb-4",[d.value?"md:grid-cols-2 md:grid-flow-row md:auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(r(!0),i(C,null,F(s(w),o=>(r(),U(s(oe),{id:o.id,key:o.id,modelValue:s(x),"onUpdate:modelValue":l[4]||(l[4]=g=>P(x)?x.value=g:null),value:o.id,title:o.name,description:o.description,deprecated:o.deprecated,"show-expand-collapse":!0,"expand-collapse-threshold":100,"show-custom-input":o.id==="custom","custom-input-value":s(b),"custom-input-placeholder":a.$t("settings.modules.consciousness.provider-model-selection.custom_model_placeholder"),name:"model",class:"scroll-snap-align-start","onUpdate:customInputValue":l[5]||(l[5]=g=>b.value=g)},null,8,["id","modelValue","value","title","description","deprecated","show-custom-input","custom-input-value","custom-input-placeholder"]))),128))],2),e("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:m([d.value?"fixed bottom-4 left-1/2 translate-x--1/2 z-10 w-[calc(100%-16px-40px-16px)]":"mt-0 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:m([d.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-neutral-200 dark:bg-neutral-800 hover:bg-neutral-300 dark:hover:bg-neutral-700"]),onClick:l[6]||(l[6]=o=>d.value=!d.value)},[e("span",null,n(d.value?a.$t("settings.modules.consciousness.provider-model-selection.collapse"):a.$t("settings.modules.consciousness.provider-model-selection.expand")),1),e("div",{class:m([d.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])],64)):f("",!0)])])):s(c)&&!s($)?(r(),i("div",De,[e("div",Re,[e("div",null,[e("h2",Ue,n(a.$t("settings.modules.consciousness.provider-model-selection.title")),1),e("div",je,[e("span",null,n(a.$t("settings.modules.consciousness.provider-model-selection.subtitle")),1)])]),e("div",Ae,[l[18]||(l[18]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",Te,[e("span",qe,n(a.$t("settings.modules.consciousness.provider-model-selection.not_supported")),1),e("span",Qe,n(a.$t("settings.modules.consciousness.provider-model-selection.not_supported_description")),1)])]),e("div",Ge,[e("label",He,n(a.$t("settings.modules.consciousness.provider-model-selection.manual_model_name")),1),D(e("input",{"onUpdate:modelValue":l[7]||(l[7]=o=>P(x)?x.value=o: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:a.$t("settings.modules.consciousness.provider-model-selection.manual_model_placeholder")},null,8,Je),[[R,s(x)]])])])])):f("",!0)]),l[19]||(l[19]=e("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",class:"text-neutral-100/80 dark:text-neutral-500/20"},[e("div",{text:"40","i-lucide:ghost":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof j=="function"&&j(Ke);export{Ke as default}; diff --git a/assets/consciousness-CCzKId_z.js b/assets/consciousness-CCzKId_z.js new file mode 100644 index 0000000000000000000000000000000000000000..058ffcd7dced44570f1ef75a9599aa80dbc17dd7 --- /dev/null +++ b/assets/consciousness-CCzKId_z.js @@ -0,0 +1 @@ +import{ar as C,cd as u,g as M,h as r,w as h}from"./index-lQIQ1Nea.js";import{u as y}from"./providers-B5WAuhMk.js";const N=C("consciousness",()=>{const o=y(),s=u("settings/consciousness/active-provider",""),n=u("settings/consciousness/active-model",""),a=u("settings/consciousness/active-custom-model",""),l=M({}),t=M(""),f=r(()=>o.supportsModelListing(s.value)),c=r(()=>o.getModelsForProvider(s.value)),m=r(()=>o.isLoadingModels[s.value]||!1),p=r(()=>o.modelLoadError[s.value]||null),g=r(()=>{if(!t.value.trim())return c.value;const e=t.value.toLowerCase().trim();return c.value.filter(i=>i.name.toLowerCase().includes(e)||i.id.toLowerCase().includes(e)||i.description&&i.description.toLowerCase().includes(e))});function L(e){s.value=e}function P(e){n.value=e}function w(e){a.value=e}function S(e){t.value=e}function d(){n.value="",a.value="",l.value={},t.value=""}async function v(e){e&&o.supportsModelListing(e)&&o.getModelsForProvider(e).length===0&&await o.fetchModelsForProvider(e)}return h(s,async e=>{await v(e),d()}),{activeProvider:s,activeModel:n,customModelName:a,expandedDescriptions:l,modelSearchQuery:t,supportsModelListing:f,providerModels:c,isLoadingActiveProviderModels:m,activeProviderModelError:p,filteredModels:g,setActiveProvider:L,setActiveModel:P,setCustomModelName:w,setModelSearchQuery:S,resetModelSelection:d,loadModelsForProvider:v}});export{N as u}; diff --git a/assets/consciousness-jUPNmBFs.js b/assets/consciousness-jUPNmBFs.js new file mode 100644 index 0000000000000000000000000000000000000000..4a42cb1461259d9e4d6c3649fae15a869ec4f2b5 --- /dev/null +++ b/assets/consciousness-jUPNmBFs.js @@ -0,0 +1 @@ +import{d as I,g as C,c as n,o as s,q as x,a as e,m as h,t as d,b as L,k as N,D as M,h as q,z as R,E as z,F as S,C as E,j as P,x as B,s as j,p as F,e as o,G as Q,B as V}from"./index-lQIQ1Nea.js";import{_ as A}from"./RadioCardSimple.vue_vue_type_script_setup_true_lang-BPQCQDzL.js";import{_ as G}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{u as H}from"./consciousness-CCzKId_z.js";import{u as J}from"./providers-B5WAuhMk.js";import{b as T}from"./route-block-B_A1xBdJ.js";const K=["checked","name","value"],O={class:"relative mr-3 mt-0.5 flex-shrink-0"},W={class:"w-full flex flex-col gap-2"},X={class:"flex items-center"},Y={key:0,class:"relative"},Z=["title"],_={key:1,class:"mt-2"},ee=["value","placeholder"],te=I({__name:"RadioCardDetail",props:{id:null,name:null,value:null,title:null,description:null,modelValue:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},emits:["update:modelValue","update:customInputValue"],setup(t,{emit:y}){const g=y,f=C(!1);function u(){f.value=!f.value}function i(c){const p=c.target;g("update:customInputValue",p.value)}return(c,p)=>(s(),n("label",{key:t.id,class:x(["relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]",[t.modelValue===t.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900":"bg-white dark:bg-neutral-900/20 border-neutral-200 dark:border-neutral-700 hover:border-primary-500/30 dark:hover:border-primary-400/30",t.deprecated?"opacity-60":""]]),transition:"all duration-200 ease-in-out",border:"2 solid"},[e("input",{checked:t.modelValue===t.value,type:"radio",name:t.name,value:t.value,class:"absolute opacity-0",onChange:p[0]||(p[0]=k=>c.$emit("update:modelValue",t.value))},null,40,K),e("div",O,[e("div",{class:x(["size-5 border-2 rounded-full transition-colors duration-200",[t.modelValue===t.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[e("div",{class:x(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[t.modelValue===t.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),e("div",W,[e("div",X,[e("span",{class:x(["line-clamp-1 font-medium",[t.modelValue===t.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},d(t.title),3)]),t.description?(s(),n("div",Y,[L(G,null,{default:N(()=>[f.value?(s(),n("div",{key:1,class:x(["cursor-pointer text-xs",[t.modelValue===t.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:M(u,["prevent"])},d(t.description),3)):(s(),n("div",{key:0,class:x(["line-clamp-2 cursor-pointer text-xs",[t.modelValue===t.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:t.description,onClick:M(u,["prevent"])},d(t.description),11,Z))]),_:1}),t.showExpandCollapse&&t.description.length>t.expandCollapseThreshold?(s(),n("button",{key:0,class:"text-primary-500 dark:text-primary-400 mt-0.5 inline-flex items-center text-xs",onClick:M(u,["prevent"])},[e("span",null,d(f.value?"Show less":"Show more"),1),e("div",{class:x([{"rotate-180":f.value},"transition-transform duration-200"])},p[1]||(p[1]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):h("",!0)])):h("",!0),t.showCustomInput&&t.modelValue===t.value?(s(),n("div",_,[e("input",{value:t.customInputValue,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:t.customInputPlaceholder,onInput:i},null,40,ee)])):h("",!0)])],2))}}),le={class:"radio-card-detail-many-select"},se={key:0,class:"relative"},oe=["placeholder"],re={class:"mt-4 space-y-2"},ae={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},ne={key:1,class:"flex items-center gap-3 border border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},de={class:"flex flex-col"},ie={class:"font-medium"},ue={class:"text-sm text-amber-600 dark:text-amber-400"},ce={class:"relative"},me=I({__name:"RadioCardDetailManySelect",props:{items:null,modelValue: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"}},emits:["update:modelValue","update:customValue"],setup(t,{emit:y}){const g=t,f=y,u=C(""),i=C(!1),c=C(""),p=q(()=>{if(!u.value)return g.items;const b=u.value.toLowerCase();return g.items.filter(r=>r.name.toLowerCase().includes(b)||r.description&&r.description.toLowerCase().includes(b))});function k(){u.value=""}function $(b){c.value=b,f("update:customValue",b)}return(b,r)=>(s(),n("div",le,[t.searchable?(s(),n("div",se,[r[5]||(r[5]=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)),R(e("input",{"onUpdate:modelValue":r[0]||(r[0]=m=>u.value=m),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-900 ~ neutral-200 dark:neutral-800 2",transition:"all duration-200 ease-in-out",ring:"focus:primary-500 dark:focus:primary-400 0 focus:2 focus:offset-0 focus:opacity-50",bg:"white dark:neutral-900",placeholder:t.searchPlaceholder},null,8,oe),[[z,u.value]]),u.value?(s(),n("button",{key:0,type:"button",class:"absolute inset-y-0 right-0 flex items-center pr-3",onClick:k},r[4]||(r[4]=[e("div",{"i-solar:close-circle-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200"},null,-1)]))):h("",!0)])):h("",!0),e("div",re,[u.value?(s(),n("div",ae,d(t.searchResultsText.replace("{count}",p.value.length.toString()).replace("{total}",t.items.length.toString())),1)):h("",!0),u.value&&p.value.length===0?(s(),n("div",ne,[r[6]||(r[6]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",de,[e("span",ie,d(t.searchNoResultsTitle),1),e("span",ue,d(t.searchNoResultsDescription.replace("{query}",u.value)),1)])])):h("",!0),e("div",ce,[e("div",{class:x(["scrollbar-hide grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto pb-4",[i.value?"md:grid-cols-2 md:grid-flow-row md:auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(s(!0),n(S,null,E(p.value,m=>(s(),P(te,{id:m.id,key:m.id,value:m.id,title:m.name,description:m.description,deprecated:m.deprecated,"show-expand-collapse":!0,"expand-collapse-threshold":100,"show-custom-input":m.customizable,"custom-input-value":c.value,"custom-input-placeholder":t.customInputPlaceholder,"model-value":t.modelValue,name:"radio-card-detail-many-select",class:"scroll-snap-align-start","onUpdate:modelValue":r[1]||(r[1]=w=>f("update:modelValue",w)),"onUpdate:customInputValue":r[2]||(r[2]=w=>$(w))},null,8,["id","value","title","description","deprecated","show-custom-input","custom-input-value","custom-input-placeholder","model-value"]))),128))],2),e("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:x([i.value?"fixed bottom-4 left-1/2 translate-x--1/2 z-10 w-[calc(100%-16px-40px-16px)]":"mt-0 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:x([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:r[3]||(r[3]=m=>i.value=!i.value)},[e("span",null,d(i.value?t.collapseButtonText:t.expandButtonText),1),e("div",{class:x([i.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),pe={flex:"~ row","items-center":"","gap-2":""},ve={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},xe={flex:"~ col gap-4"},fe={"max-w-full":""},be={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},he={key:1},ge={key:0},ke={flex:"~ col gap-4"},ye={class:"text-lg md:text-2xl"},we={text:"neutral-400 dark:neutral-400"},$e={key:0,class:"flex items-center justify-center py-4"},Ve={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},Ce={class:"flex flex-col"},Me={class:"font-medium"},Se={class:"text-sm text-red-600 dark:text-red-400"},Pe={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"},Ie={class:"flex flex-col"},Be={class:"font-medium"},Te={class:"text-sm text-amber-600 dark:text-amber-400"},Le={key:1},Ne={flex:"~ col gap-4"},Re={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},ze={text:"neutral-400 dark:neutral-500"},Ee={class:"bg-primary-50 border-primary-200 dark:bg-primary-900/20 dark:border-primary-800 flex items-center gap-3 border rounded-lg p-4"},De={class:"flex flex-col"},Ue={class:"font-medium"},qe={class:"dark:text-primary-400 text-primary-600 text-sm"},je={class:"mt-2"},Fe={class:"mb-1 block text-sm font-medium"},Qe=["placeholder"],Ae=I({__name:"consciousness",setup(t){const y=J(),g=H(),{availableProviders:f,availableProvidersMetadata:u}=B(y),{activeProvider:i,activeModel:c,customModelName:p,modelSearchQuery:k,supportsModelListing:$,providerModels:b,isLoadingActiveProviderModels:r,activeProviderModelError:m}=B(g),w=j();F(async()=>{await g.loadModelsForProvider(i.value)});function D(a){p.value=a}return(a,l)=>(s(),n(S,null,[e("div",pe,[e("button",{onClick:l[0]||(l[0]=v=>o(w).back())},l[5]||(l[5]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-xl":""},null,-1)])),l[6]||(l[6]=e("h1",{relative:""},[e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Modules")]),e("div",{"text-3xl":"","font-semibold":""}," Consciousness ")],-1))]),e("div",ve,[e("div",null,[e("div",xe,[l[8]||(l[8]=e("div",null,[e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"}," Provider "),e("div",{text:"neutral-400 dark:neutral-400"},[e("span",null,"Select the suitable LLM provider for consciousness")])],-1)),e("div",fe,[o(f).length>0?(s(),n("fieldset",be,[(s(!0),n(S,null,E(o(u),v=>(s(),P(o(A),{id:v.id,key:v.id,modelValue:o(i),"onUpdate:modelValue":l[1]||(l[1]=U=>V(i)?i.value=U:null),name:"provider",value:v.id,title:v.localizedName,description:v.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(s(),n("div",he,[L(o(Q),{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:N(()=>l[7]||(l[7]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])])]),o(i)&&o($)?(s(),n("div",ge,[e("div",ke,[e("div",null,[e("h2",ye,d(a.$t("settings.modules.consciousness.provider-model-selection.title")),1),e("div",we,[e("span",null,d(a.$t("settings.modules.consciousness.provider-model-selection.subtitle")),1)])]),o(r)?(s(),n("div",$e,[l[9]||(l[9]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,d(a.$t("settings.modules.consciousness.provider-model-selection.loading")),1)])):o(m)?(s(),n("div",Ve,[l[10]||(l[10]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",Ce,[e("span",Me,d(a.$t("settings.modules.consciousness.provider-model-selection.error")),1),e("span",Se,d(o(m)),1)])])):o(b).length===0&&!o(r)?(s(),n("div",Pe,[l[11]||(l[11]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",Ie,[e("span",Be,d(a.$t("settings.modules.consciousness.provider-model-selection.no_models")),1),e("span",Te,d(a.$t("settings.modules.consciousness.provider-model-selection.no_models_description")),1)])])):o(b).length>0?(s(),P(o(me),{key:3,modelValue:o(c),"onUpdate:modelValue":l[2]||(l[2]=v=>V(c)?c.value=v:null),"search-query":o(k),"onUpdate:searchQuery":l[3]||(l[3]=v=>V(k)?k.value=v:null),items:o(b),searchable:!0,"search-placeholder":a.$t("settings.modules.consciousness.provider-model-selection.search_placeholder"),"search-no-results-title":a.$t("settings.modules.consciousness.provider-model-selection.no_search_results"),"search-no-results-description":a.$t("settings.modules.consciousness.provider-model-selection.no_search_results_description",{query:o(k)}),"search-results-text":a.$t("settings.modules.consciousness.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":a.$t("settings.modules.consciousness.provider-model-selection.custom_model_placeholder"),"expand-button-text":a.$t("settings.modules.consciousness.provider-model-selection.expand"),"collapse-button-text":a.$t("settings.modules.consciousness.provider-model-selection.collapse"),"onUpdate:customValue":D},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"])):h("",!0)])])):o(i)&&!o($)?(s(),n("div",Le,[e("div",Ne,[e("div",null,[e("h2",Re,d(a.$t("settings.modules.consciousness.provider-model-selection.title")),1),e("div",ze,[e("span",null,d(a.$t("settings.modules.consciousness.provider-model-selection.subtitle")),1)])]),e("div",Ee,[l[12]||(l[12]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",De,[e("span",Ue,d(a.$t("settings.modules.consciousness.provider-model-selection.not_supported")),1),e("span",qe,d(a.$t("settings.modules.consciousness.provider-model-selection.not_supported_description")),1)])]),e("div",je,[e("label",Fe,d(a.$t("settings.modules.consciousness.provider-model-selection.manual_model_name")),1),R(e("input",{"onUpdate:modelValue":l[4]||(l[4]=v=>V(c)?c.value=v: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:a.$t("settings.modules.consciousness.provider-model-selection.manual_model_placeholder")},null,8,Qe),[[z,o(c)]])])])])):h("",!0)]),l[13]||(l[13]=e("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",class:"text-neutral-100/80 dark:text-neutral-500/20"},[e("div",{text:"40","i-lucide:ghost":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof T=="function"&&T(Ae);export{Ae as default}; diff --git a/assets/default-DQA6qRZU.js b/assets/default-Dk8xwEGd.js similarity index 88% rename from assets/default-DQA6qRZU.js rename to assets/default-Dk8xwEGd.js index 85e2d2c47423edee2796827fc6f5a297078c7ff1..df26b0ccf631b3d9fe2e018ede4bfcf9cf735df8 100644 --- a/assets/default-DQA6qRZU.js +++ b/assets/default-Dk8xwEGd.js @@ -1 +1 @@ -import{d as n,u as r,c,a,b as t,e,n as i,R as m,o as l}from"./index-SpDrDth7.js";import{H as f}from"./HeaderLink-BKyhECz0.js";const _={"mb-4":"","w-full":"","gap-2":"",class:"px-0 py-1 md:px-3 md:py-3"},x={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col gap-4"},$=n({__name:"default",setup(u){const{top:o,right:p,bottom:s,left:d}=r();return(g,y)=>(l(),c("div",{"p-2":"",style:i({paddingTop:`${e(o)}px`,paddingRight:`${e(p)}px`,paddingBottom:`${e(s)}px`,paddingLeft:`${e(d)}px`})},[a("div",_,[t(f)]),a("div",x,[t(e(m))])],4))}});export{$ as default}; +import{d as n,u as r,c,a,b as t,e,n as i,R as m,o as l}from"./index-lQIQ1Nea.js";import{H as f}from"./HeaderLink-Cxo-rQt1.js";const _={"mb-4":"","w-full":"","gap-2":"",class:"px-0 py-1 md:px-3 md:py-3"},x={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col gap-4"},$=n({__name:"default",setup(u){const{top:o,right:p,bottom:s,left:d}=r();return(g,y)=>(l(),c("div",{"p-2":"",style:i({paddingTop:`${e(o)}px`,paddingRight:`${e(p)}px`,paddingBottom:`${e(s)}px`,paddingLeft:`${e(d)}px`})},[a("div",_,[t(f)]),a("div",x,[t(e(m))])],4))}});export{$ as default}; diff --git a/assets/default-node-DRTvwjMK.js b/assets/default-node-DJABTJPz.js similarity index 89% rename from assets/default-node-DRTvwjMK.js rename to assets/default-node-DJABTJPz.js index 4f99eda9ae56142b4b84b276f2fb91a0e56d751b..806c81d88e6c58f9888e271a75918d75687e9a68 100644 --- a/assets/default-node-DRTvwjMK.js +++ b/assets/default-node-DJABTJPz.js @@ -1 +1 @@ -import{cr as t}from"./index-SpDrDth7.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-lQIQ1Nea.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-EUbdoOBL.js b/assets/delays-BqxW5uC2.js similarity index 76% rename from assets/delays-EUbdoOBL.js rename to assets/delays-BqxW5uC2.js index 2159b15f0119a0b3f9c0b109d88b33879af69d99..e041690ce6f8eb02c0240ee33b6998beb61ca5a5 100644 --- a/assets/delays-EUbdoOBL.js +++ b/assets/delays-BqxW5uC2.js @@ -1 +1 @@ -import{_ as v}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-CfG2YTbd.js";import"./Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js";import"./emotions-D2WM87AE.js";import{u as _,l as k}from"./queues-wwQOO-CJ.js";import"./index-aMTQzeGD.js";import{d as b,g as d,c as s,o as l,a as e,b as y,e as x,t as i,F as p,C as f}from"./index-SpDrDth7.js";import"./queue-DqQ_HXOh.js";const z={flex:"","flex-col":"","gap-2":"","p-2":""},w={flex:"","flex-row":"","gap-2":""},h={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},Q=b({__name:"delays",setup(S){const t=d(""),m=d([]),c=d([]),r=d(!1),u=_();u.onHandlerEvent("delay",a=>{c.value.push(a)});function g(){r.value=!0;const a=t.value.split("");for(const o of a)u.add(o);u.add(k),t.value="",r.value=!1}return(a,o)=>(l(),s("div",z,[e("div",w,[y(x(v),{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=n=>t.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:g},null,8,["modelValue"]),e("button",h,i(r.value?"Processing...":"Send"),1)]),e("div",M,[e("div",V,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(l(!0),s(p,null,f(m.value,n=>(l(),s("div",{key:n},[e("div",null,i(n),1)]))),128))]),e("div",E,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(l(!0),s(p,null,f(c.value,n=>(l(),s("div",{key:n},[e("div",null,i(n)+"s",1)]))),128))])])]))}});export{Q as default}; +import{_ as v}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-DTJgscnz.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{u as _,l as k}from"./queues-Bj3v4TZ0.js";import"./index-CBwQWPyY.js";import{d as b,g as d,c as s,o as l,a as e,b as y,e as x,t as i,F as p,C as f}from"./index-lQIQ1Nea.js";import"./queue-BJ5EFzA4.js";const z={flex:"","flex-col":"","gap-2":"","p-2":""},w={flex:"","flex-row":"","gap-2":""},h={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},Q=b({__name:"delays",setup(S){const t=d(""),m=d([]),c=d([]),r=d(!1),u=_();u.onHandlerEvent("delay",a=>{c.value.push(a)});function g(){r.value=!0;const a=t.value.split("");for(const o of a)u.add(o);u.add(k),t.value="",r.value=!1}return(a,o)=>(l(),s("div",z,[e("div",w,[y(x(v),{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=n=>t.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:g},null,8,["modelValue"]),e("button",h,i(r.value?"Processing...":"Send"),1)]),e("div",M,[e("div",V,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(l(!0),s(p,null,f(m.value,n=>(l(),s("div",{key:n},[e("div",null,i(n),1)]))),128))]),e("div",E,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(l(!0),s(p,null,f(c.value,n=>(l(),s("div",{key:n},[e("div",null,i(n)+"s",1)]))),128))])])]))}});export{Q as default}; diff --git a/assets/elevenlabs-Bohuloj3.js b/assets/elevenlabs-Bohuloj3.js new file mode 100644 index 0000000000000000000000000000000000000000..56b3fee8e03abe53f28624c497c2d24c182611ee --- /dev/null +++ b/assets/elevenlabs-Bohuloj3.js @@ -0,0 +1 @@ +import{d as R,s as B,x as F,h as C,g as v,I,p as T,w,c as m,o as g,a as e,e as o,t as a,z as d,J as j,E as b,H as M,F as y,C as h,A as $,b as q,k as E,q as A}from"./index-lQIQ1Nea.js";import{_ as H}from"./Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{u as J}from"./providers-B5WAuhMk.js";import{u as G}from"./speech-Dj8k8vbX.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";const O={flex:"~ row","items-center":"","gap-2":""},Q={relative:""},W={"text-3xl":"","font-semibold":""},X={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-6"},Y={flex:"~ col gap-6"},Z={"max-w-full":""},ee={grid:"~ cols-2 gap-4"},te={class:"text-xs text-zinc-500 dark:text-zinc-400","text-nowrap":""},se={flex:"~ col gap-6"},le={flex:"~ col gap-6"},oe={grid:"~ cols-2 gap-4"},ie=["value"],ne={grid:"~ cols-2 gap-4"},ae=["value"],de={grid:"~ cols-2 gap-4"},re={flex:"~ row","items-center":"","gap-2":""},ue={class:"text-xs"},xe={grid:"~ cols-2 gap-4"},pe={flex:"~ row","items-center":"","gap-2":""},ce={class:"text-xs"},ve={grid:"~ cols-2 gap-4"},me=["disabled"],ge={class:"text-sm"},fe=["onClick"],be={"mt-4":""},ze={grid:"~ cols-2 gap-4"},ke=["placeholder"],_e={"mt-4":""},we={fixed:"","bottom-0":"","right-0":"",text:"neutral-100/80 dark:neutral-500/20"},n="elevenlabs",Ee=R({__name:"elevenlabs",setup(ye){var V,S;const N=B(),f=J(),l=G(),{providers:u}=F(f),r=C(()=>f.getProviderMetadata(n)),x=v(((V=u.value[n])==null?void 0:V.apiKey)||""),p=v(((S=u.value[n])==null?void 0:S.baseUrl)||""),z=v(l.selectedLanguage),k=v(l.voiceName),P=C(()=>l.availableVoicesForLanguage),D=v(!1),K=I(D);return T(()=>{var i,t,c;f.initializeProvider(n),x.value=((i=u.value[n])==null?void 0:i.apiKey)||"",p.value=((t=u.value[n])==null?void 0:t.baseUrl)||((c=r.value)==null?void 0:c.baseUrlDefault)||"",f.configuredProviders[n]&&l.loadVoicesForProvider(n)}),w([x,p],()=>{var i;u.value[n]={apiKey:x.value,baseUrl:p.value||((i=r.value)==null?void 0:i.baseUrlDefault)||""}}),w(z,i=>{l.setLanguage(i)}),w(k,i=>{l.setVoiceName(i)}),(i,t)=>{var c,U,L;return g(),m(y,null,[e("div",O,[e("button",{onClick:t[0]||(t[0]=s=>o(N).back())},t[9]||(t[9]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e("h1",Q,[t[10]||(t[10]=e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Provider")],-1)),e("div",W,a((c=r.value)==null?void 0:c.localizedName),1)])]),e("div",X,[e("div",null,[e("div",Y,[t[12]||(t[12]=e("div",null,[e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"}," Basic "),e("div",{text:"neutral-400 dark:neutral-500"},[e("span",null,"Essential settings")])],-1)),e("div",Z,[e("label",ee,[e("div",null,[t[11]||(t[11]=e("div",{class:"flex items-center gap-1 text-sm font-medium"},[j(" API Key "),e("span",{class:"text-red-500"},"*")],-1)),e("div",te," API Key for "+a((U=r.value)==null?void 0:U.localizedName),1)]),d(e("input",{"onUpdate:modelValue":t[1]||(t[1]=s=>x.value=s),type:"password",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:"..."},null,512),[[b,x.value]])])])])]),e("div",se,[t[18]||(t[18]=e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"}," Voice Settings ",-1)),e("div",le,[e("label",oe,[t[13]||(t[13]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," Language "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Select voice language ")],-1)),d(e("select",{"onUpdate:modelValue":t[2]||(t[2]=s=>z.value=s),border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(g(!0),m(y,null,h(o(l).availableLanguages,s=>(g(),m("option",{key:s,value:s},a(s),9,ie))),128))],512),[[M,z.value]])]),e("label",ne,[t[14]||(t[14]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," Voice "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Select preferred voice ")],-1)),d(e("select",{"onUpdate:modelValue":t[3]||(t[3]=s=>k.value=s),border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(g(!0),m(y,null,h(P.value,s=>(g(),m("option",{key:s.id,value:s.name},a(s.name),9,ae))),128))],512),[[M,k.value]])]),e("label",de,[t[15]||(t[15]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," Pitch "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Adjust voice pitch ")],-1)),e("div",re,[d(e("input",{"onUpdate:modelValue":t[4]||(t[4]=s=>o(l).pitch=s),type:"range",min:"-100",max:"100",step:"1","w-full":""},null,512),[[b,o(l).pitch]]),e("span",ue,a(o(l).pitch),1)])]),e("label",xe,[t[16]||(t[16]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," Rate "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Adjust speaking rate ")],-1)),e("div",pe,[d(e("input",{"onUpdate:modelValue":t[5]||(t[5]=s=>o(l).rate=s),type:"range",min:"0.5",max:"2",step:"0.1","w-full":""},null,512),[[b,o(l).rate]]),e("span",ce,a(o(l).rate.toFixed(1)),1)])]),e("label",ve,[t[17]||(t[17]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," SSML "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Enable SSML support ")],-1)),e("div",null,[d(e("input",{"onUpdate:modelValue":t[6]||(t[6]=s=>o(l).ssmlEnabled=s),type:"checkbox",class:"mr-2",disabled:!o(l).supportsSSML},null,8,me),[[$,o(l).ssmlEnabled]]),e("span",ge,a(o(l).ssmlEnabled?"Enabled":"Disabled"),1)])])])]),e("div",null,[q(o(H),{"w-full":""},{trigger:E(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)&&o(K)()},[t[20]||(t[20]=e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},[e("span",null,"Advanced")],-1)),e("div",{transform:"",transition:"transform duration-250",class:A({"rotate-180":s.visible})},t[19]||(t[19]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,fe)]),default:E(()=>{var s;return[e("div",be,[e("label",ze,[t[21]||(t[21]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," Base URL "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Custom base URL (optional) ")],-1)),d(e("input",{"onUpdate:modelValue":t[7]||(t[7]=_=>p.value=_),type:"text",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:(s=r.value)==null?void 0:s.baseUrlDefault},null,8,ke),[[b,p.value]])]),e("div",_e,[e("button",{border:"zinc-300 dark:zinc-800 solid 1",transition:"border duration-250 ease-in-out",rounded:"","px-4":"","py-2":"","text-sm":"",onClick:t[8]||(t[8]=(..._)=>o(l).resetVoiceSettings&&o(l).resetVoiceSettings(..._))}," Reset Voice Settings ")])])]}),_:1})])]),e("div",we,[e("div",{text:"40",class:A((L=r.value)==null?void 0:L.icon),"translate-x-10":"","translate-y-10":""},null,2)])],64)}}});export{Ee as default}; diff --git a/assets/emotions-D6NX8Gz6.js b/assets/emotions-Cv9Jr9zp.js similarity index 79% rename from assets/emotions-D6NX8Gz6.js rename to assets/emotions-Cv9Jr9zp.js index 4aebf9b15ac7a7ecc01c9493e4089608a28ec1aa..4cb6ee9f2c522f7fb697e0f981e3effcb1b71e62 100644 --- a/assets/emotions-D6NX8Gz6.js +++ b/assets/emotions-Cv9Jr9zp.js @@ -1 +1 @@ -import{_}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-CfG2YTbd.js";import"./Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js";import"./emotions-D2WM87AE.js";import{u as k}from"./queue-DqQ_HXOh.js";import{a as b,l as x}from"./queues-wwQOO-CJ.js";import{d as z,g as u,c as s,o as t,a as e,b as h,e as w,t as r,F as m,C as f}from"./index-SpDrDth7.js";const M={flex:"","flex-col":"","gap-2":"","p-2":""},V={flex:"","flex-row":"","gap-2":""},y={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},E={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},L=z({__name:"emotions",setup(B){const l=u(""),p=u([]),i=u([]),d=u(!1),g=k({handlers:[async a=>{i.value.push(a.data)}]}),c=b(g);function v(){d.value=!0;const a=l.value.split("");for(const o of a)c.add(o);c.add(x),l.value="",d.value=!1}return(a,o)=>(t(),s("div",M,[e("div",V,[h(w(_),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",y,r(d.value?"Processing...":"Send"),1)]),e("div",E,[e("div",Q,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(m,null,f(p.value,n=>(t(),s("div",{key:n},[e("div",null,r(n),1)]))),128))]),e("div",S,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(m,null,f(i.value,n=>(t(),s("div",{key:n},[e("div",null,r(n),1)]))),128))])])]))}});export{L as default}; +import{_}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-DTJgscnz.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{u as k}from"./queue-BJ5EFzA4.js";import{a as b,l as x}from"./queues-Bj3v4TZ0.js";import{d as z,g as u,c as s,o as t,a as e,b as h,e as w,t as r,F as m,C as f}from"./index-lQIQ1Nea.js";const M={flex:"","flex-col":"","gap-2":"","p-2":""},V={flex:"","flex-row":"","gap-2":""},y={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},E={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},L=z({__name:"emotions",setup(B){const l=u(""),p=u([]),i=u([]),d=u(!1),g=k({handlers:[async a=>{i.value.push(a.data)}]}),c=b(g);function v(){d.value=!0;const a=l.value.split("");for(const o of a)c.add(o);c.add(x),l.value="",d.value=!1}return(a,o)=>(t(),s("div",M,[e("div",V,[h(w(_),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",y,r(d.value?"Processing...":"Send"),1)]),e("div",E,[e("div",Q,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(m,null,f(p.value,n=>(t(),s("div",{key:n},[e("div",null,r(n),1)]))),128))]),e("div",S,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(m,null,f(i.value,n=>(t(),s("div",{key:n},[e("div",null,r(n),1)]))),128))])])]))}});export{L as default}; diff --git a/assets/factorio-P3v2tIeq.png b/assets/factorio-P3v2tIeq.png deleted file mode 100644 index ddc91620af524e736ec51464743a4ed21298a12f..0000000000000000000000000000000000000000 --- a/assets/factorio-P3v2tIeq.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:904733da2f92be720937d56ca294c612071a38e46f491473c95dfc72d3f0fd79 -size 214016 diff --git a/assets/filter-message-Ad9LIo6U.js b/assets/filter-message-WXIEfvZ2.js similarity index 95% rename from assets/filter-message-Ad9LIo6U.js rename to assets/filter-message-WXIEfvZ2.js index bc4fba33786e75d5971cbf1b9995fbe313bb16b7..f982893d848b93d475ed04178d6346dcb18e356f 100644 --- a/assets/filter-message-Ad9LIo6U.js +++ b/assets/filter-message-WXIEfvZ2.js @@ -1 +1 @@ -import{d as g,g as u,r as m,c as v,o as _,a as s,b as x,t as d}from"./index-SpDrDth7.js";const b={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},k={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},w={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},V=g({__name:"filter-message",setup(z){const o=u(""),c=u(!1),i=u({content:""});async function f(r){return new Promise(e=>setTimeout(e,r))}async function p(){c.value=!0;const r=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let l="literal",t="";for(const a of r){await f(50);let n=l;a==="<"?n="special":a===">"&&(n="literal"),l==="literal"&&n==="special"&&(i.value.content+=t,t=""),l==="special"&&n==="literal"&&(t=""),l==="literal"&&n==="literal"&&(i.value.content+=a,t=""),l=n}t&&(i.value.content+=t),o.value="",c.value=!1}return(r,e)=>{const l=m("BasicTextarea");return _(),v("div",b,[s("div",S,[x(l,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",k,d(c.value?"Processing...":"Send"),1)]),s("div",w,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(i.value.content),1)])])}}});export{V as default}; +import{d as g,g as u,r as m,c as v,o as _,a as s,b as x,t as d}from"./index-lQIQ1Nea.js";const b={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},k={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},w={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},V=g({__name:"filter-message",setup(z){const o=u(""),c=u(!1),i=u({content:""});async function f(r){return new Promise(e=>setTimeout(e,r))}async function p(){c.value=!0;const r=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let l="literal",t="";for(const a of r){await f(50);let n=l;a==="<"?n="special":a===">"&&(n="literal"),l==="literal"&&n==="special"&&(i.value.content+=t,t=""),l==="special"&&n==="literal"&&(t=""),l==="literal"&&n==="literal"&&(i.value.content+=a,t=""),l=n}t&&(i.value.content+=t),o.value="",c.value=!1}return(r,e)=>{const l=m("BasicTextarea");return _(),v("div",b,[s("div",S,[x(l,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",k,d(c.value?"Processing...":"Send"),1)]),s("div",w,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(i.value.content),1)])])}}});export{V as default}; diff --git a/assets/image-CVeI_914.js b/assets/image-BIETLXD0.js similarity index 95% rename from assets/image-CVeI_914.js rename to assets/image-BIETLXD0.js index 8fdac97b8cdbd243b7129cb7efe68ae8e188fe2f..62000150aed4cd0c6c106b366b22b86cfabb643b 100644 --- a/assets/image-CVeI_914.js +++ b/assets/image-BIETLXD0.js @@ -1,2 +1,2 @@ -import{d as _,g as c,l as y,c as d,o as u,a,m as x,t as v,e as w,_ as b}from"./index-SpDrDth7.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=c(),n=c(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,i;e(((i=(l=s.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=s=>{o(s)},t.readAsDataURL(r)})}async function f(r){var t;const o=(t=r.target.files)==null?void 0:t[0];if(o){p.value=o;const s=await m(o);n.value=s}}return(r,e)=>(u(),d("div",null,[a("label",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 _,g as c,l as y,c as d,o as u,a,m as x,t as v,e as w,_ as b}from"./index-lQIQ1Nea.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=c(),n=c(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,i;e(((i=(l=s.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=s=>{o(s)},t.readAsDataURL(r)})}async function f(r){var t;const o=(t=r.target.files)==null?void 0:t[0];if(o){p.value=o;const s=await m(o);n.value=s}}return(r,e)=>(u(),d("div",null,[a("label",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-2bw7rTOf.js b/assets/index-2bw7rTOf.js new file mode 100644 index 0000000000000000000000000000000000000000..8aae66c7d5dde4e226cff9ac37bf278e716d9f9e --- /dev/null +++ b/assets/index-2bw7rTOf.js @@ -0,0 +1,3 @@ +import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import{_ as B,c as D,o as g,f as L,d as y,g as a,h as I,w as j,a as c,n as z,i as N,j as P,k as S,b as o,e as W}from"./index-lQIQ1Nea.js";import"./emotions-D2WM87AE.js";import{W as V}from"./Live2DSettings.vue_vue_type_script_setup_true_lang-BZ13gadG.js";import{_ as E,M as F,I as Z,a as q}from"./MobileInteractiveArea.vue_vue_type_script_setup_true_lang-DFvt4_Ml.js";import{b as M}from"./route-block-B_A1xBdJ.js";import"./providers-B5WAuhMk.js";import"./queue-BJ5EFzA4.js";import"./queues-Bj3v4TZ0.js";import"./speech-Dj8k8vbX.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js";import"./HeaderLink-Cxo-rQt1.js";import"./BasicTextarea.vue_vue_type_script_setup_true_lang-DTJgscnz.js";import"./consciousness-CCzKId_z.js";import"./index-CBwQWPyY.js";const G={},J={class:"cross-background-container"};function K(s,e){return g(),D("div",J,[L(s.$slots,"default",{},void 0,!0)])}const Q=B(G,[["render",K],["__scopeId","data-v-56ac1413"]]),R={class:"relative"},T={absolute:"","left-0":"","right-0":"","top-0":"","w-full":"","overflow-hidden":""},U=y({__name:"AnimatedBackground",props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:"oklch(95% 0.10 var(--theme-colors-hue))"},direction:{default:"down"},movementDirection:{default:"left"},animationSpeed:{default:50}},setup(s){const e=s,n=a(e.height),l=a(e.amplitude),t=a(e.waveLength),u=a(e.fillColor),w=a(e.direction),$=a(e.movementDirection);function A(i,v,h,f,p){const r=[],x=Math.ceil(i/f)*f,O=1,_=p==="up"?h:v-h;r.push(`M 0 ${_}`);const H=Math.PI*2/f;for(let d=0;d<=x;d+=O){const C=h*Math.sin(H*d),Y=p==="up"?_-C:_+C;r.push(`L ${d} ${Y}`)}const b=p==="up"?v:0;return r.push(`L ${x} ${b}`),r.push(`L 0 ${b} Z`),r.join(" ")}const m=I(()=>n.value+l.value*2),k=I(()=>{const i=` + + `;return`url(data:image/svg+xml;base64,${btoa(i)})`});return j(()=>[e.height,e.amplitude,e.waveLength,e.fillColor,e.direction,e.movementDirection],()=>{n.value=e.height,l.value=e.amplitude,t.value=e.waveLength,u.value=e.fillColor,w.value=e.direction,$.value=e.movementDirection},{immediate:!0}),(i,v)=>(g(),D("div",R,[L(i.$slots,"default",{},void 0,!0),c("div",T,[c("div",{class:"wave",style:z({background:u.value,height:`${m.value}px`,maskImage:k.value,WebkitMaskImage:k.value,"--wave-translate":`${-t.value}px`,"--animation-duration":`${t.value/s.animationSpeed}s`,"animation-direction":$.value==="left"?"normal":"reverse"})},null,4)])]))}}),X=B(U,[["__scopeId","data-v-750ba76d"]]),ee={relative:"",flex:"~ col","z-2":"","h-100vh":"","w-100vw":"","of-hidden":""},te={relative:"",flex:"~ 1 row gap-y-0 gap-x-2 (g(),P(Q,null,{default:S(()=>[o(X,{"fill-color":W(e)?"oklch(29% var(--theme-colors-chroma) var(--theme-colors-hue))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-50) var(--theme-colors-hue)) 80%, oklch(100% 0 360))"},{default:S(()=>[c("div",ee,[c("div",null,[o(E,{class:"flex n.value+l.value*2),k=I(()=>{const i=` - - `;return`url(data:image/svg+xml;base64,${btoa(i)})`});return j(()=>[e.height,e.amplitude,e.waveLength,e.fillColor,e.direction,e.movementDirection],()=>{n.value=e.height,l.value=e.amplitude,t.value=e.waveLength,u.value=e.fillColor,w.value=e.direction,$.value=e.movementDirection},{immediate:!0}),(i,v)=>(g(),D("div",R,[L(i.$slots,"default",{},void 0,!0),c("div",T,[c("div",{class:"wave",style:z({background:u.value,height:`${m.value}px`,maskImage:k.value,WebkitMaskImage:k.value,"--wave-translate":`${-t.value}px`,"--animation-duration":`${t.value/s.animationSpeed}s`,"animation-direction":$.value==="left"?"normal":"reverse"})},null,4)])]))}}),X=B(U,[["__scopeId","data-v-750ba76d"]]),ee={relative:"",flex:"~ col","z-2":"","h-100vh":"","w-100vw":"","of-hidden":""},te={relative:"",flex:"~ 1 row gap-y-0 gap-x-2 (g(),P(Q,null,{default:S(()=>[o(X,{"fill-color":W(e)?"oklch(29% var(--theme-colors-chroma) var(--theme-colors-hue))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-50) var(--theme-colors-hue)) 80%, oklch(100% 0 360))"},{default:S(()=>[c("div",ee,[c("div",null,[o(E,{class:"flex (y(),u(g,null,[r("div",h,[r("button",{onClick:t[0]||(t[0]=a=>l(d).back())},t[3]||(t[3]=[r("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t[4]||(t[4]=r("h1",{relative:""},[r("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[r("span",{text:"neutral-300 dark:neutral-500"},"Settings")]),r("div",{"text-3xl":"","font-semibold":""}," Themes ")],-1))]),v(l(w),{"mt-4":"","w-full":"",default:!0},{trigger:i(a=>[r("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:B=>a.setVisible(!a.visible)},[t[6]||(t[6]=r("div",{flex:"~ row 1","items-center":"","gap-1.5":""},[r("div",{"i-solar:pallete-2-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"}),r("div",null," Colors ")],-1)),r("div",{transform:"",transition:"transform duration-250",class:s({"rotate-180":a.visible})},t[5]||(t[5]=[r("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,C)]),default:i(()=>[r("div",D,[r("div",H,[t[7]||(t[7]=r("div",{class:"flex items-center gap-1 text-sm font-medium"}," Primary color ",-1)),o(r("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>l(e).themeColorsHue=a),type:"range",min:"0",max:"360",step:"0.01",class:s(["theme-hue-slider",{"opacity-25 cursor-not-allowed":l(e).themeColorsHueDynamic}]),disabled:l(e).themeColorsHueDynamic},null,10,z),[[f,l(e).themeColorsHue]])]),t[10]||(t[10]=r("div",{"mt-4":"","h-10":"","w-full":"",flex:"","overflow-hidden":"","rounded-lg":""},[r("div",{bg:"primary-50",class:"primary-color-bar","text-black":""}," 50 "),r("div",{bg:"primary-100",class:"primary-color-bar","text-black":""}," 100 "),r("div",{bg:"primary-200",class:"primary-color-bar","text-black":""}," 200 "),r("div",{bg:"primary-300",class:"primary-color-bar","text-black":""}," 300 "),r("div",{bg:"primary-400",class:"primary-color-bar","text-black":""}," 400 "),r("div",{bg:"primary-500",class:"primary-color-bar","text-black":""}," 500 "),r("div",{bg:"primary-600",class:"primary-color-bar","text-white":""}," 600 "),r("div",{bg:"primary-700",class:"primary-color-bar","text-white":""}," 700 "),r("div",{bg:"primary-800",class:"primary-color-bar","text-white":""}," 800 "),r("div",{bg:"primary-900",class:"primary-color-bar","text-white":""}," 900 "),r("div",{bg:"primary-950",class:"primary-color-bar","text-white":""}," 950 ")],-1)),t[11]||(t[11]=r("div",{"mt-4":"","h-10":"","w-full":"",flex:"","overflow-hidden":"","rounded-lg":"",class:"transparency-grid"},[r("div",{bg:"primary-500/5",class:"primary-color-bar","text-black":""}," 500/5 "),r("div",{bg:"primary-500/10",class:"primary-color-bar","text-black":""}," 500/10 "),r("div",{bg:"primary-500/20",class:"primary-color-bar","text-black":""}," 500/20 "),r("div",{bg:"primary-500/30",class:"primary-color-bar","text-black":""}," 500/30 "),r("div",{bg:"primary-500/40",class:"primary-color-bar","text-black":""}," 500/40 "),r("div",{bg:"primary-500/50",class:"primary-color-bar","text-black":""}," 500/50 "),r("div",{bg:"primary-500/60",class:"primary-color-bar","text-black":""}," 500/60 "),r("div",{bg:"primary-500/70",class:"primary-color-bar","text-black":""}," 500/70 "),r("div",{bg:"primary-500/80",class:"primary-color-bar","text-black":""}," 500/80 "),r("div",{bg:"primary-500/90",class:"primary-color-bar","text-black":""}," 500/90 "),r("div",{bg:"primary-500",class:"primary-color-bar","text-black":""}," 500 ")],-1)),r("div",E,[r("label",T,[o(r("input",{"onUpdate:modelValue":t[2]||(t[2]=a=>l(e).themeColorsHueDynamic=a),type:"checkbox",class:"peer sr-only"},null,512),[[x,l(e).themeColorsHueDynamic]]),t[8]||(t[8]=r("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),t[9]||(t[9]=r("span",{class:"ml-2 text-sm font-medium"},"I Want It Dynamic!",-1))]),r("button",{class:"rounded-md bg-neutral-100 px-3 py-1.5 text-sm transition-colors dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700",onClick:m}," Reset to Default ")])])]),_:1}),t[12]||(t[12]=r("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",text:"neutral-100/80 dark:neutral-500/20"},[r("div",{text:"40","i-lucide:paintbrush":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof n=="function"&&n(V);export{V as default}; +import{d as b,s as p,y as c,c as u,o as y,a as r,b as v,e as l,k as i,z as o,q as s,E as f,A as x,F as g,K as k}from"./index-lQIQ1Nea.js";import{_ as w}from"./Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{b as n}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";const h={flex:"~ row","items-center":"","gap-2":""},C=["onClick"],D={"p-4":""},H={class:"flex items-center gap-8"},z=["disabled"],E={"mt-4":"",class:"flex items-center justify-end gap-4"},T={class:"relative inline-flex cursor-pointer items-center"},V=b({__name:"index",setup(_){const d=p(),e=c();function m(){e.themeColorsHue=k,e.themeColorsHueDynamic=!1}return(U,t)=>(y(),u(g,null,[r("div",h,[r("button",{onClick:t[0]||(t[0]=a=>l(d).back())},t[3]||(t[3]=[r("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t[4]||(t[4]=r("h1",{relative:""},[r("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[r("span",{text:"neutral-300 dark:neutral-500"},"Settings")]),r("div",{"text-3xl":"","font-semibold":""}," Themes ")],-1))]),v(l(w),{"mt-4":"","w-full":"",default:!0},{trigger:i(a=>[r("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:B=>a.setVisible(!a.visible)},[t[6]||(t[6]=r("div",{flex:"~ row 1","items-center":"","gap-1.5":""},[r("div",{"i-solar:pallete-2-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"}),r("div",null," Colors ")],-1)),r("div",{transform:"",transition:"transform duration-250",class:s({"rotate-180":a.visible})},t[5]||(t[5]=[r("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,C)]),default:i(()=>[r("div",D,[r("div",H,[t[7]||(t[7]=r("div",{class:"flex items-center gap-1 text-sm font-medium"}," Primary color ",-1)),o(r("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>l(e).themeColorsHue=a),type:"range",min:"0",max:"360",step:"0.01",class:s(["theme-hue-slider",{"opacity-25 cursor-not-allowed":l(e).themeColorsHueDynamic}]),disabled:l(e).themeColorsHueDynamic},null,10,z),[[f,l(e).themeColorsHue]])]),t[10]||(t[10]=r("div",{"mt-4":"","h-10":"","w-full":"",flex:"","overflow-hidden":"","rounded-lg":""},[r("div",{bg:"primary-50",class:"primary-color-bar","text-black":""}," 50 "),r("div",{bg:"primary-100",class:"primary-color-bar","text-black":""}," 100 "),r("div",{bg:"primary-200",class:"primary-color-bar","text-black":""}," 200 "),r("div",{bg:"primary-300",class:"primary-color-bar","text-black":""}," 300 "),r("div",{bg:"primary-400",class:"primary-color-bar","text-black":""}," 400 "),r("div",{bg:"primary-500",class:"primary-color-bar","text-black":""}," 500 "),r("div",{bg:"primary-600",class:"primary-color-bar","text-white":""}," 600 "),r("div",{bg:"primary-700",class:"primary-color-bar","text-white":""}," 700 "),r("div",{bg:"primary-800",class:"primary-color-bar","text-white":""}," 800 "),r("div",{bg:"primary-900",class:"primary-color-bar","text-white":""}," 900 "),r("div",{bg:"primary-950",class:"primary-color-bar","text-white":""}," 950 ")],-1)),t[11]||(t[11]=r("div",{"mt-4":"","h-10":"","w-full":"",flex:"","overflow-hidden":"","rounded-lg":"",class:"transparency-grid"},[r("div",{bg:"primary-500/5",class:"primary-color-bar","text-black":""}," 500/5 "),r("div",{bg:"primary-500/10",class:"primary-color-bar","text-black":""}," 500/10 "),r("div",{bg:"primary-500/20",class:"primary-color-bar","text-black":""}," 500/20 "),r("div",{bg:"primary-500/30",class:"primary-color-bar","text-black":""}," 500/30 "),r("div",{bg:"primary-500/40",class:"primary-color-bar","text-black":""}," 500/40 "),r("div",{bg:"primary-500/50",class:"primary-color-bar","text-black":""}," 500/50 "),r("div",{bg:"primary-500/60",class:"primary-color-bar","text-black":""}," 500/60 "),r("div",{bg:"primary-500/70",class:"primary-color-bar","text-black":""}," 500/70 "),r("div",{bg:"primary-500/80",class:"primary-color-bar","text-black":""}," 500/80 "),r("div",{bg:"primary-500/90",class:"primary-color-bar","text-black":""}," 500/90 "),r("div",{bg:"primary-500",class:"primary-color-bar","text-black":""}," 500 ")],-1)),r("div",E,[r("label",T,[o(r("input",{"onUpdate:modelValue":t[2]||(t[2]=a=>l(e).themeColorsHueDynamic=a),type:"checkbox",class:"peer sr-only"},null,512),[[x,l(e).themeColorsHueDynamic]]),t[8]||(t[8]=r("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),t[9]||(t[9]=r("span",{class:"ml-2 text-sm font-medium"},"I Want It Dynamic!",-1))]),r("button",{class:"rounded-md bg-neutral-100 px-3 py-1.5 text-sm transition-colors dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700",onClick:m}," Reset to Default ")])])]),_:1}),t[12]||(t[12]=r("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",text:"neutral-100/80 dark:neutral-500/20"},[r("div",{text:"40","i-lucide:paintbrush":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof n=="function"&&n(V);export{V as default}; diff --git a/assets/index-BoxcUgjw.js b/assets/index-BoxcUgjw.js new file mode 100644 index 0000000000000000000000000000000000000000..5be2418f038d0128a6439839a4606a1e350fc78b --- /dev/null +++ b/assets/index-BoxcUgjw.js @@ -0,0 +1 @@ +import{d as l,s as d,h as u,c as n,o as i,a as e,e as p,F as s,C as f,j as m}from"./index-lQIQ1Nea.js";import{I as g}from"./IconStatusItem-C5d32Rl8.js";import{b as r}from"./route-block-B_A1xBdJ.js";const x={flex:"~ row","items-center":"","gap-2":""},k={grid:"~ cols-1 sm:cols-2 gap-4"},v=l({__name:"index",setup(b){const c=d(),a=u(()=>[{id:"consciousness",name:"Consciousness",description:"Thinking, vision, speech synthesis, gaming, etc.",icon:"i-lucide:ghost",to:"/settings/modules/consciousness",configured:!1},{id:"speech",name:"Speech",description:"Speech synthesis, etc.",icon:"i-lucide:mic",to:"/settings/modules/speech",configured:!1}]);return(h,o)=>(i(),n(s,null,[e("div",x,[e("button",{onClick:o[0]||(o[0]=t=>p(c).back())},o[1]||(o[1]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),o[2]||(o[2]=e("h1",{relative:""},[e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Settings")]),e("div",{"text-3xl":"","font-semibold":""}," Modules ")],-1))]),e("div",k,[(i(!0),n(s,null,f(a.value,t=>(i(),m(g,{key:t.id,title:t.name,description:t.description,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:t.to,configured:t.configured},null,8,["title","description","icon","icon-color","icon-image","to","configured"]))),128))]),o[3]||(o[3]=e("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",text:"neutral-100/80 dark:neutral-500/20"},[e("div",{text:"40","i-lucide:blocks":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof r=="function"&&r(v);export{v as default}; diff --git a/assets/index-DGm83CNQ.js b/assets/index-Bp-4JWYg.js similarity index 97% rename from assets/index-DGm83CNQ.js rename to assets/index-Bp-4JWYg.js index f4eb7f2e11df57ad732c833cb6d365b9bc9acd47..3f553c05a611590140b6e9d5535a7dc8e693f082 100644 --- a/assets/index-DGm83CNQ.js +++ b/assets/index-Bp-4JWYg.js @@ -1 +1 @@ -import{d as w,r as T,j as z,o as i,k as h,a as e,c as r,m as _,f as B,t as d,q as I,_ as L,s as R,v as V,x as $,y as D,i as M,e as n,b as l,z as x,A as f,B as k,T as b,F as S}from"./index-SpDrDth7.js";import"./emotions-D2WM87AE.js";import{b as y}from"./route-block-B_A1xBdJ.js";const N={"z-1":"","flex-1":""},U={"text-lg":"","font-bold":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-200"},j={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-200"},F=w({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(o){return(g,u)=>{const m=T("RouterLink");return i(),z(m,{flex:"~ row",bg:"neutral-50 dark:neutral-800",border:"neutral-100 dark:neutral-700 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-200",relative:"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",to:o.to},{default:h(()=>[e("div",N,[e("div",U,d(o.title),1),e("div",j,[e("span",null,d(o.description),1)])]),typeof o.icon=="string"?(i(),r("div",{key:0,class:I(["menu-icon-item-icon",[o.icon]]),transition:"all ease-in-out duration-500",absolute:"","right-0":"","size-24":"","translate-y-4":"",text:"neutral-400/50 dark:neutral-600/50"},null,2)):_("",!0),o.iconTemplate?B(g.$slots,"icon",{key:1},void 0,!0):_("",!0)]),_:3},8,["to"])}}}),p=L(F,[["__scopeId","data-v-5a40b42b"]]),q={flex:"~ row","items-center":"","gap-2":""},A={flex:"~ col gap-4"},E={flex:"~ col gap-4"},G={flex:"~ col gap-4"},P={grid:"~ cols-[150px_1fr]",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":""},H={text:"sm"},J={flex:"~ row","w-full":"","justify-end":""},K={value:"en-US"},O={value:"zh-CN"},Q={bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","cursor-pointer":"","rounded-lg":"","px-4":"","py-3":""},W=["checked","aria-checked"],X={flex:"~ row","w-full":"","items-center":"","gap-1.5":""},Y={text:"sm","w-full":"","flex-1":""},Z={"select-none":""},ee={key:0,"i-solar:moon-stars-bold-duotone":"",transition:"all ease-in-out duration-250"},te={key:1,"i-solar:sun-fog-bold-duotone":"",transition:"all ease-in-out duration-250"},ne={bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","cursor-pointer":"","rounded-lg":"","px-4":"","py-3":""},oe=["checked","aria-checked"],ie={flex:"~ row","w-full":"","items-center":"","gap-1.5":""},se={"select-none":""},ae={key:0,"i-solar:people-nearby-bold-duotone":"",transition:"all ease-in-out duration-250"},le={key:1,"i-solar:running-2-line-duotone":"",transition:"all ease-in-out duration-250"},re=w({__name:"index",setup(o){const g=R(),{t:u}=V(),{language:m,disableTransitions:s}=$(D()),a=M();function C(v){const t=v.target;m.value=t.value}return(v,t)=>(i(),r(S,null,[e("div",q,[e("button",{onClick:t[0]||(t[0]=c=>n(g).back())},t[3]||(t[3]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t[4]||(t[4]=e("h1",{"text-3xl":""}," Settings ",-1))]),e("div",A,[e("div",E,[l(p,{title:"Modules",description:"Thinking, vision, speech synthesis, gaming, etc.",icon:"i-lucide:blocks",to:"/settings/modules"}),l(p,{title:"Models",description:"Live2D, VRM, etc.",icon:"i-lucide:person-standing",to:"/settings/models"}),l(p,{title:"Providers",description:"LLMs, speech providers, etc.",icon:"i-lucide:brain",to:"/settings/providers"}),l(p,{title:"Themes",description:"Customize your stage!",icon:"i-lucide:paintbrush",to:"/settings/themes"})]),t[6]||(t[6]=e("div",null,[e("h2",{"text-2xl":""}," General ")],-1)),e("div",G,[e("div",P,[e("div",H,[e("span",null,d(n(u)("settings.language.title")),1)]),e("div",J,[e("select",{class:"w-32",bg:"transparent",text:"sm right neutral-800 dark:neutral-100",transition:"all ease-in-out duration-250",outline:"none","cursor-pointer":"",onChange:C},[e("option",K,d(n(u)("settings.language.english")),1),e("option",O,d(n(u)("settings.language.chinese")),1)],32)])]),e("label",Q,[x(e("input",{"onUpdate:modelValue":t[1]||(t[1]=c=>k(a)?a.value=c:null),text:"neutral-800 dark:neutral-100",checked:n(a),"aria-checked":n(a),type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,W),[[f,n(a)]]),e("div",X,[e("div",Y,[e("span",null,d(n(u)("settings.theme")),1)]),e("div",Z,[l(b,{name:"slide-away",mode:"out-in"},{default:h(()=>[n(a)?(i(),r("div",ee)):(i(),r("div",te))]),_:1})])])]),e("label",ne,[x(e("input",{"onUpdate:modelValue":t[2]||(t[2]=c=>k(s)?s.value=c:null),text:"neutral-800 dark:neutral-100",checked:n(s),"aria-checked":n(s),type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,oe),[[f,n(s)]]),e("div",ie,[t[5]||(t[5]=e("div",{text:"sm","w-full":"","flex-1":""},[e("span",null,"Disable Transitions (for debugging)")],-1)),e("div",se,[l(b,{name:"slide-away",mode:"out-in"},{default:h(()=>[n(s)?(i(),r("div",ae)):(i(),r("div",le))]),_:1})])])])]),t[7]||(t[7]=e("div",{text:"neutral-100/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":""},[e("div",{text:"40","i-lucide:cog":"","translate-x-10":"","translate-y-10":""})],-1))])],64))}});typeof y=="function"&&y(re);export{re as default}; +import{d as w,r as T,j as z,o as i,k as h,a as e,c as r,m as _,f as B,t as d,q as I,_ as L,s as R,v as V,x as $,y as D,i as M,e as n,b as l,z as x,A as f,B as k,T as b,F as S}from"./index-lQIQ1Nea.js";import"./emotions-D2WM87AE.js";import{b as y}from"./route-block-B_A1xBdJ.js";const N={"z-1":"","flex-1":""},U={"text-lg":"","font-bold":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-200"},j={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-200"},F=w({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(o){return(g,u)=>{const m=T("RouterLink");return i(),z(m,{flex:"~ row",bg:"neutral-50 dark:neutral-800",border:"neutral-100 dark:neutral-700 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-200",relative:"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",to:o.to},{default:h(()=>[e("div",N,[e("div",U,d(o.title),1),e("div",j,[e("span",null,d(o.description),1)])]),typeof o.icon=="string"?(i(),r("div",{key:0,class:I(["menu-icon-item-icon",[o.icon]]),transition:"all ease-in-out duration-500",absolute:"","right-0":"","size-24":"","translate-y-4":"",text:"neutral-400/50 dark:neutral-600/50"},null,2)):_("",!0),o.iconTemplate?B(g.$slots,"icon",{key:1},void 0,!0):_("",!0)]),_:3},8,["to"])}}}),p=L(F,[["__scopeId","data-v-5a40b42b"]]),q={flex:"~ row","items-center":"","gap-2":""},A={flex:"~ col gap-4"},E={flex:"~ col gap-4"},G={flex:"~ col gap-4"},P={grid:"~ cols-[150px_1fr]",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":""},H={text:"sm"},J={flex:"~ row","w-full":"","justify-end":""},K={value:"en-US"},O={value:"zh-CN"},Q={bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","cursor-pointer":"","rounded-lg":"","px-4":"","py-3":""},W=["checked","aria-checked"],X={flex:"~ row","w-full":"","items-center":"","gap-1.5":""},Y={text:"sm","w-full":"","flex-1":""},Z={"select-none":""},ee={key:0,"i-solar:moon-stars-bold-duotone":"",transition:"all ease-in-out duration-250"},te={key:1,"i-solar:sun-fog-bold-duotone":"",transition:"all ease-in-out duration-250"},ne={bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","cursor-pointer":"","rounded-lg":"","px-4":"","py-3":""},oe=["checked","aria-checked"],ie={flex:"~ row","w-full":"","items-center":"","gap-1.5":""},se={"select-none":""},ae={key:0,"i-solar:people-nearby-bold-duotone":"",transition:"all ease-in-out duration-250"},le={key:1,"i-solar:running-2-line-duotone":"",transition:"all ease-in-out duration-250"},re=w({__name:"index",setup(o){const g=R(),{t:u}=V(),{language:m,disableTransitions:s}=$(D()),a=M();function C(v){const t=v.target;m.value=t.value}return(v,t)=>(i(),r(S,null,[e("div",q,[e("button",{onClick:t[0]||(t[0]=c=>n(g).back())},t[3]||(t[3]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t[4]||(t[4]=e("h1",{"text-3xl":""}," Settings ",-1))]),e("div",A,[e("div",E,[l(p,{title:"Modules",description:"Thinking, vision, speech synthesis, gaming, etc.",icon:"i-lucide:blocks",to:"/settings/modules"}),l(p,{title:"Models",description:"Live2D, VRM, etc.",icon:"i-lucide:person-standing",to:"/settings/models"}),l(p,{title:"Providers",description:"LLMs, speech providers, etc.",icon:"i-lucide:brain",to:"/settings/providers"}),l(p,{title:"Themes",description:"Customize your stage!",icon:"i-lucide:paintbrush",to:"/settings/themes"})]),t[6]||(t[6]=e("div",null,[e("h2",{"text-2xl":""}," General ")],-1)),e("div",G,[e("div",P,[e("div",H,[e("span",null,d(n(u)("settings.language.title")),1)]),e("div",J,[e("select",{class:"w-32",bg:"transparent",text:"sm right neutral-800 dark:neutral-100",transition:"all ease-in-out duration-250",outline:"none","cursor-pointer":"",onChange:C},[e("option",K,d(n(u)("settings.language.english")),1),e("option",O,d(n(u)("settings.language.chinese")),1)],32)])]),e("label",Q,[x(e("input",{"onUpdate:modelValue":t[1]||(t[1]=c=>k(a)?a.value=c:null),text:"neutral-800 dark:neutral-100",checked:n(a),"aria-checked":n(a),type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,W),[[f,n(a)]]),e("div",X,[e("div",Y,[e("span",null,d(n(u)("settings.theme")),1)]),e("div",Z,[l(b,{name:"slide-away",mode:"out-in"},{default:h(()=>[n(a)?(i(),r("div",ee)):(i(),r("div",te))]),_:1})])])]),e("label",ne,[x(e("input",{"onUpdate:modelValue":t[2]||(t[2]=c=>k(s)?s.value=c:null),text:"neutral-800 dark:neutral-100",checked:n(s),"aria-checked":n(s),type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,oe),[[f,n(s)]]),e("div",ie,[t[5]||(t[5]=e("div",{text:"sm","w-full":"","flex-1":""},[e("span",null,"Disable Transitions (for debugging)")],-1)),e("div",se,[l(b,{name:"slide-away",mode:"out-in"},{default:h(()=>[n(s)?(i(),r("div",ae)):(i(),r("div",le))]),_:1})])])])]),t[7]||(t[7]=e("div",{text:"neutral-100/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":""},[e("div",{text:"40","i-lucide:cog":"","translate-x-10":"","translate-y-10":""})],-1))])],64))}});typeof y=="function"&&y(re);export{re as default}; diff --git a/assets/index-aMTQzeGD.js b/assets/index-CBwQWPyY.js similarity index 99% rename from assets/index-aMTQzeGD.js rename to assets/index-CBwQWPyY.js index 5525f41439fd5f9f331bf1b32773d16f7a22e827..c699d349b41fe3b8b86a18fc57be1d34eb965b7d 100644 --- a/assets/index-aMTQzeGD.js +++ b/assets/index-CBwQWPyY.js @@ -1,4 +1,4 @@ -import{ci as getAugmentedNamespace}from"./index-SpDrDth7.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*! +import{cg as getAugmentedNamespace}from"./index-lQIQ1Nea.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*! * ONNX Runtime Web v1.14.0 * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. diff --git a/assets/index-CHGD8voK.js b/assets/index-CHGD8voK.js new file mode 100644 index 0000000000000000000000000000000000000000..43bb1af68f37e4f4d2e5aa1fbe2450c07762cca2 --- /dev/null +++ b/assets/index-CHGD8voK.js @@ -0,0 +1 @@ +import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{W as a,_ as s}from"./Live2DSettings.vue_vue_type_script_setup_true_lang-BZ13gadG.js";import{d as l,s as d,c as m,o as p,a as t,e as o,b as r,F as u}from"./index-lQIQ1Nea.js";import{b as n}from"./route-block-B_A1xBdJ.js";import"./providers-B5WAuhMk.js";import"./queue-BJ5EFzA4.js";import"./queues-Bj3v4TZ0.js";import"./speech-Dj8k8vbX.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js";const f={flex:"~ row","items-center":"","gap-2":""},x={flex:""},v=l({__name:"index",setup(b){const i=d();return(g,e)=>(p(),m(u,null,[t("div",f,[t("button",{onClick:e[0]||(e[0]=k=>o(i).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e[2]||(e[2]=t("h1",{relative:""},[t("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[t("span",{text:"neutral-300 dark:neutral-500"},"Settings")]),t("div",{"text-3xl":"","font-semibold":""}," Models ")],-1))]),t("div",x,[r(o(a),{w:"50%",h:"80vh"}),r(s,{w:"50%",h:"80vh"})]),e[3]||(e[3]=t("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",text:"neutral-100/80 dark:neutral-500/20"},[t("div",{text:"40","i-lucide:person-standing":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof n=="function"&&n(v);export{v as default}; diff --git a/assets/index-D5R3unYH.js b/assets/index-CJP4FDm3.js similarity index 86% rename from assets/index-D5R3unYH.js rename to assets/index-CJP4FDm3.js index 5613882de92a1ff70dfd680f1d8855c2efa4feb1..254dc1cd45d453b27937b56e82a1cfb91033e024 100644 --- a/assets/index-D5R3unYH.js +++ b/assets/index-CJP4FDm3.js @@ -1 +1 @@ -import{d as u,s as m,x as f,c as i,o as n,a as t,e as r,F as s,C as p,j as x}from"./index-SpDrDth7.js";import"./emotions-D2WM87AE.js";import{u as g}from"./providers-CpyZMi_V.js";import{I as k}from"./IconStatusItem-DizX_200.js";import{b as a}from"./route-block-B_A1xBdJ.js";const b={flex:"~ row","items-center":"","gap-2":""},v={grid:"~ cols-2 gap-2"},y=u({__name:"index",setup(B){const l=m(),d=g(),{allProvidersMetadata:c}=f(d);return(C,o)=>(n(),i(s,null,[t("div",b,[t("button",{onClick:o[0]||(o[0]=e=>r(l).back())},o[1]||(o[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),o[2]||(o[2]=t("h1",{relative:""},[t("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[t("span",{text:"neutral-300 dark:neutral-500"},"Settings")]),t("div",{"text-3xl":"","font-semibold":""}," Providers ")],-1))]),t("div",v,[(n(!0),i(s,null,p(r(c),e=>(n(),x(k,{key:e.id,title:e.localizedName,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id.replace("-ai","")}`,configured:e.configured},null,8,["title","description","icon","icon-color","icon-image","to","configured"]))),128))]),o[3]||(o[3]=t("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",text:"neutral-100/80 dark:neutral-500/20"},[t("div",{text:"40","i-lucide:brain":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof a=="function"&&a(y);export{y as default}; +import{d as u,s as m,x as f,c as i,o as n,a as t,e as r,F as s,C as p,j as x}from"./index-lQIQ1Nea.js";import"./emotions-D2WM87AE.js";import{u as g}from"./providers-B5WAuhMk.js";import{I as k}from"./IconStatusItem-C5d32Rl8.js";import{b as a}from"./route-block-B_A1xBdJ.js";const b={flex:"~ row","items-center":"","gap-2":""},v={grid:"~ cols-2 gap-2"},y=u({__name:"index",setup(B){const l=m(),d=g(),{allProvidersMetadata:c}=f(d);return(C,o)=>(n(),i(s,null,[t("div",b,[t("button",{onClick:o[0]||(o[0]=e=>r(l).back())},o[1]||(o[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),o[2]||(o[2]=t("h1",{relative:""},[t("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[t("span",{text:"neutral-300 dark:neutral-500"},"Settings")]),t("div",{"text-3xl":"","font-semibold":""}," Providers ")],-1))]),t("div",v,[(n(!0),i(s,null,p(r(c),e=>(n(),x(k,{key:e.id,title:e.localizedName,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id.replace("-ai","")}`,configured:e.configured},null,8,["title","description","icon","icon-color","icon-image","to","configured"]))),128))]),o[3]||(o[3]=t("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",text:"neutral-100/80 dark:neutral-500/20"},[t("div",{text:"40","i-lucide:brain":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof a=="function"&&a(y);export{y as default}; diff --git a/assets/index-DdeMWJSg.css b/assets/index-CJvf-hh9.css similarity index 64% rename from assets/index-DdeMWJSg.css rename to assets/index-CJvf-hh9.css index 797e9f1be19ee9905feffc2598636b2f797eb2ab..e0f8d7f38e18a001796485f0355c617b10fdaef3 100644 --- a/assets/index-DdeMWJSg.css +++ b/assets/index-CJvf-hh9.css @@ -1 +1 @@ -.stage-transition-3[data-v-df576df0]{--delay: 0s;--sharpness: 40%;position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden}.stage-transition-3[data-v-df576df0]:before,.stage-transition-3[data-v-df576df0]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;animation:arrowIn-df576df0 1s cubic-bezier(.87,.05,.02,.97) both,arrowOut-df576df0 1s cubic-bezier(.87,.05,.02,.97) forwards}.stage-transition-3[data-v-df576df0]:before{background-color:var(--stage-transition-3-overlay-color-2);animation-delay:calc(0s + var(--delay, 0s)),calc(1.4s + var(--delay, 0s))}.stage-transition-3[data-v-df576df0]:after{background-color:var(--stage-transition-3-overlay-color-1);animation-delay:calc(.2s + var(--delay, 0s)),calc(1.2s + var(--delay, 0s))}@keyframes arrowIn-df576df0{0%{clip-path:polygon(calc(var(--sharpness) * -1) 0,calc(var(--sharpness) * -1) 0,0 50%,calc(var(--sharpness) * -1) 100%,calc(var(--sharpness) * -1) 100%,0 50%)}to{clip-path:polygon(calc(var(--sharpness) * -1) 0,100% 0,calc(100% + var(--sharpness)) 50%,100% 100%,calc(var(--sharpness) * -1) 100%,0 50%)}}@keyframes arrowOut-df576df0{0%{clip-path:polygon(calc(var(--sharpness) * -1) 0,100% 0,calc(100% + var(--sharpness)) 50%,100% 100%,calc(var(--sharpness) * -1) 100%,0 50%)}to{clip-path:polygon(100% 0,100% 0,calc(100% + var(--sharpness)) 50%,100% 100%,100% 100%,calc(100% + var(--sharpness)) 50%)}}.circle-expansion-transition[data-v-0c29056c]{position:fixed;top:calc(50% - 75vmax);left:calc(50% - 75vmax);width:150vmax;height:150vmax;pointer-events:none}.circle-expansion-transition div[data-v-0c29056c]{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;transform:scale(0)}.circle-expansion-transition div[data-v-0c29056c]:nth-child(1){background-color:var(--circle-expansion-color-1);animation:circleExpand-0c29056c var(--circle-expansion-duration) ease-in calc(var(--circle-expansion-delay) + 0s) forwards}.circle-expansion-transition div[data-v-0c29056c]:nth-child(2){background-color:var(--circle-expansion-color-2);animation:circleExpand-0c29056c var(--circle-expansion-duration) ease-in calc(var(--circle-expansion-delay) + .15s) forwards}.circle-expansion-transition div[data-v-0c29056c]:nth-child(3){background-color:var(--circle-expansion-color-3);animation:circleExpand-0c29056c var(--circle-expansion-duration) ease-in calc(var(--circle-expansion-delay) + .3s) forwards}.circle-expansion-transition div[data-v-0c29056c]:nth-child(4){background-color:var(--circle-expansion-color-4);animation:circleExpand-0c29056c var(--circle-expansion-duration) ease-in calc(var(--circle-expansion-delay) + .45s) forwards}@keyframes circleExpand-0c29056c{0%{transform:scale(0)}to{transform:scale(1)}}.fantasy-fall-transition[data-v-e62bf496]{position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden}.fantasy-fall-up[data-v-e62bf496]:before{content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--fantasy-fall-color);transform:translateY(-100%);border-bottom-left-radius:var(--fantasy-fall-radius-sm);border-bottom-right-radius:var(--fantasy-fall-radius-sm);animation:fantasy-fall-up var(--fantasy-fall-duration) ease-out var(--fantasy-fall-delay) forwards}.fantasy-fall-down[data-v-e62bf496]:before{content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--fantasy-fall-color);transform:translateY(100%);border-top-left-radius:var(--fantasy-fall-radius-sm);border-top-right-radius:var(--fantasy-fall-radius-sm);animation:fantasy-fall-down var(--fantasy-fall-duration) ease-out var(--fantasy-fall-delay) forwards}.fantasy-fall-left[data-v-e62bf496]:before{content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--fantasy-fall-color);transform:translate(-100%);border-top-right-radius:var(--fantasy-fall-radius-sm);border-bottom-right-radius:var(--fantasy-fall-radius-sm);animation:fantasy-fall-left var(--fantasy-fall-duration) ease-out var(--fantasy-fall-delay) forwards}.fantasy-fall-right[data-v-e62bf496]:before{content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--fantasy-fall-color);transform:translate(100%);border-top-left-radius:var(--fantasy-fall-radius-sm);border-bottom-left-radius:var(--fantasy-fall-radius-sm);animation:fantasy-fall-right var(--fantasy-fall-duration) ease-out var(--fantasy-fall-delay) forwards}@media (min-width: 768px){.fantasy-fall-up[data-v-e62bf496]:before{border-bottom-left-radius:var(--fantasy-fall-radius-md);border-bottom-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-down[data-v-e62bf496]:before{border-top-left-radius:var(--fantasy-fall-radius-md);border-top-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-left[data-v-e62bf496]:before{border-top-right-radius:var(--fantasy-fall-radius-md);border-bottom-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-right[data-v-e62bf496]:before{border-top-left-radius:var(--fantasy-fall-radius-md);border-bottom-left-radius:var(--fantasy-fall-radius-md)}}@media (min-width: 1024px){.fantasy-fall-up[data-v-e62bf496]:before{border-bottom-left-radius:var(--fantasy-fall-radius-lg);border-bottom-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-down[data-v-e62bf496]:before{border-top-left-radius:var(--fantasy-fall-radius-lg);border-top-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-left[data-v-e62bf496]:before{border-top-right-radius:var(--fantasy-fall-radius-lg);border-bottom-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-right[data-v-e62bf496]:before{border-top-left-radius:var(--fantasy-fall-radius-lg);border-bottom-left-radius:var(--fantasy-fall-radius-lg)}}@keyframes fantasy-fall-up{0%{transform:translateY(-100%)}50%{transform:translateY(0)}to{transform:translateY(0);border-bottom-right-radius:0%;border-bottom-left-radius:0%}}@keyframes fantasy-fall-down{0%{transform:translateY(100%)}50%{transform:translateY(0)}to{transform:translateY(0);border-top-right-radius:0%;border-top-left-radius:0%}}@keyframes fantasy-fall-left{0%{transform:translate(-100%)}50%{transform:translate(0)}to{transform:translate(0);border-top-right-radius:0%;border-bottom-right-radius:0%}}@keyframes fantasy-fall-right{0%{transform:translate(100%)}50%{transform:translate(0)}to{transform:translate(0);border-top-left-radius:0%;border-bottom-left-radius:0%}}.stage-transition-4[data-v-6d1179fc]{--delay: 0s;position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden;display:grid;grid-template-rows:repeat(5,1fr)}.stage-transition-4__block[data-v-6d1179fc]{position:relative;width:100%;height:100%}.stage-transition-4__block[data-v-6d1179fc]:before,.stage-transition-4__block[data-v-6d1179fc]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;animation:slideIn-6d1179fc .8s cubic-bezier(.87,.05,.02,.97) both,slideOut-6d1179fc .8s cubic-bezier(.87,.05,.02,.97) forwards}.stage-transition-4__block[data-v-6d1179fc]:before{background-color:var(--stage-transition-4-overlay-color-2);animation-delay:calc(0s + var(--d, 0s) + var(--delay, 0s)),calc(1.6s + var(--d, 0s) + var(--delay, 0s))}.stage-transition-4__block[data-v-6d1179fc]:after{background-color:var(--stage-transition-4-overlay-color-1);animation-delay:calc(.3s + var(--d, 0s) + var(--delay, 0s)),calc(1.3s + var(--d, 0s) + var(--delay, 0s))}.stage-transition-4__block[data-v-6d1179fc]:nth-child(1){--d: .1s}.stage-transition-4__block[data-v-6d1179fc]:nth-child(2){--d: .3s}.stage-transition-4__block[data-v-6d1179fc]:nth-child(3){--d: 0s}.stage-transition-4__block[data-v-6d1179fc]:nth-child(4){--d: .4s}.stage-transition-4__block[data-v-6d1179fc]:nth-child(5){--d: .2s}@keyframes slideIn-6d1179fc{0%{transform:translate(-101%)}to{transform:translate(0)}}@keyframes slideOut-6d1179fc{0%{transform:translate(0)}to{transform:translate(101%)}}.stage-transition-1[data-v-bf1d1566]{--delay: 0s;position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden}.stage-transition-1[data-v-bf1d1566]:before,.stage-transition-1[data-v-bf1d1566]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;animation:slideIn-bf1d1566 1s cubic-bezier(.87,.05,.02,.97) both,slideOut-bf1d1566 1s cubic-bezier(.87,.05,.02,.97) forwards}.stage-transition-1[data-v-bf1d1566]:before{background-color:var(--stage-transition-1-overlay-color-2);animation-delay:calc(0s + var(--delay, 0s)),calc(1.4s + var(--delay, 0s))}.stage-transition-1[data-v-bf1d1566]:after{background-color:var(--stage-transition-1-overlay-color-1);animation-delay:calc(.2s + var(--delay, 0s)),calc(1.2s + var(--delay, 0s))}@keyframes slideIn-bf1d1566{0%{transform:translate(-101%)}to{transform:translate(0)}}@keyframes slideOut-bf1d1566{0%{transform:translate(0)}to{transform:translate(101%)}}.stage-transition-2[data-v-8ff7120f]{--delay: 0s;--skew-x: 100%;position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden}.stage-transition-2[data-v-8ff7120f]:before,.stage-transition-2[data-v-8ff7120f]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;animation:maskIn-8ff7120f 1s cubic-bezier(.87,.05,.02,.97) both,maskOut-8ff7120f 1s cubic-bezier(.87,.05,.02,.97) forwards}.stage-transition-2[data-v-8ff7120f]:before{background-color:var(--stage-transition-2-overlay-color-2);animation-delay:calc(0s + var(--delay, 0s)),calc(1.4s + var(--delay, 0s))}.stage-transition-2[data-v-8ff7120f]:after{background-color:var(--stage-transition-2-overlay-color-1);animation-delay:calc(.2s + var(--delay, 0s)),calc(1.2s + var(--delay, 0s))}@keyframes maskIn-8ff7120f{0%{clip-path:polygon(0 0,0 0,calc(var(--skew-x, 0) * -1) 100%,calc(var(--skew-x, 0) * -1) 100%)}to{clip-path:polygon(0 0,calc(100% + var(--skew-x, 0)) 0,100% 100%,calc(var(--skew-x, 0) * -1) 100%)}}@keyframes maskOut-8ff7120f{0%{clip-path:polygon(0 0,calc(100% + var(--skew-x, 0)) 0,100% 100%,calc(var(--skew-x, 0) * -1) 100%)}to{clip-path:polygon(calc(100% + var(--skew-x, 0)) 0,calc(100% + var(--skew-x, 0)) 0,100% 100%,100% 100%)}}.rectangle-rotate-transition[data-v-f4b1dc64]{position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden}.rectangle[data-v-f4b1dc64]{position:absolute;width:100%;height:100%}.rectangle div[data-v-f4b1dc64]{position:absolute;width:100vmax;height:100vmax;transform:scale(0)}.rectangle-rotate-1 div[data-v-f4b1dc64]{top:-50vmax;left:-50vmax;background-color:var(--rectangle-rotate-1-color);animation:expand-rotate-f4b1dc64 var(--rectangle-rotate-duration) ease calc(var(--rectangle-rotate-delay) + 0s) forwards}.rectangle-rotate-2 div[data-v-f4b1dc64]{bottom:-50vmax;right:-50vmax;background-color:var(--rectangle-rotate-2-color);animation:expand-rotate-f4b1dc64 var(--rectangle-rotate-duration) ease calc(var(--rectangle-rotate-delay) + var(--rectangle-rotate-stagger)) forwards}.rectangle-rotate-3 div[data-v-f4b1dc64]{top:calc(50% - 50vmax);left:calc(50% - 50vmax);background-color:var(--rectangle-rotate-3-color);animation:expand-rotate-f4b1dc64 var(--rectangle-rotate-duration) ease calc(var(--rectangle-rotate-delay) + calc(var(--rectangle-rotate-stagger) * 2)) forwards}@keyframes expand-rotate-f4b1dc64{0%{transform:scale(0) rotate(0)}to{transform:scale(1) rotate(var(--rectangle-rotate-rotation))}}@property --theme-colors-hue{syntax: ""; initial-value: 0; inherits: true;}@keyframes hue-anim{0%{--theme-colors-hue: 0}to{--theme-colors-hue: 360}}.dynamic-hue{animation:hue-anim 10s linear infinite}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--airi-theme-primary-50: #fff0f2;--airi-theme-primary-100: #ffe3e6;--airi-theme-primary-200: #ffcad4;--airi-theme-primary-300: #ff9fb0;--airi-theme-primary-400: #ff6988;--airi-theme-primary-500: #fe456e;--airi-theme-primary-600: #ec124d;--airi-theme-primary-700: #c70941;--airi-theme-primary-800: #a70a3e;--airi-theme-primary-900: #8e0d3b;--airi-theme-primary-950: #50011b;--theme-colors-hue: 354.31;--theme-colors-chroma: calc(.18 + cos(var(--theme-colors-hue) * 3.14159265 / 180)/25) ;--theme-colors-chroma-50: calc(var(--theme-colors-chroma) * .3);--theme-colors-chroma-100: calc(var(--theme-colors-chroma) * .5);--theme-colors-chroma-200: calc(var(--theme-colors-chroma) * .6);--theme-colors-chroma-300: calc(var(--theme-colors-chroma) * .75);--theme-colors-chroma-400: var(--theme-colors-chroma);--theme-colors-chroma-600: calc(var(--theme-colors-chroma) * 1.15);--theme-colors-chroma-700: calc(var(--theme-colors-chroma) * 1.1);--theme-colors-chroma-800: calc(var(--theme-colors-chroma) * .85);--theme-colors-chroma-900: calc(var(--theme-colors-chroma) * .7);--theme-colors-chroma-950: calc(var(--theme-colors-chroma) * .5)}.slide-away-enter-active,.slide-away-leave-active{transition:transform .3s ease-in-out,opacity .3s ease-in-out}.slide-away-enter,.slide-away-leave-to{transform:translateY(-10px);opacity:0}.slide-away-enter-from,.slide-away-leave{transform:translateY(10px);opacity:0}html,body,#app{height:100%;margin:0;padding:0;overscroll-behavior:none}html{background:#fff;transition:all .3s ease-in-out}html.dark{background:#121212;color-scheme:dark}#nprogress{pointer-events:none}#nprogress .bar{background:#f472b6;opacity:.75;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }@font-face{font-family:DM Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmmono/v14/aFTU7PB1QTsUX8KYthSQBK6PYK3EXw.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmmono/v14/aFTU7PB1QTsUX8KYthqQBK6PYK0.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRR232RmYJp8I5zzw.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRSW32RmYJp8I5.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"DM Serif Display";font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmserifdisplay/v15/-nFnOHM81r4j6k0gjAW3mujVU2B2G_5x0vrx52jJ3Q.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"DM Serif Display";font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmserifdisplay/v15/-nFnOHM81r4j6k0gjAW3mujVU2B2G_Bx0vrx52g.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.0.woff2) format("woff2");unicode-range:U+25ee8,U+25f23,U+25f5c,U+25fd4,U+25fe0,U+25ffb,U+2600c,U+26017,U+26060,U+260ed,U+26222,U+2626a,U+26270,U+26286,U+2634c,U+26402,U+2667e,U+266b0,U+2671d,U+268dd,U+268ea,U+26951,U+2696f,U+26999,U+269dd,U+26a1e,U+26a58,U+26a8c,U+26ab7,U+26aff,U+26c29,U+26c73,U+26c9e,U+26cdd,U+26e40,U+26e65,U+26f94,U+26ff6-26ff8,U+270f4,U+2710d,U+27139,U+273da-273db,U+273fe,U+27410,U+27449,U+27614-27615,U+27631,U+27684,U+27693,U+2770e,U+27723,U+27752,U+278b2,U+27985,U+279b4,U+27a84,U+27bb3,U+27bbe,U+27bc7,U+27c3c,U+27cb8,U+27d73,U+27da0,U+27e10,U+27eaf,U+27fb7,U+2808a,U+280bb,U+28277,U+28282,U+282f3,U+283cd,U+2840c,U+28455,U+284dc,U+2856b,U+285c8-285c9,U+286d7,U+286fa,U+28946,U+28949,U+2896b,U+28987-28988,U+289ba-289bb,U+28a1e,U+28a29,U+28a43,U+28a71,U+28a99,U+28acd,U+28add,U+28ae4,U+28bc1,U+28bef,U+28cdd,U+28d10,U+28d71,U+28dfb,U+28e0f,U+28e17,U+28e1f,U+28e36,U+28e89,U+28eeb,U+28ef6,U+28f32,U+28ff8,U+292a0,U+292b1,U+29490,U+295cf,U+2967f,U+296f0,U+29719,U+29750,U+29810,U+298c6,U+29a72,U+29d4b,U+29ddb,U+29e15,U+29e3d,U+29e49,U+29e8a,U+29ec4,U+29edb,U+29ee9,U+29fce,U+29fd7,U+2a01a,U+2a02f,U+2a082,U+2a0f9,U+2a190,U+2a2b2,U+2a38c,U+2a437,U+2a5f1,U+2a602,U+2a61a,U+2a6b2,U+2a9e6,U+2b746,U+2b751,U+2b753,U+2b75a,U+2b75c,U+2b765,U+2b776-2b777,U+2b77c,U+2b782,U+2b789,U+2b78b,U+2b78e,U+2b794,U+2b7ac,U+2b7af,U+2b7bd,U+2b7c9,U+2b7cf,U+2b7d2,U+2b7d8,U+2b7f0,U+2b80d,U+2b817,U+2b81a,U+2d544,U+2e278,U+2e569,U+2e6ea,U+2f804,U+2f80f,U+2f815,U+2f818,U+2f81a,U+2f822,U+2f828,U+2f82c,U+2f833,U+2f83f,U+2f846,U+2f852,U+2f862,U+2f86d,U+2f873,U+2f877,U+2f884,U+2f899-2f89a,U+2f8a6,U+2f8ac,U+2f8b2,U+2f8b6,U+2f8d3,U+2f8db-2f8dc,U+2f8e1,U+2f8e5,U+2f8ea,U+2f8ed,U+2f8fc,U+2f903,U+2f90b,U+2f90f,U+2f91a,U+2f920-2f921,U+2f945,U+2f947,U+2f96c,U+2f995,U+2f9d0,U+2f9de-2f9df,U+2f9f4}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.1.woff2) format("woff2");unicode-range:U+1f235-1f23b,U+1f240-1f248,U+1f250-1f251,U+2000b,U+20089-2008a,U+200a2,U+200a4,U+200b0,U+200f5,U+20158,U+201a2,U+20213,U+2032b,U+20371,U+20381,U+203f9,U+2044a,U+20509,U+2053f,U+205b1,U+205d6,U+20611,U+20628,U+206ec,U+2074f,U+207c8,U+20807,U+2083a,U+208b9,U+2090e,U+2097c,U+20984,U+2099d,U+20a64,U+20ad3,U+20b1d,U+20b9f,U+20bb7,U+20d45,U+20d58,U+20de1,U+20e64,U+20e6d,U+20e95,U+20f5f,U+21201,U+2123d,U+21255,U+21274,U+2127b,U+212d7,U+212e4,U+212fd,U+2131b,U+21336,U+21344,U+213c4,U+2146d-2146e,U+215d7,U+21647,U+216b4,U+21706,U+21742,U+218bd,U+219c3,U+21a1a,U+21c56,U+21d2d,U+21d45,U+21d62,U+21d78,U+21d92,U+21d9c,U+21da1,U+21db7,U+21de0,U+21e33-21e34,U+21f1e,U+21f76,U+21ffa,U+2217b,U+22218,U+2231e,U+223ad,U+22609,U+226f3,U+2285b,U+228ab,U+2298f,U+22ab8,U+22b46,U+22b4f-22b50,U+22ba6,U+22c1d,U+22c24,U+22de1,U+22e42,U+22feb,U+231b6,U+231c3-231c4,U+231f5,U+23372,U+233cc,U+233d0,U+233d2-233d3,U+233d5,U+233da,U+233df,U+233e4,U+233fe,U+2344a-2344b,U+23451,U+23465,U+234e4,U+2355a,U+23594,U+235c4,U+23638-2363a,U+23647,U+2370c,U+2371c,U+2373f,U+23763-23764,U+237e7,U+237f1,U+237ff,U+23824,U+2383d,U+23a98,U+23c7f,U+23cbe,U+23cfe,U+23d00,U+23d0e,U+23d40,U+23dd3,U+23df9-23dfa,U+23f7e,U+2404b,U+24096,U+24103,U+241c6,U+241fe,U+242ee,U+243bc,U+243d0,U+24629,U+246a5,U+247f1,U+24896,U+248e9,U+24a4d,U+24b56,U+24b6f,U+24c16,U+24d14,U+24e04,U+24e0e,U+24e37,U+24e6a,U+24e8b,U+24ff2,U+2504a,U+25055,U+25122,U+251a9,U+251cd,U+251e5,U+2521e,U+2524c,U+2542e,U+2548e,U+254d9,U+2550e,U+255a7,U+2567f,U+25771,U+257a9,U+257b4,U+25874,U+259c4,U+259cc,U+259d4,U+25ad7,U+25ae3-25ae4,U+25af1,U+25bb2,U+25c4b,U+25c64,U+25da1,U+25e2e,U+25e56,U+25e62,U+25e65,U+25ec2,U+25ed8}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.2.woff2) format("woff2");unicode-range:U+ffd7,U+ffda-ffdc,U+ffe0-ffe2,U+ffe4,U+ffe6,U+ffe8-ffee,U+1f100-1f10c,U+1f110-1f16c,U+1f170-1f1ac,U+1f200-1f202,U+1f210-1f234}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.3.woff2) format("woff2");unicode-range:U+fa10,U+fa12-fa6d,U+fb00-fb04,U+fe10-fe19,U+fe30-fe42,U+fe44-fe52,U+fe54-fe66,U+fe68-fe6b,U+ff02,U+ff04,U+ff07,U+ff51,U+ff5b,U+ff5d,U+ff5f-ff60,U+ff66,U+ff69,U+ff87,U+ffa1-ffbe,U+ffc2-ffc7,U+ffca-ffcf,U+ffd2-ffd6}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.4.woff2) format("woff2");unicode-range:U+f92d-f959,U+f95b-f9f2,U+f9f4-fa0b,U+fa0e-fa0f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.5.woff2) format("woff2");unicode-range:U+9e8b-9e8c,U+9e8e-9e8f,U+9e91-9e92,U+9e95-9e96,U+9e98,U+9e9b,U+9e9d-9e9e,U+9ea4-9ea5,U+9ea8-9eaa,U+9eac-9eb0,U+9eb3-9eb5,U+9eb8,U+9ebc-9ebf,U+9ec3,U+9ec6,U+9ec8,U+9ecb-9ecd,U+9ecf-9ed1,U+9ed4-9ed5,U+9ed8,U+9edb-9ee0,U+9ee4-9ee5,U+9ee7-9ee8,U+9eec-9ef2,U+9ef4-9ef9,U+9efb-9eff,U+9f02-9f03,U+9f07-9f09,U+9f0e-9f12,U+9f14-9f17,U+9f19-9f1b,U+9f1f-9f22,U+9f26,U+9f2a-9f2c,U+9f2f,U+9f31-9f32,U+9f34,U+9f37,U+9f39-9f3a,U+9f3c-9f3f,U+9f41,U+9f43-9f47,U+9f4a,U+9f4e-9f50,U+9f52-9f58,U+9f5a,U+9f5d-9f61,U+9f63,U+9f66-9f6a,U+9f6c-9f73,U+9f75-9f77,U+9f7a,U+9f7d,U+9f7f,U+9f8f-9f92,U+9f94-9f97,U+9f99,U+9f9c-9fa3,U+9fa5,U+9fb4,U+9fbc-9fc2,U+9fc4,U+9fc6,U+9fcc,U+f900-f92c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.6.woff2) format("woff2");unicode-range:U+9c3e,U+9c41,U+9c43-9c4a,U+9c4e-9c50,U+9c52-9c54,U+9c56,U+9c58,U+9c5a-9c61,U+9c63,U+9c65,U+9c67-9c6b,U+9c6d-9c6e,U+9c70,U+9c72,U+9c75-9c78,U+9c7a-9c7c,U+9ce6-9ce7,U+9ceb-9cec,U+9cf0,U+9cf2,U+9cf6-9cf7,U+9cf9,U+9d02-9d03,U+9d06-9d09,U+9d0b,U+9d0e,U+9d11-9d12,U+9d15,U+9d17-9d18,U+9d1b-9d1f,U+9d23,U+9d26,U+9d2a-9d2c,U+9d2f-9d30,U+9d32-9d34,U+9d3a,U+9d3c-9d3f,U+9d41-9d48,U+9d4a,U+9d50-9d54,U+9d59,U+9d5d-9d65,U+9d69-9d6c,U+9d6f-9d70,U+9d72-9d73,U+9d76-9d77,U+9d7a-9d7c,U+9d7e,U+9d83-9d84,U+9d86-9d87,U+9d89-9d8a,U+9d8d-9d8e,U+9d92-9d93,U+9d95-9d9a,U+9da1,U+9da4,U+9da9-9dac,U+9dae,U+9db1-9db2,U+9db5,U+9db8-9dbd,U+9dbf-9dc4,U+9dc6-9dc7,U+9dc9-9dca,U+9dcf,U+9dd3-9dd7,U+9dd9-9dda,U+9dde-9de0,U+9de3,U+9de5-9de7,U+9de9,U+9deb,U+9ded-9df0,U+9df3-9df4,U+9df8,U+9dfd-9dfe,U+9e02,U+9e07,U+9e0a,U+9e0d-9e0e,U+9e10-9e12,U+9e15-9e16,U+9e19-9e1f,U+9e75,U+9e79-9e7d,U+9e80-9e85,U+9e87-9e88}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.7.woff2) format("woff2");unicode-range:U+9ae5-9ae7,U+9ae9,U+9aeb-9aec,U+9aee-9aef,U+9af1-9af5,U+9af7,U+9af9-9afb,U+9afd,U+9aff-9b06,U+9b08-9b09,U+9b0b-9b0e,U+9b10,U+9b12,U+9b16,U+9b18-9b1d,U+9b1f-9b20,U+9b22-9b23,U+9b25-9b2f,U+9b32-9b35,U+9b37,U+9b39-9b3b,U+9b3d,U+9b43-9b44,U+9b48,U+9b4b-9b4f,U+9b51,U+9b55-9b58,U+9b5b,U+9b5e,U+9b61,U+9b63,U+9b65-9b66,U+9b68,U+9b6a-9b6f,U+9b72-9b79,U+9b7f-9b80,U+9b83-9b87,U+9b89-9b8b,U+9b8d,U+9b8f-9b94,U+9b96-9b97,U+9b9a,U+9b9d-9ba0,U+9ba6-9ba7,U+9ba9-9baa,U+9bac,U+9bb0-9bb2,U+9bb4,U+9bb7-9bb9,U+9bbb-9bbc,U+9bbe-9bc1,U+9bc6-9bc8,U+9bca,U+9bce-9bd2,U+9bd4,U+9bd7-9bd8,U+9bdd,U+9bdf,U+9be1-9be5,U+9be7,U+9bea-9beb,U+9bee-9bf3,U+9bf5,U+9bf7-9bfa,U+9bfd,U+9bff-9c00,U+9c02,U+9c04,U+9c06,U+9c08-9c0d,U+9c0f-9c16,U+9c18-9c1e,U+9c21-9c2a,U+9c2d-9c32,U+9c35-9c37,U+9c39-9c3a,U+9c3d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.8.woff2) format("woff2");unicode-range:U+98eb,U+98ed-98ee,U+98f0-98f1,U+98f3,U+98f6,U+9902,U+9907-9909,U+9911-9912,U+9914-9918,U+991a-9922,U+9924,U+9926-9927,U+992b-992c,U+992e,U+9931-9935,U+9939-993e,U+9940-9942,U+9945-9949,U+994b-994e,U+9950-9952,U+9954-9955,U+9958-9959,U+995b-995c,U+995e-9960,U+9963,U+9997-9998,U+999b,U+999d-999f,U+99a3,U+99a5-99a6,U+99a8,U+99ad-99ae,U+99b0-99b2,U+99b5,U+99b9-99ba,U+99bc-99bd,U+99bf,U+99c1,U+99c3,U+99c8-99c9,U+99d1,U+99d3-99d5,U+99d8-99df,U+99e1-99e2,U+99e7,U+99ea-99ee,U+99f0-99f2,U+99f4-99f5,U+99f8-99f9,U+99fb-99fe,U+9a01-9a05,U+9a08,U+9a0a-9a0c,U+9a0f-9a11,U+9a16,U+9a1a,U+9a1e,U+9a20,U+9a22-9a24,U+9a27,U+9a2b,U+9a2d-9a2e,U+9a31,U+9a33,U+9a35-9a38,U+9a3e,U+9a40-9a45,U+9a47,U+9a4a-9a4e,U+9a51-9a52,U+9a54-9a58,U+9a5b,U+9a5d,U+9a5f,U+9a62,U+9a64-9a65,U+9a69-9a6c,U+9aaa,U+9aac-9ab0,U+9ab2,U+9ab4-9ab7,U+9ab9,U+9abb-9ac1,U+9ac3,U+9ac6,U+9ac8,U+9ace-9ad3,U+9ad5-9ad7,U+9adb-9adc,U+9ade-9ae0,U+9ae2-9ae4}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.9.woff2) format("woff2");unicode-range:U+971d,U+9721-9724,U+9728,U+972a,U+9730-9731,U+9733,U+9736,U+9738-9739,U+973b,U+973d-973e,U+9741-9744,U+9746-974a,U+974d-974f,U+9751,U+9755,U+9757-9758,U+975a-975c,U+9760-9761,U+9763-9764,U+9766-9768,U+976a-976b,U+976e,U+9771,U+9773,U+9776-977d,U+977f-9781,U+9785-9786,U+9789,U+978b,U+978f-9790,U+9795-9797,U+9799-979a,U+979c,U+979e-97a0,U+97a2-97a3,U+97a6,U+97a8,U+97ab-97ac,U+97ae,U+97b1-97b6,U+97b8-97ba,U+97bc,U+97be-97bf,U+97c1,U+97c3-97ce,U+97d0-97d1,U+97d4,U+97d7-97d9,U+97db-97de,U+97e0-97e1,U+97e4,U+97e6,U+97ed-97ef,U+97f1-97f2,U+97f4-97f8,U+97fa,U+9804,U+9807,U+980a,U+980c-980f,U+9814,U+9816-9817,U+9819-981a,U+981c,U+981e,U+9820-9821,U+9823-9826,U+982b,U+982e-9830,U+9832-9835,U+9837,U+9839,U+983d-983e,U+9844,U+9846-9847,U+984a-984b,U+984f,U+9851-9853,U+9856-9857,U+9859-985b,U+9862-9863,U+9865-9866,U+986a-986c,U+986f-9871,U+9873-9875,U+98aa-98ab,U+98ad-98ae,U+98b0-98b1,U+98b4,U+98b6-98b8,U+98ba-98bc,U+98bf,U+98c2-98c8,U+98cb-98cc,U+98ce,U+98dc,U+98de,U+98e0-98e1,U+98e3,U+98e5-98e7,U+98e9-98ea}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.10.woff2) format("woff2");unicode-range:U+944a,U+944c,U+9452-9453,U+9455,U+9459-945c,U+945e-9463,U+9468,U+946a-946b,U+946d-9472,U+9475,U+9477,U+947c-947f,U+9481,U+9483-9485,U+9578-9579,U+957e-957f,U+9582,U+9584,U+9586-9588,U+958a,U+958c-958f,U+9592,U+9594,U+9596,U+9598-9599,U+959d-95a1,U+95a4,U+95a6-95a9,U+95ab-95ad,U+95b1,U+95b4,U+95b6,U+95b9-95bf,U+95c3,U+95c6,U+95c8-95cd,U+95d0-95d6,U+95d9-95da,U+95dc-95e2,U+95e4-95e6,U+95e8,U+961d-961e,U+9621-9622,U+9624-9626,U+9628,U+962c,U+962e-962f,U+9631,U+9633-9634,U+9637-963a,U+963c-963d,U+9641-9642,U+964b-964c,U+964f,U+9652,U+9654,U+9656-9658,U+965c-965f,U+9661,U+9666,U+966a,U+966c,U+966e,U+9672,U+9674,U+9677,U+967b-967c,U+967e-967f,U+9681-9684,U+9689,U+968b,U+968d,U+9691,U+9695-9698,U+969a,U+969d,U+969f,U+96a4-96aa,U+96ae-96b4,U+96b6,U+96b8-96bb,U+96bd,U+96c1,U+96c9-96cb,U+96cd-96ce,U+96d2,U+96d5-96d6,U+96d8-96da,U+96dc-96df,U+96e9,U+96ef,U+96f1,U+96f9-96fa,U+9702-9706,U+9708-9709,U+970d-970f,U+9711,U+9713-9714,U+9716,U+9719-971b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.11.woff2) format("woff2");unicode-range:U+92bc-92bd,U+92bf-92c3,U+92c5-92c8,U+92cb-92d0,U+92d2-92d3,U+92d5,U+92d7-92d9,U+92dc-92dd,U+92df-92e1,U+92e3-92e5,U+92e7-92ea,U+92ec,U+92ee,U+92f0,U+92f2,U+92f7-92fb,U+92ff-9300,U+9302,U+9304,U+9308,U+930d,U+930f-9311,U+9314-9315,U+9318-931a,U+931c-931f,U+9321-9325,U+9327-932b,U+932e,U+9333-9337,U+933a-933b,U+9344,U+9347-934a,U+934d,U+9350-9352,U+9354-9358,U+935a,U+935c,U+935e,U+9360,U+9364-9365,U+9367,U+9369-936d,U+936f-9371,U+9373-9374,U+9376,U+937a,U+937d-9382,U+9388,U+938a-938b,U+938d,U+938f,U+9392,U+9394-9395,U+9397-9398,U+939a-939b,U+939e,U+93a1,U+93a3-93a4,U+93a6,U+93a8-93a9,U+93ab-93ad,U+93b0,U+93b4-93b6,U+93b9-93bb,U+93c1,U+93c3-93cd,U+93d0-93d1,U+93d3,U+93d6-93d9,U+93dc-93df,U+93e2,U+93e4-93e8,U+93f1,U+93f5,U+93f7-93fb,U+93fd,U+9401-9404,U+9407-9409,U+940d-9410,U+9413-9417,U+9419-941a,U+941f,U+9421,U+942b,U+942e-942f,U+9431-9434,U+9436,U+9438,U+943a-943b,U+943d,U+943f,U+9441,U+9443-9445,U+9448}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.12.woff2) format("woff2");unicode-range:U+9143,U+9146-914c,U+914f,U+9153,U+9156-915b,U+9161,U+9163-9165,U+9167,U+9169,U+916d,U+9172-9174,U+9179-917b,U+9181-9183,U+9185-9187,U+9189-918b,U+918e,U+9191,U+9193-9195,U+9197-9198,U+919e,U+91a1-91a2,U+91a6,U+91a8,U+91aa-91b6,U+91ba-91bd,U+91bf-91c6,U+91c9,U+91cb,U+91d0,U+91d3-91d4,U+91d6-91d7,U+91d9-91db,U+91de-91df,U+91e1,U+91e4-91e6,U+91e9-91ea,U+91ec-91f1,U+91f5-91f7,U+91f9,U+91fb-91fd,U+91ff-9201,U+9204-9207,U+9209-920a,U+920c,U+920e,U+9210-9218,U+921c-921e,U+9223-9226,U+9228-9229,U+922c,U+922e-9230,U+9233,U+9235-923a,U+923c,U+923e-9240,U+9242-9243,U+9245-924b,U+924d-9251,U+9256-925a,U+925c-925e,U+9260-9261,U+9264-9269,U+926e-9270,U+9275-9279,U+927b-927f,U+9288-928a,U+928d-928e,U+9291-9293,U+9295-9297,U+9299,U+929b-929c,U+929f-92a0,U+92a4-92a5,U+92a7-92a8,U+92ab,U+92af,U+92b2-92b3,U+92b6-92bb}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.13.woff2) format("woff2");unicode-range:U+8f52-8f55,U+8f57-8f58,U+8f5c-8f5e,U+8f61-8f66,U+8f9c-8f9d,U+8f9f-8fa2,U+8fa4-8fa8,U+8fad-8faf,U+8fb4-8fb8,U+8fbe,U+8fc0-8fc2,U+8fc6,U+8fc8,U+8fca-8fcb,U+8fcd,U+8fd0,U+8fd2-8fd3,U+8fd5,U+8fda,U+8fe0,U+8fe2-8fe5,U+8fe8-8fea,U+8fed-8fef,U+8ff1,U+8ff4-8ff6,U+8ff8-8ffb,U+8ffe,U+9002,U+9004-9005,U+9008,U+900b-900e,U+9011,U+9013,U+9015-9016,U+9018,U+901b,U+901e,U+9021,U+9027-902a,U+902c-902d,U+902f,U+9033-9037,U+9039,U+903c,U+903e-903f,U+9041,U+9043-9044,U+9049,U+904c,U+904f-9052,U+9056,U+9058,U+905b-905e,U+9062,U+9066-9068,U+906c,U+906f-9070,U+9072,U+9074,U+9076,U+9079,U+9080-9083,U+9085,U+9087-9088,U+908b-908c,U+908e-9090,U+9095,U+9097-9099,U+909b,U+90a0-90a2,U+90a5,U+90a8,U+90af-90b6,U+90bd-90be,U+90c3-90c5,U+90c7-90c9,U+90cc,U+90d2,U+90d5,U+90d7-90d9,U+90db-90df,U+90e2,U+90e4-90e5,U+90eb,U+90ef-90f0,U+90f2,U+90f4,U+90f6,U+90fe-9100,U+9102,U+9104-9106,U+9108,U+910d,U+9110,U+9112,U+9114-911a,U+911c,U+911e,U+9120,U+9122-9123,U+9125,U+9127,U+9129,U+912d-9132,U+9134,U+9136-9137,U+9139-913a,U+913c-913d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.14.woff2) format("woff2");unicode-range:U+8dc0,U+8dc2,U+8dc5-8dc8,U+8dca-8dcc,U+8dce-8dcf,U+8dd1,U+8dd4-8dd7,U+8dd9-8ddb,U+8ddf,U+8de3-8de5,U+8de7,U+8dea-8dec,U+8df0-8df2,U+8df4,U+8dfc-8dfd,U+8dff,U+8e01,U+8e04-8e06,U+8e08-8e09,U+8e0b-8e0c,U+8e10-8e11,U+8e14,U+8e16,U+8e1d-8e23,U+8e26-8e27,U+8e30-8e31,U+8e33-8e39,U+8e3d,U+8e40-8e42,U+8e44,U+8e47-8e50,U+8e54-8e55,U+8e59,U+8e5b-8e64,U+8e69,U+8e6c-8e6d,U+8e6f-8e72,U+8e75-8e77,U+8e79-8e7c,U+8e81-8e85,U+8e89,U+8e8b,U+8e90-8e95,U+8e98-8e9b,U+8e9d-8e9e,U+8ea1-8ea2,U+8ea7,U+8ea9-8eaa,U+8eac-8eb1,U+8eb3,U+8eb5-8eb6,U+8eba-8ebb,U+8ebe,U+8ec0-8ec1,U+8ec3-8ec8,U+8ecb,U+8ecf,U+8ed1,U+8ed4,U+8edb-8edc,U+8ee3,U+8ee8,U+8eeb,U+8eed-8eee,U+8ef0-8ef1,U+8ef7,U+8ef9-8efc,U+8efe,U+8f00,U+8f02,U+8f05,U+8f07-8f08,U+8f0a,U+8f0f-8f10,U+8f12-8f13,U+8f15-8f19,U+8f1b-8f1c,U+8f1e-8f21,U+8f23,U+8f25-8f28,U+8f2b-8f2f,U+8f33-8f37,U+8f39-8f3b,U+8f3e,U+8f40-8f43,U+8f45-8f47,U+8f49-8f4a,U+8f4c-8f4f,U+8f51}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.15.woff2) format("woff2");unicode-range:U+8b2d,U+8b30,U+8b37,U+8b3c,U+8b3e,U+8b41-8b46,U+8b48-8b49,U+8b4c-8b4f,U+8b51-8b54,U+8b56,U+8b59,U+8b5b,U+8b5e-8b5f,U+8b63,U+8b69,U+8b6b-8b6d,U+8b6f,U+8b71,U+8b74,U+8b76,U+8b78-8b79,U+8b7c-8b81,U+8b84-8b85,U+8b8a-8b8f,U+8b92-8b96,U+8b99-8b9a,U+8b9c-8ba0,U+8c38-8c3a,U+8c3d-8c3f,U+8c41,U+8c45,U+8c47-8c49,U+8c4b-8c4c,U+8c4e-8c51,U+8c53-8c55,U+8c57-8c59,U+8c5b,U+8c5d,U+8c62-8c64,U+8c66,U+8c68-8c69,U+8c6b-8c6d,U+8c73,U+8c75-8c76,U+8c78,U+8c7a-8c7c,U+8c7e,U+8c82,U+8c85-8c87,U+8c89-8c8b,U+8c8d-8c8e,U+8c90,U+8c92-8c94,U+8c98-8c99,U+8c9b-8c9c,U+8c9f,U+8ca4,U+8cad-8cae,U+8cb2-8cb3,U+8cb6,U+8cb9-8cba,U+8cbd,U+8cc1-8cc2,U+8cc4-8cc6,U+8cc8-8cc9,U+8ccb,U+8ccd-8ccf,U+8cd2,U+8cd5-8cd6,U+8cd9-8cda,U+8cdd,U+8ce1,U+8ce3-8ce4,U+8ce6,U+8ce8,U+8cec,U+8cef-8cf2,U+8cf4-8cf5,U+8cf7-8cf8,U+8cfa-8cfb,U+8cfd-8cff,U+8d01,U+8d03-8d04,U+8d07,U+8d09-8d0b,U+8d0d-8d10,U+8d12-8d14,U+8d16-8d17,U+8d1b-8d1d,U+8d65,U+8d67,U+8d69,U+8d6b-8d6e,U+8d71,U+8d73,U+8d76,U+8d7f,U+8d81-8d82,U+8d84,U+8d88,U+8d8d,U+8d90-8d91,U+8d95,U+8d99,U+8d9e-8da0,U+8da6,U+8da8,U+8dab-8dac,U+8daf,U+8db2,U+8db5,U+8db7,U+8db9-8dbc,U+8dbe}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.16.woff2) format("woff2");unicode-range:U+8973-8975,U+8977,U+897a-897e,U+8980,U+8983,U+8988-898a,U+898d,U+8990,U+8993-8995,U+8998,U+899b-899c,U+899f-89a1,U+89a5-89a6,U+89a9,U+89ac,U+89af-89b0,U+89b2,U+89b4-89b7,U+89ba,U+89bc-89bd,U+89bf-89c1,U+89d4-89d8,U+89da,U+89dc-89dd,U+89e5,U+89e7,U+89e9,U+89eb,U+89ed,U+89f1,U+89f3-89f4,U+89f6,U+89f8-89f9,U+89fd,U+89ff,U+8a01,U+8a04-8a05,U+8a07,U+8a0c,U+8a0f-8a12,U+8a14-8a16,U+8a1b,U+8a1d-8a1e,U+8a20-8a22,U+8a24-8a26,U+8a2b-8a2c,U+8a2f,U+8a35-8a37,U+8a3b,U+8a3d-8a3e,U+8a40-8a41,U+8a43,U+8a45-8a49,U+8a4d-8a4e,U+8a51-8a54,U+8a56-8a58,U+8a5b-8a5d,U+8a61-8a62,U+8a65,U+8a67,U+8a6c-8a6d,U+8a75-8a77,U+8a79-8a7c,U+8a7e-8a80,U+8a82-8a86,U+8a8b,U+8a8f-8a92,U+8a96-8a97,U+8a99-8a9a,U+8a9f,U+8aa1,U+8aa3,U+8aa5-8aaa,U+8aae-8aaf,U+8ab3,U+8ab6-8ab7,U+8abb-8abc,U+8abe,U+8ac2-8ac4,U+8ac6,U+8ac8-8aca,U+8acc-8acd,U+8ad0-8ad1,U+8ad3-8ad5,U+8ad7,U+8ada-8ae2,U+8ae4,U+8ae7,U+8aeb-8aec,U+8aee,U+8af0-8af1,U+8af3-8af7,U+8afa,U+8afc,U+8aff,U+8b01-8b02,U+8b04-8b07,U+8b0a-8b0d,U+8b0f-8b11,U+8b14,U+8b16,U+8b1a,U+8b1c,U+8b1e-8b20,U+8b26,U+8b28,U+8b2b-8b2c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.17.woff2) format("woff2");unicode-range:U+87e2-87e6,U+87ea-87ed,U+87ef,U+87f1,U+87f3,U+87f5-87f8,U+87fa-87fb,U+87fe-87ff,U+8801,U+8803,U+8805-8807,U+8809-880b,U+880d-8816,U+8818-881c,U+881e-881f,U+8821-8822,U+8827-8828,U+882d-882e,U+8830-8832,U+8835-8836,U+8839-883c,U+8841-8845,U+8848-884b,U+884d-884e,U+8851-8852,U+8855-8856,U+8858-885a,U+885c,U+885e-8860,U+8862,U+8864,U+8869,U+886b,U+886e-886f,U+8871-8872,U+8875,U+8877,U+8879,U+887b,U+887d-887e,U+8880-8882,U+8888,U+888d,U+8892,U+8897-889c,U+889e-88a0,U+88a2,U+88a4,U+88a8,U+88aa,U+88ae,U+88b0-88b1,U+88b5,U+88b7,U+88ba,U+88bc-88c0,U+88c3-88c4,U+88c6,U+88ca-88ce,U+88d1-88d4,U+88d8-88d9,U+88db,U+88dd-88e1,U+88e7-88e8,U+88ef-88f2,U+88f4-88f5,U+88f7,U+88f9,U+88fc,U+8901-8902,U+8904,U+8906,U+890a,U+890c-890f,U+8913,U+8915-8916,U+8918-891a,U+891c-891e,U+8920,U+8925-8928,U+892a-892b,U+8930-8932,U+8935-893b,U+893e,U+8940-8946,U+8949,U+894c-894d,U+894f,U+8952,U+8956-8957,U+895a-895c,U+895e,U+8960-8964,U+8966,U+896a-896b,U+896d-8970}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.18.woff2) format("woff2");unicode-range:U+8655-8659,U+865b,U+865d-8664,U+8667,U+8669,U+866c,U+866f,U+8671,U+8675-8677,U+867a-867b,U+867d,U+8687-8689,U+868b-868d,U+8691,U+8693,U+8695-8696,U+8698,U+869a,U+869c-869d,U+86a1,U+86a3-86a4,U+86a6-86ab,U+86ad,U+86af-86b1,U+86b3-86b9,U+86bf-86c1,U+86c3-86c6,U+86c9,U+86cb,U+86ce,U+86d1-86d2,U+86d4-86d5,U+86d7,U+86da,U+86dc,U+86de-86e0,U+86e3-86e7,U+86e9,U+86ec-86ed,U+86ef,U+86f8-86fe,U+8700,U+8703-870b,U+870d-8714,U+8719-871a,U+871e-871f,U+8721-8723,U+8725,U+8728-8729,U+872e-872f,U+8731-8732,U+8734,U+8737,U+8739-8740,U+8743,U+8745,U+8749,U+874b-874e,U+8751,U+8753,U+8755,U+8757-8759,U+875d,U+875f-8761,U+8763-8766,U+8768,U+876a,U+876e-876f,U+8771-8772,U+8774,U+8778,U+877b-877c,U+877f,U+8782-8789,U+878b-878c,U+878e,U+8790,U+8793,U+8795,U+8797-8799,U+879e-87a0,U+87a2-87a3,U+87a7,U+87ab-87af,U+87b1,U+87b3,U+87b5,U+87bb,U+87bd-87c1,U+87c4,U+87c6-87cb,U+87ce,U+87d0,U+87d2,U+87d5-87d6,U+87d9-87da,U+87dc,U+87df-87e0}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.19.woff2) format("woff2");unicode-range:U+84b4,U+84b9-84bb,U+84bd-84c2,U+84c6-84ca,U+84cc-84d1,U+84d3,U+84d6,U+84d9-84da,U+84dc,U+84e7,U+84ea,U+84ec,U+84ef-84f2,U+84f4,U+84f7,U+84fa-84fd,U+84ff-8500,U+8502-8503,U+8506-8507,U+850c,U+850e,U+8510,U+8514-8515,U+8517-8518,U+851a-851c,U+851e-851f,U+8521-8525,U+8527,U+852a-852c,U+852f,U+8532-8534,U+8536,U+853e-8541,U+8543,U+8546,U+8548,U+854a-854b,U+854f-8553,U+8555-855a,U+855c-8564,U+8569-856b,U+856d,U+856f,U+8577,U+8579-857b,U+857d-8581,U+8585-8586,U+8588-858c,U+858f-8591,U+8593,U+8597-8598,U+859b-859d,U+859f-85a0,U+85a2,U+85a4-85a5,U+85a7-85a8,U+85ad-85b0,U+85b4,U+85b6-85ba,U+85bc-85bf,U+85c1-85c2,U+85c7,U+85c9-85cb,U+85ce-85d0,U+85d5,U+85d8-85da,U+85dc,U+85df-85e1,U+85e5-85e6,U+85e8,U+85ed,U+85f3-85f4,U+85f6-85f7,U+85f9-85fa,U+85fc,U+85fe-8600,U+8602,U+8604-8606,U+860a-860b,U+860d-860e,U+8610-8613,U+8616-861b,U+861e,U+8621-8622,U+8624,U+8627,U+8629,U+862f-8630,U+8636,U+8638-863a,U+863c-863d,U+863f-8642,U+8646,U+864d,U+8652-8654}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.20.woff2) format("woff2");unicode-range:U+82e8,U+82ea,U+82ed,U+82ef,U+82f3-82f4,U+82f6-82f7,U+82f9,U+82fb,U+82fd-82fe,U+8300-8301,U+8303,U+8306-8308,U+830a-830c,U+8316-8318,U+831b,U+831d-831f,U+8321-8323,U+832b-8335,U+8337,U+833a,U+833c-833d,U+8340,U+8342-8347,U+834a,U+834d-8351,U+8353-8357,U+835a,U+8362-8363,U+8370,U+8373,U+8375,U+8378,U+837c-837d,U+837f-8380,U+8382,U+8384-8387,U+838a,U+838d-838e,U+8392-8396,U+8398-83a0,U+83a2,U+83a6-83ad,U+83b1,U+83b5,U+83bd-83c1,U+83c7,U+83c9,U+83ce-83d1,U+83d4,U+83d6,U+83d8,U+83dd,U+83df-83e1,U+83e5,U+83e8,U+83ea-83eb,U+83f0,U+83f2,U+83f4,U+83f6-83f9,U+83fb-83fd,U+8401,U+8403-8404,U+8406-8407,U+840a-840b,U+840d,U+840f,U+8411,U+8413,U+8415,U+8417,U+8419,U+8420,U+8422,U+842a,U+842f,U+8431,U+8435,U+8438-8439,U+843c,U+8445-8448,U+844a,U+844d-844f,U+8451-8452,U+8456,U+8458-845a,U+845c,U+845f-8462,U+8464-8467,U+8469-846b,U+846d-8470,U+8473-8474,U+8476-847a,U+847c-847d,U+8481-8482,U+8484-8485,U+848b,U+8490,U+8492-8493,U+8495,U+8497,U+849c,U+849e-849f,U+84a1,U+84a6,U+84a8-84aa,U+84ad,U+84af,U+84b1}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.21.woff2) format("woff2");unicode-range:U+814a,U+814c,U+8151-8153,U+8157,U+815f-8161,U+8165-8169,U+816d-816f,U+8171,U+8173-8174,U+8177,U+8180-8186,U+8188,U+818a-818b,U+818e,U+8190,U+8193,U+8195-8196,U+8198,U+819b,U+819e,U+81a0,U+81a2,U+81a4,U+81a9,U+81ae,U+81b0,U+81b2,U+81b4-81b5,U+81b8,U+81ba-81bb,U+81bd-81be,U+81c0-81c3,U+81c5-81c6,U+81c8-81cb,U+81cd-81cf,U+81d1,U+81d5-81db,U+81dd-81e1,U+81e4-81e5,U+81e7,U+81eb-81ec,U+81ef-81f2,U+81f5-81f6,U+81f8-81fb,U+81fd-8205,U+8209-820b,U+820d,U+820f,U+8212-8214,U+8216,U+8219-821d,U+8221-8222,U+8228-8229,U+822b,U+822e,U+8232-8235,U+8237-8238,U+823a,U+823c,U+8240,U+8243-8246,U+8249,U+824b,U+824e-824f,U+8251,U+8256-825a,U+825c-825d,U+825f-8260,U+8262-8264,U+8267-8268,U+826a-826b,U+826d-826e,U+8271,U+8274,U+8277,U+8279,U+827b,U+827d-8281,U+8283-8284,U+8287,U+8289-828a,U+828d-828e,U+8291-8294,U+8296,U+8298-829b,U+829f-82a1,U+82a3-82a4,U+82a7-82ac,U+82ae,U+82b0,U+82b2,U+82b4,U+82b7,U+82ba-82bc,U+82be-82bf,U+82c5-82c6,U+82d0,U+82d2-82d3,U+82d5,U+82d9-82da,U+82dc,U+82de-82e4,U+82e7}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.22.woff2) format("woff2");unicode-range:U+7f77-7f79,U+7f7d-7f80,U+7f82-7f83,U+7f86-7f88,U+7f8b-7f8d,U+7f8f-7f91,U+7f94,U+7f96-7f97,U+7f9a,U+7f9c-7f9d,U+7fa1-7fa3,U+7fa6,U+7faa,U+7fad-7faf,U+7fb2,U+7fb4,U+7fb6,U+7fb8-7fb9,U+7fbc,U+7fbf-7fc0,U+7fc3,U+7fc5-7fc6,U+7fc8,U+7fca,U+7fce-7fcf,U+7fd5,U+7fdb,U+7fdf,U+7fe1,U+7fe3,U+7fe5-7fe6,U+7fe8-7fe9,U+7feb-7fec,U+7fee-7ff0,U+7ff2-7ff3,U+7ff9-7ffa,U+7ffd-7fff,U+8002,U+8004,U+8006-8008,U+800a-800f,U+8011-8014,U+8016,U+8018-8019,U+801c-8021,U+8024,U+8026,U+8028,U+802c,U+802e,U+8030,U+8034-8035,U+8037,U+8039-8040,U+8043-8044,U+8046,U+804a,U+8052,U+8058,U+805a,U+805f-8060,U+8062,U+8064,U+8066,U+8068,U+806d,U+806f-8073,U+8075-8076,U+8079,U+807b,U+807d-8081,U+8084-8088,U+808b,U+808e,U+8093,U+8099-809a,U+809c,U+809e,U+80a4,U+80a6-80a7,U+80ab-80ad,U+80b1,U+80b8-80b9,U+80c4-80c5,U+80c8,U+80ca,U+80cd,U+80cf,U+80d2,U+80d4-80db,U+80dd,U+80e0,U+80e4-80e6,U+80ed-80f3,U+80f5-80f7,U+80f9-80fc,U+80fe,U+8101,U+8103,U+8109,U+810b,U+810d,U+8116-8118,U+811b-811c,U+811e,U+8120,U+8123-8124,U+8127,U+8129,U+812b-812c,U+812f-8130,U+8135,U+8139-813a,U+813c-813e,U+8141,U+8145-8147}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.23.woff2) format("woff2");unicode-range:U+7d57,U+7d59-7d5d,U+7d63,U+7d65,U+7d67,U+7d6a,U+7d6e,U+7d70,U+7d72-7d73,U+7d78,U+7d7a-7d7b,U+7d7d,U+7d7f,U+7d81-7d83,U+7d85-7d86,U+7d88-7d89,U+7d8b-7d8d,U+7d8f,U+7d91,U+7d93,U+7d96-7d97,U+7d9b-7da0,U+7da2-7da3,U+7da6-7da7,U+7daa-7dac,U+7dae-7db0,U+7db3,U+7db5-7db9,U+7dbd,U+7dc0,U+7dc2-7dc7,U+7dcc-7dce,U+7dd0,U+7dd5-7dd9,U+7ddc-7dde,U+7de1-7de6,U+7dea-7ded,U+7df1-7df2,U+7df5-7df6,U+7df9-7dfa,U+7e00,U+7e05,U+7e08-7e0b,U+7e10-7e12,U+7e15,U+7e17,U+7e1c-7e1d,U+7e1f-7e23,U+7e27-7e28,U+7e2c-7e2d,U+7e2f,U+7e31-7e33,U+7e35-7e37,U+7e39-7e3b,U+7e3d,U+7e3f,U+7e43-7e48,U+7e4e,U+7e50,U+7e52,U+7e56,U+7e58-7e5a,U+7e5d-7e5f,U+7e61-7e62,U+7e65-7e67,U+7e69-7e6b,U+7e6d-7e6f,U+7e73,U+7e75,U+7e78-7e79,U+7e7b-7e7f,U+7e81-7e83,U+7e86-7e8a,U+7e8c-7e8e,U+7e90-7e96,U+7e98,U+7e9a-7e9f,U+7f38,U+7f3a-7f3f,U+7f43-7f45,U+7f47,U+7f4c-7f50,U+7f52-7f55,U+7f58,U+7f5b-7f5d,U+7f5f,U+7f61,U+7f63-7f69,U+7f6b,U+7f6d,U+7f71}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.24.woff2) format("woff2");unicode-range:U+7bc8,U+7bca-7bcc,U+7bcf,U+7bd4,U+7bd6-7bd7,U+7bd9-7bdb,U+7bdd,U+7be5-7be6,U+7be8-7bea,U+7bf0,U+7bf2-7bfa,U+7bfc,U+7bfe,U+7c00-7c04,U+7c06-7c07,U+7c09,U+7c0b-7c0f,U+7c11-7c14,U+7c17,U+7c19,U+7c1b,U+7c1e-7c20,U+7c23,U+7c25-7c28,U+7c2a-7c2c,U+7c2f,U+7c31,U+7c33-7c34,U+7c36-7c3a,U+7c3d-7c3e,U+7c40,U+7c42-7c43,U+7c45-7c46,U+7c4a,U+7c4c,U+7c4f-7c5f,U+7c61,U+7c63-7c65,U+7c67,U+7c69,U+7c6c-7c70,U+7c72,U+7c75,U+7c79,U+7c7b-7c7e,U+7c81-7c83,U+7c86-7c87,U+7c8d,U+7c8f-7c90,U+7c94,U+7c9e,U+7ca0-7ca2,U+7ca4-7ca6,U+7ca8,U+7cab,U+7cad-7cae,U+7cb0-7cb3,U+7cb6-7cb7,U+7cb9-7cbd,U+7cbf-7cc0,U+7cc2,U+7cc4-7cc5,U+7cc7-7cca,U+7ccd-7ccf,U+7cd2-7cd5,U+7cd7-7cda,U+7cdc-7cdd,U+7cdf-7ce0,U+7ce2,U+7ce6,U+7ce9,U+7ceb,U+7cef,U+7cf2,U+7cf4-7cf6,U+7cf9-7cfa,U+7cfe,U+7d02-7d03,U+7d06-7d0a,U+7d0f,U+7d11-7d13,U+7d15-7d16,U+7d1c-7d1e,U+7d23,U+7d26,U+7d2a,U+7d2c-7d2e,U+7d31-7d32,U+7d35,U+7d3c-7d41,U+7d43,U+7d45,U+7d47-7d48,U+7d4b,U+7d4d-7d4f,U+7d51,U+7d53,U+7d55-7d56}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.25.woff2) format("woff2");unicode-range:U+7a17-7a19,U+7a1b,U+7a1e-7a21,U+7a27,U+7a2b,U+7a2d,U+7a2f-7a31,U+7a34-7a35,U+7a37-7a3b,U+7a3e,U+7a43-7a49,U+7a4c,U+7a4e,U+7a50,U+7a55-7a57,U+7a59,U+7a5c-7a5d,U+7a5f-7a63,U+7a65,U+7a67,U+7a69-7a6a,U+7a6d,U+7a70,U+7a75,U+7a78-7a79,U+7a7d-7a7e,U+7a80,U+7a82,U+7a84-7a86,U+7a88,U+7a8a-7a8b,U+7a90-7a91,U+7a94-7a98,U+7a9e,U+7aa0,U+7aa3,U+7aa9,U+7aac,U+7ab0,U+7ab3,U+7ab5-7ab6,U+7ab9-7abf,U+7ac3,U+7ac5-7aca,U+7acc-7acf,U+7ad1-7ad3,U+7ad5,U+7ada-7adb,U+7add,U+7adf,U+7ae1-7ae2,U+7ae6-7aed,U+7af0-7af1,U+7af4,U+7af8,U+7afa-7afb,U+7afd-7afe,U+7b02,U+7b04,U+7b06-7b08,U+7b0a-7b0b,U+7b0f,U+7b12,U+7b14,U+7b18-7b19,U+7b1e-7b1f,U+7b23,U+7b25,U+7b27-7b2b,U+7b2d-7b31,U+7b33-7b36,U+7b3b,U+7b3d,U+7b3f-7b41,U+7b45,U+7b47,U+7b4c-7b50,U+7b53,U+7b55,U+7b5d,U+7b60,U+7b64-7b66,U+7b69-7b6a,U+7b6c-7b75,U+7b77,U+7b79-7b7a,U+7b7f,U+7b84,U+7b86,U+7b89,U+7b8d-7b92,U+7b96,U+7b98-7ba0,U+7ba5,U+7bac-7bad,U+7baf-7bb0,U+7bb2,U+7bb4-7bb6,U+7bba-7bbd,U+7bc1-7bc2,U+7bc5-7bc6}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.26.woff2) format("woff2");unicode-range:U+7851-7852,U+785c,U+785e,U+7860-7861,U+7863-7864,U+7868,U+786a,U+786e-786f,U+7872,U+7874,U+787a,U+787c,U+787e,U+7886-7887,U+788a,U+788c-788f,U+7893-7895,U+7898,U+789a,U+789d-789f,U+78a1,U+78a3-78a4,U+78a8-78aa,U+78ac-78ad,U+78af-78b3,U+78b5,U+78bb-78bf,U+78c5-78cc,U+78ce,U+78d1-78d6,U+78da-78db,U+78df-78e1,U+78e4,U+78e6-78e7,U+78ea,U+78ec,U+78f2-78f4,U+78f6-78f7,U+78f9-78fb,U+78fd-7901,U+7906-7907,U+790c,U+7910-7912,U+7919-791c,U+791e-7920,U+7925-792e,U+7930-7931,U+7934-7935,U+793b,U+793d,U+793f,U+7941-7942,U+7944-7946,U+794a-794b,U+794f,U+7951,U+7954-7955,U+7957-7958,U+795a-795c,U+795f-7960,U+7962,U+7967,U+7969,U+796b,U+7972,U+7977,U+7979-797c,U+797e-7980,U+798a-798e,U+7991,U+7993-7996,U+7998,U+799b-799d,U+79a1,U+79a6-79ab,U+79ae-79b1,U+79b3-79b4,U+79b8-79bb,U+79bd-79be,U+79c2,U+79c4,U+79c7-79ca,U+79cc-79cd,U+79cf,U+79d4-79d6,U+79da,U+79dd-79e3,U+79e5,U+79e7,U+79ea-79ed,U+79f1,U+79f8,U+79fc,U+7a02-7a03,U+7a05,U+7a07-7a0a,U+7a0c-7a0d,U+7a11,U+7a15}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.27.woff2) format("woff2");unicode-range:U+768c-768e,U+7690,U+7693,U+7695-7696,U+7699-76a8,U+76aa,U+76ad,U+76af-76b0,U+76b4,U+76b6-76ba,U+76bd,U+76c1-76c3,U+76c5,U+76c8-76c9,U+76cb-76ce,U+76d2,U+76d4,U+76d6,U+76d9,U+76dc,U+76de,U+76e0-76e1,U+76e5-76e8,U+76ea-76ec,U+76f0-76f1,U+76f6,U+76f9,U+76fb-76fc,U+7700,U+7704,U+7706-7708,U+770a,U+770e,U+7712,U+7714-7715,U+7717,U+7719-771c,U+7722,U+7724-7726,U+7728,U+772d-772f,U+7734-7739,U+773d-773e,U+7742,U+7745-7747,U+774a,U+774d-774f,U+7752,U+7756-7758,U+775a-775c,U+775e-7760,U+7762,U+7764-7765,U+7767,U+776a-776c,U+7770,U+7772-7774,U+7779-777a,U+777c-7780,U+7784,U+778b-778e,U+7794-7796,U+779a,U+779e-77a0,U+77a2,U+77a4-77a5,U+77a7,U+77a9-77aa,U+77ae-77b1,U+77b5-77b7,U+77b9,U+77bb-77bf,U+77c3,U+77c7,U+77c9,U+77cd,U+77d1-77d2,U+77d5,U+77d7,U+77d9-77da,U+77dc,U+77de-77e0,U+77e3-77e4,U+77e6-77e7,U+77e9-77ea,U+77ec,U+77ee,U+77f0-77f1,U+77f4,U+77f8,U+77fb-77fc,U+7805-7806,U+7809,U+780c-780e,U+7811-7812,U+7819,U+781d,U+7820-7823,U+7826-7827,U+782c-782e,U+7830,U+7835,U+7837,U+783a,U+783f,U+7843-7845,U+7847-7848,U+784c,U+784e-784f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.28.woff2) format("woff2");unicode-range:U+7511-7513,U+7515-7517,U+751c,U+751e,U+7520-7522,U+7524,U+7526-7527,U+7529-752c,U+752f,U+7536,U+7538-7539,U+753c-7540,U+7543-7544,U+7546-754b,U+754d-7550,U+7552,U+7557,U+755a-755b,U+755d-755f,U+7561-7562,U+7564,U+7566-7567,U+7569,U+756b-756d,U+756f,U+7571-7572,U+7574-757e,U+7581-7582,U+7585-7587,U+7589-758c,U+758f-7590,U+7592-7595,U+7599-759a,U+759c-759d,U+75a2-75a5,U+75b0-75b1,U+75b3-75b5,U+75b7-75b8,U+75ba,U+75bd,U+75bf-75c4,U+75c6,U+75ca,U+75cc-75cf,U+75d3-75d4,U+75d7-75d8,U+75dc-75e1,U+75e3-75e4,U+75e7,U+75ec,U+75ee-75f3,U+75f9,U+75fc,U+75fe-7604,U+7607-760c,U+760f,U+7612-7613,U+7615-7616,U+7618-7619,U+761b-7629,U+762d,U+7630,U+7632-7635,U+7638-763c,U+7640-7641,U+7643-764b,U+764e,U+7655,U+7658-7659,U+765c,U+765f,U+7661-7662,U+7664-7665,U+7667-766a,U+766c-7672,U+7674,U+7676,U+7678,U+7680-7683,U+7685,U+7688,U+768b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.29.woff2) format("woff2");unicode-range:U+736c,U+736e-7371,U+7375,U+7377-737c,U+7380-7381,U+7383,U+7385-7386,U+738a,U+738e,U+7390,U+7393-7398,U+739c,U+739e-73a0,U+73a2,U+73a5-73a6,U+73a8,U+73aa-73ab,U+73ad,U+73b3,U+73b5,U+73b7,U+73b9-73bd,U+73bf,U+73c5-73c6,U+73c9-73cc,U+73ce-73cf,U+73d2-73d3,U+73d6,U+73d9,U+73dd-73de,U+73e1,U+73e3-73e7,U+73e9-73ea,U+73ee,U+73f1,U+73f4-73f5,U+73f7-73fb,U+73fd,U+73ff-7401,U+7404-7405,U+7407,U+740a,U+7411,U+7413,U+741a-741b,U+7421,U+7424,U+7426,U+7428-7431,U+7433,U+7439-743a,U+743f-7441,U+7443-7444,U+7446-7447,U+744b,U+744d,U+7451-7453,U+7455,U+7457,U+7459-745a,U+745c-745d,U+745f,U+7462-7464,U+7466-746b,U+746d-7473,U+7476,U+747e,U+7480-7481,U+7485-7489,U+748b,U+748f-7492,U+7497-749a,U+749c,U+749e-74a3,U+74a5-74a6,U+74a8-74ab,U+74ae-74af,U+74b1-74b2,U+74b5,U+74b9-74bb,U+74bd,U+74bf,U+74c8-74ca,U+74cc,U+74cf-74d0,U+74d3-74d4,U+74d6,U+74d8,U+74da-74db,U+74de-74e0,U+74e3-74e4,U+74e7-74eb,U+74ee-74f2,U+74f4,U+74f7-74f8,U+74fa-74fc,U+74ff,U+7501,U+7503-7506,U+750c-750e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.30.woff2) format("woff2");unicode-range:U+7166,U+7168,U+716c,U+7179,U+7180,U+7184-7185,U+7187-7188,U+718c,U+718f,U+7192,U+7194-7196,U+7199-719b,U+71a0,U+71a2,U+71a8,U+71ac,U+71ae-71b0,U+71b2-71b3,U+71b9-71ba,U+71be-71c1,U+71c4,U+71c9,U+71cb-71cc,U+71ce,U+71d0,U+71d2-71d4,U+71d6-71d7,U+71d9-71da,U+71dc,U+71df-71e0,U+71e6-71e7,U+71ec-71ee,U+71f4-71f5,U+71f8-71f9,U+71fc,U+71fe-7200,U+7207-7209,U+720d,U+7210,U+7213,U+7215,U+7217,U+721a,U+721d,U+721f,U+7224,U+7228,U+722b,U+722d,U+722f-7230,U+7232,U+7234,U+7238-7239,U+723b-723c,U+723e-7243,U+7245-7246,U+724b,U+724e-7250,U+7252-7253,U+7255-7258,U+725a,U+725c,U+725e,U+7260,U+7263,U+7268,U+726b,U+726e-726f,U+7271,U+7274,U+7277-7278,U+727b-727c,U+727e-7282,U+7284,U+7287,U+7289,U+728d-728e,U+7292-7293,U+7296,U+729b,U+72a2,U+72a7-72a8,U+72ad-72ae,U+72b0-72b2,U+72b4,U+72b9,U+72be,U+72c0-72c1,U+72c3-72c4,U+72c6-72c7,U+72c9,U+72cc,U+72ce,U+72d2,U+72d5-72d6,U+72d8,U+72df-72e2,U+72e5,U+72f3-72f4,U+72f7,U+72f9-72fb,U+72fd-72fe,U+7302,U+7304-7305,U+7307,U+730a-730b,U+730d,U+7312-7313,U+7316-7319,U+731c-731e,U+7322,U+7324,U+7327-7329,U+732c,U+732f,U+7331-7337,U+7339-733b,U+733d-733e,U+7343,U+734d-7350,U+7352,U+7356-7358,U+735d-7360,U+7366-736b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.31.woff2) format("woff2");unicode-range:U+6f58-6f5b,U+6f5d-6f5e,U+6f60-6f62,U+6f66,U+6f68,U+6f6c-6f6d,U+6f6f,U+6f74,U+6f78,U+6f7a,U+6f7c-6f7e,U+6f80,U+6f82-6f83,U+6f86-6f88,U+6f8b-6f8e,U+6f90-6f94,U+6f96-6f98,U+6f9a,U+6f9d,U+6f9f-6fa1,U+6fa3,U+6fa5-6fa8,U+6fae-6fb1,U+6fb3,U+6fb5-6fb7,U+6fb9,U+6fbc,U+6fbe,U+6fc2,U+6fc5-6fca,U+6fd4-6fd5,U+6fd8,U+6fda-6fdb,U+6fde-6fe0,U+6fe4,U+6fe8-6fe9,U+6feb-6fec,U+6fee,U+6ff0,U+6ff3,U+6ff5-6ff6,U+6ff9-6ffa,U+6ffc-6ffe,U+7000-7001,U+7005-7007,U+7009-700b,U+700d,U+700f,U+7011,U+7015,U+7017-7018,U+701a-701b,U+701d-7020,U+7023,U+7026,U+7028,U+702f-7030,U+7032,U+7034,U+7037,U+7039-703a,U+703c,U+703e,U+7043-7044,U+7047-704c,U+704e,U+7051,U+7054-7055,U+705d-705e,U+7064-7065,U+7069,U+706c,U+706e,U+7075-7076,U+707e,U+7081,U+7085-7086,U+7094-7098,U+709b,U+709f,U+70a4,U+70ab-70ac,U+70ae-70b1,U+70b3-70b4,U+70b7,U+70bb,U+70ca-70cb,U+70d1,U+70d3-70d6,U+70d8-70d9,U+70dc-70dd,U+70df,U+70e4,U+70ec,U+70f1,U+70fa,U+70fd,U+7103-7108,U+710b-710c,U+710f,U+7114,U+7119,U+711c,U+711e,U+7120,U+712b,U+712d-7131,U+7138,U+7141,U+7145-7147,U+7149-714b,U+7150-7153,U+7155-7157,U+715a,U+715c,U+715e,U+7160,U+7162,U+7164-7165}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.32.woff2) format("woff2");unicode-range:U+6d7c,U+6d80-6d82,U+6d85,U+6d87,U+6d89-6d8a,U+6d8c-6d8e,U+6d91-6d98,U+6d9c,U+6daa-6dac,U+6dae,U+6db4-6db5,U+6db7-6db9,U+6dbd,U+6dbf,U+6dc2,U+6dc4-6dc8,U+6dca,U+6dcc,U+6dce-6dd0,U+6dd2,U+6dd5-6dd6,U+6dd8-6ddb,U+6ddd-6de0,U+6de2,U+6de4-6de6,U+6de8-6dea,U+6dec,U+6dee-6df0,U+6df2,U+6df4,U+6df6,U+6df8-6dfa,U+6dfc,U+6e00,U+6e04,U+6e0a,U+6e17,U+6e19,U+6e1d-6e20,U+6e22-6e25,U+6e27,U+6e2b,U+6e2d-6e2e,U+6e32,U+6e34,U+6e36,U+6e38-6e3c,U+6e42-6e45,U+6e48-6e49,U+6e4b-6e4f,U+6e51-6e54,U+6e57,U+6e5b-6e5f,U+6e62-6e63,U+6e68,U+6e6b,U+6e6e,U+6e72-6e73,U+6e76,U+6e7b,U+6e7d,U+6e82,U+6e89,U+6e8c-6e8d,U+6e8f,U+6e93,U+6e98-6e99,U+6e9f-6ea0,U+6ea5,U+6ea7,U+6eaa-6eab,U+6ead-6eaf,U+6eb1-6eb4,U+6eb7,U+6ebb-6ebd,U+6ebf-6ec4,U+6ec7-6eca,U+6ecc-6ecf,U+6ed3-6ed5,U+6ed9-6edb,U+6ee6,U+6eeb-6eef,U+6ef7-6ef9,U+6efb,U+6efd-6eff,U+6f04,U+6f08-6f0a,U+6f0c-6f0d,U+6f10-6f11,U+6f13,U+6f15-6f16,U+6f18,U+6f1a-6f1b,U+6f25-6f26,U+6f29-6f2a,U+6f2d,U+6f2f-6f33,U+6f35-6f36,U+6f38,U+6f3b-6f3c,U+6f3e-6f3f,U+6f41,U+6f45,U+6f4f,U+6f51-6f53,U+6f57}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.33.woff2) format("woff2");unicode-range:U+6b85,U+6b89,U+6b8d,U+6b95,U+6b97-6b98,U+6b9b,U+6b9e-6ba0,U+6ba2-6ba4,U+6ba8-6bb3,U+6bb7-6bb9,U+6bbc-6bbe,U+6bc0,U+6bc3-6bc4,U+6bc6-6bc9,U+6bcb-6bcc,U+6bcf,U+6bd3,U+6bd6-6bd8,U+6bda,U+6bdf,U+6be1,U+6be3,U+6be6-6be7,U+6beb-6bec,U+6bee,U+6bf1,U+6bf3,U+6bf7,U+6bf9,U+6bff,U+6c02,U+6c04-6c05,U+6c08-6c0a,U+6c0d-6c0e,U+6c10,U+6c12-6c14,U+6c19,U+6c1b,U+6c1f,U+6c24,U+6c26-6c28,U+6c2c,U+6c2e,U+6c33,U+6c35-6c36,U+6c3a-6c3b,U+6c3e-6c40,U+6c4a-6c4b,U+6c4d,U+6c4f,U+6c52,U+6c54-6c55,U+6c59,U+6c5b-6c5e,U+6c62,U+6c67-6c68,U+6c6a-6c6b,U+6c6d,U+6c6f,U+6c73-6c74,U+6c76,U+6c78-6c79,U+6c7b,U+6c7e,U+6c81-6c87,U+6c89,U+6c8c-6c8d,U+6c90,U+6c92-6c95,U+6c97-6c98,U+6c9a-6c9c,U+6c9f,U+6caa-6cae,U+6cb0-6cb2,U+6cb4,U+6cba,U+6cbd-6cbe,U+6cc2,U+6cc5-6cc6,U+6ccd,U+6ccf-6cd4,U+6cd6-6cd7,U+6cd9-6cdd,U+6ce0,U+6ce7,U+6ce9-6cef,U+6cf1-6cf2,U+6cf4,U+6cfb,U+6d00-6d01,U+6d04,U+6d07,U+6d0a,U+6d0c,U+6d0e-6d0f,U+6d11,U+6d13,U+6d19-6d1a,U+6d1f,U+6d24,U+6d26-6d28,U+6d2b,U+6d2e-6d2f,U+6d31,U+6d33-6d36,U+6d38-6d39,U+6d3c-6d3d,U+6d3f,U+6d57-6d5b,U+6d5e-6d61,U+6d64-6d65,U+6d67,U+6d6c,U+6d6f-6d70,U+6d79}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.34.woff2) format("woff2");unicode-range:U+69dd-69de,U+69e2-69e3,U+69e5,U+69e7-69eb,U+69ed-69ef,U+69f1-69f6,U+69f9,U+69fe-6a01,U+6a03,U+6a05,U+6a0a,U+6a0c,U+6a0f,U+6a11-6a15,U+6a17,U+6a1a-6a1b,U+6a1d-6a20,U+6a22-6a24,U+6a28,U+6a2e,U+6a30,U+6a32-6a38,U+6a3b,U+6a3e-6a3f,U+6a44-6a4a,U+6a4e,U+6a50-6a52,U+6a54-6a56,U+6a5b,U+6a61-6a62,U+6a64,U+6a66-6a67,U+6a6a-6a6b,U+6a71-6a73,U+6a78,U+6a7a,U+6a7e-6a7f,U+6a81,U+6a83-6a84,U+6a86-6a87,U+6a89,U+6a8b,U+6a8d,U+6a90-6a91,U+6a94,U+6a97,U+6a9b,U+6a9d-6aa3,U+6aa5,U+6aaa-6aac,U+6aae-6ab1,U+6ab3-6ab4,U+6ab8,U+6abb,U+6abd-6abf,U+6ac1-6ac3,U+6ac6,U+6ac8-6ac9,U+6acc,U+6ad0-6ad1,U+6ad3-6ad6,U+6ada-6adf,U+6ae2,U+6ae4,U+6ae7-6ae8,U+6aea,U+6aec,U+6af0-6af3,U+6af8,U+6afa,U+6afc-6afd,U+6b02-6b03,U+6b06-6b07,U+6b09-6b0b,U+6b0f-6b12,U+6b16-6b17,U+6b1b,U+6b1d-6b1f,U+6b23-6b24,U+6b28,U+6b2b-6b2c,U+6b2f,U+6b35-6b39,U+6b3b,U+6b3d,U+6b3f,U+6b43,U+6b46-6b47,U+6b49-6b4a,U+6b4d-6b4e,U+6b50,U+6b52,U+6b54,U+6b56,U+6b58-6b59,U+6b5b,U+6b5d,U+6b5f-6b61,U+6b65,U+6b67,U+6b6b-6b6c,U+6b6e,U+6b70,U+6b72,U+6b75,U+6b77-6b7a,U+6b7d-6b84}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.35.woff2) format("woff2");unicode-range:U+6855,U+6857-6859,U+685b,U+685d,U+685f,U+6863,U+6867,U+686b,U+686e-6872,U+6874-6875,U+6877,U+6879-687c,U+687e-687f,U+6882-6884,U+6886,U+6888,U+688d-6890,U+6894,U+6896,U+6898-689c,U+689f-68a3,U+68a5-68a7,U+68a9-68ab,U+68ad-68af,U+68b2-68b5,U+68b9-68bc,U+68c3,U+68c5-68c6,U+68c8-68ca,U+68cc-68cd,U+68cf-68d1,U+68d3-68d9,U+68dc-68dd,U+68e0-68e1,U+68e3-68e5,U+68e7-68e8,U+68ea-68ed,U+68ef-68f1,U+68f5-68f7,U+68f9,U+68fb-68fd,U+6900-6901,U+6903-6904,U+6906-690c,U+690f-6911,U+6913,U+6916-6917,U+6919-691b,U+6921-6923,U+6925-6926,U+6928,U+692a,U+6930-6931,U+6933-6936,U+6938-6939,U+693b,U+693d,U+6942,U+6945-6946,U+6949,U+694e,U+6954,U+6957,U+6959,U+695b-695e,U+6961-6966,U+6968-696c,U+696e-6974,U+6977-697b,U+697e-6981,U+6986,U+698d,U+6991-6992,U+6994-6996,U+6998,U+699c,U+69a0-69a1,U+69a5-69a8,U+69ab,U+69ad,U+69af-69b2,U+69b4,U+69b7-69b8,U+69ba-69bc,U+69be-69c1,U+69c3,U+69c5,U+69c7-69c8,U+69ca,U+69ce-69d1,U+69d3,U+69d6-69d7,U+69d9}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.36.woff2) format("woff2");unicode-range:U+667e-6680,U+6683-6684,U+6688,U+668b-668e,U+6690,U+6692,U+6698-669d,U+669f-66a0,U+66a2,U+66a4,U+66ad,U+66b1-66b3,U+66b5,U+66b8-66b9,U+66bb-66bc,U+66be-66c4,U+66c6,U+66c8-66c9,U+66cc,U+66ce-66cf,U+66d4,U+66da-66db,U+66dd,U+66df-66e0,U+66e6,U+66e8-66e9,U+66eb-66ec,U+66ee,U+66f5,U+66f7,U+66fa-66fc,U+6701,U+6705,U+6707,U+670c,U+670e-6710,U+6712-6716,U+6719,U+671c,U+671e,U+6720,U+6722,U+6725-6726,U+672e,U+6733,U+6735-6738,U+673e-673f,U+6741,U+6743,U+6745-6748,U+674c-674d,U+6753-6755,U+6759,U+675d-675e,U+6760,U+6762-6764,U+6766,U+676a,U+676c,U+676e,U+6770,U+6772-6774,U+6776-6777,U+677b-677c,U+6780-6781,U+6784-6785,U+6787,U+6789,U+678b-678c,U+678e-678f,U+6791-6793,U+6796,U+6798-6799,U+679b,U+67a1,U+67a4,U+67a6,U+67a9,U+67b0-67b5,U+67b7-67b9,U+67bb-67be,U+67c0-67c3,U+67c5-67c6,U+67c8-67c9,U+67ce,U+67d2,U+67d7-67d9,U+67db-67de,U+67e1-67e2,U+67e4,U+67e6-67e7,U+67e9,U+67ec,U+67ee-67f0,U+67f2,U+67f6-67f7,U+67f9-67fa,U+67fc,U+67fe,U+6801-6802,U+6805,U+6810,U+6814,U+6818-6819,U+681d,U+681f,U+6822,U+6827-6829,U+682b-682d,U+682f-6834,U+683b,U+683e-6840,U+6844-6846,U+6849-684a,U+684c-684e,U+6852-6854}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.37.woff2) format("woff2");unicode-range:U+64d2,U+64d4-64d5,U+64d7-64d8,U+64da,U+64e0-64e1,U+64e3-64e5,U+64e7,U+64e9-64ea,U+64ed,U+64ef-64f2,U+64f4-64f7,U+64fa-64fb,U+64fd-6501,U+6504-6505,U+6508-650a,U+650f,U+6513-6514,U+6516,U+6518-6519,U+651b-651f,U+6522,U+6524,U+6526,U+6529-652c,U+652e,U+6531-6532,U+6534-6538,U+653a,U+653c-653d,U+6543-6544,U+6547-6549,U+654d-654e,U+6550,U+6552,U+6554-6556,U+6558,U+655d-6560,U+6567,U+656b,U+6572,U+6578,U+657a,U+657d,U+6581-6585,U+6588,U+658a,U+658c,U+6592,U+6595,U+6598,U+659b,U+659d,U+659f-65a1,U+65a3-65a6,U+65ab,U+65ae,U+65b2-65b5,U+65b7-65b8,U+65be-65bf,U+65c1-65c4,U+65c6,U+65c8-65c9,U+65cc,U+65ce,U+65d0,U+65d2,U+65d4,U+65d6,U+65d8-65d9,U+65db,U+65df-65e1,U+65e3,U+65f0-65f2,U+65f4-65f5,U+65f9,U+65fb-65fc,U+65fe-6600,U+6603-6604,U+6608-660a,U+660d,U+6611-6612,U+6615-6616,U+661c-661e,U+6621-6624,U+6626,U+6629-662c,U+662e,U+6630-6631,U+6633-6637,U+6639-663b,U+663f-6641,U+6644-6646,U+6648-664a,U+664c,U+664e-664f,U+6651,U+6657-6665,U+6667-6668,U+666a-666d,U+6670,U+6673,U+6675,U+6677-6679,U+667b-667c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.38.woff2) format("woff2");unicode-range:U+62cf,U+62d1,U+62d4-62d6,U+62da,U+62dc,U+62ea,U+62ee-62ef,U+62f1-62f2,U+62f4-62f5,U+62fc-62fd,U+62ff,U+6302-6304,U+6308-630d,U+6310,U+6313,U+6316,U+6318,U+631b,U+6327,U+6329-632a,U+632d,U+6332,U+6335-6336,U+6339-633c,U+633e,U+6341-6344,U+6346,U+634a-634e,U+6350,U+6352-6354,U+6358-6359,U+635b,U+6365-6366,U+6369,U+636b-636d,U+6371-6372,U+6374-6378,U+637a,U+637c-637d,U+637f-6380,U+6382,U+6384,U+6387,U+6389-638a,U+638e-6390,U+6394-6396,U+6399-639a,U+639e,U+63a0,U+63a3-63a4,U+63a6,U+63a9,U+63ab-63af,U+63b5,U+63bd-63be,U+63c0-63c1,U+63c4-63c6,U+63c8,U+63ce,U+63d1-63d6,U+63dc,U+63e0,U+63e3,U+63e5,U+63e9-63ed,U+63f2-63f3,U+63f5-63f9,U+6406,U+6409-640a,U+640f-6410,U+6412-6414,U+6416-6418,U+641e,U+6420,U+6422,U+6424-6426,U+6428-642a,U+642f-6430,U+6434-6436,U+643d,U+643f,U+644b,U+644e-644f,U+6451-6454,U+645a-645d,U+645f-6461,U+6463,U+6467,U+646d,U+6473-6474,U+6476,U+6478-6479,U+647b,U+647d,U+6485,U+6487-6488,U+648f-6491,U+6493,U+6495,U+6498-649b,U+649d-649f,U+64a1,U+64a3,U+64a6,U+64a8-64a9,U+64ac,U+64b3,U+64bb-64bf,U+64c2,U+64c4-64c5,U+64c7,U+64c9-64cc,U+64ce,U+64d0-64d1}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.39.woff2) format("woff2");unicode-range:U+6117,U+6119,U+611c,U+611e,U+6120-6122,U+6127-6128,U+612a-612c,U+6130-6131,U+6134-6137,U+6139-613a,U+613c-613f,U+6141-6142,U+6144-6147,U+6149-614a,U+614d,U+6153,U+6158-615a,U+615d-6160,U+6164-6165,U+616b-616c,U+616f,U+6171-6175,U+6177-6178,U+617b-6181,U+6183-6184,U+6187,U+618a-618b,U+618d,U+6192-6194,U+6196-619a,U+619c-619d,U+619f-61a0,U+61a5,U+61a8,U+61aa-61ae,U+61b8-61ba,U+61bc,U+61be,U+61c0-61c3,U+61c6,U+61c8,U+61ca-61cf,U+61d5,U+61dc-61df,U+61e1-61e3,U+61e5-61e9,U+61ec-61ed,U+61ef,U+61f4-61f7,U+61fa,U+61fc-6201,U+6203-6204,U+6207-620a,U+620d-620e,U+6213-6215,U+621b-621e,U+6220-6223,U+6227,U+6229-622b,U+622e,U+6230-6233,U+6236,U+6239,U+623d-623e,U+6241-6244,U+6246,U+6248,U+624c,U+624e,U+6250-6252,U+6254,U+6256,U+6258,U+625a-625c,U+625e,U+6260-6261,U+6263-6264,U+6268,U+626d,U+626f,U+6273,U+627a-627e,U+6282-6283,U+6285,U+6289,U+628d-6290,U+6292-6294,U+6296,U+6299,U+629b,U+62a6,U+62a8,U+62ac,U+62b3,U+62b6-62b7,U+62ba-62bb,U+62be-62bf,U+62c2,U+62c4,U+62c6-62c8,U+62ca,U+62ce}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.40.woff2) format("woff2");unicode-range:U+5f6c-5f6d,U+5f6f,U+5f72-5f75,U+5f78,U+5f7a,U+5f7d-5f7f,U+5f82-5f83,U+5f87-5f89,U+5f8d,U+5f8f,U+5f91,U+5f96,U+5f99,U+5f9c-5f9d,U+5fa0,U+5fa2,U+5fa4,U+5fa7-5fa8,U+5fab-5fad,U+5faf-5fb1,U+5fb5,U+5fb7-5fb8,U+5fbc-5fbd,U+5fc4,U+5fc7-5fc9,U+5fcb,U+5fd0-5fd4,U+5fdd-5fde,U+5fe1-5fe2,U+5fe4,U+5fe8-5fea,U+5fec-5ff3,U+5ff6,U+5ff8,U+5ffa-5ffd,U+5fff,U+6007,U+600a,U+600d-6010,U+6013-6015,U+6017-601b,U+601f,U+6021-6022,U+6024,U+6026,U+6029,U+602b,U+602d,U+6031,U+6033,U+6035,U+603a,U+6040-6043,U+6046-604a,U+604c-604d,U+6051,U+6054-6057,U+6059-605a,U+605d,U+605f-6064,U+6067,U+606a-606c,U+6070-6071,U+6077,U+607e-607f,U+6081-6086,U+6088-608e,U+6091-6093,U+6095-6098,U+609a-609b,U+609d-609e,U+60a2,U+60a4-60a5,U+60a7-60a8,U+60b0-60b1,U+60b3-60b5,U+60b7-60b8,U+60bb,U+60bd-60be,U+60c2,U+60c4,U+60c6-60cb,U+60ce-60cf,U+60d3-60d5,U+60d8-60d9,U+60db,U+60dd-60df,U+60e1-60e2,U+60e5,U+60ee,U+60f0-60f2,U+60f4-60f8,U+60fa-60fd,U+6100,U+6102-6103,U+6106-6108,U+610a,U+610c-610e,U+6110-6114,U+6116}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.41.woff2) format("woff2");unicode-range:U+5d9b,U+5d9d,U+5d9f-5da0,U+5da2,U+5da4,U+5da7,U+5dab-5dac,U+5dae,U+5db0,U+5db2,U+5db4,U+5db7-5db9,U+5dbc-5dbd,U+5dc3,U+5dc7,U+5dc9,U+5dcb-5dce,U+5dd0-5dd3,U+5dd6-5dd9,U+5ddb,U+5de0,U+5de2,U+5de4,U+5de9,U+5df2,U+5df5,U+5df8-5df9,U+5dfd,U+5dff-5e00,U+5e07,U+5e0b,U+5e0d,U+5e11-5e12,U+5e14-5e15,U+5e18-5e1b,U+5e1f-5e20,U+5e25,U+5e28,U+5e2e,U+5e32,U+5e35-5e37,U+5e3e,U+5e40,U+5e43-5e44,U+5e47,U+5e49,U+5e4b,U+5e4e,U+5e50-5e51,U+5e54,U+5e56-5e58,U+5e5b-5e5c,U+5e5e-5e5f,U+5e62,U+5e64,U+5e68,U+5e6a-5e6e,U+5e70,U+5e75-5e77,U+5e7a,U+5e7f-5e80,U+5e87,U+5e8b,U+5e8e,U+5e96,U+5e99-5e9a,U+5ea0,U+5ea2,U+5ea4-5ea5,U+5ea8,U+5eaa,U+5eac,U+5eb1,U+5eb3,U+5eb8-5eb9,U+5ebd-5ebf,U+5ec1-5ec2,U+5ec6,U+5ec8,U+5ecb-5ecc,U+5ece-5ed6,U+5ed9-5ee2,U+5ee5,U+5ee8-5ee9,U+5eeb-5eec,U+5ef0-5ef1,U+5ef3-5ef4,U+5ef8-5ef9,U+5efc-5f00,U+5f02-5f03,U+5f06-5f09,U+5f0b-5f0e,U+5f11,U+5f16-5f17,U+5f19,U+5f1b-5f1e,U+5f21-5f24,U+5f27-5f29,U+5f2b-5f30,U+5f34,U+5f36,U+5f38,U+5f3a-5f3d,U+5f3f-5f41,U+5f44-5f45,U+5f47-5f48,U+5f4a,U+5f4c-5f4e,U+5f50-5f51,U+5f54,U+5f56-5f58,U+5f5b-5f5d,U+5f60,U+5f63-5f65,U+5f67,U+5f6a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.42.woff2) format("woff2");unicode-range:U+5bbc,U+5bc0-5bc1,U+5bc3,U+5bc7,U+5bc9,U+5bcd-5bd0,U+5bd3-5bd4,U+5bd6-5bda,U+5bde,U+5be0-5be2,U+5be4-5be6,U+5be8,U+5beb-5bec,U+5bef-5bf1,U+5bf3-5bf6,U+5bfd,U+5c03,U+5c05,U+5c07-5c09,U+5c0c-5c0d,U+5c12-5c14,U+5c17,U+5c19,U+5c1e-5c20,U+5c22-5c24,U+5c26,U+5c28-5c2e,U+5c30,U+5c32,U+5c35-5c36,U+5c38-5c39,U+5c46,U+5c4d-5c50,U+5c53,U+5c59-5c5c,U+5c5f-5c63,U+5c67-5c69,U+5c6c-5c70,U+5c74-5c76,U+5c79-5c7d,U+5c87-5c88,U+5c8a,U+5c8c,U+5c8f,U+5c91-5c92,U+5c94,U+5c9d,U+5c9f-5ca0,U+5ca2-5ca3,U+5ca6-5ca8,U+5caa-5cab,U+5cad,U+5cb1-5cb2,U+5cb4-5cb7,U+5cba-5cbc,U+5cbe,U+5cc5,U+5cc7,U+5cc9,U+5ccb,U+5cd0,U+5cd2,U+5cd7,U+5cd9,U+5cdd,U+5ce6,U+5ce8-5cea,U+5ced-5cee,U+5cf1-5cf2,U+5cf4-5cf5,U+5cfa-5cfb,U+5cfd,U+5d01,U+5d06,U+5d0b,U+5d0d,U+5d10-5d12,U+5d14-5d15,U+5d17-5d1b,U+5d1d,U+5d1f-5d20,U+5d22-5d24,U+5d26-5d27,U+5d2b,U+5d31,U+5d34,U+5d39,U+5d3d,U+5d3f,U+5d42-5d43,U+5d46-5d48,U+5d4a-5d4b,U+5d4e,U+5d51-5d53,U+5d55,U+5d59,U+5d5c,U+5d5f-5d62,U+5d64,U+5d69-5d6a,U+5d6c-5d6d,U+5d6f-5d70,U+5d73,U+5d76,U+5d79-5d7a,U+5d7e-5d7f,U+5d81-5d84,U+5d87-5d88,U+5d8a,U+5d8c,U+5d90,U+5d92-5d95,U+5d97,U+5d99}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.43.woff2) format("woff2");unicode-range:U+598b-598e,U+5992,U+5995,U+5997,U+599b,U+599d,U+599f,U+59a3-59a4,U+59a7,U+59ad-59b0,U+59b2-59b3,U+59b7,U+59ba,U+59bc,U+59be,U+59c1,U+59c3-59c4,U+59c6,U+59c8,U+59ca,U+59cd,U+59d2,U+59d9-59da,U+59dd-59df,U+59e3-59e5,U+59e7-59e8,U+59ec,U+59ee-59ef,U+59f1-59f2,U+59f4,U+59f6-59f8,U+5a00,U+5a03-5a04,U+5a09,U+5a0c-5a0e,U+5a11-5a13,U+5a17,U+5a1a-5a1c,U+5a1e-5a1f,U+5a23-5a25,U+5a27-5a28,U+5a2a,U+5a2d,U+5a30,U+5a35-5a36,U+5a40-5a41,U+5a44-5a45,U+5a47-5a49,U+5a4c,U+5a50,U+5a55,U+5a5e,U+5a62-5a63,U+5a65,U+5a67,U+5a6a,U+5a6c-5a6d,U+5a77,U+5a7a-5a7b,U+5a7e,U+5a84,U+5a8b,U+5a90,U+5a93,U+5a96,U+5a99,U+5a9c,U+5a9e-5aa0,U+5aa2,U+5aa7,U+5aac,U+5ab1-5ab3,U+5ab5,U+5ab8,U+5aba-5abf,U+5ac2,U+5ac4,U+5ac6,U+5ac8,U+5acb,U+5acf-5ad0,U+5ad6-5ad7,U+5ada,U+5adc,U+5ae0-5ae1,U+5ae3,U+5ae5-5ae6,U+5ae9-5aea,U+5aee,U+5af0,U+5af5-5af6,U+5afa-5afb,U+5afd,U+5b00-5b01,U+5b08,U+5b0b,U+5b16-5b17,U+5b19,U+5b1b,U+5b1d,U+5b21,U+5b25,U+5b2a,U+5b2c-5b2d,U+5b30,U+5b32,U+5b34,U+5b36,U+5b38,U+5b3e,U+5b40-5b41,U+5b43,U+5b45,U+5b4b-5b4c,U+5b51-5b52,U+5b56,U+5b5a-5b5c,U+5b5e-5b5f,U+5b65,U+5b68-5b69,U+5b6e-5b71,U+5b73,U+5b75-5b76,U+5b7a,U+5b7c-5b84,U+5b86,U+5b8a-5b8b,U+5b8d-5b8e,U+5b90-5b91,U+5b93-5b94,U+5b96,U+5ba5-5ba6,U+5ba8-5ba9,U+5bac-5bad,U+5baf,U+5bb1-5bb2,U+5bb7-5bb8,U+5bba}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.44.woff2) format("woff2");unicode-range:U+57b3,U+57b8,U+57bd,U+57c0,U+57c3,U+57c6-57c8,U+57cc,U+57cf,U+57d2-57d7,U+57dc-57de,U+57e0-57e1,U+57e3-57e4,U+57e6-57e7,U+57e9,U+57ed,U+57f0,U+57f4-57f6,U+57f8,U+57fb,U+57fd-57ff,U+5803-5804,U+5808-580d,U+5819,U+581b,U+581d-5821,U+5826-5827,U+582d,U+582f-5830,U+5832,U+5835,U+5839,U+583d,U+583f-5840,U+5849,U+584b-584d,U+584f-5852,U+5855,U+5858-5859,U+585f,U+5861-5862,U+5864,U+5867-5868,U+586d,U+5870,U+5872,U+5878-5879,U+587c,U+587f-5881,U+5885,U+5887-588d,U+588f-5890,U+5894,U+5896,U+5898,U+589d-589e,U+58a0-58a2,U+58a6,U+58a9-58ab,U+58ae,U+58b1-58b3,U+58b8-58bc,U+58be,U+58c2-58c5,U+58c8,U+58cd-58ce,U+58d0-58da,U+58dc-58e2,U+58e4-58e5,U+58e9,U+58ec,U+58ef,U+58f3-58f4,U+58f7,U+58f9,U+58fb-58fd,U+5902,U+5905-5906,U+590a-590d,U+5910,U+5912-5914,U+5918-5919,U+591b,U+591d,U+591f,U+5921,U+5923-5925,U+5928,U+592c-592d,U+592f-5930,U+5932-5933,U+5935-5936,U+5938-5939,U+593d-593f,U+5943,U+5946,U+594e,U+5950,U+5952-5953,U+5955,U+5957-595b,U+595d-5961,U+5963,U+5967,U+5969,U+596b-596d,U+596f,U+5972,U+5975-5976,U+5978-5979,U+597b-597c,U+5981}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.45.woff2) format("woff2");unicode-range:U+5616-5617,U+5619,U+561b,U+5620,U+5628,U+562c,U+562f-5639,U+563b-563d,U+563f-5641,U+5643-5644,U+5646-5647,U+5649,U+564b,U+564d-5650,U+5653-5654,U+565e,U+5660-5664,U+5666,U+5669-566d,U+566f,U+5671-5672,U+5675-5676,U+5678,U+567a,U+5680,U+5684-5688,U+568a-568c,U+568f,U+5694-5695,U+5699-569a,U+569d-56a0,U+56a5-56a9,U+56ab-56ae,U+56b1-56b4,U+56b6-56b7,U+56bc,U+56be,U+56c0,U+56c2-56c3,U+56c5,U+56c8-56d1,U+56d3,U+56d7-56d9,U+56dc-56dd,U+56df,U+56e1,U+56e4-56e8,U+56eb,U+56ed-56ee,U+56f1,U+56f6-56f7,U+56f9,U+56ff-5704,U+5707-570a,U+570c-570d,U+5711,U+5713,U+5715-5716,U+5718,U+571a-571d,U+5720-5726,U+5729-572a,U+572c,U+572e-572f,U+5733-5734,U+5737-5738,U+573b,U+573d-573f,U+5745-5746,U+574c-574f,U+5751-5752,U+5759,U+575f,U+5761-5762,U+5764-5765,U+5767-5769,U+576b,U+576d-5771,U+5773-5775,U+5777,U+5779-577c,U+577e-577f,U+5781,U+5783,U+5788-5789,U+578c,U+5793-5795,U+5797,U+5799-579a,U+579c-57a1,U+57a4,U+57a7-57aa,U+57ac,U+57ae,U+57b0}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.46.woff2) format("woff2");unicode-range:U+543f-5440,U+5443-5444,U+5447,U+544c-544f,U+5455,U+545e,U+5462,U+5464,U+5466-5467,U+5469,U+546b-546e,U+5470-5471,U+5474-5477,U+547b,U+547f-5481,U+5483-5486,U+5488-548b,U+548d-5492,U+5495-5496,U+549c,U+549f-54a2,U+54a4,U+54a6-54af,U+54b1,U+54b7-54bc,U+54be-54bf,U+54c2-54c4,U+54c6-54c8,U+54ca,U+54cd-54ce,U+54d8,U+54e0,U+54e2,U+54e5-54e6,U+54e8-54ea,U+54ec-54ef,U+54f1,U+54f3,U+54f6,U+54fc-5501,U+5505,U+5508-5509,U+550c-550f,U+5514-5516,U+5527,U+552a-552b,U+552e,U+5532-5533,U+5535-5536,U+5538-5539,U+553b-553d,U+5540-5541,U+5544-5545,U+5547,U+5549-554a,U+554c-554d,U+5550-5551,U+5556-5558,U+555a-555e,U+5560-5561,U+5563-5564,U+5566,U+557b-5583,U+5586-5588,U+558a,U+558e-558f,U+5591-5594,U+5597,U+5599,U+559e-559f,U+55a3-55a4,U+55a8-55a9,U+55ac-55ae,U+55b2,U+55bf,U+55c1,U+55c3-55c4,U+55c6-55c7,U+55c9,U+55cb-55cc,U+55ce,U+55d1-55d4,U+55d7-55d8,U+55da-55db,U+55dd-55df,U+55e2,U+55e4,U+55e9,U+55ec,U+55ee,U+55f1,U+55f6-55f9,U+55fd-55ff,U+5605,U+5607-5608,U+560a,U+560d-5612}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.47.woff2) format("woff2");unicode-range:U+528d,U+5291-5298,U+529a,U+529c,U+52a4-52a7,U+52ab-52ad,U+52af-52b0,U+52b5-52b8,U+52ba-52be,U+52c0-52c1,U+52c4-52c6,U+52c8,U+52ca,U+52cc-52cd,U+52cf-52d2,U+52d4,U+52d6-52d7,U+52db-52dc,U+52de,U+52e0-52e1,U+52e3,U+52e5-52e6,U+52e8-52ea,U+52ec,U+52f0-52f1,U+52f3-52fb,U+5300-5301,U+5303,U+5306-5308,U+530a-530d,U+530f-5311,U+5313,U+5315,U+5318-531f,U+5321,U+5323-5325,U+5327-532d,U+532f-5333,U+5335,U+5338,U+533c-533e,U+5340,U+5342,U+5345-5346,U+5349,U+534b-534c,U+5359,U+535b,U+535e,U+5361,U+5363-5367,U+5369,U+536c-536e,U+5372,U+5377,U+5379-537b,U+537d-537f,U+5382-5383,U+5387-5389,U+538e,U+5393-5394,U+5396,U+5398-5399,U+539d,U+53a0-53a1,U+53a4-53a6,U+53a9-53ab,U+53ad-53b0,U+53b2,U+53b4-53b8,U+53ba,U+53bd,U+53c0-53c1,U+53c3-53c5,U+53cf,U+53d2-53d3,U+53d5,U+53da-53db,U+53dd-53e0,U+53e2,U+53e6-53e8,U+53ed-53ee,U+53f4-53f5,U+53fa,U+5401-5403,U+540b,U+540f,U+5412-5413,U+541a,U+541d-541e,U+5421,U+5424,U+5427-542a,U+542c-542f,U+5431,U+5433-5436,U+543c-543d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.48.woff2) format("woff2");unicode-range:U+50dd-50df,U+50e1-50e6,U+50e8-50e9,U+50ed-50f6,U+50f9-50fb,U+50fe,U+5101-5103,U+5106-5109,U+510b-510e,U+5110,U+5112,U+5114-511e,U+5121,U+5123,U+5127-5128,U+512c-512d,U+512f,U+5131,U+5133-5135,U+5137-513c,U+513f-5142,U+5147,U+514a,U+514c,U+514f,U+5152-5155,U+5157-5158,U+515f-5160,U+5162,U+5164,U+5166-5167,U+5169-516a,U+516e,U+5173-5174,U+5179,U+517b,U+517e,U+5180,U+5182-5184,U+5189,U+518b-518c,U+518e-5191,U+5193,U+5195-5196,U+5198,U+519d,U+51a1-51a4,U+51a6,U+51a9-51ab,U+51ad,U+51b0-51b3,U+51b5,U+51b8,U+51ba,U+51bc-51bf,U+51c2-51c3,U+51c5,U+51c8-51cb,U+51cf,U+51d1-51d6,U+51d8,U+51de-51e0,U+51e2,U+51e5,U+51e7,U+51e9,U+51ec-51ee,U+51f2-51f5,U+51f7,U+51fe,U+5201-5202,U+5204-5205,U+520b,U+520e,U+5212-5216,U+5218,U+5222,U+5226-5228,U+522a-522b,U+522e,U+5231-5233,U+5235,U+523c,U+5244-5245,U+5249,U+524b-524c,U+524f,U+5254-5255,U+5257-5258,U+525a,U+525c-5261,U+5266,U+5269,U+526c,U+526e,U+5271,U+5273-5274,U+5277-5279,U+527d,U+527f-5280,U+5282-5285,U+5288-528a,U+528c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.49.woff2) format("woff2");unicode-range:U+4f57-4f58,U+4f5a-4f5b,U+4f5d-4f5f,U+4f63-4f64,U+4f69-4f6a,U+4f6c,U+4f6e-4f71,U+4f76-4f7e,U+4f81-4f85,U+4f88-4f8a,U+4f8c,U+4f8e-4f90,U+4f92-4f94,U+4f96-4f9a,U+4f9e-4fa0,U+4fab,U+4fad,U+4faf,U+4fb2,U+4fb7,U+4fb9,U+4fbb-4fbe,U+4fc0-4fc1,U+4fc4-4fc6,U+4fc8-4fc9,U+4fcb-4fd4,U+4fd8,U+4fda-4fdc,U+4fdf-4fe0,U+4fe2,U+4fe4-4fe6,U+4fef-4ff2,U+4ff6,U+4ffc-5002,U+5004-5007,U+500a,U+500c,U+500e-5011,U+5013-5014,U+5016-5018,U+501a-501e,U+5021-5023,U+5025-502a,U+502c-502e,U+5030,U+5032-5033,U+5035,U+5039,U+503b,U+5040-5043,U+5045-5048,U+504a,U+504c,U+504e,U+5050-5053,U+5055-5057,U+5059-505a,U+505f-5060,U+5062-5063,U+5066-5067,U+506a,U+506c-506d,U+5070-5072,U+5077-5078,U+5080-5081,U+5083-5086,U+5088,U+508a,U+508e-5090,U+5092-5096,U+509a-509c,U+509e-50a3,U+50aa,U+50ad,U+50af-50b4,U+50b9-50bb,U+50bd,U+50c0,U+50c2-50c4,U+50c7,U+50c9-50ca,U+50cc,U+50ce,U+50d0-50d1,U+50d3-50d4,U+50d6,U+50d8-50d9,U+50dc}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.50.woff2) format("woff2");unicode-range:U+4093,U+4103,U+4105,U+4148,U+414f,U+4163,U+41b4,U+41bf,U+41e6,U+41ee,U+41f3,U+4207,U+420e,U+4264,U+4293,U+42c6,U+42d6,U+42dd,U+4302,U+432b,U+4343,U+43ee,U+43f0,U+4408,U+440c,U+4417,U+441c,U+4422,U+4453,U+445b,U+4476,U+447a,U+4491,U+44b3,U+44be,U+44d4,U+4508,U+450d,U+4525,U+4543,U+457a,U+459d,U+45b8,U+45be,U+45e5,U+45ea,U+460f-4610,U+4641,U+4665,U+46a1,U+46ae-46af,U+470c,U+471f,U+4764,U+47e6,U+47fd,U+4816,U+481e,U+4844,U+484e,U+48b5,U+49b0,U+49e7,U+49fa,U+4a04,U+4a29,U+4abc,U+4b38,U+4b3b,U+4b7e,U+4bc2,U+4bca,U+4bd2,U+4be8,U+4c17,U+4c20,U+4c38,U+4cc4,U+4cd1,U+4ce1,U+4d07,U+4d77,U+4e02,U+4e04-4e05,U+4e0c,U+4e0f-4e12,U+4e15,U+4e17,U+4e19,U+4e1e-4e1f,U+4e23-4e24,U+4e28-4e2c,U+4e2e-4e31,U+4e35-4e37,U+4e3f-4e42,U+4e44,U+4e47-4e48,U+4e4d-4e4e,U+4e51,U+4e55-4e56,U+4e58,U+4e5a-4e5c,U+4e62-4e63,U+4e68-4e69,U+4e74-4e75,U+4e79,U+4e7f,U+4e82,U+4e85,U+4e8a,U+4e8d-4e8e,U+4e96-4e99,U+4e9d-4ea0,U+4ea2,U+4ea5-4ea6,U+4ea8,U+4eaf-4eb0,U+4eb3,U+4eb6,U+4eb9,U+4ebb-4ebc,U+4ec2-4ec4,U+4ec6-4ec8,U+4ecd,U+4ed0,U+4ed7,U+4eda-4edb,U+4edd-4ee2,U+4ee8,U+4eeb,U+4eed,U+4eef,U+4ef1,U+4ef3,U+4ef5,U+4ef7,U+4efc-4f00,U+4f02-4f03,U+4f08-4f09,U+4f0b-4f0d,U+4f12,U+4f15-4f17,U+4f19,U+4f1c,U+4f2b,U+4f2e,U+4f30-4f31,U+4f33,U+4f35-4f37,U+4f39,U+4f3b,U+4f3e,U+4f40,U+4f42-4f43,U+4f48-4f49,U+4f4b-4f4c,U+4f52,U+4f54,U+4f56}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.51.woff2) format("woff2");unicode-range:U+3395-339b,U+339e-33a0,U+33a2-33ff,U+3402,U+3405-3406,U+3427,U+342c,U+342e,U+3468,U+346a,U+3488,U+3492,U+34b5,U+34bc,U+34c1,U+34c7,U+34db,U+351f,U+353e,U+355d-355e,U+3563,U+356e,U+35a6,U+35a8,U+35c5,U+35da,U+35de,U+35f4,U+3605,U+3614,U+364a,U+3691,U+3696,U+3699,U+36cf,U+3761-3762,U+376b-376c,U+3775,U+378d,U+37c1,U+37e2,U+37e8,U+37f4,U+37fd,U+3800,U+382f,U+3836,U+3840,U+385c,U+3861,U+38a1,U+38ad,U+38fa,U+3917,U+391a,U+396f,U+39a4,U+39b8,U+3a5c,U+3a6e,U+3a73,U+3a85,U+3ac4,U+3acb,U+3ad6-3ad7,U+3aea,U+3af3,U+3b0e,U+3b1a,U+3b1c,U+3b22,U+3b35,U+3b6d,U+3b77,U+3b87-3b88,U+3b8d,U+3ba4,U+3bb6,U+3bc3,U+3bcd,U+3bf0,U+3bf3,U+3c0f,U+3c26,U+3cc3,U+3cd2,U+3d11,U+3d1e,U+3d31,U+3d4e,U+3d64,U+3d9a,U+3dc0,U+3dcc,U+3dd4,U+3e05,U+3e3f-3e40,U+3e60,U+3e66,U+3e68,U+3e83,U+3e8a,U+3e94,U+3eda,U+3f57,U+3f72,U+3f75,U+3f77,U+3fae,U+3fb1,U+3fc9,U+3fd7,U+3fdc,U+4039,U+4058}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.52.woff2) format("woff2");unicode-range:U+32b5-332b,U+332d-3394}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.53.woff2) format("woff2");unicode-range:U+31c8-31e3,U+31f0-321e,U+3220-3230,U+3232-32b4}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.54.woff2) format("woff2");unicode-range:U+3028-303f,U+3094-3096,U+309f-30a0,U+30ee,U+30f7-30fa,U+30ff,U+3105-312f,U+3131-3163,U+3165-318e,U+3190-31bb,U+31c0-31c7}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.55.woff2) format("woff2");unicode-range:U+2f14-2fd5,U+2ff0-2ffb,U+3004,U+3013,U+3016-301b,U+301e,U+3020-3027}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.56.woff2) format("woff2");unicode-range:U+25e4-25e6,U+2601-2603,U+2609,U+260e-260f,U+2616-2617,U+261c-261f,U+262f,U+2641,U+2660,U+2662-2664,U+2666-2668,U+266d-266e,U+2672-267d,U+26bd-26be,U+2702,U+271a,U+273d,U+2740,U+2756,U+2776-2793,U+27a1,U+2934-2935,U+29bf,U+29fa-29fb,U+2b05-2b07,U+2b1a,U+2b95,U+2e3a-2e3b,U+2e80-2e99,U+2e9b-2ef3,U+2f00-2f13}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.57.woff2) format("woff2");unicode-range:U+24d1-24ff,U+2503-2513,U+2515-2516,U+2518-251b,U+251d-2522,U+2524-259f,U+25a2-25ab,U+25b1,U+25b7,U+25c0-25c1,U+25c9-25ca,U+25cc,U+25d0-25d3,U+25e2-25e3}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.58.woff2) format("woff2");unicode-range:U+2105,U+2109-210a,U+210f,U+2116,U+2121,U+2126-2127,U+212b,U+212e,U+2135,U+213b,U+2194-2199,U+21b8-21b9,U+21c4-21c6,U+21cb-21cc,U+21d0,U+21e6-21e9,U+21f5,U+2202-2203,U+2205-2206,U+2208-220b,U+220f,U+2211,U+2213,U+2215,U+221a,U+221d,U+2220,U+2223,U+2225-2226,U+2228,U+222a-222e,U+2234-2237,U+223d,U+2243,U+2245,U+2248,U+224c,U+2260,U+2262,U+2264-2265,U+226e-226f,U+2272-2273,U+2276-2277,U+2283-2287,U+228a-228b,U+2295-2299,U+22a0,U+22a5,U+22bf,U+22da-22db,U+22ef,U+2305-2307,U+2318,U+2329-232a,U+23b0-23b1,U+23be-23cc,U+23ce,U+23da-23db,U+2423,U+2469-24d0}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.59.woff2) format("woff2");unicode-range:U+a1-a4,U+a6-a7,U+aa,U+ac-ad,U+b5-b6,U+b8-ba,U+bc-c8,U+ca-cc,U+ce-d5,U+d9-db,U+dd-df,U+e6,U+ee,U+f0,U+f5,U+f7,U+f9,U+fb,U+fe-102,U+110-113,U+11a-11b,U+128-12b,U+143-144,U+147-148,U+14c,U+14e-14f,U+152-153,U+168-16d,U+192,U+1a0-1a1,U+1af,U+1cd-1dc,U+1f8-1f9,U+251,U+261,U+2bb,U+2c7,U+2c9,U+2ea-2eb,U+304,U+307,U+30c,U+1e3e-1e3f,U+1ea0-1ebe,U+1ec0-1ec6,U+1ec8-1ef9,U+2011-2012,U+2016,U+2018-201a,U+201e,U+2021,U+2030,U+2033,U+2035,U+2042,U+2047,U+2051,U+2074,U+20a9,U+20ab-20ac,U+20dd-20de,U+2100}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.60.woff2) format("woff2");unicode-range:U+2227,U+26a0,U+2713,U+301f,U+4ff8,U+5239,U+526a,U+54fa,U+5740,U+5937,U+5993,U+59fb,U+5a3c,U+5c41,U+6028,U+626e,U+646f,U+647a,U+64b0,U+64e2,U+65a7,U+66fe,U+6727,U+6955,U+6bef,U+6f23,U+724c,U+767c,U+7a83,U+7ac4,U+7b67,U+8000,U+8471,U+8513,U+8599,U+86db,U+8718,U+87f2,U+88f3,U+8ad2,U+8e2a,U+8fa3,U+95a5,U+9798,U+9910,U+9957,U+9bab,U+9c3b,U+9daf,U+ff95}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.61.woff2) format("woff2");unicode-range:U+a8,U+2032,U+2261,U+2282,U+3090,U+30f1,U+339c,U+535c,U+53d9,U+56a2,U+56c1,U+5806,U+589f,U+59d0,U+5a7f,U+60e0,U+639f,U+65af,U+68fa,U+69ae,U+6d1b,U+6ef2,U+71fb,U+725d,U+7262,U+75bc,U+7768,U+7940,U+79bf,U+7bed,U+7d68,U+7dfb,U+814b,U+8207,U+83e9,U+8494,U+8526,U+8568,U+85ea,U+86d9,U+87ba,U+8861,U+887f,U+8fe6,U+9059,U+9061,U+916a,U+976d,U+97ad,U+9ece}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.62.woff2) format("woff2");unicode-range:U+2d9,U+21d4,U+301d,U+515c,U+52fe,U+5420,U+5750,U+5766,U+5954,U+5b95,U+5f8a,U+5f98,U+620c,U+621f,U+641c,U+66d9,U+676d,U+6775,U+67f5,U+694a,U+6a02,U+6a3a,U+6a80,U+6c23,U+6c72,U+6dcb,U+6faa,U+707c,U+71c8,U+7422,U+74e2,U+7791,U+7825,U+7a14,U+7a1c,U+7c95,U+7fc1,U+82a5,U+82db,U+8304,U+853d,U+8cd3,U+8de8,U+8f0c,U+8f3f,U+9091,U+91c7,U+929a,U+98af,U+9913}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.63.woff2) format("woff2");unicode-range:U+2ca-2cb,U+2229,U+2468,U+2669,U+266f,U+273f,U+4ec0,U+4f60,U+4fb6,U+5347,U+540e,U+543b,U+5b0c,U+5d4c,U+5f14,U+5f9e,U+6155,U+62d0,U+6602,U+6666,U+66f3,U+67a2,U+67ca,U+69cc,U+6d29,U+6d9b,U+6e3e,U+6f81,U+7109,U+73c0,U+73c2,U+7425,U+7435-7436,U+7525,U+7554,U+785d,U+786b,U+7ae3,U+7b94,U+7d18,U+81bf,U+8511,U+8549,U+9075,U+9640,U+98e2,U+9e9f,U+ff96}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.64.woff2) format("woff2");unicode-range:U+2467,U+4ece,U+4ed4,U+4f91,U+4fae,U+534d,U+53c9,U+54b3,U+586b,U+5944,U+5b78,U+5df7,U+5f77,U+6101,U+6167-6168,U+61a4,U+62d9,U+698a,U+699b,U+6a59,U+6cc4,U+6e07,U+7099,U+75d2,U+77ad,U+7953,U+7984,U+7a92,U+7baa,U+7dbb,U+817f,U+82ad,U+85e9,U+868a,U+8caa,U+8f44,U+9017,U+907c,U+908a,U+92f3,U+936e,U+9435,U+978d,U+9838,U+9a28,U+9b41,U+9ba8,U+9c57,U+9eb9}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.65.woff2) format("woff2");unicode-range:U+b1,U+309b,U+4e5e,U+51f1,U+5506,U+55c5,U+58cc,U+59d1,U+5c51,U+5ef7,U+6284,U+62d7,U+6689,U+673d,U+6a2b,U+6a8e,U+6a9c,U+6d63,U+6dd1,U+70b8,U+7235,U+72db,U+72f8,U+7560,U+7c9b,U+7ce7,U+7e1e,U+80af,U+82eb,U+8463,U+8499,U+85dd,U+86ee,U+8a60,U+8a6e,U+8c79,U+8e87,U+8e8a,U+8f5f,U+9010,U+918d,U+9190,U+965b,U+97fb,U+9ab8,U+9bad,U+9d3b,U+9d5c,U+9dfa,U+9e93}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.66.woff2) format("woff2");unicode-range:U+2020,U+3003,U+3231,U+4e9b,U+4f3d,U+4f47,U+51b6,U+51dc,U+53e1,U+5bc5,U+602f,U+60bc,U+61c9,U+633d,U+637b,U+6492,U+65fa,U+660f,U+66f0,U+6703,U+681e,U+6876,U+6893,U+6912,U+698e,U+6c7d,U+714c,U+7169,U+71d5,U+725f,U+72d7,U+745b,U+74dc,U+75e2,U+7891,U+7897,U+7dcb,U+810a,U+8218,U+8339,U+840e,U+852d,U+8823,U+8a0a,U+9089,U+919c,U+971c,U+9ad9,U+ff4a,U+ff5a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.67.woff2) format("woff2");unicode-range:U+2466,U+2600,U+4eab,U+4fe3,U+4ff5,U+51a5,U+51f0,U+536f,U+53d4,U+53f1,U+54a5,U+559d,U+55e3,U+58fa,U+5962,U+59ea,U+5c16,U+5cef,U+5d16,U+5f10,U+5fd6,U+6190,U+6216,U+634f,U+63bb,U+66d6,U+6756,U+6bc5,U+6e26,U+727d,U+731f,U+76f2,U+7729,U+7a7f,U+7aff,U+7c9f,U+818f,U+8236,U+82b9,U+8338,U+85aa,U+88b4,U+8b33,U+904d,U+93a7,U+96cc,U+96eb,U+9aed,U+9b8e,U+fa11}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.68.woff2) format("woff2");unicode-range:U+251c,U+2523,U+4e14,U+545f,U+54bd,U+553e,U+55dc,U+56da,U+589c,U+5b55,U+5bb5,U+5ce1,U+5df4,U+5eb6,U+5ec9,U+6191,U+62f7,U+6357,U+64a5,U+6591,U+65bc,U+6897,U+6e1a,U+7063,U+711a,U+721b,U+722c,U+75b9,U+75d5,U+75fa,U+7766,U+7aae,U+7b48,U+7b8b,U+7d21,U+7e55,U+7f75,U+842c,U+8910,U+8a63,U+8b39,U+8b5a,U+8cdc,U+8d74,U+907d,U+91e7,U+9306,U+96bc,U+98f4,U+9ac4}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.69.woff2) format("woff2");unicode-range:U+2003,U+2312,U+266c,U+4f86,U+51ea,U+5243,U+5256,U+541f,U+5841,U+59dc,U+5df3,U+601c,U+60e7,U+632b,U+638c,U+64ad,U+6881,U+697c,U+69cd,U+6c50,U+6d2a,U+6fc1,U+7027,U+7058,U+70f9,U+714e,U+7345,U+751a,U+760d,U+764c,U+77db,U+7d79,U+7e8f,U+80ce,U+814e,U+81fc,U+8247,U+8278,U+85a9,U+8a03,U+90ed,U+9784,U+9801,U+984e,U+99b3,U+9bc9,U+9bdb,U+9be8,U+9e78,U+ff6b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.70.woff2) format("woff2");unicode-range:U+266b,U+3006,U+5176,U+5197,U+51a8,U+51c6,U+52f2,U+5614,U+5875,U+5a2f,U+5b54,U+5ce0,U+5dba,U+5deb,U+5e63,U+5f59,U+5fcc,U+6068,U+6367,U+68b6,U+6a0b,U+6b64,U+6e15,U+6eba,U+7272,U+72a0,U+7947,U+7985,U+79e6,U+79e9,U+7a3d,U+7a9f,U+7aaf,U+7b95,U+7f60,U+7f9e,U+7fe0,U+8098,U+80ba,U+8106,U+82d4,U+831c,U+87f9,U+8a1f,U+8acf,U+90c1,U+920d,U+9756,U+fe43,U+ff94}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.71.woff2) format("woff2");unicode-range:U+af,U+2465,U+2517,U+33a1,U+4f10,U+50c5,U+51b4,U+5384,U+5606,U+5bb0,U+5cac,U+5ee3,U+618e,U+61f2,U+62c9,U+66ab,U+66f9,U+6816,U+6960,U+6b3e,U+6f20,U+7078,U+72d0,U+73ed,U+7ad9,U+7b1b,U+7be4,U+7d62,U+7f51,U+80b4,U+80f4,U+8154,U+85fb,U+865c,U+8702,U+895f,U+8aed,U+8b90,U+8ced,U+8fbf,U+91d8,U+9418,U+9583,U+9591,U+9813,U+982c,U+9bd6,U+ff46,U+ff7f,U+ff88}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.72.woff2) format("woff2");unicode-range:U+4e91,U+508d,U+50e7,U+514e,U+51f6,U+5446,U+5504,U+584a,U+59a8,U+59d3,U+5a46,U+5ac9,U+6020,U+60a6,U+6148,U+621a,U+6234,U+64c1,U+6523,U+675c,U+67d1,U+6953,U+6ccc,U+6df5,U+6e13,U+6f06,U+723a,U+7325,U+74e6,U+758e,U+75ab,U+75d9,U+7a40,U+8096,U+82fa,U+8587,U+8594,U+8a6b,U+8ab9,U+8b17,U+8b83,U+937c,U+963b,U+9673,U+96db,U+9ce9,U+9f4b,U+ff67,U+ff82,U+ff93}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.73.woff2) format("woff2");unicode-range:U+221e,U+2514,U+51f9,U+5270,U+5449,U+5824,U+59a5,U+5a29,U+5d07,U+5e16,U+60e3,U+614c,U+6276,U+643e,U+64ab,U+6562,U+6681,U+670b,U+6734,U+67af,U+6a3d,U+6b05,U+6dc0,U+6e4a,U+7259,U+732a,U+7409,U+78a7,U+7a6b,U+8015,U+809b,U+817a,U+830e,U+837b,U+85ab,U+8a23,U+8a93,U+8b00,U+8b19,U+8b21,U+8cbf,U+8fb0,U+901d,U+91b8,U+9320,U+932c,U+9688,U+96f6,U+9df2,U+ff6a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.74.woff2) format("woff2");unicode-range:U+2002,U+2025,U+4f8d,U+51e1,U+51f8,U+5507,U+5598,U+58f1,U+5983,U+59ac,U+5c3c,U+5de7,U+5e7d,U+5eca,U+5f61,U+606d,U+60f9,U+636e,U+64ec,U+67da,U+67ff,U+6813,U+68f2,U+693f,U+6b6a,U+6bbb,U+6ef4,U+7092,U+717d,U+7261,U+73c8,U+7432,U+7483,U+76fe,U+7709,U+78d0,U+81a3,U+81b3,U+82af,U+8305,U+8309,U+8870,U+88fe,U+8cd1,U+8d66,U+906e,U+971e,U+9812,U+ff79,U+ff90}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.75.woff2) format("woff2");unicode-range:U+2464,U+2501,U+2640,U+2642,U+339d,U+4f0e,U+5091,U+50b5,U+5132,U+51cc,U+558b,U+55aa,U+585e,U+5bee,U+5dfe,U+60b6,U+62b9,U+6349,U+6566,U+6590,U+6842,U+689d,U+6a58,U+6c70,U+6ff1,U+7815,U+7881,U+7aaa,U+7bc7,U+7def,U+7fa8,U+8017,U+8036,U+8061,U+821f,U+8429,U+8ce0,U+8e74,U+9019,U+90ca,U+9162,U+932f,U+93ae,U+9644,U+990c,U+9cf3,U+ff56,U+ff6e,U+ff7e,U+ff85}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.76.woff2) format("woff2");unicode-range:U+2266-2267,U+4f2f,U+5208,U+5451,U+546a,U+5589,U+576a,U+5815,U+5a9a,U+5b9b,U+5c3a,U+5efb,U+5faa,U+6109,U+6643,U+6652,U+695a,U+69fd,U+6b86,U+6bb4,U+6daf,U+7089,U+70cf,U+7a00,U+7a4f,U+7b39,U+7d33,U+80e1,U+828b,U+82a6,U+86cd,U+8c8c,U+8cca,U+8df3,U+9077,U+9175,U+91dc,U+925b,U+9262,U+9271,U+92ed,U+9855,U+9905,U+9d28,U+ff3f,U+ff58,U+ff68,U+ff6d,U+ff9c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.77.woff2) format("woff2");unicode-range:U+2207,U+25ef,U+309c,U+4e4f,U+5146,U+51dd,U+5351,U+540a,U+5629,U+5eb5,U+5f04,U+5f13,U+60dc,U+6212,U+63b4,U+642c,U+6627,U+66a6,U+66c7,U+66fd,U+674e,U+6b96,U+6c4e,U+6df3,U+6e67,U+6f84,U+72fc,U+733f,U+7c97,U+7db1,U+7e4d,U+816b,U+82d1,U+84cb,U+854e,U+8607,U+86c7,U+871c,U+8776,U+8a89,U+8fc4,U+91a4,U+9285,U+9685,U+9903,U+9b31,U+9f13,U+ff42,U+ff74,U+ff91}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.78.woff2) format("woff2");unicode-range:U+4e32,U+51db,U+53a8,U+53ea,U+5609,U+5674,U+5a92,U+5e7e,U+6115,U+611a,U+62cc,U+62ed,U+63c9,U+64b9,U+64e6,U+65cb,U+6606,U+6731,U+683d,U+6afb,U+7460,U+771e,U+78ef,U+7b26,U+7b51,U+7cde,U+7d10,U+7d2f,U+7d46,U+80de,U+819c,U+84b2,U+85cd,U+865a,U+8ecc,U+9022,U+90b8,U+9192,U+9675,U+96b7,U+99ff,U+ff44,U+ff55,U+ff6c,U+ff73,U+ff75,U+ff86,U+ff8d,U+ff92,U+ffe3}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.79.woff2) format("woff2");unicode-range:U+25b3,U+30f5,U+4eae,U+4f46,U+4f51,U+5203,U+52ff,U+55a7,U+564c,U+565b,U+57f9,U+5805,U+5b64,U+5e06,U+5f70,U+5f90,U+60e8,U+6182,U+62f3,U+62fe,U+63aa,U+64a4,U+65d7,U+673a,U+6851,U+68cb,U+68df,U+6d1e,U+6e58,U+6e9d,U+77b3,U+7832,U+7c3f,U+7db4,U+7f70,U+80aa,U+80c6,U+8105,U+819d,U+8276,U+8679,U+8986,U+8c9d,U+8fc5,U+916c,U+9665,U+9699,U+96c0,U+9a19,U+ff8b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.80.woff2) format("woff2");unicode-range:U+2463,U+25a1,U+4ef0,U+5076,U+5098,U+51fd,U+5302,U+5448,U+54c9,U+570b,U+583a,U+5893,U+58a8,U+58ee,U+5949,U+5bdb,U+5f26,U+5f81,U+6052,U+6170,U+61c7,U+631f,U+635c,U+664b,U+69fb,U+6f01,U+7070,U+722a,U+745e,U+755c,U+76c6,U+78c1,U+79e4,U+7bb8,U+7d0b,U+81a8,U+82d7,U+8b5c,U+8f14,U+8fb1,U+8fbb,U+9283,U+9298,U+9a30,U+ff03,U+ff50,U+ff59,U+ff7b,U+ff8e-ff8f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.81.woff2) format("woff2");unicode-range:U+2010,U+2502,U+25b6,U+4f3a,U+514b,U+5265,U+52c3,U+5339,U+53ec,U+54c0,U+55b0,U+5854,U+5b8f,U+5cb3,U+5e84,U+60da,U+6247,U+6249,U+628a,U+62cd,U+65ac,U+6838,U+690e,U+6cf0,U+6f02,U+6f2c,U+6f70,U+708a,U+7434,U+75be,U+77ef,U+7c60,U+7c98,U+7d1b,U+7e2b,U+80a5,U+81e3,U+820c,U+8210,U+8475,U+862d,U+8650,U+8997,U+906d,U+91c8,U+9700,U+9727,U+9df9,U+ff3a,U+ff9a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.82.woff2) format("woff2");unicode-range:U+2103,U+5049,U+52b1,U+5320,U+5553,U+572d,U+58c7,U+5b5d,U+5bc2,U+5de3,U+5e61,U+5f80,U+61a9,U+67d0,U+67f4,U+6c88,U+6ca1,U+6ce5,U+6d78,U+6e9c,U+6f54,U+731b,U+73b2,U+74a7,U+74f6,U+75e9,U+7b20,U+7c8b,U+7f72,U+809d,U+8108,U+82b3,U+82bd,U+84b8,U+84c4,U+88c2,U+8ae6,U+8ef8,U+902e,U+9065,U+9326,U+935b,U+938c,U+9676,U+9694,U+96f7,U+9ed9,U+ff48,U+ff4c,U+ff81}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.83.woff2) format("woff2");unicode-range:U+2500,U+3008-3009,U+4ead,U+4f0f,U+4fca,U+53eb,U+543e,U+57a2,U+5cf0,U+5e8f,U+5fe0,U+61b2,U+62d8,U+6442,U+64b2,U+6589,U+659c,U+67f1,U+68c4,U+6cb8,U+6d12,U+6de1,U+6fe1,U+70c8,U+723d,U+73e0,U+7656,U+773a,U+7948,U+7b87,U+7c92,U+7d3a,U+7e1b,U+7e4a,U+819a,U+8358,U+83c5,U+84bc,U+864e,U+8912,U+8c9e,U+8d05,U+92fc,U+9396,U+98fd,U+99d2,U+ff64,U+ff7a,U+ff83}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.84.woff2) format("woff2");unicode-range:U+3014-3015,U+4e3c,U+5036,U+5075,U+533f,U+53e9,U+5531,U+5642,U+5984,U+59e6,U+5a01,U+5b6b,U+5c0b,U+5f25,U+6069,U+60a0,U+614e,U+62b5,U+62d2-62d3,U+6597,U+660c,U+674f,U+67cf,U+6841,U+6905,U+6cf3,U+6d32,U+6d69,U+6f64,U+716e,U+7761,U+7b52,U+7be0,U+7dbf,U+7de9,U+7f36,U+81d3,U+8302,U+8389,U+846c,U+84ee,U+8a69,U+9038,U+9d8f,U+ff47,U+ff4b,U+ff76,U+ff9b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.85.woff2) format("woff2");unicode-range:U+25c7,U+3007,U+504f,U+507d,U+51a0,U+52a3,U+5410,U+5510,U+559a,U+5782,U+582a,U+5c0a,U+5c3f,U+5c48,U+5f6b,U+6176,U+622f,U+6279,U+62bd,U+62dd,U+65ed,U+67b6,U+6817,U+6850,U+6d6a,U+6deb,U+6ea2,U+6edd,U+6f5c,U+72e9,U+73a9,U+7573,U+76bf,U+7950,U+7956,U+7f8a,U+7ffc,U+80a2,U+80c3,U+83ca,U+8a02,U+8a13,U+8df5,U+9375,U+983b,U+99b4,U+ff4e,U+ff71,U+ff89,U+ff97}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.86.woff2) format("woff2");unicode-range:U+24,U+2022,U+2212,U+221f,U+2665,U+4ecf,U+5100,U+51cd,U+52d8,U+5378,U+53f6,U+574a,U+5982,U+5996,U+5c1a,U+5e1d,U+5f84,U+609f,U+61a7,U+61f8,U+6398,U+63ee,U+6676,U+6691,U+6eb6,U+7126,U+71e5,U+7687,U+7965,U+7d17,U+80a1,U+8107,U+8266,U+85a6,U+8987,U+8ca2,U+8cab,U+8e0a,U+9042,U+95c7,U+9810,U+9867,U+98fc,U+ff52-ff54,U+ff61,U+ff77,U+ff98-ff99}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.87.woff2) format("woff2");unicode-range:U+b0,U+226a,U+2462,U+4e39,U+4fc3,U+4fd7,U+50be,U+50da,U+5200,U+5211,U+54f2,U+5618,U+596a,U+5b22,U+5bb4,U+5d50,U+60a3,U+63fa,U+658e,U+65e8,U+6669,U+6795,U+679d,U+67a0,U+6b3a,U+6e09,U+757f,U+7cd6,U+7dbe,U+7ffb,U+83cc,U+83f1,U+840c,U+845b,U+8846,U+8972,U+8a34,U+8a50,U+8a87,U+8edf,U+8ff0,U+90a6,U+9154,U+95a3,U+9663,U+9686,U+96c7,U+ff3c,U+ff7c,U+ff8a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.88.woff2) format("woff2");unicode-range:U+25bd,U+4e59,U+4ec1,U+4ff3,U+515a,U+518a,U+525b,U+5375,U+552f,U+57a3,U+5b9c,U+5c3d,U+5e3d,U+5e7b,U+5f0a,U+6094,U+6458,U+654f,U+67f3,U+6b8a,U+6bd2,U+6c37,U+6ce1,U+6e56,U+6e7f,U+6ed1,U+6ede,U+6f0f,U+70ad,U+7267,U+7363,U+786c,U+7a42,U+7db2,U+7f85,U+8178,U+829d,U+8896,U+8c5a,U+8cb0,U+8ce2,U+8ed2,U+9047,U+9177,U+970a,U+9ea6,U+ff1b,U+ff31,U+ff39,U+ff80}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.89.woff2) format("woff2");unicode-range:U+a5,U+4e80,U+4f34,U+4f73,U+4f75,U+511f,U+5192,U+52aa,U+53c8,U+570f,U+57cb,U+596e,U+5d8b,U+5f66,U+5fd9,U+62db,U+62f6,U+6328,U+633f,U+63a7,U+6469,U+6bbf,U+6c41,U+6c57,U+6d44,U+6dbc,U+706f,U+72c2,U+72ed,U+7551,U+75f4,U+7949,U+7e26,U+7fd4,U+8150,U+8af8,U+8b0e,U+8b72,U+8ca7,U+934b,U+9a0e,U+9a12,U+9b42,U+ff41,U+ff43,U+ff45,U+ff49,U+ff4f,U+ff62-ff63}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.90.woff2) format("woff2");unicode-range:U+4e18,U+4fb5,U+5104,U+52c7,U+5353,U+5374,U+53e5,U+587e,U+594f,U+5a20,U+5de1,U+5f18,U+5fcd,U+6291,U+62ab,U+6355,U+6392,U+63da,U+63e1,U+656c,U+6687,U+68b0-68b1,U+68d2,U+68da,U+6b27,U+6cbc,U+7159,U+7344,U+73cd,U+76df,U+790e,U+7cf8,U+8102,U+88c1,U+8aa0,U+8e0f,U+9178,U+92ad,U+9670,U+96c5,U+9cf4,U+9db4,U+ff3e,U+ff6f,U+ff72,U+ff78,U+ff7d,U+ff84,U+ff8c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.91.woff2) format("woff2");unicode-range:U+60,U+2200,U+226b,U+2461,U+517c,U+526f,U+5800,U+5b97,U+5bf8,U+5c01,U+5d29,U+5e4c,U+5e81,U+6065,U+61d0,U+667a,U+6696,U+6843,U+6c99,U+6d99,U+6ec5,U+6f22,U+6f6e,U+6fa4,U+6fef,U+71c3,U+72d9,U+7384,U+78e8,U+7a1a,U+7a32,U+7a3c,U+7adc,U+7ca7,U+7d2b,U+7dad,U+7e4b,U+80a9,U+8170,U+81ed,U+820e,U+8a17,U+8afe,U+90aa,U+914e,U+963f,U+99c4,U+9eba,U+9f3b,U+ff38}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.92.woff2) format("woff2");unicode-range:U+2460,U+4e5f,U+4e7e,U+4ed9,U+501f,U+502b,U+5968,U+5974,U+5ac1,U+5b99,U+5ba3,U+5be7,U+5be9,U+5c64,U+5cb8,U+5ec3,U+5f1f,U+616e,U+6297,U+62e0,U+62ec,U+6368,U+642d,U+65e6,U+6717,U+676f,U+6b04,U+732e,U+7652,U+76ca,U+76d7,U+7802,U+7e70,U+7f6a,U+8133,U+81e8,U+866b,U+878d,U+88f8,U+8a5e,U+8cdb,U+8d08,U+907a,U+90e1,U+96f2,U+9f8d,U+ff35,U+ff37,U+ff40,U+ff9d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.93.woff2) format("woff2");unicode-range:U+21d2,U+25ce,U+300a-300b,U+4e89,U+4e9c,U+4ea1,U+5263,U+53cc,U+5426,U+5869,U+5947,U+598a,U+5999,U+5e55,U+5e72,U+5e79,U+5fae,U+5fb9,U+602a,U+6163,U+624d,U+6749,U+6c5a,U+6cbf,U+6d45,U+6dfb,U+6e7e,U+708e,U+725b,U+7763,U+79c0,U+7bc4,U+7c89,U+7e01,U+7e2e,U+8010,U+8033,U+8c6a,U+8cc3,U+8f1d,U+8f9b,U+8fb2,U+907f,U+90f7,U+9707,U+9818,U+9b3c,U+ff0a,U+ff4d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.94.woff2) format("woff2");unicode-range:U+2015,U+2190,U+4e43,U+5019,U+5247,U+52e7,U+5438,U+54b2,U+55ab,U+57f7,U+5bd2,U+5e8a,U+5ef6,U+6016,U+60b2,U+6162,U+6319,U+6551,U+6607,U+66b4,U+675f,U+67d4,U+6b20,U+6b53,U+6ce3,U+719f,U+75b2,U+770b,U+7720,U+77ac,U+79d2,U+7af9,U+7d05,U+7dca,U+8056,U+80f8,U+81f3,U+8352,U+885d,U+8a70,U+8aa4,U+8cbc,U+900f,U+9084,U+91e3,U+9451,U+96c4,U+99c6,U+9ad4,U+ff70}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.95.woff2) format("woff2");unicode-range:U+2193,U+25b2,U+4e4b,U+516d,U+51c4,U+529f,U+52c9,U+5360,U+5442,U+5857,U+5915,U+59eb,U+5a9b,U+5c3b,U+6012,U+61b6,U+62b1,U+6311,U+6577,U+65e2,U+65ec,U+6613,U+6790,U+6cb9,U+7372,U+76ae,U+7d5e,U+7fcc,U+88ab,U+88d5,U+8caf,U+8ddd,U+8ecd,U+8f38,U+8f9e,U+8feb,U+9063,U+90f5,U+93e1,U+968a,U+968f,U+98fe,U+9ec4,U+ff1d,U+ff27,U+ff2a,U+ff36,U+ff3b,U+ff3d,U+ffe5}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.96.woff2) format("woff2");unicode-range:U+4e03,U+4f38,U+50b7,U+5264,U+5348,U+5371,U+585a,U+58ca,U+5951,U+59b9,U+59d4,U+5b98,U+5f8b,U+6388,U+64cd,U+65e7,U+6803,U+6b6f,U+6d66,U+6e0b,U+6ecb,U+6fc3,U+72ac,U+773c,U+77e2,U+7968,U+7a74,U+7dba,U+7dd1,U+7e3e,U+808c,U+811a,U+8179,U+8239,U+8584,U+8a0e,U+8a72,U+8b66,U+8c46,U+8f29,U+90a3,U+9234,U+96f0,U+9769,U+9774,U+9aa8,U+ff26,U+ff28,U+ff9e-ff9f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.97.woff2) format("woff2");unicode-range:U+7e,U+b4,U+25c6,U+2661,U+4e92,U+4eee,U+4ffa,U+5144,U+5237,U+5287,U+52b4,U+58c1,U+5bff,U+5c04,U+5c06,U+5e95,U+5f31,U+5f93,U+63c3,U+640d,U+6557,U+6614,U+662f,U+67d3,U+690d,U+6bba,U+6e6f,U+72af,U+732b,U+7518,U+7ae0,U+7ae5,U+7af6,U+822a,U+89e6,U+8a3a,U+8a98,U+8cb8,U+8de1,U+8e8d,U+95d8,U+961c,U+96a3,U+96ea,U+9bae,U+ff20,U+ff22,U+ff29,U+ff2b-ff2c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.98.woff2) format("woff2");unicode-range:U+25cb,U+4e71,U+4f59,U+50d5,U+520a,U+5217,U+5230,U+523a-523b,U+541b,U+5439,U+5747,U+59c9,U+5bdf,U+5c31,U+5de8,U+5e7c,U+5f69,U+6050,U+60d1,U+63cf,U+663c,U+67c4,U+6885,U+6c38,U+6d6e,U+6db2,U+6df7,U+6e2c,U+6f5f,U+7532,U+76e3-76e4,U+7701,U+793c,U+79f0,U+7a93,U+7d00,U+7de0,U+7e54,U+8328,U+8840,U+969c,U+96e8,U+9811,U+9aea,U+9b5a,U+ff24,U+ff2e,U+ff57}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.99.woff2) format("woff2");unicode-range:U+2191,U+505c,U+52e4,U+5305,U+535a,U+56e0,U+59bb,U+5acc,U+5b09,U+5b87,U+5c90,U+5df1,U+5e2d,U+5e33,U+5f3e,U+6298,U+6383,U+653b,U+6697,U+6804,U+6a39,U+6cca,U+6e90,U+6f2b,U+702c,U+7206,U+7236,U+7559,U+7565,U+7591,U+75c7,U+75db,U+7b4b,U+7bb1,U+7d99,U+7fbd,U+8131,U+885b,U+8b1d,U+8ff7,U+9003,U+9045,U+96a0,U+9732,U+990a,U+99d0,U+9e97,U+9f62,U+ff25,U+ff2d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.100.woff2) format("woff2");unicode-range:U+4e08,U+4f9d,U+5012,U+514d,U+51b7,U+5275,U+53ca,U+53f8,U+5584,U+57fc,U+5b9d,U+5bfa,U+5c3e,U+5f01,U+5fb4,U+5fd7,U+606f,U+62e1,U+6563,U+6674,U+6cb3,U+6d3e,U+6d74,U+6e1b,U+6e2f,U+718a,U+7247,U+79d8,U+7d14,U+7d66,U+7d71,U+7df4,U+7e41,U+80cc,U+8155,U+83d3,U+8a95,U+8ab2,U+8ad6,U+8ca1,U+9000,U+9006,U+9678,U+97d3,U+9808,U+98ef,U+9a5a,U+9b45,U+ff23,U+ff30}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.101.woff2) format("woff2");unicode-range:U+25bc,U+3012,U+4ef2,U+4f0a,U+516b,U+5373,U+539a,U+53b3,U+559c,U+56f0,U+5727,U+5742,U+5965,U+59ff,U+5bc6,U+5dfb,U+5e45,U+5ead,U+5fb3,U+6211,U+6253,U+639b,U+63a8,U+6545,U+6575,U+6628,U+672d,U+68a8,U+6bdb,U+6d25,U+707d,U+767e,U+7834,U+7b46,U+7bc9,U+8074,U+82e6,U+8349,U+8a2a,U+8d70,U+8da3,U+8fce,U+91cc,U+967d,U+97ff,U+9996,U+ff1c,U+ff2f,U+ff32,U+ff34}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.102.woff2) format("woff2");unicode-range:U+3d,U+5e,U+25cf,U+4e0e,U+4e5d,U+4e73,U+4e94,U+4f3c,U+5009,U+5145,U+51ac,U+5238,U+524a,U+53f3,U+547c,U+5802,U+5922,U+5a66,U+5c0e,U+5de6,U+5fd8,U+5feb,U+6797,U+685c,U+6b7b,U+6c5f-6c60,U+6cc9,U+6ce2,U+6d17,U+6e21,U+7167,U+7642,U+76db,U+8001,U+821e,U+8857,U+89d2,U+8b1b,U+8b70,U+8cb4,U+8cde,U+8f03,U+8f2a,U+968e,U+9b54,U+9e7f,U+9ebb,U+ff05,U+ff33}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.103.woff2) format("woff2");unicode-range:U+500d,U+5074,U+50cd,U+5175,U+52e2,U+5352,U+5354,U+53f2,U+5409,U+56fa,U+5a18,U+5b88,U+5bdd,U+5ca9,U+5f92,U+5fa9,U+60a9,U+623f,U+6483,U+653f,U+666f,U+66ae,U+66f2,U+6a21,U+6b66,U+6bcd,U+6d5c,U+796d,U+7a4d,U+7aef,U+7b56,U+7b97,U+7c4d,U+7e04,U+7fa9,U+8377,U+83dc,U+83ef,U+8535,U+8863,U+88cf,U+88dc,U+8907,U+8acb,U+90ce,U+91dd,U+ff0b,U+ff0d,U+ff19,U+ff65}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.104.woff2) format("woff2");unicode-range:U+4e01,U+4e21,U+4e38,U+52a9,U+547d,U+592e,U+5931,U+5b63,U+5c40,U+5dde,U+5e78,U+5efa,U+5fa1,U+604b,U+6075,U+62c5,U+632f,U+6a19,U+6c0f,U+6c11,U+6c96,U+6e05,U+70ba,U+71b1,U+7387,U+7403,U+75c5,U+77ed,U+795d,U+7b54,U+7cbe,U+7d19,U+7fa4,U+8089,U+81f4,U+8208,U+8336,U+8457,U+8a33,U+8c4a,U+8ca0,U+8ca8,U+8cc0,U+9014,U+964d,U+9803,U+983c,U+98db,U+ff17,U+ff21}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.105.woff2) format("woff2");unicode-range:U+25,U+25a0,U+4e26,U+4f4e,U+5341,U+56f2,U+5bbf,U+5c45,U+5c55,U+5c5e,U+5dee,U+5e9c,U+5f7c,U+6255,U+627f,U+62bc,U+65cf,U+661f,U+666e,U+66dc,U+67fb,U+6975,U+6a4b,U+6b32,U+6df1,U+6e29,U+6fc0,U+738b,U+7686,U+7a76,U+7a81,U+7c73,U+7d75,U+7dd2,U+82e5,U+82f1,U+85ac,U+888b,U+899a,U+8a31,U+8a8c,U+8ab0,U+8b58,U+904a,U+9060,U+9280,U+95b2,U+984d,U+9ce5,U+ff18}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.106.woff2) format("woff2");unicode-range:U+30f6,U+50ac,U+5178,U+51e6,U+5224,U+52dd,U+5883,U+5897,U+590f,U+5a5a,U+5bb3,U+5c65,U+5e03,U+5e2b,U+5e30,U+5eb7,U+6271,U+63f4,U+64ae,U+6574,U+672b,U+679a,U+6a29-6a2a,U+6ca2,U+6cc1,U+6d0b,U+713c,U+74b0,U+7981,U+7a0b,U+7bc0,U+7d1a,U+7d61,U+7fd2,U+822c,U+8996,U+89aa,U+8cac,U+8cbb,U+8d77,U+8def,U+9020,U+9152,U+9244,U+9662,U+967a,U+96e3,U+9759,U+ff16}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.107.woff2) format("woff2");unicode-range:U+23,U+3c,U+2192,U+4e45,U+4efb,U+4f50,U+4f8b,U+4fc2,U+5024,U+5150,U+5272,U+5370,U+53bb,U+542b,U+56db,U+56e3,U+57ce,U+5bc4,U+5bcc,U+5f71,U+60aa,U+6238,U+6280,U+629c,U+6539,U+66ff,U+670d,U+677e-677f,U+6839,U+69cb,U+6b4c,U+6bb5,U+6e96,U+6f14,U+72ec,U+7389,U+7814,U+79cb,U+79d1,U+79fb,U+7a0e,U+7d0d,U+85e4,U+8d64,U+9632,U+96e2,U+9805,U+99ac,U+ff1e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.108.woff2) format("woff2");unicode-range:U+2605-2606,U+301c,U+4e57,U+4fee,U+5065,U+52df,U+533b,U+5357,U+57df,U+58eb,U+58f0,U+591c,U+592a-592b,U+5948,U+5b85,U+5d0e,U+5ea7,U+5ff5,U+6025,U+63a1,U+63a5,U+63db,U+643a,U+65bd,U+671d,U+68ee,U+6982,U+6b73,U+6bd4,U+6d88,U+7570,U+7b11,U+7d76,U+8077,U+8217,U+8c37,U+8c61,U+8cc7,U+8d85,U+901f,U+962a,U+9802,U+9806,U+9854,U+98f2,U+9928,U+99c5,U+9ed2}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.109.woff2) format("woff2");unicode-range:U+266a,U+4f11,U+533a,U+5343,U+534a,U+53cd,U+5404,U+56f3,U+5b57-5b58,U+5bae,U+5c4a,U+5e0c,U+5e2f,U+5eab,U+5f35,U+5f79,U+614b,U+6226,U+629e,U+65c5,U+6625,U+6751,U+6821,U+6b69,U+6b8b,U+6bce,U+6c42,U+706b,U+7c21,U+7cfb,U+805e,U+80b2,U+82b8,U+843d,U+8853,U+88c5,U+8a3c,U+8a66,U+8d8a,U+8fba,U+9069,U+91cf,U+9752,U+975e,U+9999,U+ff0f-ff10,U+ff14-ff15}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.110.woff2) format("woff2");unicode-range:U+40,U+4e86,U+4e95,U+4f01,U+4f1d,U+4fbf,U+5099,U+5171,U+5177,U+53cb,U+53ce,U+53f0,U+5668,U+5712,U+5ba4,U+5ca1,U+5f85,U+60f3,U+653e,U+65ad,U+65e9,U+6620,U+6750,U+6761,U+6b62,U+6b74,U+6e08,U+6e80,U+7248,U+7531,U+7533,U+753a,U+77f3,U+798f,U+7f6e,U+8449,U+88fd,U+89b3,U+8a55,U+8ac7,U+8b77,U+8db3,U+8efd,U+8fd4,U+9031-9032,U+9580,U+9589,U+96d1,U+985e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.111.woff2) format("woff2");unicode-range:U+2b,U+d7,U+300e-300f,U+4e07,U+4e8c,U+512a,U+5149,U+518d,U+5236,U+52b9,U+52d9,U+5468,U+578b,U+57fa,U+5b8c,U+5ba2,U+5c02,U+5de5,U+5f37,U+5f62,U+623b,U+63d0,U+652f,U+672a,U+6848,U+6d41,U+7136,U+7537,U+754c,U+76f4,U+79c1,U+7ba1,U+7d44,U+7d4c,U+7dcf,U+7dda,U+7de8,U+82b1,U+897f,U+8ca9,U+8cfc,U+904e,U+9664,U+982d,U+9858,U+98a8,U+9a13,U+ff13,U+ff5c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.112.woff2) format("woff2");unicode-range:U+4e16,U+4e3b,U+4ea4,U+4ee4,U+4f4d,U+4f4f,U+4f55,U+4f9b,U+5317,U+5358,U+53c2,U+53e4,U+548c,U+571f,U+59cb,U+5cf6,U+5e38,U+63a2,U+63b2,U+6559,U+662d,U+679c,U+6c7a,U+72b6,U+7523,U+767d,U+770c,U+7a2e,U+7a3f,U+7a7a,U+7b2c,U+7b49,U+7d20,U+7d42,U+8003,U+8272,U+8a08,U+8aac,U+8cb7,U+8eab,U+8ee2,U+9054-9055,U+90fd,U+914d,U+91cd,U+969b,U+97f3,U+984c,U+ff06}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.113.woff2) format("woff2");unicode-range:U+26,U+5f,U+2026,U+203b,U+4e09,U+4eac,U+4ed5,U+4fa1,U+5143,U+5199,U+5207,U+539f,U+53e3,U+53f7,U+5411,U+5473,U+5546,U+55b6,U+5929,U+597d,U+5bb9,U+5c11,U+5c4b,U+5ddd,U+5f97,U+5fc5,U+6295,U+6301,U+6307,U+671b,U+76f8,U+78ba,U+795e,U+7d30,U+7d39,U+7d9a,U+89e3,U+8a00,U+8a73,U+8a8d,U+8a9e,U+8aad,U+8abf,U+8cea,U+8eca,U+8ffd,U+904b,U+9650,U+ff11-ff12}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.114.woff2) format("woff2");unicode-range:U+3e,U+3005,U+4e0d,U+4e88,U+4ecb,U+4ee3,U+4ef6,U+4fdd,U+4fe1,U+500b,U+50cf,U+5186,U+5316,U+53d7,U+540c,U+544a,U+54e1,U+5728,U+58f2,U+5973,U+5b89,U+5c71,U+5e02,U+5e97,U+5f15,U+5fc3,U+5fdc,U+601d,U+611b,U+611f,U+671f,U+6728,U+6765,U+683c,U+6b21,U+6ce8,U+6d3b,U+6d77,U+7530,U+7740,U+7acb,U+7d50,U+826f,U+8f09,U+8fbc,U+9001,U+9053,U+91ce,U+9762,U+98df}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.115.woff2) format("woff2");unicode-range:U+7c,U+3080,U+4ee5,U+5148,U+516c,U+521d,U+5225,U+529b,U+52a0,U+53ef,U+56de,U+56fd,U+5909,U+591a,U+5b66,U+5b9f,U+5bb6,U+5bfe,U+5e73,U+5e83,U+5ea6,U+5f53,U+6027,U+610f,U+6210,U+6240,U+660e,U+66f4,U+66f8,U+6709,U+6771,U+697d,U+69d8,U+6a5f,U+6c34,U+6cbb,U+73fe,U+756a,U+7684,U+771f,U+793a,U+7f8e,U+898f,U+8a2d,U+8a71,U+8fd1,U+9078,U+9577,U+96fb,U+ff5e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.116.woff2) format("woff2");unicode-range:U+a9,U+3010-3011,U+30e2,U+4e0b,U+4eca,U+4ed6,U+4ed8,U+4f53,U+4f5c,U+4f7f,U+53d6,U+540d,U+54c1,U+5730,U+5916,U+5b50,U+5c0f,U+5f8c,U+624b,U+6570,U+6587,U+6599,U+691c,U+696d,U+6cd5,U+7269,U+7279,U+7406,U+767a-767b,U+77e5,U+7d04,U+7d22,U+8005,U+80fd,U+81ea,U+8868,U+8981,U+89a7,U+901a,U+9023,U+90e8,U+91d1,U+9332,U+958b,U+96c6,U+9ad8,U+ff1a,U+ff1f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.117.woff2) format("woff2");unicode-range:U+4e,U+a0,U+3000,U+300c-300d,U+4e00,U+4e0a,U+4e2d,U+4e8b,U+4eba,U+4f1a,U+5165,U+5168,U+5185,U+51fa,U+5206,U+5229,U+524d,U+52d5,U+5408,U+554f,U+5831,U+5834,U+5927,U+5b9a,U+5e74,U+5f0f,U+60c5,U+65b0,U+65b9,U+6642,U+6700,U+672c,U+682a,U+6b63,U+6c17,U+7121,U+751f,U+7528,U+753b,U+76ee,U+793e,U+884c,U+898b,U+8a18,U+9593,U+95a2,U+ff01,U+ff08-ff09}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.118.woff2) format("woff2");unicode-range:U+21-22,U+27-2a,U+2c-3b,U+3f,U+41-4d,U+4f-5d,U+61-7b,U+7d,U+ab,U+ae,U+b2-b3,U+b7,U+bb,U+c9,U+cd,U+d6,U+d8,U+dc,U+e0-e5,U+e7-ed,U+ef,U+f1-f4,U+f6,U+f8,U+fa,U+fc-fd,U+103,U+14d,U+1b0,U+300-301,U+1ebf,U+1ec7,U+2013-2014,U+201c-201d,U+2039-203a,U+203c,U+2048-2049,U+2113,U+2122,U+65e5,U+6708,U+70b9}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.119.woff2) format("woff2");unicode-range:U+20,U+2027,U+3001-3002,U+3041-307f,U+3081-308f,U+3091-3093,U+3099-309a,U+309d-309e,U+30a1-30e1,U+30e3-30ed,U+30ef-30f0,U+30f2-30f4,U+30fb-30fe,U+ff0c,U+ff0e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6omwqRfTHxT624.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6okQqRfTHxT624.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6onwqRfTHxTw.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/sniglet/v17/cIf9MaFLtkE3UjaJ9CChYUsEkIpdQQ.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/sniglet/v17/cIf9MaFLtkE3UjaJ9C6hYUsEkIo.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.i-eos-icons\:three-dots-loading,[i-eos-icons\:three-dots-loading=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='18' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.67' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.33' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='0' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:cloudflare-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437' fill='%23F38020'/%3E%3Cpath d='M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777' fill='%23FCAD32'/%3E%3C/g%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:deepseek-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cpath d='M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z' fill='%234D6BFE'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:fireworks{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:mistral-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cpath d='M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z' fill='gold'/%3E%3Cpath d='M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z' fill='%23FFAF00'/%3E%3Cpath d='M3.428 10.258h17.144v3.428H3.428v-3.428z' fill='%23FF8205'/%3E%3Cpath d='M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z' fill='%23FA500F'/%3E%3Cpath d='M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z' fill='%23E10500'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:moonshot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:novita-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cpath clip-rule='evenodd' d='M9.167 4.17v5.665L0 19.003h9.167v-5.666l5.666 5.666H24L9.167 4.17z' fill='%2323D57C' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:ollama{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:openai,[i-lobe-icons\:openai=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:openrouter{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:together-color{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cg%3E%3Cpath d='M17.385 11.23a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm0 10.77a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm-10.77 0a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23z' opacity='.2'/%3E%3Ccircle cx='6.615' cy='6.615' fill='%230F6FFF' r='4.615'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:vllm-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cpath d='M0 4.973h9.324V23L0 4.973z' fill='%23FDB515'/%3E%3Cpath d='M13.986 4.351L22.378 0l-6.216 23H9.324l4.662-18.649z' fill='%2330A2FF'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:xai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:blocks,[i-lucide\:blocks=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='7' height='7' x='14' y='3' rx='1'/%3E%3Cpath d='M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:book{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:book-copy{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M2 16V4a2 2 0 0 1 2-2h11'/%3E%3Cpath d='M22 18H11a2 2 0 1 0 0 4h10.5a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5H11a2 2 0 0 0-2 2v12m-4-6H4a2 2 0 1 0 0 4h1'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:brain,[i-lucide\:brain=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 5a3 3 0 1 0-5.997.125a4 4 0 0 0-2.526 5.77a4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z'/%3E%3Cpath d='M12 5a3 3 0 1 1 5.997.125a4 4 0 0 1 2.526 5.77a4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z'/%3E%3Cpath d='M15 13a4.5 4.5 0 0 1-3-4a4.5 4.5 0 0 1-3 4m8.599-6.5a3 3 0 0 0 .399-1.375m-11.995 0A3 3 0 0 0 6.401 6.5m-2.924 4.396a4 4 0 0 1 .585-.396m15.876 0a4 4 0 0 1 .585.396M6 18a4 4 0 0 1-1.967-.516m15.934 0A4 4 0 0 1 18 18'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:check,[i-lucide\:check=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:cog,[i-lucide\:cog=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 20a8 8 0 1 0 0-16a8 8 0 0 0 0 16'/%3E%3Cpath d='M12 14a2 2 0 1 0 0-4a2 2 0 0 0 0 4m0-12v2m0 18v-2m5 .66l-1-1.73m-5-8.66L7 3.34M20.66 17l-1.73-1M3.34 7l1.73 1M14 12h8M2 12h2m16.66-5l-1.73 1M3.34 17l1.73-1M17 3.34l-1 1.73m-5 8.66l-4 6.93'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:ear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0'/%3E%3Cpath d='M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:eye{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:ghost,[i-lucide\:ghost=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 10h.01M15 10h.01M12 2a8 8 0 0 0-8 8v12l3-3l2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:mic{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2m7 9v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:paintbrush,[i-lucide\:paintbrush=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14.622 17.897l-10.68-2.913M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0zM9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:person-standing,[i-lucide\:person-standing=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='5' r='1'/%3E%3Cpath d='m9 20l3-6l3 6M6 8l6 2l6-2m-6 2v4'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-simple-icons\:discord{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-simple-icons\:elevenlabs{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.604 0v24h4.931V0zm9.86 0v24h4.933V0z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:add-circle-line-duotone,[i-solar\:add-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:alt-arrow-down-bold-duotone,[i-solar\:alt-arrow-down-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m8.303 12.404l3.327 3.431c.213.22.527.22.74 0l6.43-6.63C19.201 8.79 18.958 8 18.43 8h-5.723z'/%3E%3Cpath fill='currentColor' d='M11.293 8H5.57c-.528 0-.771.79-.37 1.205l2.406 2.481z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:alt-arrow-left-bold-duotone,[i-solar\:alt-arrow-left-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M11.596 8.303L8.165 11.63a.5.5 0 0 0 0 .74l6.63 6.43c.414.401 1.205.158 1.205-.37v-5.723z'/%3E%3Cpath fill='currentColor' d='M16 11.293V5.57c0-.528-.791-.771-1.205-.37l-2.482 2.406z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:alt-arrow-left-line-duotone,[i-solar\:alt-arrow-left-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 5l-6 7l6 7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:alt-arrow-right-bold-duotone,[i-solar\:alt-arrow-right-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m12.404 8.303l3.431 3.327c.22.213.22.527 0 .74l-6.63 6.43C8.79 19.201 8 18.958 8 18.43v-5.723z'/%3E%3Cpath fill='currentColor' d='M8 11.293V5.57c0-.528.79-.771 1.205-.37l2.481 2.406z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:arrow-right-line-duotone,[i-solar\:arrow-right-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Cpath fill='currentColor' d='M4 11.25a.75.75 0 0 0 0 1.5zm0 1.5h16v-1.5H4z' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m14 6l6 6l-6 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:bug-bold-duotone,[i-solar\:bug-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M19 11.938V15a7 7 0 0 1-6.25 6.96V15a.75.75 0 0 0-1.5 0v6.96A7 7 0 0 1 5 15v-3.062A3.94 3.94 0 0 1 8.938 8h6.124A3.94 3.94 0 0 1 19 11.938' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19 14.75v-1.5h3a.75.75 0 0 1 0 1.5zm-1.504 4.586c.31-.393.58-.82.801-1.276l2.538 1.27a.75.75 0 1 1-.67 1.34zM5.703 18.06q.333.684.801 1.276l-2.669 1.335a.75.75 0 0 1-.67-1.342zM5 13.25H2a.75.75 0 0 0 0 1.5h3zm12.354-4.515l2.81-1.406a.75.75 0 1 1 .671 1.341L18.42 9.88a4 4 0 0 0-1.065-1.144M6.647 8.735c-.427.306-.79.695-1.067 1.144L3.165 8.67a.75.75 0 0 1 .67-1.341zM16.5 8.27V7.5a4.5 4.5 0 1 0-9 0v.77A3.9 3.9 0 0 1 8.938 8h6.124c.508 0 .993.096 1.438.27'/%3E%3Cpath fill='currentColor' d='M6.376 1.584a.75.75 0 0 0 .208 1.04l2.36 1.573a4.5 4.5 0 0 1 1.387-.877L7.416 1.376a.75.75 0 0 0-1.04.208m8.68 2.613a4.5 4.5 0 0 0-1.387-.877l2.915-1.944a.75.75 0 1 1 .832 1.248z' opacity='.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 14.25a.75.75 0 0 1 .75.75v7h-1.5v-7a.75.75 0 0 1 .75-.75' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:check-circle-line-duotone,[i-solar\:check-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m8.5 12.5l2 2l5-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:close-circle-line-duotone,[i-solar\:close-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='m14.5 9.5l-5 5m0-5l5 5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:danger-triangle-bold-duotone,[i-solar\:danger-triangle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 3c-2.31 0-3.77 2.587-6.688 7.762l-.364.644c-2.425 4.3-3.638 6.45-2.542 8.022S6.214 21 11.636 21h.728c5.422 0 8.134 0 9.23-1.572s-.117-3.722-2.542-8.022l-.364-.645C15.77 5.587 14.311 3 12 3' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 7.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V8a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:dialog-2-bold-duotone,[i-solar\:dialog-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m10.404 22.48l.275-.465c.44-.745.66-1.117 1.012-1.325c.351-.207.81-.222 1.725-.252c.859-.027 1.436-.102 1.93-.306a4.24 4.24 0 0 0 2.295-2.296c.323-.779.323-1.767.323-3.743v-.848c0-2.777 0-4.165-.625-5.185c-.35-.57-.83-1.05-1.4-1.4c-1.02-.625-2.408-.625-5.185-.625H8.21c-2.777 0-4.165 0-5.185.625c-.57.35-1.05.83-1.4 1.4C1 9.08 1 10.468 1 13.245v.848c0 1.976 0 2.964.323 3.744a4.24 4.24 0 0 0 2.295 2.295c.494.204 1.07.28 1.93.306c.916.03 1.374.045 1.725.252c.35.208.571.58 1.012 1.325l.275.465c.41.692 1.434.692 1.844 0m2.789-7.963a1.06 1.06 0 1 0 0-2.12a1.06 1.06 0 0 0 0 2.12m-2.65-1.06a1.06 1.06 0 1 1-2.121 0a1.06 1.06 0 0 1 2.12 0m-4.772 1.06a1.06 1.06 0 1 0 0-2.12a1.06 1.06 0 0 0 0 2.12' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M15.486 1c1.267 0 2.274 0 3.082.077c.829.079 1.53.244 2.153.626a4.8 4.8 0 0 1 1.575 1.575c.383.624.548 1.325.627 2.153c.076.808.076 1.816.076 3.082v.866c0 .901 0 1.619-.04 2.2c-.04.595-.125 1.106-.323 1.584a4.77 4.77 0 0 1-2.67 2.617q-.21.082-.368.135h-1.65c.016-.499.016-1.093.016-1.822v-.848c0-2.777 0-4.165-.625-5.185c-.35-.57-.83-1.05-1.4-1.4c-1.02-.625-2.408-.625-5.185-.625H8.21c-.986 0-1.796 0-2.478.028v-1.65q.05-.17.13-.396q.133-.389.346-.739a4.8 4.8 0 0 1 1.576-1.575c.624-.382 1.324-.547 2.153-.626C10.745 1 11.752 1 13.019 1z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:face-scan-circle-bold-duotone,[i-solar\:face-scan-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.801 2.57a.71.71 0 0 1-.555.838a8.78 8.78 0 0 0-6.838 6.838a.71.71 0 1 1-1.394-.283a10.2 10.2 0 0 1 7.949-7.949a.71.71 0 0 1 .838.556M2.57 13.199a.71.71 0 0 1 .838.555a8.78 8.78 0 0 0 6.838 6.838a.71.71 0 1 1-.283 1.394a10.2 10.2 0 0 1-7.948-7.949a.71.71 0 0 1 .555-.838M13.199 2.57a.71.71 0 0 1 .838-.556a10.2 10.2 0 0 1 7.949 7.949a.711.711 0 0 1-1.394.283a8.78 8.78 0 0 0-6.838-6.838a.71.71 0 0 1-.555-.838m8.231 10.629a.71.71 0 0 1 .556.838a10.2 10.2 0 0 1-7.949 7.949a.711.711 0 0 1-.283-1.394a8.78 8.78 0 0 0 6.838-6.838a.71.71 0 0 1 .838-.555' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M12 19.583a7.583 7.583 0 1 0 0-15.166a7.583 7.583 0 0 0 0 15.166' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.94 14.539a.71.71 0 0 1 .995-.148c.59.437 1.3.69 2.065.69a3.45 3.45 0 0 0 2.065-.69a.71.71 0 1 1 .847 1.142a4.87 4.87 0 0 1-2.912.97a4.87 4.87 0 0 1-2.911-.97a.71.71 0 0 1-.148-.994m5.547-2.895c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244m-4.976 0c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:info-circle-line-duotone,[i-solar\:info-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='M12 17v-6'/%3E%3Ccircle cx='1' cy='1' r='1' fill='currentColor' transform='matrix(1 0 0 -1 11 9)'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:magic-stick-3-bold-duotone,[i-solar\:magic-stick-3-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51c.012-.014.555.503.568.49l4-4c.013-.013-.504-.556-.49-.568L7.922 3.845a2.883 2.883 0 0 0-4.077 0m1.288 11.462a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19.967 9.13a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273z' opacity='.2'/%3E%3Cpath fill='currentColor' d='M16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274z' opacity='.7'/%3E%3Cpath fill='currentColor' d='M10.568 6.49c-.012.014-.555-.503-.568-.49l-4 4c-.013.013.504.556.49.568l9.588 9.587a2.883 2.883 0 1 0 4.078-4.077z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:magnifer-line-duotone,[i-solar\:magnifer-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cdefs%3E%3Cmask id='solarMagniferLineDuotone0'%3E%3Cg fill='none' stroke-width='1.5'%3E%3Ccircle cx='11.5' cy='11.5' r='9.5' stroke='gray'/%3E%3Cpath stroke='%23fff' stroke-linecap='round' d='M18.5 18.5L22 22'/%3E%3C/g%3E%3C/mask%3E%3C/defs%3E%3Cpath fill='currentColor' d='M0 0h24v24H0z' mask='url(%23solarMagniferLineDuotone0)'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:microphone-2-bold-duotone,[i-solar\:microphone-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M4 9a.75.75 0 0 1 .75.75v1a7.25 7.25 0 1 0 14.5 0v-1a.75.75 0 0 1 1.5 0v1a8.75 8.75 0 0 1-8 8.718v2.282a.75.75 0 0 1-1.5 0v-2.282a8.75 8.75 0 0 1-8-8.718v-1A.75.75 0 0 1 4 9' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M9.75 7.75A.75.75 0 0 0 9 7H6.298a5.751 5.751 0 0 1 11.404 0H13.5a.75.75 0 0 0 0 1.5h4.25V10H13.5a.75.75 0 0 0 0 1.5h4.201a5.751 5.751 0 0 1-11.403 0H9A.75.75 0 0 0 9 10H6.25V8.5H9a.75.75 0 0 0 .75-.75' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.75 10.75c0 .414.336.75.75.75h4.201l.049-1.5H13.5a.75.75 0 0 0-.75.75m0-3c0 .414.336.75.75.75h4.25L17.701 7H13.5a.75.75 0 0 0-.75.75m-3 0A.75.75 0 0 0 9 7H6.298L6.25 8.5H9a.75.75 0 0 0 .75-.75m0 3A.75.75 0 0 0 9 10H6.25l.048 1.5H9a.75.75 0 0 0 .75-.75'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:moon-stars-bold-duotone,[i-solar\:moon-stars-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19.9 2.307a.483.483 0 0 0-.9 0l-.43 1.095a.48.48 0 0 1-.272.274l-1.091.432a.486.486 0 0 0 0 .903l1.091.432a.48.48 0 0 1 .272.273L19 6.81c.162.41.74.41.9 0l.43-1.095a.48.48 0 0 1 .273-.273l1.091-.432a.486.486 0 0 0 0-.903l-1.091-.432a.48.48 0 0 1-.273-.274zM16.033 8.13a.483.483 0 0 0-.9 0l-.157.399a.48.48 0 0 1-.272.273l-.398.158a.486.486 0 0 0 0 .903l.398.157c.125.05.223.148.272.274l.157.399c.161.41.739.41.9 0l.157-.4a.48.48 0 0 1 .272-.273l.398-.157a.486.486 0 0 0 0-.903l-.398-.158a.48.48 0 0 1-.272-.273z'/%3E%3Cpath fill='currentColor' d='M12 22c5.523 0 10-4.477 10-10c0-.463-.694-.54-.933-.143a6.5 6.5 0 1 1-8.924-8.924C12.54 2.693 12.463 2 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:pallete-2-bold-duotone,[i-solar\:pallete-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10.847 21.934C5.867 21.362 2 17.133 2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.157-3.283 4.733-6.086 4.37c-1.618-.209-3.075-.397-3.652.518c-.395.626.032 1.406.555 1.929a1.673 1.673 0 0 1 0 2.366c-.523.523-1.235.836-1.97.751' opacity='.5'/%3E%3Cpath fill='currentColor' d='M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0M6.5 13a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m11 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m-3-4.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:people-nearby-bold-duotone,[i-solar\:people-nearby-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19.717 20.362C21.143 19.585 22 18.587 22 17.5c0-1.152-.963-2.204-2.546-3C17.623 13.58 14.962 13 12 13s-5.623.58-7.454 1.5C2.963 15.296 2 16.348 2 17.5s.963 2.204 2.546 3C6.377 21.42 9.038 22 12 22c3.107 0 5.882-.637 7.717-1.638' opacity='.6'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M9.25 4a2.75 2.75 0 1 1 5.5 0a2.75 2.75 0 0 1-5.5 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m8.223 11.574l-2.175-.725a1.532 1.532 0 0 1 .805-2.952l1.898.407l.21.044a15 15 0 0 0 6.288-.044l1.897-.407a1.532 1.532 0 0 1 .806 2.952l-2.175.725c-.263.088-.394.132-.493.193a1 1 0 0 0-.466.986c.016.115.066.244.165.503l1.247 3.242a1.473 1.473 0 0 1-2.654 1.26L12 15l-1.576 2.757a1.473 1.473 0 0 1-2.654-1.26l1.247-3.241c.1-.259.149-.388.165-.503a1 1 0 0 0-.466-.986c-.099-.061-.23-.105-.493-.193'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:running-2-line-duotone,[i-solar\:running-2-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='18.5' cy='4.5' r='2.5' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='m9 17l-1 1.2c-.738.886-1.107 1.328-1.61 1.564S5.31 20 4.157 20H3'/%3E%3Cpath fill='currentColor' d='M13.65 22a.75.75 0 0 0 1.5 0zm-1.085-5.754l.453-.598zm1.184 1.015l.587-.466zm.557 1.12l.727-.186zm-.802-6.826a.75.75 0 0 0-1.009-1.11zm-2.652 1.61l.703.26zm.07 1.555l-.677.323zm2.728 5.219v2.06h1.5v-2.06zm-1.538-3.095c.663.502.887.679 1.05.884l1.174-.934c-.308-.387-.717-.69-1.319-1.146zm3.038 3.095c0-.755.006-1.264-.117-1.744l-1.453.373c.065.254.07.538.07 1.37zm-1.988-2.211c.197.247.339.534.417.84l1.454-.373a3.75 3.75 0 0 0-.697-1.4zm-.667-7.283c-.42.381-.945.836-1.354 1.224c-.21.198-.41.398-.573.586c-.149.172-.327.4-.42.649l1.407.521c-.007.021.014-.035.146-.187c.116-.134.276-.295.471-.48c.4-.38.865-.778 1.332-1.203zm.523 5.203c-.488-.37-.818-.62-1.056-.832c-.233-.208-.32-.33-.363-.418l-1.354.645c.167.35.423.63.72.894c.292.26.679.552 1.147.907zm-2.87-2.744a2.75 2.75 0 0 0 .097 2.139l1.354-.645a1.25 1.25 0 0 1-.044-.973z' opacity='.5'/%3E%3Cpath fill='currentColor' d='m5.436 8.82l-.37-.652zm-1.807.164a.75.75 0 1 0 .742 1.304zm9.778-1.627l-.286.693zm-2.96-.715l-.055-.748zM21 12.75a.75.75 0 1 0 0-1.5zm-5.232-3.213l-.67.335zM5.065 8.168l-1.436.816l.742 1.304l1.435-.816zm8.627-1.505c-1.344-.553-2.08-.857-3.3-.769l.11 1.496c.823-.06 1.255.099 2.62.66zm-7.886 2.81c2.502-1.422 3.552-2 4.695-2.083l-.109-1.496c-1.56.114-2.949.923-5.327 2.274zm13.949 3.276H21v-1.5h-1.245zm-4.658-2.878a5.21 5.21 0 0 0 4.658 2.878v-1.5A3.71 3.71 0 0 1 16.439 9.2zm1.342-.67a5.33 5.33 0 0 0-2.747-2.538l-.57 1.387c.86.354 1.564 1 1.975 1.821z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:settings-bold-duotone,[i-solar\:settings-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M14.279 2.152C13.909 2 13.439 2 12.5 2s-1.408 0-1.779.152a2 2 0 0 0-1.09 1.083c-.094.223-.13.484-.145.863a1.62 1.62 0 0 1-.796 1.353a1.64 1.64 0 0 1-1.579.008c-.338-.178-.583-.276-.825-.308a2.03 2.03 0 0 0-1.49.396c-.318.242-.553.646-1.022 1.453c-.47.807-.704 1.21-.757 1.605c-.07.526.074 1.058.4 1.479c.148.192.357.353.68.555c.477.297.783.803.783 1.361s-.306 1.064-.782 1.36c-.324.203-.533.364-.682.556a2 2 0 0 0-.399 1.479c.053.394.287.798.757 1.605s.704 1.21 1.022 1.453c.424.323.96.465 1.49.396c.242-.032.487-.13.825-.308a1.64 1.64 0 0 1 1.58.008c.486.28.774.795.795 1.353c.015.38.051.64.145.863c.204.49.596.88 1.09 1.083c.37.152.84.152 1.779.152s1.409 0 1.779-.152a2 2 0 0 0 1.09-1.083c.094-.223.13-.483.145-.863c.02-.558.309-1.074.796-1.353a1.64 1.64 0 0 1 1.579-.008c.338.178.583.276.825.308c.53.07 1.066-.073 1.49-.396c.318-.242.553-.646 1.022-1.453c.47-.807.704-1.21.757-1.605a2 2 0 0 0-.4-1.479c-.148-.192-.357-.353-.68-.555c-.477-.297-.783-.803-.783-1.361s.306-1.064.782-1.36c.324-.203.533-.364.682-.556a2 2 0 0 0 .399-1.479c-.053-.394-.287-.798-.757-1.605s-.704-1.21-1.022-1.453a2.03 2.03 0 0 0-1.49-.396c-.242.032-.487.13-.825.308a1.64 1.64 0 0 1-1.58-.008a1.62 1.62 0 0 1-.795-1.353c-.015-.38-.051-.64-.145-.863a2 2 0 0 0-1.09-1.083' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15.523 12c0 1.657-1.354 3-3.023 3s-3.023-1.343-3.023-3S10.83 9 12.5 9s3.023 1.343 3.023 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:settings-minimalistic-bold-duotone,[i-solar\:settings-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.428 2c-1.114 0-2.129.6-4.157 1.802l-.686.406C5.555 5.41 4.542 6.011 3.985 7c-.557.99-.557 2.19-.557 4.594v.812c0 2.403 0 3.605.557 4.594s1.57 1.59 3.6 2.791l.686.407C10.299 21.399 11.314 22 12.428 22s2.128-.6 4.157-1.802l.686-.407c2.028-1.2 3.043-1.802 3.6-2.791c.557-.99.557-2.19.557-4.594v-.812c0-2.403 0-3.605-.557-4.594s-1.572-1.59-3.6-2.792l-.686-.406C14.555 2.601 13.542 2 12.428 2' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.428 8.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:star-fall-2-bold-duotone,[i-solar\:star-fall-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M11.58 4.776c.695-1.77 1.043-2.656 1.769-2.765c.726-.11 1.35.63 2.6 2.109l.323.382c.355.42.532.63.774.75c.24.12.518.137 1.074.17l.506.029c1.955.114 2.932.172 3.271.81c.34.64-.184 1.438-1.231 3.033l-.271.413c-.298.453-.447.68-.487.939s.033.52.179 1.043l.133.477c.513 1.842.77 2.762.253 3.266c-.517.505-1.465.258-3.361-.235l-.49-.127c-.54-.14-.809-.21-1.075-.17s-.499.185-.964.476l-.424.265c-1.638 1.024-2.456 1.536-3.115 1.208c-.659-.327-.72-1.277-.845-3.177l-.033-.492c-.035-.54-.053-.81-.177-1.044s-.34-.406-.774-.75l-.395-.312C7.294 9.865 6.53 9.26 6.64 8.554s1.02-1.047 2.839-1.729l.47-.176c.518-.194.776-.29.965-.475c.19-.185.288-.437.486-.94z'/%3E%3Cpath fill='currentColor' d='M5.31 9.593C2.873 11.92 1.275 15.806 2.331 22c.943-2.603 3.526-4.76 6.581-6.047c-.106-.593-.154-1.317-.204-2.08l-.039-.595a22 22 0 0 0-.032-.43l-.086-.071l-.268-.215l-.475-.376c-.694-.55-1.34-1.06-1.783-1.532c-.253-.269-.536-.624-.715-1.061m5.037 5.83l-.015-.114l.056.101z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:sun-fog-bold-duotone,[i-solar\:sun-fog-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7.25 22a.75.75 0 0 1 .75-.75h8a.75.75 0 0 1 0 1.5H8a.75.75 0 0 1-.75-.75M12 1.25a.75.75 0 0 1 .75.75v1a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75M1.25 12a.75.75 0 0 1 .75-.75h1a.75.75 0 0 1 0 1.5H2a.75.75 0 0 1-.75-.75m19 0a.75.75 0 0 1 .75-.75h1a.75.75 0 0 1 0 1.5h-1a.75.75 0 0 1-.75-.75M6.083 15.25H2a.75.75 0 0 0 0 1.5h20a.75.75 0 0 0 0-1.5z' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M4.25 19a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75m.148-14.602a.75.75 0 0 1 1.061 0l.393.393a.75.75 0 0 1-1.06 1.06l-.394-.392a.75.75 0 0 1 0-1.06m15.202 0a.75.75 0 0 1 0 1.06l-.392.393a.75.75 0 0 1-1.06-1.06l.392-.393a.75.75 0 0 1 1.06 0M5.25 12c0 1.178.302 2.286.833 3.25h11.834A6.75 6.75 0 1 0 5.25 12' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:trash-bin-trash-bold-duotone,[i-solar\:trash-bin-trash-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 6.386c0-.484.345-.877.771-.877h2.665c.529-.016.996-.399 1.176-.965l.03-.1l.115-.391c.07-.24.131-.45.217-.637c.338-.739.964-1.252 1.687-1.383c.184-.033.378-.033.6-.033h3.478c.223 0 .417 0 .6.033c.723.131 1.35.644 1.687 1.383c.086.187.147.396.218.637l.114.391l.03.1c.18.566.74.95 1.27.965h2.57c.427 0 .772.393.772.877s-.345.877-.771.877H3.77c-.425 0-.77-.393-.77-.877'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M9.425 11.482c.413-.044.78.273.821.707l.5 5.263c.041.433-.26.82-.671.864c-.412.043-.78-.273-.821-.707l-.5-5.263c-.041-.434.26-.821.671-.864m5.15 0c.412.043.713.43.671.864l-.5 5.263c-.04.434-.408.75-.82.707c-.413-.044-.713-.43-.672-.864l.5-5.264c.041-.433.409-.75.82-.707' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M11.596 22h.808c2.783 0 4.174 0 5.08-.886c.904-.886.996-2.339 1.181-5.245l.267-4.188c.1-1.577.15-2.366-.303-2.865c-.454-.5-1.22-.5-2.753-.5H8.124c-1.533 0-2.3 0-2.753.5s-.404 1.288-.303 2.865l.267 4.188c.185 2.906.277 4.36 1.182 5.245c.905.886 2.296.886 5.079.886' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-svg-spinners\:bouncing-ball,[i-svg-spinners\:bouncing-ball=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cellipse cx='12' cy='5' fill='currentColor' rx='4' ry='4'%3E%3Canimate id='svgSpinnersBouncingBall0' fill='freeze' attributeName='cy' begin='0;svgSpinnersBouncingBall2.end' calcMode='spline' dur='0.375s' keySplines='.33,0,.66,.33' values='5;20'/%3E%3Canimate attributeName='rx' begin='svgSpinnersBouncingBall0.end' calcMode='spline' dur='0.05s' keySplines='.33,0,.66,.33;.33,.66,.66,1' values='4;4.8;4'/%3E%3Canimate attributeName='ry' begin='svgSpinnersBouncingBall0.end' calcMode='spline' dur='0.05s' keySplines='.33,0,.66,.33;.33,.66,.66,1' values='4;3;4'/%3E%3Canimate id='svgSpinnersBouncingBall1' attributeName='cy' begin='svgSpinnersBouncingBall0.end' calcMode='spline' dur='0.025s' keySplines='.33,0,.66,.33' values='20;20.5'/%3E%3Canimate id='svgSpinnersBouncingBall2' attributeName='cy' begin='svgSpinnersBouncingBall1.end' calcMode='spline' dur='0.4s' keySplines='.33,.66,.66,1' values='20.5;5'/%3E%3C/ellipse%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-vscode-icons\:file-type-minecraft{background:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='%2352a535' d='M30 2H2v28h28z'/%3E%3Cpath fill='%2386d562' d='M24.4 13.2h-5.6v.47h5.6zm-5.6 8.4h-5.6v.47h5.6zm2.8 2.8h-2.8v.47h2.8zm-8.4 0h-2.8v.47h2.8zm0-11.2H7.6v.47h5.6z'/%3E%3Cpath d='M24.4 13.2V7.6h-5.6v5.6h-5.6V16h-2.8v8.4h2.8v-2.8h5.6v2.8h2.8V16h-2.8v-2.8zM13.2 7.6H7.6v5.6h5.6z'/%3E%3Cpath fill='%232a641c' d='M24.4 7.6h-5.6v.47h5.6zm-5.6 5.6h-5.6v.47h5.6zm-5.6-5.6H7.6v.47h5.6zm0 8.4h-2.8v.47h2.8zm8.4 0h-2.8v.47h2.8z'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-headings);font-weight:600;line-height:1.25}.prose :where(a):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links);text-decoration:underline;font-weight:500}.prose :where(a code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links)}.prose :where(p,ul,ol,pre):not(:where(.not-prose,.not-prose *)){margin:1em 0;line-height:1.75}.prose :where(blockquote):not(:where(.not-prose,.not-prose *)){margin:1em 0;padding-left:1em;font-style:italic;border-left:.25em solid var(--un-prose-borders)}.prose :where(h1):not(:where(.not-prose,.not-prose *)){margin:1rem 0;font-size:2.25em}.prose :where(h2):not(:where(.not-prose,.not-prose *)){margin:1.75em 0 .5em;font-size:1.75em}.prose :where(h3):not(:where(.not-prose,.not-prose *)){margin:1.5em 0 .5em;font-size:1.375em}.prose :where(h4):not(:where(.not-prose,.not-prose *)){margin:1em 0;font-size:1.125em}.prose :where(img,video):not(:where(.not-prose,.not-prose *)){max-width:100%}.prose :where(figure,picture):not(:where(.not-prose,.not-prose *)){margin:1em 0}.prose :where(figcaption):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-captions);font-size:.875em}.prose :where(code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);font-size:.875em;font-weight:600;font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):before,.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):after{content:"`"}.prose :where(pre):not(:where(.not-prose,.not-prose *)){padding:1.25rem 1.5rem;overflow-x:auto;border-radius:.375rem}.prose :where(pre,code):not(:where(.not-prose,.not-prose *)){white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;background:transparent}.prose :where(pre code):not(:where(.not-prose,.not-prose *)){font-weight:inherit}.prose :where(ol,ul):not(:where(.not-prose,.not-prose *)){padding-left:1.25em}.prose :where(ol):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ol[type=A]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ul):not(:where(.not-prose,.not-prose *)){list-style-type:disc}.prose :where(ol>li):not(:where(.not-prose,.not-prose *))::marker,.prose :where(ul>li):not(:where(.not-prose,.not-prose *))::marker,.prose :where(summary):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(hr):not(:where(.not-prose,.not-prose *)){margin:2em 0;border:1px solid var(--un-prose-hr)}.prose :where(table):not(:where(.not-prose,.not-prose *)){display:block;margin:1em 0;border-collapse:collapse;overflow-x:auto}.prose :where(tr):not(:where(.not-prose,.not-prose *)):nth-child(2n){background:var(--un-prose-bg-soft)}.prose :where(td,th):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-borders);padding:.625em 1em}.prose :where(abbr):not(:where(.not-prose,.not-prose *)){cursor:help}.prose :where(kbd):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);border:1px solid;padding:.25rem .5rem;font-size:.875em;border-radius:.25rem}.prose :where(details):not(:where(.not-prose,.not-prose *)){margin:1em 0;padding:1.25rem 1.5rem;background:var(--un-prose-bg-soft)}.prose :where(summary):not(:where(.not-prose,.not-prose *)){cursor:pointer;font-weight:600}.prose{color:var(--un-prose-body);max-width:65ch}.container,[container=""]{width:100%}@media (min-width: 640px){.container,[container=""]{max-width:640px}}@media (min-width: 768px){.container,[container=""]{max-width:768px}}@media (min-width: 1024px){.container,[container=""]{max-width:1024px}}@media (min-width: 1280px){.container,[container=""]{max-width:1280px}}@media (min-width: 1536px){.container,[container=""]{max-width:1536px}}.\[input\:checked\~\&\]{input:checked~&}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none,[pointer-events-none=""]{pointer-events:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.absolute,[absolute=""]{position:absolute}.fixed,[fixed=""]{position:fixed}.relative,[relative=""]{position:relative}.sticky,[sticky=""]{position:sticky}.after\:absolute:after{position:absolute}.inset-0,[inset-0=""]{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-0,[bottom-0=""]{bottom:0}.bottom-11,[bottom-11=""]{bottom:2.75rem}.bottom-4{bottom:1rem}.left-0,[left-0=""]{left:0}.left-1\/2,[left~="1/2"]{left:50%}.left-2{left:.5rem}.right-0,[right-0=""]{right:0}.top-0,[top-0=""]{top:0}.top-1\/2,[top~="50%"]{top:50%}.top-2{top:.5rem}[bottom~="-10"]{bottom:-2.5rem}[bottom~="20%"]{bottom:20%}[bottom~="3"]{bottom:.75rem}[right~="-50%"]{right:-50%}[right~="3"]{right:.75rem}.after\:left-\[2px\]:after{left:2px}.after\:top-\[2px\]:after{top:2px}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.z--1,[z--1=""]{z-index:-1}.z-1,[z-1=""]{z-index:1}.z-10,[z-10=""]{z-index:10}.z-2,[z-2=""]{z-index:2}.z-30,[z-30=""]{z-index:30}.z-50,[z-50=""]{z-index:50}[z~="20"]{z-index:20}.grid,[grid=""],[grid~="~"]{display:grid}.auto-cols-\[350px\]{grid-auto-columns:350px}.grid-flow-col{grid-auto-flow:column}.cols-\[150px_1fr\],[grid~="cols-[150px_1fr]"]{grid-template-columns:150px 1fr}.cols-\[20px_1fr_60px\],[grid~="cols-[20px_1fr_60px]"]{grid-template-columns:20px 1fr 60px}.cols-1,[grid~=cols-1]{grid-template-columns:repeat(1,minmax(0,1fr))}.cols-2,[grid~=cols-2]{grid-template-columns:repeat(2,minmax(0,1fr))}.m-1,[m-1=""]{margin:.25rem}.m-auto{margin:auto}.mx2,[mx2=""]{margin-left:.5rem;margin-right:.5rem}.mb-1,[mb-1=""]{margin-bottom:.25rem}.mb-2,.mb2,[mb-2=""],[mb2=""]{margin-bottom:.5rem}.mb-4,[mb-4=""]{margin-bottom:1rem}.mb-6,[mb-6=""]{margin-bottom:1.5rem}.ml{margin-left:1rem}.ml-0\.5,[ml-0\.5=""]{margin-left:.125rem}.ml-2,[ml-2=""]{margin-left:.5rem}.ml-auto{margin-left:auto}.mr{margin-right:1rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.ms{margin-inline-start:1rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-2,[mt-2=""]{margin-top:.5rem}.mt-24,[mt-24=""]{margin-top:6rem}.mt-4,[mt-4=""]{margin-top:1rem}[ml~="12"]{margin-left:3rem}[mr~="12"]{margin-right:3rem}.inline,[inline=""]{display:inline}.block,[block=""]{display:block}.inline-block,[inline-block=""]{display:inline-block}.hidden,[hidden=""]{display:none}.size-16,[size-16=""]{width:4rem;height:4rem}.size-24,[size-24=""]{width:6rem;height:6rem}.size-3,[size-3=""]{width:.75rem;height:.75rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-10,[h-10=""]{height:2.5rem}.h-100vh,[h-100vh=""]{height:100vh}.h-2,.h2{height:.5rem}.h-6{height:1.5rem}.h-8,[h-8=""]{height:2rem}.h-fit,[h-fit=""]{height:fit-content}.h-full,[h-full=""]{height:100%}.h1{height:.25rem}.h3{height:.75rem}.max-h-\[10lh\],[max-h~="[10lh]"]{max-height:10lh}.max-w-full,[max-w-full=""]{max-width:100%}.min-h-\[1lh\],[min-h~="[1lh]"]{min-height:1lh}.min-h-16,[min-h-16=""]{min-height:4rem}.min-w-0,[min-w-0=""]{min-width:0}.min-w-20,[min-w-20=""]{min-width:5rem}.min-w-50,[min-w-50=""]{min-width:12.5rem}.w-\[calc\(100\%-16px-40px-16px\)\]{width:calc(100% - 72px)}.w-100,[w-100=""]{width:25rem}.w-100vw,[w-100vw=""]{width:100vw}.w-11{width:2.75rem}.w-32{width:8rem}.w-8,[w-8=""]{width:2rem}.w-fit,[w-fit=""]{width:fit-content}.w-full,[w-full=""],[w~=full]{width:100%}[h~="[14px]"]{height:14px}[h~="80vh"]{height:80vh}[h~=unset]{height:unset}[max-h~="[75%]"]{max-height:75%}[max-h~="[85vh]"]{max-height:85vh}[max-h~="100"]{max-height:25rem}[max-h~="30vh"]{max-height:30vh}[max-w~="30%"]{max-width:30%}[max-w~="500px"]{max-width:500px}[min-h~="[100px]"]{min-height:100px}[min-h~="100"]{min-height:25rem}[min-w~="1/2"],[min-w~="50%"]{min-width:50%}[min-w~="30%"]{min-width:30%}[min-w~="3em"]{min-width:3em}[min-w~="50vw"]{min-width:50vw}[min-w~="6"]{min-width:1.5rem}[w~="[1px]"]{width:1px}[w~="50%"]{width:50%}.after\:h-5:after{height:1.25rem}.after\:w-5:after{width:1.25rem}.flex,[flex=""],[flex~="~"]{display:flex}.inline-flex{display:inline-flex}.flex-1,[flex-1=""],[flex~="1"]{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-row,[flex-row=""],[flex~=row]{flex-direction:row}[flex~=row-reverse]{flex-direction:row-reverse}.flex-col,[flex-col=""],[flex~=col]{flex-direction:column}.flex-wrap,[flex-wrap=""]{flex-wrap:wrap}.-translate-x-1\/2,.translate-x--1\/2,[transform~="translate-x--1/2"]{--un-translate-x:-50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.-translate-y-1\/2,.translate-y-\[-50\%\],[transform~="translate-y-[-50%]"]{--un-translate-y:-50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-x-\[50\%\],[transform~="translate-x-[50%]"]{--un-translate-x:50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-x-10,[translate-x-10=""]{--un-translate-x:2.5rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y--100\%,.translate-y-\[-100\%\],[transform~="translate-y--100%"],[transform~="translate-y-[-100%]"]{--un-translate-y:-100%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y--2,[transform~=translate-y--2]{--un-translate-y:-.5rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y-10,[translate-y-10=""]{--un-translate-y:2.5rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y-2,[translate-y-2=""]{--un-translate-y:.5rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y-4,[translate-y-4=""]{--un-translate-y:1rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}[translate-y~="[-80%]"]{--un-translate-y:-80%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.peer:checked~.peer-checked\:after\:translate-x-full:after{--un-translate-x:100%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-180{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:180deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.transform,[transform=""]{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.disabled\:cursor-default:disabled{cursor:default}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.cursor-not-allowed{cursor:not-allowed}.cursor-ew-resize,[cursor-ew-resize=""]{cursor:ew-resize}.select-none,[select-none=""]{-webkit-user-select:none;user-select:none}.resize-none,[resize-none=""]{resize:none}.appearance-none,[appearance-none=""]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.items-start,[items-start=""]{align-items:flex-start}.items-center,[items-center=""]{align-items:center}.justify-end,[justify-end=""]{justify-content:flex-end}.justify-center,[justify-center=""]{justify-content:center}.justify-between,[justify-between=""]{justify-content:space-between}.gap-1,[gap-1=""]{gap:.25rem}.gap-1\.5,[gap-1\.5=""]{gap:.375rem}.gap-2,[gap-2=""],[grid~=gap-2]{gap:.5rem}.gap-3{gap:.75rem}.gap-4,[flex~=gap-4],[gap-4=""],[grid~=gap-4]{gap:1rem}.gap-8{gap:2rem}.gap-x-2,[flex~=gap-x-2]{column-gap:.5rem}.gap-y-0,[flex~=gap-y-0]{row-gap:0}.space-x-1>:not([hidden])~:not([hidden]),[space-x-1=""]>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.25rem * calc(1 - var(--un-space-x-reverse)));margin-right:calc(.25rem * var(--un-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.25rem * var(--un-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.5rem * var(--un-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1rem * var(--un-space-y-reverse))}[divide~=y]>:not([hidden])~:not([hidden]){--un-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--un-divide-y-reverse)));border-bottom-width:calc(1px * var(--un-divide-y-reverse))}[divide~="gray/25"]>:not([hidden])~:not([hidden]){border-color:#9ca3af40}[border~=dashed],[divide~=dashed]>:not([hidden])~:not([hidden]){border-style:dashed}.of-clip,[of-clip=""]{overflow:clip}.of-hidden,.overflow-hidden,[of-hidden=""],[overflow-hidden=""]{overflow:hidden}.overflow-scroll,[overflow-scroll=""]{overflow:scroll}.of-x-scroll,[of-x-scroll=""]{overflow-x:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-scroll,[overflow-y-scroll=""]{overflow-y:scroll}.scroll-smooth,[scroll-smooth=""]{scroll-behavior:smooth}.b-2,.border-2,[b-2=""],[border~="2"],[border~="2px"]{border-width:2px}.border,[border~="~"],[border~="1"]{border-width:1px}[border~="4"]{border-width:4px}[border~=b-2]{border-bottom-width:2px}[border~=l-2]{border-left-width:2px}[border~=r-2]{border-right-width:2px}[border~=t-2]{border-top-width:2px}.\[\&\:checked\+div\]\:border-primary-500:checked+div,.border-primary-500{--un-border-opacity:1;border-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.border-amber-200{--un-border-opacity:1;border-color:rgb(253 230 138 / var(--un-border-opacity))}.border-neutral-200,[border~=neutral-200]{--un-border-opacity:1;border-color:rgb(229 229 229 / var(--un-border-opacity))}.border-neutral-300,[border~=neutral-300]{--un-border-opacity:1;border-color:rgb(212 212 212 / var(--un-border-opacity))}.border-primary-200{--un-border-opacity:1;border-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.border-red-200{--un-border-opacity:1;border-color:rgb(254 202 202 / var(--un-border-opacity))}.dark .dark\:\[\&\:checked\+div\]\:border-primary-400:checked+div,.dark .dark\:border-primary-400{--un-border-opacity:1;border-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.dark .dark\:border-amber-800{--un-border-opacity:1;border-color:rgb(146 64 14 / var(--un-border-opacity))}.dark .dark\:border-neutral-600,.dark [border~="dark:neutral-600"]{--un-border-opacity:1;border-color:rgb(82 82 82 / var(--un-border-opacity))}.dark .dark\:border-neutral-700,.dark [border~="dark:neutral-700"]{--un-border-opacity:1;border-color:rgb(64 64 64 / var(--un-border-opacity))}.dark .dark\:border-primary-800{--un-border-opacity:1;border-color:oklch(42% var(--theme-colors-chroma-800) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.dark .dark\:border-red-800{--un-border-opacity:1;border-color:rgb(153 27 27 / var(--un-border-opacity))}.dark [border~="dark:cyan-500/50"]{border-color:#06b6d480}.dark [border~="dark:cyan-800"]{--un-border-opacity:1;border-color:rgb(21 94 117 / var(--un-border-opacity))}.dark [border~="dark:neutral-800"]{--un-border-opacity:1;border-color:rgb(38 38 38 / var(--un-border-opacity))}.dark [border~="dark:primary-400/20"]{border-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2)}.dark [border~="dark:primary-500/50"]{border-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .5)}.dark [border~="dark:primary-900"]{--un-border-opacity:1;border-color:oklch(37% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.dark [border~="dark:violet-500/50"]{border-color:#8b5cf680}.dark [border~="dark:zinc-800"]{--un-border-opacity:1;border-color:rgb(39 39 42 / var(--un-border-opacity))}[border~=cyan-200]{--un-border-opacity:1;border-color:rgb(165 243 252 / var(--un-border-opacity))}[border~="cyan-200/50"]{border-color:#a5f3fc80}[border~="gray/25"]{border-color:#9ca3af40}[border~=neutral-100]{--un-border-opacity:1;border-color:rgb(245 245 245 / var(--un-border-opacity))}[border~=primary-100]{border-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-100) calc(var(--theme-colors-hue) + 0)) 80%,oklch(100% 0 360))}[border~="primary-200/50"]{border-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / .5)}[border~="violet-200/50"]{border-color:#ddd6fe80}[border~=zinc-300]{--un-border-opacity:1;border-color:rgb(212 212 216 / var(--un-border-opacity))}.peer:checked~.peer-checked\:after\:border-white:after{--un-border-opacity:1;border-color:rgb(255 255 255 / var(--un-border-opacity))}.dark .dark\:hover\:border-primary-400\/30:hover,.dark [border~="dark:hover:primary-400/30"]:hover{border-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .3)}.hover\:border-primary-500\/30:hover,[border~="hover:primary-500/30"]:hover{border-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .3)}.dark [border~="dark:focus:primary-400"]:focus{--un-border-opacity:1;border-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.dark [border~="dark:focus:zinc-600"]:focus{--un-border-opacity:1;border-color:rgb(82 82 91 / var(--un-border-opacity))}[border~="focus:primary-500"]:focus{--un-border-opacity:1;border-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}[border~="focus:zinc-400"]:focus{--un-border-opacity:1;border-color:rgb(161 161 170 / var(--un-border-opacity))}.rounded,[rounded=""]{border-radius:.25rem}.rounded-2xl,[rounded-2xl=""]{border-radius:1rem}.rounded-full,[rounded-full=""]{border-radius:9999px}.rounded-lg,[border~=rounded-lg],[rounded-lg=""],[rounded~=lg]{border-radius:.5rem}.rounded-md,[rounded-md=""]{border-radius:.375rem}.rounded-sm,[rounded-sm=""]{border-radius:.125rem}.rounded-xl,[rounded-xl=""]{border-radius:.75rem}.after\:rounded-full:after{border-radius:9999px}.rounded-l-lg,[rounded-l-lg=""]{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-xl,[rounded-l-xl=""]{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-lg,[rounded-r-lg=""]{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-r-xl,[rounded-r-xl=""]{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-lg,[rounded-t-lg=""]{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl,[rounded-t-xl=""]{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border-none,[border-none=""]{border-style:none}[border~=solid]{border-style:solid}.bg-amber-50{--un-bg-opacity:1;background-color:rgb(255 251 235 / var(--un-bg-opacity))}.bg-black\/40{background-color:#0006}.bg-neutral-100,[bg~=neutral-100]{--un-bg-opacity:1;background-color:rgb(245 245 245 / var(--un-bg-opacity))}.bg-neutral-200{--un-bg-opacity:1;background-color:rgb(229 229 229 / var(--un-bg-opacity))}.bg-primary-100,[bg~=primary-100]{background-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-100) calc(var(--theme-colors-hue) + 0)) 80%,oklch(100% 0 360))}.bg-primary-50,[bg~=primary-50]{background-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-50) calc(var(--theme-colors-hue) + 0)) 30%,oklch(100% 0 360))}.bg-primary-500,.dark [bg~="dark:primary-500"],[bg~=primary-500],.peer:checked~.peer-checked\:bg-primary-500{--un-bg-opacity:1;background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.bg-red-50{--un-bg-opacity:1;background-color:rgb(254 242 242 / var(--un-bg-opacity))}.bg-white,[bg~=white]{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.bg-zinc-100,[bg-zinc-100=""],[bg~=zinc-100]{--un-bg-opacity:1;background-color:rgb(244 244 245 / var(--un-bg-opacity))}.bg-zinc-200,.dark .dark\:bg-zinc-200{--un-bg-opacity:1;background-color:rgb(228 228 231 / var(--un-bg-opacity))}.bg-zinc-300,[bg-zinc-300=""]{--un-bg-opacity:1;background-color:rgb(212 212 216 / var(--un-bg-opacity))}.dark .dark\:bg-amber-900\/20{background-color:#78350f33}.dark .dark\:bg-neutral-600{--un-bg-opacity:1;background-color:rgb(82 82 82 / var(--un-bg-opacity))}.dark .dark\:bg-neutral-700,.dark [bg~="dark:neutral-700"]{--un-bg-opacity:1;background-color:rgb(64 64 64 / var(--un-bg-opacity))}.dark .dark\:bg-neutral-800,.dark [bg~="dark:neutral-800"]{--un-bg-opacity:1;background-color:rgb(38 38 38 / var(--un-bg-opacity))}.dark .dark\:bg-neutral-900,.dark [bg~="dark:neutral-900"]{--un-bg-opacity:1;background-color:rgb(23 23 23 / var(--un-bg-opacity))}.dark .dark\:bg-neutral-900\/20{background-color:#17171733}.dark .dark\:bg-primary-400,.dark [bg~="dark:primary-400"],[bg~=primary-400]{--un-bg-opacity:1;background-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.dark .dark\:bg-primary-900,[bg~=primary-900]{--un-bg-opacity:1;background-color:oklch(37% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.dark .dark\:bg-primary-900\/20{background-color:oklch(37% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0) / .2)}.dark .dark\:bg-primary-950,.dark [bg~="dark:primary-950"],[bg~=primary-950]{--un-bg-opacity:1;background-color:oklch(29% var(--theme-colors-chroma-950) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.dark .dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark .dark\:bg-zinc-700,.dark [bg~="dark:zinc-700"]{--un-bg-opacity:1;background-color:rgb(63 63 70 / var(--un-bg-opacity))}.dark .dark\:bg-zinc-800,.dark [bg~="dark:zinc-800"]{--un-bg-opacity:1;background-color:rgb(39 39 42 / var(--un-bg-opacity))}.dark [bg~="dark:[#1f1a1d]"]{--un-bg-opacity:1;background-color:rgb(31 26 29 / var(--un-bg-opacity))}.dark [bg~="dark:[#3c2632]"]{--un-bg-opacity:1;background-color:rgb(60 38 50 / var(--un-bg-opacity))}.dark [bg~="dark:[#4e34b9]"]{--un-bg-opacity:1;background-color:rgb(78 52 185 / var(--un-bg-opacity))}.dark [bg~="dark:[#676085]"]{--un-bg-opacity:1;background-color:rgb(103 96 133 / var(--un-bg-opacity))}.dark [bg~="dark:[rgba(0,0,0,0.3)]"]{--un-bg-opacity:.3;background-color:rgba(0,0,0,var(--un-bg-opacity))}.dark [bg~="dark:black/20"]{background-color:#0003}.dark [bg~="dark:complementary-800"]{--un-bg-opacity:1;background-color:oklch(42% var(--theme-colors-chroma-800) calc(var(--theme-colors-hue) + 180) / var(--un-bg-opacity))}.dark [bg~="dark:cyan-900"]{--un-bg-opacity:1;background-color:rgb(22 78 99 / var(--un-bg-opacity))}.dark [bg~="dark:green-600"]{--un-bg-opacity:1;background-color:rgb(22 163 74 / var(--un-bg-opacity))}.dark [bg~="dark:neutral-500"]{--un-bg-opacity:1;background-color:rgb(115 115 115 / var(--un-bg-opacity))}.dark [bg~="dark:primary-400/20"]{background-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2)}.dark [bg~="dark:zinc-400"]{--un-bg-opacity:1;background-color:rgb(161 161 170 / var(--un-bg-opacity))}.dark [bg~="dark:zinc-800/50"]{background-color:#27272a80}[bg~="[#cabeff]"]{--un-bg-opacity:1;background-color:rgb(202 190 255 / var(--un-bg-opacity))}[bg~="[#e6e1fc]"]{--un-bg-opacity:1;background-color:rgb(230 225 252 / var(--un-bg-opacity))}[bg~="[#fffbff]"]{--un-bg-opacity:1;background-color:rgb(255 251 255 / var(--un-bg-opacity))}[bg~=complementary-100]{background-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-100) calc(var(--theme-colors-hue) + 180)) 80%,oklch(100% 0 360))}[bg~=green-500]{--un-bg-opacity:1;background-color:rgb(34 197 94 / var(--un-bg-opacity))}[bg~="neutral-200/50"]{background-color:#e5e5e580}[bg~=neutral-400]{--un-bg-opacity:1;background-color:rgb(163 163 163 / var(--un-bg-opacity))}[bg~=neutral-50]{--un-bg-opacity:1;background-color:rgb(250 250 250 / var(--un-bg-opacity))}[bg~=primary-200]{--un-bg-opacity:1;background-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~=primary-300]{--un-bg-opacity:1;background-color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~="primary-500/10"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1)}[bg~="primary-500/20"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2)}[bg~="primary-500/30"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .3)}[bg~="primary-500/40"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .4)}[bg~="primary-500/5"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .05)}[bg~="primary-500/50"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .5)}[bg~="primary-500/60"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .6)}[bg~="primary-500/70"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .7)}[bg~="primary-500/80"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .8)}[bg~="primary-500/90"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .9)}[bg~=primary-600]{--un-bg-opacity:1;background-color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~=primary-700]{--un-bg-opacity:1;background-color:oklch(49% var(--theme-colors-chroma-700) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~=primary-800]{--un-bg-opacity:1;background-color:oklch(42% var(--theme-colors-chroma-800) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~=transparent]{background-color:transparent}[bg~="zinc-100/70"]{background-color:#f4f4f5b3}[bg~="zinc-200/20"]{background-color:#e4e4e733}.dark [dark\:bg-zinc-700~="default:"]:default{--un-bg-opacity:1;background-color:rgb(63 63 70 / var(--un-bg-opacity))}.dark [dark\:bg-zinc-700~="checked:"]:checked{--un-bg-opacity:1;background-color:rgb(63 63 70 / var(--un-bg-opacity))}.dark .\[\&_div_span\]\:dark\:hover\:bg-cyan-300:hover div span{--un-bg-opacity:1;background-color:rgb(103 232 249 / var(--un-bg-opacity))}.dark .\[\&_div_span\]\:dark\:hover\:bg-cyan-900:hover div span{--un-bg-opacity:1;background-color:rgb(22 78 99 / var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-700:hover{--un-bg-opacity:1;background-color:rgb(64 64 64 / var(--un-bg-opacity))}.dark [bg~="dark:hover:complementary-700"]:hover{--un-bg-opacity:1;background-color:oklch(49% var(--theme-colors-chroma-700) calc(var(--theme-colors-hue) + 180) / var(--un-bg-opacity))}.dark [bg~="dark:hover:primary-900"]:hover{--un-bg-opacity:1;background-color:oklch(37% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.dark [dark\:hover\:bg-cyan-300=""]:hover{--un-bg-opacity:1;background-color:rgb(103 232 249 / var(--un-bg-opacity))}.dark [hover~="dark:bg-neutral-700"]:hover{--un-bg-opacity:1;background-color:rgb(64 64 64 / var(--un-bg-opacity))}.dark [hover~="dark:bg-zinc-700"]:hover{--un-bg-opacity:1;background-color:rgb(63 63 70 / var(--un-bg-opacity))}.hover\:bg-neutral-200:hover{--un-bg-opacity:1;background-color:rgb(229 229 229 / var(--un-bg-opacity))}.hover\:bg-neutral-300:hover{--un-bg-opacity:1;background-color:rgb(212 212 212 / var(--un-bg-opacity))}.hover\:bg-primary-600:hover{--un-bg-opacity:1;background-color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~="hover:complementary-200"]:hover{--un-bg-opacity:1;background-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 180) / var(--un-bg-opacity))}[bg~="hover:primary-100"]:hover{background-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-100) calc(var(--theme-colors-hue) + 0)) 80%,oklch(100% 0 360))}[hover~=bg-neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229 / var(--un-bg-opacity))}[hover~=bg-zinc-200]:hover{--un-bg-opacity:1;background-color:rgb(228 228 231 / var(--un-bg-opacity))}.after\:bg-white:after{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .dark\:from-primary-400\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to)}.dark .dark\:from-primary-400\/20{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to)}.from-primary-500\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to)}.from-primary-500\/20{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to)}.dark .dark\:via-primary-400\/10{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to)}.via-primary-500\/10{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to)}.dark .dark\:to-primary-400\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.dark .dark\:to-transparent,.to-transparent{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.to-primary-500\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.bg-gradient-to-r{--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.p-2,.p2,[p-2=""],[p~="2"],[p2=""]{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4,[p-4=""]{padding:1rem}.p-5,[p-5=""]{padding:1.25rem}.px,.px-4,[px-4=""],[px=""]{padding-left:1rem;padding-right:1rem}.px-0{padding-left:0;padding-right:0}.px-10,[px-10=""]{padding-left:2.5rem;padding-right:2.5rem}.px-2,.px2,[px-2=""],[px~="2"],[px2=""]{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py,.py-4,[py~="4"]{padding-top:1rem;padding-bottom:1rem}.py-1,.py1,[py-1=""],[py~="1"],[py1=""]{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2,[py-2=""]{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3,[py-3=""]{padding-top:.75rem;padding-bottom:.75rem}.py-6,[py-6=""]{padding-top:1.5rem;padding-bottom:1.5rem}[px~="12"]{padding-left:3rem;padding-right:3rem}.pb-2,[pb-2=""]{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pl-5,[pl-5=""]{padding-left:1.25rem}.pr-\[20px\]{padding-right:20px}.pr-3{padding-right:.75rem}.pr-4,[pr-4=""]{padding-right:1rem}.pt-2,[pt-2=""]{padding-top:.5rem}.pt-4,[pt-4=""]{padding-top:1rem}.text-left,[text-left=""]{text-align:left}.text-right,[text-right=""],[text~=right]{text-align:right}.text-wrap,[text-wrap=""]{text-wrap:wrap}.text-nowrap,[text-nowrap=""]{text-wrap:nowrap}.text-2xl,[text-2xl=""],[text~="2xl"]{font-size:1.5rem;line-height:2rem}.text-3xl,[text-3xl=""]{font-size:1.875rem;line-height:2.25rem}.text-base,[text-base=""],[text~=base]{font-size:1rem;line-height:1.5rem}.text-lg,[text-lg=""],[text~=lg]{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""],[text~=sm]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""],[text~=xl]{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""]{font-size:.75rem;line-height:1rem}[text~="40"]{font-size:10rem}.dark .dark\:text-amber-400{--un-text-opacity:1;color:rgb(251 191 36 / var(--un-text-opacity))}.dark .dark\:text-neutral-300,[text~=neutral-300]{--un-text-opacity:1;color:rgb(212 212 212 / var(--un-text-opacity))}.dark .dark\:text-neutral-400,.dark [text~="dark:neutral-400"],.text-neutral-400,[text~=neutral-400]{--un-text-opacity:1;color:rgb(163 163 163 / var(--un-text-opacity))}.dark .dark\:text-neutral-500,.dark [text~="dark:neutral-500"],.text-neutral-500,[text~=neutral-500]{--un-text-opacity:1;color:rgb(115 115 115 / var(--un-text-opacity))}.dark .dark\:text-neutral-500\/20,.dark [text~="dark:neutral-500/20"]{color:#73737333}.dark .dark\:text-neutral-600,.text-neutral-600{--un-text-opacity:1;color:rgb(82 82 82 / var(--un-text-opacity))}.dark .dark\:text-primary-400,.text-primary-400,[text~=primary-400]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .dark\:text-primary-500,.text-primary-500{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .dark\:text-red-400{--un-text-opacity:1;color:rgb(248 113 113 / var(--un-text-opacity))}.dark .dark\:text-white,.dark [dark\:text-white=""],.dark [text~="dark:white"],.text-white,[text-white=""],[text~=white]{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.dark .dark\:text-white\/50{color:#ffffff80}.dark .dark\:text-zinc-400,.dark [text~="dark:zinc-400"],.text-zinc-400,[text~=zinc-400]{--un-text-opacity:1;color:rgb(161 161 170 / var(--un-text-opacity))}.dark .dark\:text-zinc-600{--un-text-opacity:1;color:rgb(82 82 91 / var(--un-text-opacity))}.dark [text~="dark:[#905073]"]{--un-text-opacity:1;color:rgb(144 80 115 / var(--un-text-opacity))}.dark [text~="dark:cyan-600/90"]{color:#0891b2e6}.dark [text~="dark:gray-200"]{--un-text-opacity:1;color:rgb(229 231 235 / var(--un-text-opacity))}.dark [text~="dark:neutral-100"]{--un-text-opacity:1;color:rgb(245 245 245 / var(--un-text-opacity))}.dark [text~="dark:neutral-600/50"]{color:#52525280}.dark [text~="dark:primary-300/50"]{color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / .5)}.dark [text~="dark:primary-600/90"]{color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / .9)}.dark [text~="dark:violet-600/90"]{color:#7c3aede6}.dark [text~="dark:zinc-100"]{--un-text-opacity:1;color:rgb(244 244 245 / var(--un-text-opacity))}.dark [text~="dark:zinc-200/80"]{color:#e4e4e7cc}.dark [text~="dark:zinc-500"],.text-zinc-500,[text~=zinc-500]{--un-text-opacity:1;color:rgb(113 113 122 / var(--un-text-opacity))}.text-amber-500{--un-text-opacity:1;color:rgb(245 158 11 / var(--un-text-opacity))}.text-amber-600{--un-text-opacity:1;color:rgb(217 119 6 / var(--un-text-opacity))}.text-black,[text-black=""]{--un-text-opacity:1;color:rgb(0 0 0 / var(--un-text-opacity))}.text-cyan,[text~=cyan-400]{--un-text-opacity:1;color:rgb(34 211 238 / var(--un-text-opacity))}.text-neutral-100\/80,[text~="neutral-100/80"]{color:#f5f5f5cc}.text-neutral-700{--un-text-opacity:1;color:rgb(64 64 64 / var(--un-text-opacity))}.text-primary-300,[text~=primary-300]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.text-primary-600,[text~=primary-600]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.text-red-500{--un-text-opacity:1;color:rgb(239 68 68 / var(--un-text-opacity))}.text-red-600{--un-text-opacity:1;color:rgb(220 38 38 / var(--un-text-opacity))}.text-violet-500,[text-violet-500=""]{--un-text-opacity:1;color:rgb(139 92 246 / var(--un-text-opacity))}[text~=complementary-400]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 180) / var(--un-text-opacity))}[text~="cyan-400/90"]{color:#22d3eee6}[text~=gray-700]{--un-text-opacity:1;color:rgb(55 65 81 / var(--un-text-opacity))}[text~="neutral-100/50"]{color:#f5f5f580}[text~="neutral-400/50"]{color:#a3a3a380}[text~=neutral-800]{--un-text-opacity:1;color:rgb(38 38 38 / var(--un-text-opacity))}[text~="primary-400/90"]{color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .9)}[text~="violet-400/90"]{color:#a78bfae6}[text~=zinc-800]{--un-text-opacity:1;color:rgb(39 39 42 / var(--un-text-opacity))}[text~="zinc-800/80"]{color:#27272acc}.dark .dark\:hover\:text-neutral-200:hover{--un-text-opacity:1;color:rgb(229 229 229 / var(--un-text-opacity))}.dark [text~="dark:hover:primary-500"]:hover{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark [text~="dark:hover:primary-600"]:hover{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.hover\:text-neutral-700:hover{--un-text-opacity:1;color:rgb(64 64 64 / var(--un-text-opacity))}.hover\:text-red-600:hover{--un-text-opacity:1;color:rgb(220 38 38 / var(--un-text-opacity))}[text~="hover:primary-500"]:hover{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}[text~="hover:primary-600"]:hover{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark [text~="placeholder:dark:[#905073]"]::placeholder{--un-text-opacity:1;color:rgb(144 80 115 / var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-600"]:hover::placeholder{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark [text~="placeholder:dark:primary-300/50"]::placeholder{color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / .5)}[text~="placeholder:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}[text~="placeholder:hover:primary-600"]:hover::placeholder{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}[text~="placeholder:primary-300"]::placeholder{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}[text~="placeholder:primary-400"]::placeholder{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.font-bold,[font-bold=""]{font-weight:700}.font-medium,[font-medium=""]{font-weight:500}.font-semibold,[font-semibold=""]{font-weight:600}.font-cute,[font-cute=""]{font-family:Kiwi Maru}.font-cuteen,[font-cuteen=""]{font-family:Sniglet}.font-mono,[font-mono=""]{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans,[font-sans=""]{font-family:DM Sans,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.tab,[aria-checked~=tab][aria-checked=true],[tab=""]{-moz-tab-size:4;-o-tab-size:4;tab-size:4}[checked~=tab]:checked{-moz-tab-size:4;-o-tab-size:4;tab-size:4}.\[\&\:checked\+div_\.radio-dot\]\:opacity-100:checked+div .radio-dot,.opacity-100{opacity:1}.op50,[op50=""]{opacity:.5}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-60{opacity:.6}.focus\:opacity-50:focus{opacity:.5}.disabled\:opacity-50:disabled{opacity:.5}.dark [shadow~="dark:none"]{--un-shadow:0 0 var(--un-shadow-color, rgb(0 0 0 / 0));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-sm,[shadow-sm=""]{--un-shadow:var(--un-shadow-inset) 0 1px 2px 0 var(--un-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[shadow~="cyan-200/50"]{--un-shadow-color:rgb(165 243 252 / .5) }[shadow~=md]{--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[shadow~="primary-200/50"]{--un-shadow-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / .5) }[shadow~="violet-200/50"]{--un-shadow-color:rgb(221 214 254 / .5) }.outline{outline-style:solid}.outline-none,[outline-none=""],[outline~=none]{outline:2px solid transparent;outline-offset:2px}.ring{--un-ring-width:3px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[ring~="0"]{--un-ring-width:0px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[ring~="focus:2"]:focus{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[ring~="focus:offset-0"]:focus{--un-ring-offset-width:0px}.dark [ring~="dark:focus:primary-400"]:focus{--un-ring-opacity:1;--un-ring-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-ring-opacity)) }[ring~="focus:primary-500"]:focus{--un-ring-opacity:1;--un-ring-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-ring-opacity)) }[ring~="focus:opacity-50"]:focus{--un-ring-opacity:.5}.backdrop-blur-sm,[backdrop-blur-sm=""]{--un-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.backdrop-blur-xl,[backdrop-blur-xl=""]{--un-backdrop-blur:blur(24px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.drop-shadow{--un-drop-shadow:drop-shadow(0 1px 2px var(--un-drop-shadow-color, rgb(0 0 0 / .1))) drop-shadow(0 1px 1px var(--un-drop-shadow-color, rgb(0 0 0 / .06)));filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}[drop-shadow~=none],.dark [drop-shadow~="dark:hover:none"]:hover{--un-drop-shadow:drop-shadow(0 0 var(--un-drop-shadow-color, rgb(0 0 0 / 0)));filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}[drop-shadow~="hover:[0px_4px_4px_rgba(220,220,220,0.4)]"]:hover{--un-drop-shadow:drop-shadow(0px 4px 4px rgba(220,220,220,.4));filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}[drop-shadow~="active:[0px_0px_0px_rgba(220,220,220,0.25)]"]:active{--un-drop-shadow:drop-shadow(0px 0px 0px rgba(220,220,220,.25));filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.\[\&_\.provider-icon\]\:grayscale-100 .provider-icon,.grayscale-100,[grayscale-100=""]{--un-grayscale:grayscale(1);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.\[\&_\.provider-icon\]\:hover\:grayscale-0:hover .provider-icon{--un-grayscale:grayscale(0);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all,[transition~=all]{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors,[transition~=colors]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform,[transition~=transform]{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[transition~=border]{transition-property:border;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[transition~=filter]{transition-property:filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[transition~="placeholder:all"]::placeholder{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:transition-all:after{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200,[transition~=duration-200]{transition-duration:.2s}.duration-250,[duration-250=""],[transition~=duration-250]{transition-duration:.25s}.duration-500,[transition~=duration-500]{transition-duration:.5s}.placeholder\:duration-250::placeholder{transition-duration:.25s}[placeholder\:duration-250=""]::placeholder{transition-duration:.25s}[transition~="placeholder:duration-250"]::placeholder{transition-duration:.25s}.ease,.ease-in-out,[ease-in-out=""],[transition~=ease-in-out]{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:ease-in-out::placeholder{transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~="placeholder:ease-in-out"]::placeholder{transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:content-\[\'\'\]:after{content:""}[placeholder~="$t("]::placeholder{color:var(--t\()}.bg-dotted-\[neutral-200\/80\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.8}.dark .dark\:bg-dotted-\[neutral-700\/50\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .dark\:hover\:bg-dotted-\[primary-200\/20\]:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.hover\:bg-dotted-\[primary-300\/50\]:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}@media (max-width: 1023.9px){[min-w~=""; initial-value: 0; inherits: true;}@keyframes hue-anim{0%{--theme-colors-hue: 0}to{--theme-colors-hue: 360}}.dynamic-hue{animation:hue-anim 10s linear infinite}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--airi-theme-primary-50: #fff0f2;--airi-theme-primary-100: #ffe3e6;--airi-theme-primary-200: #ffcad4;--airi-theme-primary-300: #ff9fb0;--airi-theme-primary-400: #ff6988;--airi-theme-primary-500: #fe456e;--airi-theme-primary-600: #ec124d;--airi-theme-primary-700: #c70941;--airi-theme-primary-800: #a70a3e;--airi-theme-primary-900: #8e0d3b;--airi-theme-primary-950: #50011b;--theme-colors-hue: 354.31;--theme-colors-chroma: calc(.18 + cos(var(--theme-colors-hue) * 3.14159265 / 180)/25) ;--theme-colors-chroma-50: calc(var(--theme-colors-chroma) * .3);--theme-colors-chroma-100: calc(var(--theme-colors-chroma) * .5);--theme-colors-chroma-200: calc(var(--theme-colors-chroma) * .6);--theme-colors-chroma-300: calc(var(--theme-colors-chroma) * .75);--theme-colors-chroma-400: var(--theme-colors-chroma);--theme-colors-chroma-600: calc(var(--theme-colors-chroma) * 1.15);--theme-colors-chroma-700: calc(var(--theme-colors-chroma) * 1.1);--theme-colors-chroma-800: calc(var(--theme-colors-chroma) * .85);--theme-colors-chroma-900: calc(var(--theme-colors-chroma) * .7);--theme-colors-chroma-950: calc(var(--theme-colors-chroma) * .5)}.slide-away-enter-active,.slide-away-leave-active{transition:transform .3s ease-in-out,opacity .3s ease-in-out}.slide-away-enter,.slide-away-leave-to{transform:translateY(-10px);opacity:0}.slide-away-enter-from,.slide-away-leave{transform:translateY(10px);opacity:0}html,body,#app{height:100%;margin:0;padding:0;overscroll-behavior:none}html{background:#fff;transition:all .3s ease-in-out}html.dark{background:#121212;color-scheme:dark}#nprogress{pointer-events:none}#nprogress .bar{background:#f472b6;opacity:.75;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }@font-face{font-family:DM Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmmono/v14/aFTU7PB1QTsUX8KYthSQBK6PYK3EXw.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmmono/v14/aFTU7PB1QTsUX8KYthqQBK6PYK0.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRR232RmYJp8I5zzw.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRSW32RmYJp8I5.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"DM Serif Display";font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmserifdisplay/v15/-nFnOHM81r4j6k0gjAW3mujVU2B2G_5x0vrx52jJ3Q.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"DM Serif Display";font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/dmserifdisplay/v15/-nFnOHM81r4j6k0gjAW3mujVU2B2G_Bx0vrx52g.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.0.woff2) format("woff2");unicode-range:U+25ee8,U+25f23,U+25f5c,U+25fd4,U+25fe0,U+25ffb,U+2600c,U+26017,U+26060,U+260ed,U+26222,U+2626a,U+26270,U+26286,U+2634c,U+26402,U+2667e,U+266b0,U+2671d,U+268dd,U+268ea,U+26951,U+2696f,U+26999,U+269dd,U+26a1e,U+26a58,U+26a8c,U+26ab7,U+26aff,U+26c29,U+26c73,U+26c9e,U+26cdd,U+26e40,U+26e65,U+26f94,U+26ff6-26ff8,U+270f4,U+2710d,U+27139,U+273da-273db,U+273fe,U+27410,U+27449,U+27614-27615,U+27631,U+27684,U+27693,U+2770e,U+27723,U+27752,U+278b2,U+27985,U+279b4,U+27a84,U+27bb3,U+27bbe,U+27bc7,U+27c3c,U+27cb8,U+27d73,U+27da0,U+27e10,U+27eaf,U+27fb7,U+2808a,U+280bb,U+28277,U+28282,U+282f3,U+283cd,U+2840c,U+28455,U+284dc,U+2856b,U+285c8-285c9,U+286d7,U+286fa,U+28946,U+28949,U+2896b,U+28987-28988,U+289ba-289bb,U+28a1e,U+28a29,U+28a43,U+28a71,U+28a99,U+28acd,U+28add,U+28ae4,U+28bc1,U+28bef,U+28cdd,U+28d10,U+28d71,U+28dfb,U+28e0f,U+28e17,U+28e1f,U+28e36,U+28e89,U+28eeb,U+28ef6,U+28f32,U+28ff8,U+292a0,U+292b1,U+29490,U+295cf,U+2967f,U+296f0,U+29719,U+29750,U+29810,U+298c6,U+29a72,U+29d4b,U+29ddb,U+29e15,U+29e3d,U+29e49,U+29e8a,U+29ec4,U+29edb,U+29ee9,U+29fce,U+29fd7,U+2a01a,U+2a02f,U+2a082,U+2a0f9,U+2a190,U+2a2b2,U+2a38c,U+2a437,U+2a5f1,U+2a602,U+2a61a,U+2a6b2,U+2a9e6,U+2b746,U+2b751,U+2b753,U+2b75a,U+2b75c,U+2b765,U+2b776-2b777,U+2b77c,U+2b782,U+2b789,U+2b78b,U+2b78e,U+2b794,U+2b7ac,U+2b7af,U+2b7bd,U+2b7c9,U+2b7cf,U+2b7d2,U+2b7d8,U+2b7f0,U+2b80d,U+2b817,U+2b81a,U+2d544,U+2e278,U+2e569,U+2e6ea,U+2f804,U+2f80f,U+2f815,U+2f818,U+2f81a,U+2f822,U+2f828,U+2f82c,U+2f833,U+2f83f,U+2f846,U+2f852,U+2f862,U+2f86d,U+2f873,U+2f877,U+2f884,U+2f899-2f89a,U+2f8a6,U+2f8ac,U+2f8b2,U+2f8b6,U+2f8d3,U+2f8db-2f8dc,U+2f8e1,U+2f8e5,U+2f8ea,U+2f8ed,U+2f8fc,U+2f903,U+2f90b,U+2f90f,U+2f91a,U+2f920-2f921,U+2f945,U+2f947,U+2f96c,U+2f995,U+2f9d0,U+2f9de-2f9df,U+2f9f4}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.1.woff2) format("woff2");unicode-range:U+1f235-1f23b,U+1f240-1f248,U+1f250-1f251,U+2000b,U+20089-2008a,U+200a2,U+200a4,U+200b0,U+200f5,U+20158,U+201a2,U+20213,U+2032b,U+20371,U+20381,U+203f9,U+2044a,U+20509,U+2053f,U+205b1,U+205d6,U+20611,U+20628,U+206ec,U+2074f,U+207c8,U+20807,U+2083a,U+208b9,U+2090e,U+2097c,U+20984,U+2099d,U+20a64,U+20ad3,U+20b1d,U+20b9f,U+20bb7,U+20d45,U+20d58,U+20de1,U+20e64,U+20e6d,U+20e95,U+20f5f,U+21201,U+2123d,U+21255,U+21274,U+2127b,U+212d7,U+212e4,U+212fd,U+2131b,U+21336,U+21344,U+213c4,U+2146d-2146e,U+215d7,U+21647,U+216b4,U+21706,U+21742,U+218bd,U+219c3,U+21a1a,U+21c56,U+21d2d,U+21d45,U+21d62,U+21d78,U+21d92,U+21d9c,U+21da1,U+21db7,U+21de0,U+21e33-21e34,U+21f1e,U+21f76,U+21ffa,U+2217b,U+22218,U+2231e,U+223ad,U+22609,U+226f3,U+2285b,U+228ab,U+2298f,U+22ab8,U+22b46,U+22b4f-22b50,U+22ba6,U+22c1d,U+22c24,U+22de1,U+22e42,U+22feb,U+231b6,U+231c3-231c4,U+231f5,U+23372,U+233cc,U+233d0,U+233d2-233d3,U+233d5,U+233da,U+233df,U+233e4,U+233fe,U+2344a-2344b,U+23451,U+23465,U+234e4,U+2355a,U+23594,U+235c4,U+23638-2363a,U+23647,U+2370c,U+2371c,U+2373f,U+23763-23764,U+237e7,U+237f1,U+237ff,U+23824,U+2383d,U+23a98,U+23c7f,U+23cbe,U+23cfe,U+23d00,U+23d0e,U+23d40,U+23dd3,U+23df9-23dfa,U+23f7e,U+2404b,U+24096,U+24103,U+241c6,U+241fe,U+242ee,U+243bc,U+243d0,U+24629,U+246a5,U+247f1,U+24896,U+248e9,U+24a4d,U+24b56,U+24b6f,U+24c16,U+24d14,U+24e04,U+24e0e,U+24e37,U+24e6a,U+24e8b,U+24ff2,U+2504a,U+25055,U+25122,U+251a9,U+251cd,U+251e5,U+2521e,U+2524c,U+2542e,U+2548e,U+254d9,U+2550e,U+255a7,U+2567f,U+25771,U+257a9,U+257b4,U+25874,U+259c4,U+259cc,U+259d4,U+25ad7,U+25ae3-25ae4,U+25af1,U+25bb2,U+25c4b,U+25c64,U+25da1,U+25e2e,U+25e56,U+25e62,U+25e65,U+25ec2,U+25ed8}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.2.woff2) format("woff2");unicode-range:U+ffd7,U+ffda-ffdc,U+ffe0-ffe2,U+ffe4,U+ffe6,U+ffe8-ffee,U+1f100-1f10c,U+1f110-1f16c,U+1f170-1f1ac,U+1f200-1f202,U+1f210-1f234}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.3.woff2) format("woff2");unicode-range:U+fa10,U+fa12-fa6d,U+fb00-fb04,U+fe10-fe19,U+fe30-fe42,U+fe44-fe52,U+fe54-fe66,U+fe68-fe6b,U+ff02,U+ff04,U+ff07,U+ff51,U+ff5b,U+ff5d,U+ff5f-ff60,U+ff66,U+ff69,U+ff87,U+ffa1-ffbe,U+ffc2-ffc7,U+ffca-ffcf,U+ffd2-ffd6}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.4.woff2) format("woff2");unicode-range:U+f92d-f959,U+f95b-f9f2,U+f9f4-fa0b,U+fa0e-fa0f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.5.woff2) format("woff2");unicode-range:U+9e8b-9e8c,U+9e8e-9e8f,U+9e91-9e92,U+9e95-9e96,U+9e98,U+9e9b,U+9e9d-9e9e,U+9ea4-9ea5,U+9ea8-9eaa,U+9eac-9eb0,U+9eb3-9eb5,U+9eb8,U+9ebc-9ebf,U+9ec3,U+9ec6,U+9ec8,U+9ecb-9ecd,U+9ecf-9ed1,U+9ed4-9ed5,U+9ed8,U+9edb-9ee0,U+9ee4-9ee5,U+9ee7-9ee8,U+9eec-9ef2,U+9ef4-9ef9,U+9efb-9eff,U+9f02-9f03,U+9f07-9f09,U+9f0e-9f12,U+9f14-9f17,U+9f19-9f1b,U+9f1f-9f22,U+9f26,U+9f2a-9f2c,U+9f2f,U+9f31-9f32,U+9f34,U+9f37,U+9f39-9f3a,U+9f3c-9f3f,U+9f41,U+9f43-9f47,U+9f4a,U+9f4e-9f50,U+9f52-9f58,U+9f5a,U+9f5d-9f61,U+9f63,U+9f66-9f6a,U+9f6c-9f73,U+9f75-9f77,U+9f7a,U+9f7d,U+9f7f,U+9f8f-9f92,U+9f94-9f97,U+9f99,U+9f9c-9fa3,U+9fa5,U+9fb4,U+9fbc-9fc2,U+9fc4,U+9fc6,U+9fcc,U+f900-f92c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.6.woff2) format("woff2");unicode-range:U+9c3e,U+9c41,U+9c43-9c4a,U+9c4e-9c50,U+9c52-9c54,U+9c56,U+9c58,U+9c5a-9c61,U+9c63,U+9c65,U+9c67-9c6b,U+9c6d-9c6e,U+9c70,U+9c72,U+9c75-9c78,U+9c7a-9c7c,U+9ce6-9ce7,U+9ceb-9cec,U+9cf0,U+9cf2,U+9cf6-9cf7,U+9cf9,U+9d02-9d03,U+9d06-9d09,U+9d0b,U+9d0e,U+9d11-9d12,U+9d15,U+9d17-9d18,U+9d1b-9d1f,U+9d23,U+9d26,U+9d2a-9d2c,U+9d2f-9d30,U+9d32-9d34,U+9d3a,U+9d3c-9d3f,U+9d41-9d48,U+9d4a,U+9d50-9d54,U+9d59,U+9d5d-9d65,U+9d69-9d6c,U+9d6f-9d70,U+9d72-9d73,U+9d76-9d77,U+9d7a-9d7c,U+9d7e,U+9d83-9d84,U+9d86-9d87,U+9d89-9d8a,U+9d8d-9d8e,U+9d92-9d93,U+9d95-9d9a,U+9da1,U+9da4,U+9da9-9dac,U+9dae,U+9db1-9db2,U+9db5,U+9db8-9dbd,U+9dbf-9dc4,U+9dc6-9dc7,U+9dc9-9dca,U+9dcf,U+9dd3-9dd7,U+9dd9-9dda,U+9dde-9de0,U+9de3,U+9de5-9de7,U+9de9,U+9deb,U+9ded-9df0,U+9df3-9df4,U+9df8,U+9dfd-9dfe,U+9e02,U+9e07,U+9e0a,U+9e0d-9e0e,U+9e10-9e12,U+9e15-9e16,U+9e19-9e1f,U+9e75,U+9e79-9e7d,U+9e80-9e85,U+9e87-9e88}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.7.woff2) format("woff2");unicode-range:U+9ae5-9ae7,U+9ae9,U+9aeb-9aec,U+9aee-9aef,U+9af1-9af5,U+9af7,U+9af9-9afb,U+9afd,U+9aff-9b06,U+9b08-9b09,U+9b0b-9b0e,U+9b10,U+9b12,U+9b16,U+9b18-9b1d,U+9b1f-9b20,U+9b22-9b23,U+9b25-9b2f,U+9b32-9b35,U+9b37,U+9b39-9b3b,U+9b3d,U+9b43-9b44,U+9b48,U+9b4b-9b4f,U+9b51,U+9b55-9b58,U+9b5b,U+9b5e,U+9b61,U+9b63,U+9b65-9b66,U+9b68,U+9b6a-9b6f,U+9b72-9b79,U+9b7f-9b80,U+9b83-9b87,U+9b89-9b8b,U+9b8d,U+9b8f-9b94,U+9b96-9b97,U+9b9a,U+9b9d-9ba0,U+9ba6-9ba7,U+9ba9-9baa,U+9bac,U+9bb0-9bb2,U+9bb4,U+9bb7-9bb9,U+9bbb-9bbc,U+9bbe-9bc1,U+9bc6-9bc8,U+9bca,U+9bce-9bd2,U+9bd4,U+9bd7-9bd8,U+9bdd,U+9bdf,U+9be1-9be5,U+9be7,U+9bea-9beb,U+9bee-9bf3,U+9bf5,U+9bf7-9bfa,U+9bfd,U+9bff-9c00,U+9c02,U+9c04,U+9c06,U+9c08-9c0d,U+9c0f-9c16,U+9c18-9c1e,U+9c21-9c2a,U+9c2d-9c32,U+9c35-9c37,U+9c39-9c3a,U+9c3d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.8.woff2) format("woff2");unicode-range:U+98eb,U+98ed-98ee,U+98f0-98f1,U+98f3,U+98f6,U+9902,U+9907-9909,U+9911-9912,U+9914-9918,U+991a-9922,U+9924,U+9926-9927,U+992b-992c,U+992e,U+9931-9935,U+9939-993e,U+9940-9942,U+9945-9949,U+994b-994e,U+9950-9952,U+9954-9955,U+9958-9959,U+995b-995c,U+995e-9960,U+9963,U+9997-9998,U+999b,U+999d-999f,U+99a3,U+99a5-99a6,U+99a8,U+99ad-99ae,U+99b0-99b2,U+99b5,U+99b9-99ba,U+99bc-99bd,U+99bf,U+99c1,U+99c3,U+99c8-99c9,U+99d1,U+99d3-99d5,U+99d8-99df,U+99e1-99e2,U+99e7,U+99ea-99ee,U+99f0-99f2,U+99f4-99f5,U+99f8-99f9,U+99fb-99fe,U+9a01-9a05,U+9a08,U+9a0a-9a0c,U+9a0f-9a11,U+9a16,U+9a1a,U+9a1e,U+9a20,U+9a22-9a24,U+9a27,U+9a2b,U+9a2d-9a2e,U+9a31,U+9a33,U+9a35-9a38,U+9a3e,U+9a40-9a45,U+9a47,U+9a4a-9a4e,U+9a51-9a52,U+9a54-9a58,U+9a5b,U+9a5d,U+9a5f,U+9a62,U+9a64-9a65,U+9a69-9a6c,U+9aaa,U+9aac-9ab0,U+9ab2,U+9ab4-9ab7,U+9ab9,U+9abb-9ac1,U+9ac3,U+9ac6,U+9ac8,U+9ace-9ad3,U+9ad5-9ad7,U+9adb-9adc,U+9ade-9ae0,U+9ae2-9ae4}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.9.woff2) format("woff2");unicode-range:U+971d,U+9721-9724,U+9728,U+972a,U+9730-9731,U+9733,U+9736,U+9738-9739,U+973b,U+973d-973e,U+9741-9744,U+9746-974a,U+974d-974f,U+9751,U+9755,U+9757-9758,U+975a-975c,U+9760-9761,U+9763-9764,U+9766-9768,U+976a-976b,U+976e,U+9771,U+9773,U+9776-977d,U+977f-9781,U+9785-9786,U+9789,U+978b,U+978f-9790,U+9795-9797,U+9799-979a,U+979c,U+979e-97a0,U+97a2-97a3,U+97a6,U+97a8,U+97ab-97ac,U+97ae,U+97b1-97b6,U+97b8-97ba,U+97bc,U+97be-97bf,U+97c1,U+97c3-97ce,U+97d0-97d1,U+97d4,U+97d7-97d9,U+97db-97de,U+97e0-97e1,U+97e4,U+97e6,U+97ed-97ef,U+97f1-97f2,U+97f4-97f8,U+97fa,U+9804,U+9807,U+980a,U+980c-980f,U+9814,U+9816-9817,U+9819-981a,U+981c,U+981e,U+9820-9821,U+9823-9826,U+982b,U+982e-9830,U+9832-9835,U+9837,U+9839,U+983d-983e,U+9844,U+9846-9847,U+984a-984b,U+984f,U+9851-9853,U+9856-9857,U+9859-985b,U+9862-9863,U+9865-9866,U+986a-986c,U+986f-9871,U+9873-9875,U+98aa-98ab,U+98ad-98ae,U+98b0-98b1,U+98b4,U+98b6-98b8,U+98ba-98bc,U+98bf,U+98c2-98c8,U+98cb-98cc,U+98ce,U+98dc,U+98de,U+98e0-98e1,U+98e3,U+98e5-98e7,U+98e9-98ea}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.10.woff2) format("woff2");unicode-range:U+944a,U+944c,U+9452-9453,U+9455,U+9459-945c,U+945e-9463,U+9468,U+946a-946b,U+946d-9472,U+9475,U+9477,U+947c-947f,U+9481,U+9483-9485,U+9578-9579,U+957e-957f,U+9582,U+9584,U+9586-9588,U+958a,U+958c-958f,U+9592,U+9594,U+9596,U+9598-9599,U+959d-95a1,U+95a4,U+95a6-95a9,U+95ab-95ad,U+95b1,U+95b4,U+95b6,U+95b9-95bf,U+95c3,U+95c6,U+95c8-95cd,U+95d0-95d6,U+95d9-95da,U+95dc-95e2,U+95e4-95e6,U+95e8,U+961d-961e,U+9621-9622,U+9624-9626,U+9628,U+962c,U+962e-962f,U+9631,U+9633-9634,U+9637-963a,U+963c-963d,U+9641-9642,U+964b-964c,U+964f,U+9652,U+9654,U+9656-9658,U+965c-965f,U+9661,U+9666,U+966a,U+966c,U+966e,U+9672,U+9674,U+9677,U+967b-967c,U+967e-967f,U+9681-9684,U+9689,U+968b,U+968d,U+9691,U+9695-9698,U+969a,U+969d,U+969f,U+96a4-96aa,U+96ae-96b4,U+96b6,U+96b8-96bb,U+96bd,U+96c1,U+96c9-96cb,U+96cd-96ce,U+96d2,U+96d5-96d6,U+96d8-96da,U+96dc-96df,U+96e9,U+96ef,U+96f1,U+96f9-96fa,U+9702-9706,U+9708-9709,U+970d-970f,U+9711,U+9713-9714,U+9716,U+9719-971b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.11.woff2) format("woff2");unicode-range:U+92bc-92bd,U+92bf-92c3,U+92c5-92c8,U+92cb-92d0,U+92d2-92d3,U+92d5,U+92d7-92d9,U+92dc-92dd,U+92df-92e1,U+92e3-92e5,U+92e7-92ea,U+92ec,U+92ee,U+92f0,U+92f2,U+92f7-92fb,U+92ff-9300,U+9302,U+9304,U+9308,U+930d,U+930f-9311,U+9314-9315,U+9318-931a,U+931c-931f,U+9321-9325,U+9327-932b,U+932e,U+9333-9337,U+933a-933b,U+9344,U+9347-934a,U+934d,U+9350-9352,U+9354-9358,U+935a,U+935c,U+935e,U+9360,U+9364-9365,U+9367,U+9369-936d,U+936f-9371,U+9373-9374,U+9376,U+937a,U+937d-9382,U+9388,U+938a-938b,U+938d,U+938f,U+9392,U+9394-9395,U+9397-9398,U+939a-939b,U+939e,U+93a1,U+93a3-93a4,U+93a6,U+93a8-93a9,U+93ab-93ad,U+93b0,U+93b4-93b6,U+93b9-93bb,U+93c1,U+93c3-93cd,U+93d0-93d1,U+93d3,U+93d6-93d9,U+93dc-93df,U+93e2,U+93e4-93e8,U+93f1,U+93f5,U+93f7-93fb,U+93fd,U+9401-9404,U+9407-9409,U+940d-9410,U+9413-9417,U+9419-941a,U+941f,U+9421,U+942b,U+942e-942f,U+9431-9434,U+9436,U+9438,U+943a-943b,U+943d,U+943f,U+9441,U+9443-9445,U+9448}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.12.woff2) format("woff2");unicode-range:U+9143,U+9146-914c,U+914f,U+9153,U+9156-915b,U+9161,U+9163-9165,U+9167,U+9169,U+916d,U+9172-9174,U+9179-917b,U+9181-9183,U+9185-9187,U+9189-918b,U+918e,U+9191,U+9193-9195,U+9197-9198,U+919e,U+91a1-91a2,U+91a6,U+91a8,U+91aa-91b6,U+91ba-91bd,U+91bf-91c6,U+91c9,U+91cb,U+91d0,U+91d3-91d4,U+91d6-91d7,U+91d9-91db,U+91de-91df,U+91e1,U+91e4-91e6,U+91e9-91ea,U+91ec-91f1,U+91f5-91f7,U+91f9,U+91fb-91fd,U+91ff-9201,U+9204-9207,U+9209-920a,U+920c,U+920e,U+9210-9218,U+921c-921e,U+9223-9226,U+9228-9229,U+922c,U+922e-9230,U+9233,U+9235-923a,U+923c,U+923e-9240,U+9242-9243,U+9245-924b,U+924d-9251,U+9256-925a,U+925c-925e,U+9260-9261,U+9264-9269,U+926e-9270,U+9275-9279,U+927b-927f,U+9288-928a,U+928d-928e,U+9291-9293,U+9295-9297,U+9299,U+929b-929c,U+929f-92a0,U+92a4-92a5,U+92a7-92a8,U+92ab,U+92af,U+92b2-92b3,U+92b6-92bb}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.13.woff2) format("woff2");unicode-range:U+8f52-8f55,U+8f57-8f58,U+8f5c-8f5e,U+8f61-8f66,U+8f9c-8f9d,U+8f9f-8fa2,U+8fa4-8fa8,U+8fad-8faf,U+8fb4-8fb8,U+8fbe,U+8fc0-8fc2,U+8fc6,U+8fc8,U+8fca-8fcb,U+8fcd,U+8fd0,U+8fd2-8fd3,U+8fd5,U+8fda,U+8fe0,U+8fe2-8fe5,U+8fe8-8fea,U+8fed-8fef,U+8ff1,U+8ff4-8ff6,U+8ff8-8ffb,U+8ffe,U+9002,U+9004-9005,U+9008,U+900b-900e,U+9011,U+9013,U+9015-9016,U+9018,U+901b,U+901e,U+9021,U+9027-902a,U+902c-902d,U+902f,U+9033-9037,U+9039,U+903c,U+903e-903f,U+9041,U+9043-9044,U+9049,U+904c,U+904f-9052,U+9056,U+9058,U+905b-905e,U+9062,U+9066-9068,U+906c,U+906f-9070,U+9072,U+9074,U+9076,U+9079,U+9080-9083,U+9085,U+9087-9088,U+908b-908c,U+908e-9090,U+9095,U+9097-9099,U+909b,U+90a0-90a2,U+90a5,U+90a8,U+90af-90b6,U+90bd-90be,U+90c3-90c5,U+90c7-90c9,U+90cc,U+90d2,U+90d5,U+90d7-90d9,U+90db-90df,U+90e2,U+90e4-90e5,U+90eb,U+90ef-90f0,U+90f2,U+90f4,U+90f6,U+90fe-9100,U+9102,U+9104-9106,U+9108,U+910d,U+9110,U+9112,U+9114-911a,U+911c,U+911e,U+9120,U+9122-9123,U+9125,U+9127,U+9129,U+912d-9132,U+9134,U+9136-9137,U+9139-913a,U+913c-913d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.14.woff2) format("woff2");unicode-range:U+8dc0,U+8dc2,U+8dc5-8dc8,U+8dca-8dcc,U+8dce-8dcf,U+8dd1,U+8dd4-8dd7,U+8dd9-8ddb,U+8ddf,U+8de3-8de5,U+8de7,U+8dea-8dec,U+8df0-8df2,U+8df4,U+8dfc-8dfd,U+8dff,U+8e01,U+8e04-8e06,U+8e08-8e09,U+8e0b-8e0c,U+8e10-8e11,U+8e14,U+8e16,U+8e1d-8e23,U+8e26-8e27,U+8e30-8e31,U+8e33-8e39,U+8e3d,U+8e40-8e42,U+8e44,U+8e47-8e50,U+8e54-8e55,U+8e59,U+8e5b-8e64,U+8e69,U+8e6c-8e6d,U+8e6f-8e72,U+8e75-8e77,U+8e79-8e7c,U+8e81-8e85,U+8e89,U+8e8b,U+8e90-8e95,U+8e98-8e9b,U+8e9d-8e9e,U+8ea1-8ea2,U+8ea7,U+8ea9-8eaa,U+8eac-8eb1,U+8eb3,U+8eb5-8eb6,U+8eba-8ebb,U+8ebe,U+8ec0-8ec1,U+8ec3-8ec8,U+8ecb,U+8ecf,U+8ed1,U+8ed4,U+8edb-8edc,U+8ee3,U+8ee8,U+8eeb,U+8eed-8eee,U+8ef0-8ef1,U+8ef7,U+8ef9-8efc,U+8efe,U+8f00,U+8f02,U+8f05,U+8f07-8f08,U+8f0a,U+8f0f-8f10,U+8f12-8f13,U+8f15-8f19,U+8f1b-8f1c,U+8f1e-8f21,U+8f23,U+8f25-8f28,U+8f2b-8f2f,U+8f33-8f37,U+8f39-8f3b,U+8f3e,U+8f40-8f43,U+8f45-8f47,U+8f49-8f4a,U+8f4c-8f4f,U+8f51}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.15.woff2) format("woff2");unicode-range:U+8b2d,U+8b30,U+8b37,U+8b3c,U+8b3e,U+8b41-8b46,U+8b48-8b49,U+8b4c-8b4f,U+8b51-8b54,U+8b56,U+8b59,U+8b5b,U+8b5e-8b5f,U+8b63,U+8b69,U+8b6b-8b6d,U+8b6f,U+8b71,U+8b74,U+8b76,U+8b78-8b79,U+8b7c-8b81,U+8b84-8b85,U+8b8a-8b8f,U+8b92-8b96,U+8b99-8b9a,U+8b9c-8ba0,U+8c38-8c3a,U+8c3d-8c3f,U+8c41,U+8c45,U+8c47-8c49,U+8c4b-8c4c,U+8c4e-8c51,U+8c53-8c55,U+8c57-8c59,U+8c5b,U+8c5d,U+8c62-8c64,U+8c66,U+8c68-8c69,U+8c6b-8c6d,U+8c73,U+8c75-8c76,U+8c78,U+8c7a-8c7c,U+8c7e,U+8c82,U+8c85-8c87,U+8c89-8c8b,U+8c8d-8c8e,U+8c90,U+8c92-8c94,U+8c98-8c99,U+8c9b-8c9c,U+8c9f,U+8ca4,U+8cad-8cae,U+8cb2-8cb3,U+8cb6,U+8cb9-8cba,U+8cbd,U+8cc1-8cc2,U+8cc4-8cc6,U+8cc8-8cc9,U+8ccb,U+8ccd-8ccf,U+8cd2,U+8cd5-8cd6,U+8cd9-8cda,U+8cdd,U+8ce1,U+8ce3-8ce4,U+8ce6,U+8ce8,U+8cec,U+8cef-8cf2,U+8cf4-8cf5,U+8cf7-8cf8,U+8cfa-8cfb,U+8cfd-8cff,U+8d01,U+8d03-8d04,U+8d07,U+8d09-8d0b,U+8d0d-8d10,U+8d12-8d14,U+8d16-8d17,U+8d1b-8d1d,U+8d65,U+8d67,U+8d69,U+8d6b-8d6e,U+8d71,U+8d73,U+8d76,U+8d7f,U+8d81-8d82,U+8d84,U+8d88,U+8d8d,U+8d90-8d91,U+8d95,U+8d99,U+8d9e-8da0,U+8da6,U+8da8,U+8dab-8dac,U+8daf,U+8db2,U+8db5,U+8db7,U+8db9-8dbc,U+8dbe}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.16.woff2) format("woff2");unicode-range:U+8973-8975,U+8977,U+897a-897e,U+8980,U+8983,U+8988-898a,U+898d,U+8990,U+8993-8995,U+8998,U+899b-899c,U+899f-89a1,U+89a5-89a6,U+89a9,U+89ac,U+89af-89b0,U+89b2,U+89b4-89b7,U+89ba,U+89bc-89bd,U+89bf-89c1,U+89d4-89d8,U+89da,U+89dc-89dd,U+89e5,U+89e7,U+89e9,U+89eb,U+89ed,U+89f1,U+89f3-89f4,U+89f6,U+89f8-89f9,U+89fd,U+89ff,U+8a01,U+8a04-8a05,U+8a07,U+8a0c,U+8a0f-8a12,U+8a14-8a16,U+8a1b,U+8a1d-8a1e,U+8a20-8a22,U+8a24-8a26,U+8a2b-8a2c,U+8a2f,U+8a35-8a37,U+8a3b,U+8a3d-8a3e,U+8a40-8a41,U+8a43,U+8a45-8a49,U+8a4d-8a4e,U+8a51-8a54,U+8a56-8a58,U+8a5b-8a5d,U+8a61-8a62,U+8a65,U+8a67,U+8a6c-8a6d,U+8a75-8a77,U+8a79-8a7c,U+8a7e-8a80,U+8a82-8a86,U+8a8b,U+8a8f-8a92,U+8a96-8a97,U+8a99-8a9a,U+8a9f,U+8aa1,U+8aa3,U+8aa5-8aaa,U+8aae-8aaf,U+8ab3,U+8ab6-8ab7,U+8abb-8abc,U+8abe,U+8ac2-8ac4,U+8ac6,U+8ac8-8aca,U+8acc-8acd,U+8ad0-8ad1,U+8ad3-8ad5,U+8ad7,U+8ada-8ae2,U+8ae4,U+8ae7,U+8aeb-8aec,U+8aee,U+8af0-8af1,U+8af3-8af7,U+8afa,U+8afc,U+8aff,U+8b01-8b02,U+8b04-8b07,U+8b0a-8b0d,U+8b0f-8b11,U+8b14,U+8b16,U+8b1a,U+8b1c,U+8b1e-8b20,U+8b26,U+8b28,U+8b2b-8b2c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.17.woff2) format("woff2");unicode-range:U+87e2-87e6,U+87ea-87ed,U+87ef,U+87f1,U+87f3,U+87f5-87f8,U+87fa-87fb,U+87fe-87ff,U+8801,U+8803,U+8805-8807,U+8809-880b,U+880d-8816,U+8818-881c,U+881e-881f,U+8821-8822,U+8827-8828,U+882d-882e,U+8830-8832,U+8835-8836,U+8839-883c,U+8841-8845,U+8848-884b,U+884d-884e,U+8851-8852,U+8855-8856,U+8858-885a,U+885c,U+885e-8860,U+8862,U+8864,U+8869,U+886b,U+886e-886f,U+8871-8872,U+8875,U+8877,U+8879,U+887b,U+887d-887e,U+8880-8882,U+8888,U+888d,U+8892,U+8897-889c,U+889e-88a0,U+88a2,U+88a4,U+88a8,U+88aa,U+88ae,U+88b0-88b1,U+88b5,U+88b7,U+88ba,U+88bc-88c0,U+88c3-88c4,U+88c6,U+88ca-88ce,U+88d1-88d4,U+88d8-88d9,U+88db,U+88dd-88e1,U+88e7-88e8,U+88ef-88f2,U+88f4-88f5,U+88f7,U+88f9,U+88fc,U+8901-8902,U+8904,U+8906,U+890a,U+890c-890f,U+8913,U+8915-8916,U+8918-891a,U+891c-891e,U+8920,U+8925-8928,U+892a-892b,U+8930-8932,U+8935-893b,U+893e,U+8940-8946,U+8949,U+894c-894d,U+894f,U+8952,U+8956-8957,U+895a-895c,U+895e,U+8960-8964,U+8966,U+896a-896b,U+896d-8970}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.18.woff2) format("woff2");unicode-range:U+8655-8659,U+865b,U+865d-8664,U+8667,U+8669,U+866c,U+866f,U+8671,U+8675-8677,U+867a-867b,U+867d,U+8687-8689,U+868b-868d,U+8691,U+8693,U+8695-8696,U+8698,U+869a,U+869c-869d,U+86a1,U+86a3-86a4,U+86a6-86ab,U+86ad,U+86af-86b1,U+86b3-86b9,U+86bf-86c1,U+86c3-86c6,U+86c9,U+86cb,U+86ce,U+86d1-86d2,U+86d4-86d5,U+86d7,U+86da,U+86dc,U+86de-86e0,U+86e3-86e7,U+86e9,U+86ec-86ed,U+86ef,U+86f8-86fe,U+8700,U+8703-870b,U+870d-8714,U+8719-871a,U+871e-871f,U+8721-8723,U+8725,U+8728-8729,U+872e-872f,U+8731-8732,U+8734,U+8737,U+8739-8740,U+8743,U+8745,U+8749,U+874b-874e,U+8751,U+8753,U+8755,U+8757-8759,U+875d,U+875f-8761,U+8763-8766,U+8768,U+876a,U+876e-876f,U+8771-8772,U+8774,U+8778,U+877b-877c,U+877f,U+8782-8789,U+878b-878c,U+878e,U+8790,U+8793,U+8795,U+8797-8799,U+879e-87a0,U+87a2-87a3,U+87a7,U+87ab-87af,U+87b1,U+87b3,U+87b5,U+87bb,U+87bd-87c1,U+87c4,U+87c6-87cb,U+87ce,U+87d0,U+87d2,U+87d5-87d6,U+87d9-87da,U+87dc,U+87df-87e0}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.19.woff2) format("woff2");unicode-range:U+84b4,U+84b9-84bb,U+84bd-84c2,U+84c6-84ca,U+84cc-84d1,U+84d3,U+84d6,U+84d9-84da,U+84dc,U+84e7,U+84ea,U+84ec,U+84ef-84f2,U+84f4,U+84f7,U+84fa-84fd,U+84ff-8500,U+8502-8503,U+8506-8507,U+850c,U+850e,U+8510,U+8514-8515,U+8517-8518,U+851a-851c,U+851e-851f,U+8521-8525,U+8527,U+852a-852c,U+852f,U+8532-8534,U+8536,U+853e-8541,U+8543,U+8546,U+8548,U+854a-854b,U+854f-8553,U+8555-855a,U+855c-8564,U+8569-856b,U+856d,U+856f,U+8577,U+8579-857b,U+857d-8581,U+8585-8586,U+8588-858c,U+858f-8591,U+8593,U+8597-8598,U+859b-859d,U+859f-85a0,U+85a2,U+85a4-85a5,U+85a7-85a8,U+85ad-85b0,U+85b4,U+85b6-85ba,U+85bc-85bf,U+85c1-85c2,U+85c7,U+85c9-85cb,U+85ce-85d0,U+85d5,U+85d8-85da,U+85dc,U+85df-85e1,U+85e5-85e6,U+85e8,U+85ed,U+85f3-85f4,U+85f6-85f7,U+85f9-85fa,U+85fc,U+85fe-8600,U+8602,U+8604-8606,U+860a-860b,U+860d-860e,U+8610-8613,U+8616-861b,U+861e,U+8621-8622,U+8624,U+8627,U+8629,U+862f-8630,U+8636,U+8638-863a,U+863c-863d,U+863f-8642,U+8646,U+864d,U+8652-8654}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.20.woff2) format("woff2");unicode-range:U+82e8,U+82ea,U+82ed,U+82ef,U+82f3-82f4,U+82f6-82f7,U+82f9,U+82fb,U+82fd-82fe,U+8300-8301,U+8303,U+8306-8308,U+830a-830c,U+8316-8318,U+831b,U+831d-831f,U+8321-8323,U+832b-8335,U+8337,U+833a,U+833c-833d,U+8340,U+8342-8347,U+834a,U+834d-8351,U+8353-8357,U+835a,U+8362-8363,U+8370,U+8373,U+8375,U+8378,U+837c-837d,U+837f-8380,U+8382,U+8384-8387,U+838a,U+838d-838e,U+8392-8396,U+8398-83a0,U+83a2,U+83a6-83ad,U+83b1,U+83b5,U+83bd-83c1,U+83c7,U+83c9,U+83ce-83d1,U+83d4,U+83d6,U+83d8,U+83dd,U+83df-83e1,U+83e5,U+83e8,U+83ea-83eb,U+83f0,U+83f2,U+83f4,U+83f6-83f9,U+83fb-83fd,U+8401,U+8403-8404,U+8406-8407,U+840a-840b,U+840d,U+840f,U+8411,U+8413,U+8415,U+8417,U+8419,U+8420,U+8422,U+842a,U+842f,U+8431,U+8435,U+8438-8439,U+843c,U+8445-8448,U+844a,U+844d-844f,U+8451-8452,U+8456,U+8458-845a,U+845c,U+845f-8462,U+8464-8467,U+8469-846b,U+846d-8470,U+8473-8474,U+8476-847a,U+847c-847d,U+8481-8482,U+8484-8485,U+848b,U+8490,U+8492-8493,U+8495,U+8497,U+849c,U+849e-849f,U+84a1,U+84a6,U+84a8-84aa,U+84ad,U+84af,U+84b1}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.21.woff2) format("woff2");unicode-range:U+814a,U+814c,U+8151-8153,U+8157,U+815f-8161,U+8165-8169,U+816d-816f,U+8171,U+8173-8174,U+8177,U+8180-8186,U+8188,U+818a-818b,U+818e,U+8190,U+8193,U+8195-8196,U+8198,U+819b,U+819e,U+81a0,U+81a2,U+81a4,U+81a9,U+81ae,U+81b0,U+81b2,U+81b4-81b5,U+81b8,U+81ba-81bb,U+81bd-81be,U+81c0-81c3,U+81c5-81c6,U+81c8-81cb,U+81cd-81cf,U+81d1,U+81d5-81db,U+81dd-81e1,U+81e4-81e5,U+81e7,U+81eb-81ec,U+81ef-81f2,U+81f5-81f6,U+81f8-81fb,U+81fd-8205,U+8209-820b,U+820d,U+820f,U+8212-8214,U+8216,U+8219-821d,U+8221-8222,U+8228-8229,U+822b,U+822e,U+8232-8235,U+8237-8238,U+823a,U+823c,U+8240,U+8243-8246,U+8249,U+824b,U+824e-824f,U+8251,U+8256-825a,U+825c-825d,U+825f-8260,U+8262-8264,U+8267-8268,U+826a-826b,U+826d-826e,U+8271,U+8274,U+8277,U+8279,U+827b,U+827d-8281,U+8283-8284,U+8287,U+8289-828a,U+828d-828e,U+8291-8294,U+8296,U+8298-829b,U+829f-82a1,U+82a3-82a4,U+82a7-82ac,U+82ae,U+82b0,U+82b2,U+82b4,U+82b7,U+82ba-82bc,U+82be-82bf,U+82c5-82c6,U+82d0,U+82d2-82d3,U+82d5,U+82d9-82da,U+82dc,U+82de-82e4,U+82e7}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.22.woff2) format("woff2");unicode-range:U+7f77-7f79,U+7f7d-7f80,U+7f82-7f83,U+7f86-7f88,U+7f8b-7f8d,U+7f8f-7f91,U+7f94,U+7f96-7f97,U+7f9a,U+7f9c-7f9d,U+7fa1-7fa3,U+7fa6,U+7faa,U+7fad-7faf,U+7fb2,U+7fb4,U+7fb6,U+7fb8-7fb9,U+7fbc,U+7fbf-7fc0,U+7fc3,U+7fc5-7fc6,U+7fc8,U+7fca,U+7fce-7fcf,U+7fd5,U+7fdb,U+7fdf,U+7fe1,U+7fe3,U+7fe5-7fe6,U+7fe8-7fe9,U+7feb-7fec,U+7fee-7ff0,U+7ff2-7ff3,U+7ff9-7ffa,U+7ffd-7fff,U+8002,U+8004,U+8006-8008,U+800a-800f,U+8011-8014,U+8016,U+8018-8019,U+801c-8021,U+8024,U+8026,U+8028,U+802c,U+802e,U+8030,U+8034-8035,U+8037,U+8039-8040,U+8043-8044,U+8046,U+804a,U+8052,U+8058,U+805a,U+805f-8060,U+8062,U+8064,U+8066,U+8068,U+806d,U+806f-8073,U+8075-8076,U+8079,U+807b,U+807d-8081,U+8084-8088,U+808b,U+808e,U+8093,U+8099-809a,U+809c,U+809e,U+80a4,U+80a6-80a7,U+80ab-80ad,U+80b1,U+80b8-80b9,U+80c4-80c5,U+80c8,U+80ca,U+80cd,U+80cf,U+80d2,U+80d4-80db,U+80dd,U+80e0,U+80e4-80e6,U+80ed-80f3,U+80f5-80f7,U+80f9-80fc,U+80fe,U+8101,U+8103,U+8109,U+810b,U+810d,U+8116-8118,U+811b-811c,U+811e,U+8120,U+8123-8124,U+8127,U+8129,U+812b-812c,U+812f-8130,U+8135,U+8139-813a,U+813c-813e,U+8141,U+8145-8147}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.23.woff2) format("woff2");unicode-range:U+7d57,U+7d59-7d5d,U+7d63,U+7d65,U+7d67,U+7d6a,U+7d6e,U+7d70,U+7d72-7d73,U+7d78,U+7d7a-7d7b,U+7d7d,U+7d7f,U+7d81-7d83,U+7d85-7d86,U+7d88-7d89,U+7d8b-7d8d,U+7d8f,U+7d91,U+7d93,U+7d96-7d97,U+7d9b-7da0,U+7da2-7da3,U+7da6-7da7,U+7daa-7dac,U+7dae-7db0,U+7db3,U+7db5-7db9,U+7dbd,U+7dc0,U+7dc2-7dc7,U+7dcc-7dce,U+7dd0,U+7dd5-7dd9,U+7ddc-7dde,U+7de1-7de6,U+7dea-7ded,U+7df1-7df2,U+7df5-7df6,U+7df9-7dfa,U+7e00,U+7e05,U+7e08-7e0b,U+7e10-7e12,U+7e15,U+7e17,U+7e1c-7e1d,U+7e1f-7e23,U+7e27-7e28,U+7e2c-7e2d,U+7e2f,U+7e31-7e33,U+7e35-7e37,U+7e39-7e3b,U+7e3d,U+7e3f,U+7e43-7e48,U+7e4e,U+7e50,U+7e52,U+7e56,U+7e58-7e5a,U+7e5d-7e5f,U+7e61-7e62,U+7e65-7e67,U+7e69-7e6b,U+7e6d-7e6f,U+7e73,U+7e75,U+7e78-7e79,U+7e7b-7e7f,U+7e81-7e83,U+7e86-7e8a,U+7e8c-7e8e,U+7e90-7e96,U+7e98,U+7e9a-7e9f,U+7f38,U+7f3a-7f3f,U+7f43-7f45,U+7f47,U+7f4c-7f50,U+7f52-7f55,U+7f58,U+7f5b-7f5d,U+7f5f,U+7f61,U+7f63-7f69,U+7f6b,U+7f6d,U+7f71}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.24.woff2) format("woff2");unicode-range:U+7bc8,U+7bca-7bcc,U+7bcf,U+7bd4,U+7bd6-7bd7,U+7bd9-7bdb,U+7bdd,U+7be5-7be6,U+7be8-7bea,U+7bf0,U+7bf2-7bfa,U+7bfc,U+7bfe,U+7c00-7c04,U+7c06-7c07,U+7c09,U+7c0b-7c0f,U+7c11-7c14,U+7c17,U+7c19,U+7c1b,U+7c1e-7c20,U+7c23,U+7c25-7c28,U+7c2a-7c2c,U+7c2f,U+7c31,U+7c33-7c34,U+7c36-7c3a,U+7c3d-7c3e,U+7c40,U+7c42-7c43,U+7c45-7c46,U+7c4a,U+7c4c,U+7c4f-7c5f,U+7c61,U+7c63-7c65,U+7c67,U+7c69,U+7c6c-7c70,U+7c72,U+7c75,U+7c79,U+7c7b-7c7e,U+7c81-7c83,U+7c86-7c87,U+7c8d,U+7c8f-7c90,U+7c94,U+7c9e,U+7ca0-7ca2,U+7ca4-7ca6,U+7ca8,U+7cab,U+7cad-7cae,U+7cb0-7cb3,U+7cb6-7cb7,U+7cb9-7cbd,U+7cbf-7cc0,U+7cc2,U+7cc4-7cc5,U+7cc7-7cca,U+7ccd-7ccf,U+7cd2-7cd5,U+7cd7-7cda,U+7cdc-7cdd,U+7cdf-7ce0,U+7ce2,U+7ce6,U+7ce9,U+7ceb,U+7cef,U+7cf2,U+7cf4-7cf6,U+7cf9-7cfa,U+7cfe,U+7d02-7d03,U+7d06-7d0a,U+7d0f,U+7d11-7d13,U+7d15-7d16,U+7d1c-7d1e,U+7d23,U+7d26,U+7d2a,U+7d2c-7d2e,U+7d31-7d32,U+7d35,U+7d3c-7d41,U+7d43,U+7d45,U+7d47-7d48,U+7d4b,U+7d4d-7d4f,U+7d51,U+7d53,U+7d55-7d56}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.25.woff2) format("woff2");unicode-range:U+7a17-7a19,U+7a1b,U+7a1e-7a21,U+7a27,U+7a2b,U+7a2d,U+7a2f-7a31,U+7a34-7a35,U+7a37-7a3b,U+7a3e,U+7a43-7a49,U+7a4c,U+7a4e,U+7a50,U+7a55-7a57,U+7a59,U+7a5c-7a5d,U+7a5f-7a63,U+7a65,U+7a67,U+7a69-7a6a,U+7a6d,U+7a70,U+7a75,U+7a78-7a79,U+7a7d-7a7e,U+7a80,U+7a82,U+7a84-7a86,U+7a88,U+7a8a-7a8b,U+7a90-7a91,U+7a94-7a98,U+7a9e,U+7aa0,U+7aa3,U+7aa9,U+7aac,U+7ab0,U+7ab3,U+7ab5-7ab6,U+7ab9-7abf,U+7ac3,U+7ac5-7aca,U+7acc-7acf,U+7ad1-7ad3,U+7ad5,U+7ada-7adb,U+7add,U+7adf,U+7ae1-7ae2,U+7ae6-7aed,U+7af0-7af1,U+7af4,U+7af8,U+7afa-7afb,U+7afd-7afe,U+7b02,U+7b04,U+7b06-7b08,U+7b0a-7b0b,U+7b0f,U+7b12,U+7b14,U+7b18-7b19,U+7b1e-7b1f,U+7b23,U+7b25,U+7b27-7b2b,U+7b2d-7b31,U+7b33-7b36,U+7b3b,U+7b3d,U+7b3f-7b41,U+7b45,U+7b47,U+7b4c-7b50,U+7b53,U+7b55,U+7b5d,U+7b60,U+7b64-7b66,U+7b69-7b6a,U+7b6c-7b75,U+7b77,U+7b79-7b7a,U+7b7f,U+7b84,U+7b86,U+7b89,U+7b8d-7b92,U+7b96,U+7b98-7ba0,U+7ba5,U+7bac-7bad,U+7baf-7bb0,U+7bb2,U+7bb4-7bb6,U+7bba-7bbd,U+7bc1-7bc2,U+7bc5-7bc6}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.26.woff2) format("woff2");unicode-range:U+7851-7852,U+785c,U+785e,U+7860-7861,U+7863-7864,U+7868,U+786a,U+786e-786f,U+7872,U+7874,U+787a,U+787c,U+787e,U+7886-7887,U+788a,U+788c-788f,U+7893-7895,U+7898,U+789a,U+789d-789f,U+78a1,U+78a3-78a4,U+78a8-78aa,U+78ac-78ad,U+78af-78b3,U+78b5,U+78bb-78bf,U+78c5-78cc,U+78ce,U+78d1-78d6,U+78da-78db,U+78df-78e1,U+78e4,U+78e6-78e7,U+78ea,U+78ec,U+78f2-78f4,U+78f6-78f7,U+78f9-78fb,U+78fd-7901,U+7906-7907,U+790c,U+7910-7912,U+7919-791c,U+791e-7920,U+7925-792e,U+7930-7931,U+7934-7935,U+793b,U+793d,U+793f,U+7941-7942,U+7944-7946,U+794a-794b,U+794f,U+7951,U+7954-7955,U+7957-7958,U+795a-795c,U+795f-7960,U+7962,U+7967,U+7969,U+796b,U+7972,U+7977,U+7979-797c,U+797e-7980,U+798a-798e,U+7991,U+7993-7996,U+7998,U+799b-799d,U+79a1,U+79a6-79ab,U+79ae-79b1,U+79b3-79b4,U+79b8-79bb,U+79bd-79be,U+79c2,U+79c4,U+79c7-79ca,U+79cc-79cd,U+79cf,U+79d4-79d6,U+79da,U+79dd-79e3,U+79e5,U+79e7,U+79ea-79ed,U+79f1,U+79f8,U+79fc,U+7a02-7a03,U+7a05,U+7a07-7a0a,U+7a0c-7a0d,U+7a11,U+7a15}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.27.woff2) format("woff2");unicode-range:U+768c-768e,U+7690,U+7693,U+7695-7696,U+7699-76a8,U+76aa,U+76ad,U+76af-76b0,U+76b4,U+76b6-76ba,U+76bd,U+76c1-76c3,U+76c5,U+76c8-76c9,U+76cb-76ce,U+76d2,U+76d4,U+76d6,U+76d9,U+76dc,U+76de,U+76e0-76e1,U+76e5-76e8,U+76ea-76ec,U+76f0-76f1,U+76f6,U+76f9,U+76fb-76fc,U+7700,U+7704,U+7706-7708,U+770a,U+770e,U+7712,U+7714-7715,U+7717,U+7719-771c,U+7722,U+7724-7726,U+7728,U+772d-772f,U+7734-7739,U+773d-773e,U+7742,U+7745-7747,U+774a,U+774d-774f,U+7752,U+7756-7758,U+775a-775c,U+775e-7760,U+7762,U+7764-7765,U+7767,U+776a-776c,U+7770,U+7772-7774,U+7779-777a,U+777c-7780,U+7784,U+778b-778e,U+7794-7796,U+779a,U+779e-77a0,U+77a2,U+77a4-77a5,U+77a7,U+77a9-77aa,U+77ae-77b1,U+77b5-77b7,U+77b9,U+77bb-77bf,U+77c3,U+77c7,U+77c9,U+77cd,U+77d1-77d2,U+77d5,U+77d7,U+77d9-77da,U+77dc,U+77de-77e0,U+77e3-77e4,U+77e6-77e7,U+77e9-77ea,U+77ec,U+77ee,U+77f0-77f1,U+77f4,U+77f8,U+77fb-77fc,U+7805-7806,U+7809,U+780c-780e,U+7811-7812,U+7819,U+781d,U+7820-7823,U+7826-7827,U+782c-782e,U+7830,U+7835,U+7837,U+783a,U+783f,U+7843-7845,U+7847-7848,U+784c,U+784e-784f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.28.woff2) format("woff2");unicode-range:U+7511-7513,U+7515-7517,U+751c,U+751e,U+7520-7522,U+7524,U+7526-7527,U+7529-752c,U+752f,U+7536,U+7538-7539,U+753c-7540,U+7543-7544,U+7546-754b,U+754d-7550,U+7552,U+7557,U+755a-755b,U+755d-755f,U+7561-7562,U+7564,U+7566-7567,U+7569,U+756b-756d,U+756f,U+7571-7572,U+7574-757e,U+7581-7582,U+7585-7587,U+7589-758c,U+758f-7590,U+7592-7595,U+7599-759a,U+759c-759d,U+75a2-75a5,U+75b0-75b1,U+75b3-75b5,U+75b7-75b8,U+75ba,U+75bd,U+75bf-75c4,U+75c6,U+75ca,U+75cc-75cf,U+75d3-75d4,U+75d7-75d8,U+75dc-75e1,U+75e3-75e4,U+75e7,U+75ec,U+75ee-75f3,U+75f9,U+75fc,U+75fe-7604,U+7607-760c,U+760f,U+7612-7613,U+7615-7616,U+7618-7619,U+761b-7629,U+762d,U+7630,U+7632-7635,U+7638-763c,U+7640-7641,U+7643-764b,U+764e,U+7655,U+7658-7659,U+765c,U+765f,U+7661-7662,U+7664-7665,U+7667-766a,U+766c-7672,U+7674,U+7676,U+7678,U+7680-7683,U+7685,U+7688,U+768b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.29.woff2) format("woff2");unicode-range:U+736c,U+736e-7371,U+7375,U+7377-737c,U+7380-7381,U+7383,U+7385-7386,U+738a,U+738e,U+7390,U+7393-7398,U+739c,U+739e-73a0,U+73a2,U+73a5-73a6,U+73a8,U+73aa-73ab,U+73ad,U+73b3,U+73b5,U+73b7,U+73b9-73bd,U+73bf,U+73c5-73c6,U+73c9-73cc,U+73ce-73cf,U+73d2-73d3,U+73d6,U+73d9,U+73dd-73de,U+73e1,U+73e3-73e7,U+73e9-73ea,U+73ee,U+73f1,U+73f4-73f5,U+73f7-73fb,U+73fd,U+73ff-7401,U+7404-7405,U+7407,U+740a,U+7411,U+7413,U+741a-741b,U+7421,U+7424,U+7426,U+7428-7431,U+7433,U+7439-743a,U+743f-7441,U+7443-7444,U+7446-7447,U+744b,U+744d,U+7451-7453,U+7455,U+7457,U+7459-745a,U+745c-745d,U+745f,U+7462-7464,U+7466-746b,U+746d-7473,U+7476,U+747e,U+7480-7481,U+7485-7489,U+748b,U+748f-7492,U+7497-749a,U+749c,U+749e-74a3,U+74a5-74a6,U+74a8-74ab,U+74ae-74af,U+74b1-74b2,U+74b5,U+74b9-74bb,U+74bd,U+74bf,U+74c8-74ca,U+74cc,U+74cf-74d0,U+74d3-74d4,U+74d6,U+74d8,U+74da-74db,U+74de-74e0,U+74e3-74e4,U+74e7-74eb,U+74ee-74f2,U+74f4,U+74f7-74f8,U+74fa-74fc,U+74ff,U+7501,U+7503-7506,U+750c-750e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.30.woff2) format("woff2");unicode-range:U+7166,U+7168,U+716c,U+7179,U+7180,U+7184-7185,U+7187-7188,U+718c,U+718f,U+7192,U+7194-7196,U+7199-719b,U+71a0,U+71a2,U+71a8,U+71ac,U+71ae-71b0,U+71b2-71b3,U+71b9-71ba,U+71be-71c1,U+71c4,U+71c9,U+71cb-71cc,U+71ce,U+71d0,U+71d2-71d4,U+71d6-71d7,U+71d9-71da,U+71dc,U+71df-71e0,U+71e6-71e7,U+71ec-71ee,U+71f4-71f5,U+71f8-71f9,U+71fc,U+71fe-7200,U+7207-7209,U+720d,U+7210,U+7213,U+7215,U+7217,U+721a,U+721d,U+721f,U+7224,U+7228,U+722b,U+722d,U+722f-7230,U+7232,U+7234,U+7238-7239,U+723b-723c,U+723e-7243,U+7245-7246,U+724b,U+724e-7250,U+7252-7253,U+7255-7258,U+725a,U+725c,U+725e,U+7260,U+7263,U+7268,U+726b,U+726e-726f,U+7271,U+7274,U+7277-7278,U+727b-727c,U+727e-7282,U+7284,U+7287,U+7289,U+728d-728e,U+7292-7293,U+7296,U+729b,U+72a2,U+72a7-72a8,U+72ad-72ae,U+72b0-72b2,U+72b4,U+72b9,U+72be,U+72c0-72c1,U+72c3-72c4,U+72c6-72c7,U+72c9,U+72cc,U+72ce,U+72d2,U+72d5-72d6,U+72d8,U+72df-72e2,U+72e5,U+72f3-72f4,U+72f7,U+72f9-72fb,U+72fd-72fe,U+7302,U+7304-7305,U+7307,U+730a-730b,U+730d,U+7312-7313,U+7316-7319,U+731c-731e,U+7322,U+7324,U+7327-7329,U+732c,U+732f,U+7331-7337,U+7339-733b,U+733d-733e,U+7343,U+734d-7350,U+7352,U+7356-7358,U+735d-7360,U+7366-736b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.31.woff2) format("woff2");unicode-range:U+6f58-6f5b,U+6f5d-6f5e,U+6f60-6f62,U+6f66,U+6f68,U+6f6c-6f6d,U+6f6f,U+6f74,U+6f78,U+6f7a,U+6f7c-6f7e,U+6f80,U+6f82-6f83,U+6f86-6f88,U+6f8b-6f8e,U+6f90-6f94,U+6f96-6f98,U+6f9a,U+6f9d,U+6f9f-6fa1,U+6fa3,U+6fa5-6fa8,U+6fae-6fb1,U+6fb3,U+6fb5-6fb7,U+6fb9,U+6fbc,U+6fbe,U+6fc2,U+6fc5-6fca,U+6fd4-6fd5,U+6fd8,U+6fda-6fdb,U+6fde-6fe0,U+6fe4,U+6fe8-6fe9,U+6feb-6fec,U+6fee,U+6ff0,U+6ff3,U+6ff5-6ff6,U+6ff9-6ffa,U+6ffc-6ffe,U+7000-7001,U+7005-7007,U+7009-700b,U+700d,U+700f,U+7011,U+7015,U+7017-7018,U+701a-701b,U+701d-7020,U+7023,U+7026,U+7028,U+702f-7030,U+7032,U+7034,U+7037,U+7039-703a,U+703c,U+703e,U+7043-7044,U+7047-704c,U+704e,U+7051,U+7054-7055,U+705d-705e,U+7064-7065,U+7069,U+706c,U+706e,U+7075-7076,U+707e,U+7081,U+7085-7086,U+7094-7098,U+709b,U+709f,U+70a4,U+70ab-70ac,U+70ae-70b1,U+70b3-70b4,U+70b7,U+70bb,U+70ca-70cb,U+70d1,U+70d3-70d6,U+70d8-70d9,U+70dc-70dd,U+70df,U+70e4,U+70ec,U+70f1,U+70fa,U+70fd,U+7103-7108,U+710b-710c,U+710f,U+7114,U+7119,U+711c,U+711e,U+7120,U+712b,U+712d-7131,U+7138,U+7141,U+7145-7147,U+7149-714b,U+7150-7153,U+7155-7157,U+715a,U+715c,U+715e,U+7160,U+7162,U+7164-7165}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.32.woff2) format("woff2");unicode-range:U+6d7c,U+6d80-6d82,U+6d85,U+6d87,U+6d89-6d8a,U+6d8c-6d8e,U+6d91-6d98,U+6d9c,U+6daa-6dac,U+6dae,U+6db4-6db5,U+6db7-6db9,U+6dbd,U+6dbf,U+6dc2,U+6dc4-6dc8,U+6dca,U+6dcc,U+6dce-6dd0,U+6dd2,U+6dd5-6dd6,U+6dd8-6ddb,U+6ddd-6de0,U+6de2,U+6de4-6de6,U+6de8-6dea,U+6dec,U+6dee-6df0,U+6df2,U+6df4,U+6df6,U+6df8-6dfa,U+6dfc,U+6e00,U+6e04,U+6e0a,U+6e17,U+6e19,U+6e1d-6e20,U+6e22-6e25,U+6e27,U+6e2b,U+6e2d-6e2e,U+6e32,U+6e34,U+6e36,U+6e38-6e3c,U+6e42-6e45,U+6e48-6e49,U+6e4b-6e4f,U+6e51-6e54,U+6e57,U+6e5b-6e5f,U+6e62-6e63,U+6e68,U+6e6b,U+6e6e,U+6e72-6e73,U+6e76,U+6e7b,U+6e7d,U+6e82,U+6e89,U+6e8c-6e8d,U+6e8f,U+6e93,U+6e98-6e99,U+6e9f-6ea0,U+6ea5,U+6ea7,U+6eaa-6eab,U+6ead-6eaf,U+6eb1-6eb4,U+6eb7,U+6ebb-6ebd,U+6ebf-6ec4,U+6ec7-6eca,U+6ecc-6ecf,U+6ed3-6ed5,U+6ed9-6edb,U+6ee6,U+6eeb-6eef,U+6ef7-6ef9,U+6efb,U+6efd-6eff,U+6f04,U+6f08-6f0a,U+6f0c-6f0d,U+6f10-6f11,U+6f13,U+6f15-6f16,U+6f18,U+6f1a-6f1b,U+6f25-6f26,U+6f29-6f2a,U+6f2d,U+6f2f-6f33,U+6f35-6f36,U+6f38,U+6f3b-6f3c,U+6f3e-6f3f,U+6f41,U+6f45,U+6f4f,U+6f51-6f53,U+6f57}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.33.woff2) format("woff2");unicode-range:U+6b85,U+6b89,U+6b8d,U+6b95,U+6b97-6b98,U+6b9b,U+6b9e-6ba0,U+6ba2-6ba4,U+6ba8-6bb3,U+6bb7-6bb9,U+6bbc-6bbe,U+6bc0,U+6bc3-6bc4,U+6bc6-6bc9,U+6bcb-6bcc,U+6bcf,U+6bd3,U+6bd6-6bd8,U+6bda,U+6bdf,U+6be1,U+6be3,U+6be6-6be7,U+6beb-6bec,U+6bee,U+6bf1,U+6bf3,U+6bf7,U+6bf9,U+6bff,U+6c02,U+6c04-6c05,U+6c08-6c0a,U+6c0d-6c0e,U+6c10,U+6c12-6c14,U+6c19,U+6c1b,U+6c1f,U+6c24,U+6c26-6c28,U+6c2c,U+6c2e,U+6c33,U+6c35-6c36,U+6c3a-6c3b,U+6c3e-6c40,U+6c4a-6c4b,U+6c4d,U+6c4f,U+6c52,U+6c54-6c55,U+6c59,U+6c5b-6c5e,U+6c62,U+6c67-6c68,U+6c6a-6c6b,U+6c6d,U+6c6f,U+6c73-6c74,U+6c76,U+6c78-6c79,U+6c7b,U+6c7e,U+6c81-6c87,U+6c89,U+6c8c-6c8d,U+6c90,U+6c92-6c95,U+6c97-6c98,U+6c9a-6c9c,U+6c9f,U+6caa-6cae,U+6cb0-6cb2,U+6cb4,U+6cba,U+6cbd-6cbe,U+6cc2,U+6cc5-6cc6,U+6ccd,U+6ccf-6cd4,U+6cd6-6cd7,U+6cd9-6cdd,U+6ce0,U+6ce7,U+6ce9-6cef,U+6cf1-6cf2,U+6cf4,U+6cfb,U+6d00-6d01,U+6d04,U+6d07,U+6d0a,U+6d0c,U+6d0e-6d0f,U+6d11,U+6d13,U+6d19-6d1a,U+6d1f,U+6d24,U+6d26-6d28,U+6d2b,U+6d2e-6d2f,U+6d31,U+6d33-6d36,U+6d38-6d39,U+6d3c-6d3d,U+6d3f,U+6d57-6d5b,U+6d5e-6d61,U+6d64-6d65,U+6d67,U+6d6c,U+6d6f-6d70,U+6d79}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.34.woff2) format("woff2");unicode-range:U+69dd-69de,U+69e2-69e3,U+69e5,U+69e7-69eb,U+69ed-69ef,U+69f1-69f6,U+69f9,U+69fe-6a01,U+6a03,U+6a05,U+6a0a,U+6a0c,U+6a0f,U+6a11-6a15,U+6a17,U+6a1a-6a1b,U+6a1d-6a20,U+6a22-6a24,U+6a28,U+6a2e,U+6a30,U+6a32-6a38,U+6a3b,U+6a3e-6a3f,U+6a44-6a4a,U+6a4e,U+6a50-6a52,U+6a54-6a56,U+6a5b,U+6a61-6a62,U+6a64,U+6a66-6a67,U+6a6a-6a6b,U+6a71-6a73,U+6a78,U+6a7a,U+6a7e-6a7f,U+6a81,U+6a83-6a84,U+6a86-6a87,U+6a89,U+6a8b,U+6a8d,U+6a90-6a91,U+6a94,U+6a97,U+6a9b,U+6a9d-6aa3,U+6aa5,U+6aaa-6aac,U+6aae-6ab1,U+6ab3-6ab4,U+6ab8,U+6abb,U+6abd-6abf,U+6ac1-6ac3,U+6ac6,U+6ac8-6ac9,U+6acc,U+6ad0-6ad1,U+6ad3-6ad6,U+6ada-6adf,U+6ae2,U+6ae4,U+6ae7-6ae8,U+6aea,U+6aec,U+6af0-6af3,U+6af8,U+6afa,U+6afc-6afd,U+6b02-6b03,U+6b06-6b07,U+6b09-6b0b,U+6b0f-6b12,U+6b16-6b17,U+6b1b,U+6b1d-6b1f,U+6b23-6b24,U+6b28,U+6b2b-6b2c,U+6b2f,U+6b35-6b39,U+6b3b,U+6b3d,U+6b3f,U+6b43,U+6b46-6b47,U+6b49-6b4a,U+6b4d-6b4e,U+6b50,U+6b52,U+6b54,U+6b56,U+6b58-6b59,U+6b5b,U+6b5d,U+6b5f-6b61,U+6b65,U+6b67,U+6b6b-6b6c,U+6b6e,U+6b70,U+6b72,U+6b75,U+6b77-6b7a,U+6b7d-6b84}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.35.woff2) format("woff2");unicode-range:U+6855,U+6857-6859,U+685b,U+685d,U+685f,U+6863,U+6867,U+686b,U+686e-6872,U+6874-6875,U+6877,U+6879-687c,U+687e-687f,U+6882-6884,U+6886,U+6888,U+688d-6890,U+6894,U+6896,U+6898-689c,U+689f-68a3,U+68a5-68a7,U+68a9-68ab,U+68ad-68af,U+68b2-68b5,U+68b9-68bc,U+68c3,U+68c5-68c6,U+68c8-68ca,U+68cc-68cd,U+68cf-68d1,U+68d3-68d9,U+68dc-68dd,U+68e0-68e1,U+68e3-68e5,U+68e7-68e8,U+68ea-68ed,U+68ef-68f1,U+68f5-68f7,U+68f9,U+68fb-68fd,U+6900-6901,U+6903-6904,U+6906-690c,U+690f-6911,U+6913,U+6916-6917,U+6919-691b,U+6921-6923,U+6925-6926,U+6928,U+692a,U+6930-6931,U+6933-6936,U+6938-6939,U+693b,U+693d,U+6942,U+6945-6946,U+6949,U+694e,U+6954,U+6957,U+6959,U+695b-695e,U+6961-6966,U+6968-696c,U+696e-6974,U+6977-697b,U+697e-6981,U+6986,U+698d,U+6991-6992,U+6994-6996,U+6998,U+699c,U+69a0-69a1,U+69a5-69a8,U+69ab,U+69ad,U+69af-69b2,U+69b4,U+69b7-69b8,U+69ba-69bc,U+69be-69c1,U+69c3,U+69c5,U+69c7-69c8,U+69ca,U+69ce-69d1,U+69d3,U+69d6-69d7,U+69d9}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.36.woff2) format("woff2");unicode-range:U+667e-6680,U+6683-6684,U+6688,U+668b-668e,U+6690,U+6692,U+6698-669d,U+669f-66a0,U+66a2,U+66a4,U+66ad,U+66b1-66b3,U+66b5,U+66b8-66b9,U+66bb-66bc,U+66be-66c4,U+66c6,U+66c8-66c9,U+66cc,U+66ce-66cf,U+66d4,U+66da-66db,U+66dd,U+66df-66e0,U+66e6,U+66e8-66e9,U+66eb-66ec,U+66ee,U+66f5,U+66f7,U+66fa-66fc,U+6701,U+6705,U+6707,U+670c,U+670e-6710,U+6712-6716,U+6719,U+671c,U+671e,U+6720,U+6722,U+6725-6726,U+672e,U+6733,U+6735-6738,U+673e-673f,U+6741,U+6743,U+6745-6748,U+674c-674d,U+6753-6755,U+6759,U+675d-675e,U+6760,U+6762-6764,U+6766,U+676a,U+676c,U+676e,U+6770,U+6772-6774,U+6776-6777,U+677b-677c,U+6780-6781,U+6784-6785,U+6787,U+6789,U+678b-678c,U+678e-678f,U+6791-6793,U+6796,U+6798-6799,U+679b,U+67a1,U+67a4,U+67a6,U+67a9,U+67b0-67b5,U+67b7-67b9,U+67bb-67be,U+67c0-67c3,U+67c5-67c6,U+67c8-67c9,U+67ce,U+67d2,U+67d7-67d9,U+67db-67de,U+67e1-67e2,U+67e4,U+67e6-67e7,U+67e9,U+67ec,U+67ee-67f0,U+67f2,U+67f6-67f7,U+67f9-67fa,U+67fc,U+67fe,U+6801-6802,U+6805,U+6810,U+6814,U+6818-6819,U+681d,U+681f,U+6822,U+6827-6829,U+682b-682d,U+682f-6834,U+683b,U+683e-6840,U+6844-6846,U+6849-684a,U+684c-684e,U+6852-6854}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.37.woff2) format("woff2");unicode-range:U+64d2,U+64d4-64d5,U+64d7-64d8,U+64da,U+64e0-64e1,U+64e3-64e5,U+64e7,U+64e9-64ea,U+64ed,U+64ef-64f2,U+64f4-64f7,U+64fa-64fb,U+64fd-6501,U+6504-6505,U+6508-650a,U+650f,U+6513-6514,U+6516,U+6518-6519,U+651b-651f,U+6522,U+6524,U+6526,U+6529-652c,U+652e,U+6531-6532,U+6534-6538,U+653a,U+653c-653d,U+6543-6544,U+6547-6549,U+654d-654e,U+6550,U+6552,U+6554-6556,U+6558,U+655d-6560,U+6567,U+656b,U+6572,U+6578,U+657a,U+657d,U+6581-6585,U+6588,U+658a,U+658c,U+6592,U+6595,U+6598,U+659b,U+659d,U+659f-65a1,U+65a3-65a6,U+65ab,U+65ae,U+65b2-65b5,U+65b7-65b8,U+65be-65bf,U+65c1-65c4,U+65c6,U+65c8-65c9,U+65cc,U+65ce,U+65d0,U+65d2,U+65d4,U+65d6,U+65d8-65d9,U+65db,U+65df-65e1,U+65e3,U+65f0-65f2,U+65f4-65f5,U+65f9,U+65fb-65fc,U+65fe-6600,U+6603-6604,U+6608-660a,U+660d,U+6611-6612,U+6615-6616,U+661c-661e,U+6621-6624,U+6626,U+6629-662c,U+662e,U+6630-6631,U+6633-6637,U+6639-663b,U+663f-6641,U+6644-6646,U+6648-664a,U+664c,U+664e-664f,U+6651,U+6657-6665,U+6667-6668,U+666a-666d,U+6670,U+6673,U+6675,U+6677-6679,U+667b-667c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.38.woff2) format("woff2");unicode-range:U+62cf,U+62d1,U+62d4-62d6,U+62da,U+62dc,U+62ea,U+62ee-62ef,U+62f1-62f2,U+62f4-62f5,U+62fc-62fd,U+62ff,U+6302-6304,U+6308-630d,U+6310,U+6313,U+6316,U+6318,U+631b,U+6327,U+6329-632a,U+632d,U+6332,U+6335-6336,U+6339-633c,U+633e,U+6341-6344,U+6346,U+634a-634e,U+6350,U+6352-6354,U+6358-6359,U+635b,U+6365-6366,U+6369,U+636b-636d,U+6371-6372,U+6374-6378,U+637a,U+637c-637d,U+637f-6380,U+6382,U+6384,U+6387,U+6389-638a,U+638e-6390,U+6394-6396,U+6399-639a,U+639e,U+63a0,U+63a3-63a4,U+63a6,U+63a9,U+63ab-63af,U+63b5,U+63bd-63be,U+63c0-63c1,U+63c4-63c6,U+63c8,U+63ce,U+63d1-63d6,U+63dc,U+63e0,U+63e3,U+63e5,U+63e9-63ed,U+63f2-63f3,U+63f5-63f9,U+6406,U+6409-640a,U+640f-6410,U+6412-6414,U+6416-6418,U+641e,U+6420,U+6422,U+6424-6426,U+6428-642a,U+642f-6430,U+6434-6436,U+643d,U+643f,U+644b,U+644e-644f,U+6451-6454,U+645a-645d,U+645f-6461,U+6463,U+6467,U+646d,U+6473-6474,U+6476,U+6478-6479,U+647b,U+647d,U+6485,U+6487-6488,U+648f-6491,U+6493,U+6495,U+6498-649b,U+649d-649f,U+64a1,U+64a3,U+64a6,U+64a8-64a9,U+64ac,U+64b3,U+64bb-64bf,U+64c2,U+64c4-64c5,U+64c7,U+64c9-64cc,U+64ce,U+64d0-64d1}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.39.woff2) format("woff2");unicode-range:U+6117,U+6119,U+611c,U+611e,U+6120-6122,U+6127-6128,U+612a-612c,U+6130-6131,U+6134-6137,U+6139-613a,U+613c-613f,U+6141-6142,U+6144-6147,U+6149-614a,U+614d,U+6153,U+6158-615a,U+615d-6160,U+6164-6165,U+616b-616c,U+616f,U+6171-6175,U+6177-6178,U+617b-6181,U+6183-6184,U+6187,U+618a-618b,U+618d,U+6192-6194,U+6196-619a,U+619c-619d,U+619f-61a0,U+61a5,U+61a8,U+61aa-61ae,U+61b8-61ba,U+61bc,U+61be,U+61c0-61c3,U+61c6,U+61c8,U+61ca-61cf,U+61d5,U+61dc-61df,U+61e1-61e3,U+61e5-61e9,U+61ec-61ed,U+61ef,U+61f4-61f7,U+61fa,U+61fc-6201,U+6203-6204,U+6207-620a,U+620d-620e,U+6213-6215,U+621b-621e,U+6220-6223,U+6227,U+6229-622b,U+622e,U+6230-6233,U+6236,U+6239,U+623d-623e,U+6241-6244,U+6246,U+6248,U+624c,U+624e,U+6250-6252,U+6254,U+6256,U+6258,U+625a-625c,U+625e,U+6260-6261,U+6263-6264,U+6268,U+626d,U+626f,U+6273,U+627a-627e,U+6282-6283,U+6285,U+6289,U+628d-6290,U+6292-6294,U+6296,U+6299,U+629b,U+62a6,U+62a8,U+62ac,U+62b3,U+62b6-62b7,U+62ba-62bb,U+62be-62bf,U+62c2,U+62c4,U+62c6-62c8,U+62ca,U+62ce}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.40.woff2) format("woff2");unicode-range:U+5f6c-5f6d,U+5f6f,U+5f72-5f75,U+5f78,U+5f7a,U+5f7d-5f7f,U+5f82-5f83,U+5f87-5f89,U+5f8d,U+5f8f,U+5f91,U+5f96,U+5f99,U+5f9c-5f9d,U+5fa0,U+5fa2,U+5fa4,U+5fa7-5fa8,U+5fab-5fad,U+5faf-5fb1,U+5fb5,U+5fb7-5fb8,U+5fbc-5fbd,U+5fc4,U+5fc7-5fc9,U+5fcb,U+5fd0-5fd4,U+5fdd-5fde,U+5fe1-5fe2,U+5fe4,U+5fe8-5fea,U+5fec-5ff3,U+5ff6,U+5ff8,U+5ffa-5ffd,U+5fff,U+6007,U+600a,U+600d-6010,U+6013-6015,U+6017-601b,U+601f,U+6021-6022,U+6024,U+6026,U+6029,U+602b,U+602d,U+6031,U+6033,U+6035,U+603a,U+6040-6043,U+6046-604a,U+604c-604d,U+6051,U+6054-6057,U+6059-605a,U+605d,U+605f-6064,U+6067,U+606a-606c,U+6070-6071,U+6077,U+607e-607f,U+6081-6086,U+6088-608e,U+6091-6093,U+6095-6098,U+609a-609b,U+609d-609e,U+60a2,U+60a4-60a5,U+60a7-60a8,U+60b0-60b1,U+60b3-60b5,U+60b7-60b8,U+60bb,U+60bd-60be,U+60c2,U+60c4,U+60c6-60cb,U+60ce-60cf,U+60d3-60d5,U+60d8-60d9,U+60db,U+60dd-60df,U+60e1-60e2,U+60e5,U+60ee,U+60f0-60f2,U+60f4-60f8,U+60fa-60fd,U+6100,U+6102-6103,U+6106-6108,U+610a,U+610c-610e,U+6110-6114,U+6116}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.41.woff2) format("woff2");unicode-range:U+5d9b,U+5d9d,U+5d9f-5da0,U+5da2,U+5da4,U+5da7,U+5dab-5dac,U+5dae,U+5db0,U+5db2,U+5db4,U+5db7-5db9,U+5dbc-5dbd,U+5dc3,U+5dc7,U+5dc9,U+5dcb-5dce,U+5dd0-5dd3,U+5dd6-5dd9,U+5ddb,U+5de0,U+5de2,U+5de4,U+5de9,U+5df2,U+5df5,U+5df8-5df9,U+5dfd,U+5dff-5e00,U+5e07,U+5e0b,U+5e0d,U+5e11-5e12,U+5e14-5e15,U+5e18-5e1b,U+5e1f-5e20,U+5e25,U+5e28,U+5e2e,U+5e32,U+5e35-5e37,U+5e3e,U+5e40,U+5e43-5e44,U+5e47,U+5e49,U+5e4b,U+5e4e,U+5e50-5e51,U+5e54,U+5e56-5e58,U+5e5b-5e5c,U+5e5e-5e5f,U+5e62,U+5e64,U+5e68,U+5e6a-5e6e,U+5e70,U+5e75-5e77,U+5e7a,U+5e7f-5e80,U+5e87,U+5e8b,U+5e8e,U+5e96,U+5e99-5e9a,U+5ea0,U+5ea2,U+5ea4-5ea5,U+5ea8,U+5eaa,U+5eac,U+5eb1,U+5eb3,U+5eb8-5eb9,U+5ebd-5ebf,U+5ec1-5ec2,U+5ec6,U+5ec8,U+5ecb-5ecc,U+5ece-5ed6,U+5ed9-5ee2,U+5ee5,U+5ee8-5ee9,U+5eeb-5eec,U+5ef0-5ef1,U+5ef3-5ef4,U+5ef8-5ef9,U+5efc-5f00,U+5f02-5f03,U+5f06-5f09,U+5f0b-5f0e,U+5f11,U+5f16-5f17,U+5f19,U+5f1b-5f1e,U+5f21-5f24,U+5f27-5f29,U+5f2b-5f30,U+5f34,U+5f36,U+5f38,U+5f3a-5f3d,U+5f3f-5f41,U+5f44-5f45,U+5f47-5f48,U+5f4a,U+5f4c-5f4e,U+5f50-5f51,U+5f54,U+5f56-5f58,U+5f5b-5f5d,U+5f60,U+5f63-5f65,U+5f67,U+5f6a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.42.woff2) format("woff2");unicode-range:U+5bbc,U+5bc0-5bc1,U+5bc3,U+5bc7,U+5bc9,U+5bcd-5bd0,U+5bd3-5bd4,U+5bd6-5bda,U+5bde,U+5be0-5be2,U+5be4-5be6,U+5be8,U+5beb-5bec,U+5bef-5bf1,U+5bf3-5bf6,U+5bfd,U+5c03,U+5c05,U+5c07-5c09,U+5c0c-5c0d,U+5c12-5c14,U+5c17,U+5c19,U+5c1e-5c20,U+5c22-5c24,U+5c26,U+5c28-5c2e,U+5c30,U+5c32,U+5c35-5c36,U+5c38-5c39,U+5c46,U+5c4d-5c50,U+5c53,U+5c59-5c5c,U+5c5f-5c63,U+5c67-5c69,U+5c6c-5c70,U+5c74-5c76,U+5c79-5c7d,U+5c87-5c88,U+5c8a,U+5c8c,U+5c8f,U+5c91-5c92,U+5c94,U+5c9d,U+5c9f-5ca0,U+5ca2-5ca3,U+5ca6-5ca8,U+5caa-5cab,U+5cad,U+5cb1-5cb2,U+5cb4-5cb7,U+5cba-5cbc,U+5cbe,U+5cc5,U+5cc7,U+5cc9,U+5ccb,U+5cd0,U+5cd2,U+5cd7,U+5cd9,U+5cdd,U+5ce6,U+5ce8-5cea,U+5ced-5cee,U+5cf1-5cf2,U+5cf4-5cf5,U+5cfa-5cfb,U+5cfd,U+5d01,U+5d06,U+5d0b,U+5d0d,U+5d10-5d12,U+5d14-5d15,U+5d17-5d1b,U+5d1d,U+5d1f-5d20,U+5d22-5d24,U+5d26-5d27,U+5d2b,U+5d31,U+5d34,U+5d39,U+5d3d,U+5d3f,U+5d42-5d43,U+5d46-5d48,U+5d4a-5d4b,U+5d4e,U+5d51-5d53,U+5d55,U+5d59,U+5d5c,U+5d5f-5d62,U+5d64,U+5d69-5d6a,U+5d6c-5d6d,U+5d6f-5d70,U+5d73,U+5d76,U+5d79-5d7a,U+5d7e-5d7f,U+5d81-5d84,U+5d87-5d88,U+5d8a,U+5d8c,U+5d90,U+5d92-5d95,U+5d97,U+5d99}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.43.woff2) format("woff2");unicode-range:U+598b-598e,U+5992,U+5995,U+5997,U+599b,U+599d,U+599f,U+59a3-59a4,U+59a7,U+59ad-59b0,U+59b2-59b3,U+59b7,U+59ba,U+59bc,U+59be,U+59c1,U+59c3-59c4,U+59c6,U+59c8,U+59ca,U+59cd,U+59d2,U+59d9-59da,U+59dd-59df,U+59e3-59e5,U+59e7-59e8,U+59ec,U+59ee-59ef,U+59f1-59f2,U+59f4,U+59f6-59f8,U+5a00,U+5a03-5a04,U+5a09,U+5a0c-5a0e,U+5a11-5a13,U+5a17,U+5a1a-5a1c,U+5a1e-5a1f,U+5a23-5a25,U+5a27-5a28,U+5a2a,U+5a2d,U+5a30,U+5a35-5a36,U+5a40-5a41,U+5a44-5a45,U+5a47-5a49,U+5a4c,U+5a50,U+5a55,U+5a5e,U+5a62-5a63,U+5a65,U+5a67,U+5a6a,U+5a6c-5a6d,U+5a77,U+5a7a-5a7b,U+5a7e,U+5a84,U+5a8b,U+5a90,U+5a93,U+5a96,U+5a99,U+5a9c,U+5a9e-5aa0,U+5aa2,U+5aa7,U+5aac,U+5ab1-5ab3,U+5ab5,U+5ab8,U+5aba-5abf,U+5ac2,U+5ac4,U+5ac6,U+5ac8,U+5acb,U+5acf-5ad0,U+5ad6-5ad7,U+5ada,U+5adc,U+5ae0-5ae1,U+5ae3,U+5ae5-5ae6,U+5ae9-5aea,U+5aee,U+5af0,U+5af5-5af6,U+5afa-5afb,U+5afd,U+5b00-5b01,U+5b08,U+5b0b,U+5b16-5b17,U+5b19,U+5b1b,U+5b1d,U+5b21,U+5b25,U+5b2a,U+5b2c-5b2d,U+5b30,U+5b32,U+5b34,U+5b36,U+5b38,U+5b3e,U+5b40-5b41,U+5b43,U+5b45,U+5b4b-5b4c,U+5b51-5b52,U+5b56,U+5b5a-5b5c,U+5b5e-5b5f,U+5b65,U+5b68-5b69,U+5b6e-5b71,U+5b73,U+5b75-5b76,U+5b7a,U+5b7c-5b84,U+5b86,U+5b8a-5b8b,U+5b8d-5b8e,U+5b90-5b91,U+5b93-5b94,U+5b96,U+5ba5-5ba6,U+5ba8-5ba9,U+5bac-5bad,U+5baf,U+5bb1-5bb2,U+5bb7-5bb8,U+5bba}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.44.woff2) format("woff2");unicode-range:U+57b3,U+57b8,U+57bd,U+57c0,U+57c3,U+57c6-57c8,U+57cc,U+57cf,U+57d2-57d7,U+57dc-57de,U+57e0-57e1,U+57e3-57e4,U+57e6-57e7,U+57e9,U+57ed,U+57f0,U+57f4-57f6,U+57f8,U+57fb,U+57fd-57ff,U+5803-5804,U+5808-580d,U+5819,U+581b,U+581d-5821,U+5826-5827,U+582d,U+582f-5830,U+5832,U+5835,U+5839,U+583d,U+583f-5840,U+5849,U+584b-584d,U+584f-5852,U+5855,U+5858-5859,U+585f,U+5861-5862,U+5864,U+5867-5868,U+586d,U+5870,U+5872,U+5878-5879,U+587c,U+587f-5881,U+5885,U+5887-588d,U+588f-5890,U+5894,U+5896,U+5898,U+589d-589e,U+58a0-58a2,U+58a6,U+58a9-58ab,U+58ae,U+58b1-58b3,U+58b8-58bc,U+58be,U+58c2-58c5,U+58c8,U+58cd-58ce,U+58d0-58da,U+58dc-58e2,U+58e4-58e5,U+58e9,U+58ec,U+58ef,U+58f3-58f4,U+58f7,U+58f9,U+58fb-58fd,U+5902,U+5905-5906,U+590a-590d,U+5910,U+5912-5914,U+5918-5919,U+591b,U+591d,U+591f,U+5921,U+5923-5925,U+5928,U+592c-592d,U+592f-5930,U+5932-5933,U+5935-5936,U+5938-5939,U+593d-593f,U+5943,U+5946,U+594e,U+5950,U+5952-5953,U+5955,U+5957-595b,U+595d-5961,U+5963,U+5967,U+5969,U+596b-596d,U+596f,U+5972,U+5975-5976,U+5978-5979,U+597b-597c,U+5981}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.45.woff2) format("woff2");unicode-range:U+5616-5617,U+5619,U+561b,U+5620,U+5628,U+562c,U+562f-5639,U+563b-563d,U+563f-5641,U+5643-5644,U+5646-5647,U+5649,U+564b,U+564d-5650,U+5653-5654,U+565e,U+5660-5664,U+5666,U+5669-566d,U+566f,U+5671-5672,U+5675-5676,U+5678,U+567a,U+5680,U+5684-5688,U+568a-568c,U+568f,U+5694-5695,U+5699-569a,U+569d-56a0,U+56a5-56a9,U+56ab-56ae,U+56b1-56b4,U+56b6-56b7,U+56bc,U+56be,U+56c0,U+56c2-56c3,U+56c5,U+56c8-56d1,U+56d3,U+56d7-56d9,U+56dc-56dd,U+56df,U+56e1,U+56e4-56e8,U+56eb,U+56ed-56ee,U+56f1,U+56f6-56f7,U+56f9,U+56ff-5704,U+5707-570a,U+570c-570d,U+5711,U+5713,U+5715-5716,U+5718,U+571a-571d,U+5720-5726,U+5729-572a,U+572c,U+572e-572f,U+5733-5734,U+5737-5738,U+573b,U+573d-573f,U+5745-5746,U+574c-574f,U+5751-5752,U+5759,U+575f,U+5761-5762,U+5764-5765,U+5767-5769,U+576b,U+576d-5771,U+5773-5775,U+5777,U+5779-577c,U+577e-577f,U+5781,U+5783,U+5788-5789,U+578c,U+5793-5795,U+5797,U+5799-579a,U+579c-57a1,U+57a4,U+57a7-57aa,U+57ac,U+57ae,U+57b0}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.46.woff2) format("woff2");unicode-range:U+543f-5440,U+5443-5444,U+5447,U+544c-544f,U+5455,U+545e,U+5462,U+5464,U+5466-5467,U+5469,U+546b-546e,U+5470-5471,U+5474-5477,U+547b,U+547f-5481,U+5483-5486,U+5488-548b,U+548d-5492,U+5495-5496,U+549c,U+549f-54a2,U+54a4,U+54a6-54af,U+54b1,U+54b7-54bc,U+54be-54bf,U+54c2-54c4,U+54c6-54c8,U+54ca,U+54cd-54ce,U+54d8,U+54e0,U+54e2,U+54e5-54e6,U+54e8-54ea,U+54ec-54ef,U+54f1,U+54f3,U+54f6,U+54fc-5501,U+5505,U+5508-5509,U+550c-550f,U+5514-5516,U+5527,U+552a-552b,U+552e,U+5532-5533,U+5535-5536,U+5538-5539,U+553b-553d,U+5540-5541,U+5544-5545,U+5547,U+5549-554a,U+554c-554d,U+5550-5551,U+5556-5558,U+555a-555e,U+5560-5561,U+5563-5564,U+5566,U+557b-5583,U+5586-5588,U+558a,U+558e-558f,U+5591-5594,U+5597,U+5599,U+559e-559f,U+55a3-55a4,U+55a8-55a9,U+55ac-55ae,U+55b2,U+55bf,U+55c1,U+55c3-55c4,U+55c6-55c7,U+55c9,U+55cb-55cc,U+55ce,U+55d1-55d4,U+55d7-55d8,U+55da-55db,U+55dd-55df,U+55e2,U+55e4,U+55e9,U+55ec,U+55ee,U+55f1,U+55f6-55f9,U+55fd-55ff,U+5605,U+5607-5608,U+560a,U+560d-5612}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.47.woff2) format("woff2");unicode-range:U+528d,U+5291-5298,U+529a,U+529c,U+52a4-52a7,U+52ab-52ad,U+52af-52b0,U+52b5-52b8,U+52ba-52be,U+52c0-52c1,U+52c4-52c6,U+52c8,U+52ca,U+52cc-52cd,U+52cf-52d2,U+52d4,U+52d6-52d7,U+52db-52dc,U+52de,U+52e0-52e1,U+52e3,U+52e5-52e6,U+52e8-52ea,U+52ec,U+52f0-52f1,U+52f3-52fb,U+5300-5301,U+5303,U+5306-5308,U+530a-530d,U+530f-5311,U+5313,U+5315,U+5318-531f,U+5321,U+5323-5325,U+5327-532d,U+532f-5333,U+5335,U+5338,U+533c-533e,U+5340,U+5342,U+5345-5346,U+5349,U+534b-534c,U+5359,U+535b,U+535e,U+5361,U+5363-5367,U+5369,U+536c-536e,U+5372,U+5377,U+5379-537b,U+537d-537f,U+5382-5383,U+5387-5389,U+538e,U+5393-5394,U+5396,U+5398-5399,U+539d,U+53a0-53a1,U+53a4-53a6,U+53a9-53ab,U+53ad-53b0,U+53b2,U+53b4-53b8,U+53ba,U+53bd,U+53c0-53c1,U+53c3-53c5,U+53cf,U+53d2-53d3,U+53d5,U+53da-53db,U+53dd-53e0,U+53e2,U+53e6-53e8,U+53ed-53ee,U+53f4-53f5,U+53fa,U+5401-5403,U+540b,U+540f,U+5412-5413,U+541a,U+541d-541e,U+5421,U+5424,U+5427-542a,U+542c-542f,U+5431,U+5433-5436,U+543c-543d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.48.woff2) format("woff2");unicode-range:U+50dd-50df,U+50e1-50e6,U+50e8-50e9,U+50ed-50f6,U+50f9-50fb,U+50fe,U+5101-5103,U+5106-5109,U+510b-510e,U+5110,U+5112,U+5114-511e,U+5121,U+5123,U+5127-5128,U+512c-512d,U+512f,U+5131,U+5133-5135,U+5137-513c,U+513f-5142,U+5147,U+514a,U+514c,U+514f,U+5152-5155,U+5157-5158,U+515f-5160,U+5162,U+5164,U+5166-5167,U+5169-516a,U+516e,U+5173-5174,U+5179,U+517b,U+517e,U+5180,U+5182-5184,U+5189,U+518b-518c,U+518e-5191,U+5193,U+5195-5196,U+5198,U+519d,U+51a1-51a4,U+51a6,U+51a9-51ab,U+51ad,U+51b0-51b3,U+51b5,U+51b8,U+51ba,U+51bc-51bf,U+51c2-51c3,U+51c5,U+51c8-51cb,U+51cf,U+51d1-51d6,U+51d8,U+51de-51e0,U+51e2,U+51e5,U+51e7,U+51e9,U+51ec-51ee,U+51f2-51f5,U+51f7,U+51fe,U+5201-5202,U+5204-5205,U+520b,U+520e,U+5212-5216,U+5218,U+5222,U+5226-5228,U+522a-522b,U+522e,U+5231-5233,U+5235,U+523c,U+5244-5245,U+5249,U+524b-524c,U+524f,U+5254-5255,U+5257-5258,U+525a,U+525c-5261,U+5266,U+5269,U+526c,U+526e,U+5271,U+5273-5274,U+5277-5279,U+527d,U+527f-5280,U+5282-5285,U+5288-528a,U+528c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.49.woff2) format("woff2");unicode-range:U+4f57-4f58,U+4f5a-4f5b,U+4f5d-4f5f,U+4f63-4f64,U+4f69-4f6a,U+4f6c,U+4f6e-4f71,U+4f76-4f7e,U+4f81-4f85,U+4f88-4f8a,U+4f8c,U+4f8e-4f90,U+4f92-4f94,U+4f96-4f9a,U+4f9e-4fa0,U+4fab,U+4fad,U+4faf,U+4fb2,U+4fb7,U+4fb9,U+4fbb-4fbe,U+4fc0-4fc1,U+4fc4-4fc6,U+4fc8-4fc9,U+4fcb-4fd4,U+4fd8,U+4fda-4fdc,U+4fdf-4fe0,U+4fe2,U+4fe4-4fe6,U+4fef-4ff2,U+4ff6,U+4ffc-5002,U+5004-5007,U+500a,U+500c,U+500e-5011,U+5013-5014,U+5016-5018,U+501a-501e,U+5021-5023,U+5025-502a,U+502c-502e,U+5030,U+5032-5033,U+5035,U+5039,U+503b,U+5040-5043,U+5045-5048,U+504a,U+504c,U+504e,U+5050-5053,U+5055-5057,U+5059-505a,U+505f-5060,U+5062-5063,U+5066-5067,U+506a,U+506c-506d,U+5070-5072,U+5077-5078,U+5080-5081,U+5083-5086,U+5088,U+508a,U+508e-5090,U+5092-5096,U+509a-509c,U+509e-50a3,U+50aa,U+50ad,U+50af-50b4,U+50b9-50bb,U+50bd,U+50c0,U+50c2-50c4,U+50c7,U+50c9-50ca,U+50cc,U+50ce,U+50d0-50d1,U+50d3-50d4,U+50d6,U+50d8-50d9,U+50dc}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.50.woff2) format("woff2");unicode-range:U+4093,U+4103,U+4105,U+4148,U+414f,U+4163,U+41b4,U+41bf,U+41e6,U+41ee,U+41f3,U+4207,U+420e,U+4264,U+4293,U+42c6,U+42d6,U+42dd,U+4302,U+432b,U+4343,U+43ee,U+43f0,U+4408,U+440c,U+4417,U+441c,U+4422,U+4453,U+445b,U+4476,U+447a,U+4491,U+44b3,U+44be,U+44d4,U+4508,U+450d,U+4525,U+4543,U+457a,U+459d,U+45b8,U+45be,U+45e5,U+45ea,U+460f-4610,U+4641,U+4665,U+46a1,U+46ae-46af,U+470c,U+471f,U+4764,U+47e6,U+47fd,U+4816,U+481e,U+4844,U+484e,U+48b5,U+49b0,U+49e7,U+49fa,U+4a04,U+4a29,U+4abc,U+4b38,U+4b3b,U+4b7e,U+4bc2,U+4bca,U+4bd2,U+4be8,U+4c17,U+4c20,U+4c38,U+4cc4,U+4cd1,U+4ce1,U+4d07,U+4d77,U+4e02,U+4e04-4e05,U+4e0c,U+4e0f-4e12,U+4e15,U+4e17,U+4e19,U+4e1e-4e1f,U+4e23-4e24,U+4e28-4e2c,U+4e2e-4e31,U+4e35-4e37,U+4e3f-4e42,U+4e44,U+4e47-4e48,U+4e4d-4e4e,U+4e51,U+4e55-4e56,U+4e58,U+4e5a-4e5c,U+4e62-4e63,U+4e68-4e69,U+4e74-4e75,U+4e79,U+4e7f,U+4e82,U+4e85,U+4e8a,U+4e8d-4e8e,U+4e96-4e99,U+4e9d-4ea0,U+4ea2,U+4ea5-4ea6,U+4ea8,U+4eaf-4eb0,U+4eb3,U+4eb6,U+4eb9,U+4ebb-4ebc,U+4ec2-4ec4,U+4ec6-4ec8,U+4ecd,U+4ed0,U+4ed7,U+4eda-4edb,U+4edd-4ee2,U+4ee8,U+4eeb,U+4eed,U+4eef,U+4ef1,U+4ef3,U+4ef5,U+4ef7,U+4efc-4f00,U+4f02-4f03,U+4f08-4f09,U+4f0b-4f0d,U+4f12,U+4f15-4f17,U+4f19,U+4f1c,U+4f2b,U+4f2e,U+4f30-4f31,U+4f33,U+4f35-4f37,U+4f39,U+4f3b,U+4f3e,U+4f40,U+4f42-4f43,U+4f48-4f49,U+4f4b-4f4c,U+4f52,U+4f54,U+4f56}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.51.woff2) format("woff2");unicode-range:U+3395-339b,U+339e-33a0,U+33a2-33ff,U+3402,U+3405-3406,U+3427,U+342c,U+342e,U+3468,U+346a,U+3488,U+3492,U+34b5,U+34bc,U+34c1,U+34c7,U+34db,U+351f,U+353e,U+355d-355e,U+3563,U+356e,U+35a6,U+35a8,U+35c5,U+35da,U+35de,U+35f4,U+3605,U+3614,U+364a,U+3691,U+3696,U+3699,U+36cf,U+3761-3762,U+376b-376c,U+3775,U+378d,U+37c1,U+37e2,U+37e8,U+37f4,U+37fd,U+3800,U+382f,U+3836,U+3840,U+385c,U+3861,U+38a1,U+38ad,U+38fa,U+3917,U+391a,U+396f,U+39a4,U+39b8,U+3a5c,U+3a6e,U+3a73,U+3a85,U+3ac4,U+3acb,U+3ad6-3ad7,U+3aea,U+3af3,U+3b0e,U+3b1a,U+3b1c,U+3b22,U+3b35,U+3b6d,U+3b77,U+3b87-3b88,U+3b8d,U+3ba4,U+3bb6,U+3bc3,U+3bcd,U+3bf0,U+3bf3,U+3c0f,U+3c26,U+3cc3,U+3cd2,U+3d11,U+3d1e,U+3d31,U+3d4e,U+3d64,U+3d9a,U+3dc0,U+3dcc,U+3dd4,U+3e05,U+3e3f-3e40,U+3e60,U+3e66,U+3e68,U+3e83,U+3e8a,U+3e94,U+3eda,U+3f57,U+3f72,U+3f75,U+3f77,U+3fae,U+3fb1,U+3fc9,U+3fd7,U+3fdc,U+4039,U+4058}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.52.woff2) format("woff2");unicode-range:U+32b5-332b,U+332d-3394}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.53.woff2) format("woff2");unicode-range:U+31c8-31e3,U+31f0-321e,U+3220-3230,U+3232-32b4}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.54.woff2) format("woff2");unicode-range:U+3028-303f,U+3094-3096,U+309f-30a0,U+30ee,U+30f7-30fa,U+30ff,U+3105-312f,U+3131-3163,U+3165-318e,U+3190-31bb,U+31c0-31c7}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.55.woff2) format("woff2");unicode-range:U+2f14-2fd5,U+2ff0-2ffb,U+3004,U+3013,U+3016-301b,U+301e,U+3020-3027}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.56.woff2) format("woff2");unicode-range:U+25e4-25e6,U+2601-2603,U+2609,U+260e-260f,U+2616-2617,U+261c-261f,U+262f,U+2641,U+2660,U+2662-2664,U+2666-2668,U+266d-266e,U+2672-267d,U+26bd-26be,U+2702,U+271a,U+273d,U+2740,U+2756,U+2776-2793,U+27a1,U+2934-2935,U+29bf,U+29fa-29fb,U+2b05-2b07,U+2b1a,U+2b95,U+2e3a-2e3b,U+2e80-2e99,U+2e9b-2ef3,U+2f00-2f13}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.57.woff2) format("woff2");unicode-range:U+24d1-24ff,U+2503-2513,U+2515-2516,U+2518-251b,U+251d-2522,U+2524-259f,U+25a2-25ab,U+25b1,U+25b7,U+25c0-25c1,U+25c9-25ca,U+25cc,U+25d0-25d3,U+25e2-25e3}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.58.woff2) format("woff2");unicode-range:U+2105,U+2109-210a,U+210f,U+2116,U+2121,U+2126-2127,U+212b,U+212e,U+2135,U+213b,U+2194-2199,U+21b8-21b9,U+21c4-21c6,U+21cb-21cc,U+21d0,U+21e6-21e9,U+21f5,U+2202-2203,U+2205-2206,U+2208-220b,U+220f,U+2211,U+2213,U+2215,U+221a,U+221d,U+2220,U+2223,U+2225-2226,U+2228,U+222a-222e,U+2234-2237,U+223d,U+2243,U+2245,U+2248,U+224c,U+2260,U+2262,U+2264-2265,U+226e-226f,U+2272-2273,U+2276-2277,U+2283-2287,U+228a-228b,U+2295-2299,U+22a0,U+22a5,U+22bf,U+22da-22db,U+22ef,U+2305-2307,U+2318,U+2329-232a,U+23b0-23b1,U+23be-23cc,U+23ce,U+23da-23db,U+2423,U+2469-24d0}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.59.woff2) format("woff2");unicode-range:U+a1-a4,U+a6-a7,U+aa,U+ac-ad,U+b5-b6,U+b8-ba,U+bc-c8,U+ca-cc,U+ce-d5,U+d9-db,U+dd-df,U+e6,U+ee,U+f0,U+f5,U+f7,U+f9,U+fb,U+fe-102,U+110-113,U+11a-11b,U+128-12b,U+143-144,U+147-148,U+14c,U+14e-14f,U+152-153,U+168-16d,U+192,U+1a0-1a1,U+1af,U+1cd-1dc,U+1f8-1f9,U+251,U+261,U+2bb,U+2c7,U+2c9,U+2ea-2eb,U+304,U+307,U+30c,U+1e3e-1e3f,U+1ea0-1ebe,U+1ec0-1ec6,U+1ec8-1ef9,U+2011-2012,U+2016,U+2018-201a,U+201e,U+2021,U+2030,U+2033,U+2035,U+2042,U+2047,U+2051,U+2074,U+20a9,U+20ab-20ac,U+20dd-20de,U+2100}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.60.woff2) format("woff2");unicode-range:U+2227,U+26a0,U+2713,U+301f,U+4ff8,U+5239,U+526a,U+54fa,U+5740,U+5937,U+5993,U+59fb,U+5a3c,U+5c41,U+6028,U+626e,U+646f,U+647a,U+64b0,U+64e2,U+65a7,U+66fe,U+6727,U+6955,U+6bef,U+6f23,U+724c,U+767c,U+7a83,U+7ac4,U+7b67,U+8000,U+8471,U+8513,U+8599,U+86db,U+8718,U+87f2,U+88f3,U+8ad2,U+8e2a,U+8fa3,U+95a5,U+9798,U+9910,U+9957,U+9bab,U+9c3b,U+9daf,U+ff95}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.61.woff2) format("woff2");unicode-range:U+a8,U+2032,U+2261,U+2282,U+3090,U+30f1,U+339c,U+535c,U+53d9,U+56a2,U+56c1,U+5806,U+589f,U+59d0,U+5a7f,U+60e0,U+639f,U+65af,U+68fa,U+69ae,U+6d1b,U+6ef2,U+71fb,U+725d,U+7262,U+75bc,U+7768,U+7940,U+79bf,U+7bed,U+7d68,U+7dfb,U+814b,U+8207,U+83e9,U+8494,U+8526,U+8568,U+85ea,U+86d9,U+87ba,U+8861,U+887f,U+8fe6,U+9059,U+9061,U+916a,U+976d,U+97ad,U+9ece}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.62.woff2) format("woff2");unicode-range:U+2d9,U+21d4,U+301d,U+515c,U+52fe,U+5420,U+5750,U+5766,U+5954,U+5b95,U+5f8a,U+5f98,U+620c,U+621f,U+641c,U+66d9,U+676d,U+6775,U+67f5,U+694a,U+6a02,U+6a3a,U+6a80,U+6c23,U+6c72,U+6dcb,U+6faa,U+707c,U+71c8,U+7422,U+74e2,U+7791,U+7825,U+7a14,U+7a1c,U+7c95,U+7fc1,U+82a5,U+82db,U+8304,U+853d,U+8cd3,U+8de8,U+8f0c,U+8f3f,U+9091,U+91c7,U+929a,U+98af,U+9913}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.63.woff2) format("woff2");unicode-range:U+2ca-2cb,U+2229,U+2468,U+2669,U+266f,U+273f,U+4ec0,U+4f60,U+4fb6,U+5347,U+540e,U+543b,U+5b0c,U+5d4c,U+5f14,U+5f9e,U+6155,U+62d0,U+6602,U+6666,U+66f3,U+67a2,U+67ca,U+69cc,U+6d29,U+6d9b,U+6e3e,U+6f81,U+7109,U+73c0,U+73c2,U+7425,U+7435-7436,U+7525,U+7554,U+785d,U+786b,U+7ae3,U+7b94,U+7d18,U+81bf,U+8511,U+8549,U+9075,U+9640,U+98e2,U+9e9f,U+ff96}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.64.woff2) format("woff2");unicode-range:U+2467,U+4ece,U+4ed4,U+4f91,U+4fae,U+534d,U+53c9,U+54b3,U+586b,U+5944,U+5b78,U+5df7,U+5f77,U+6101,U+6167-6168,U+61a4,U+62d9,U+698a,U+699b,U+6a59,U+6cc4,U+6e07,U+7099,U+75d2,U+77ad,U+7953,U+7984,U+7a92,U+7baa,U+7dbb,U+817f,U+82ad,U+85e9,U+868a,U+8caa,U+8f44,U+9017,U+907c,U+908a,U+92f3,U+936e,U+9435,U+978d,U+9838,U+9a28,U+9b41,U+9ba8,U+9c57,U+9eb9}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.65.woff2) format("woff2");unicode-range:U+b1,U+309b,U+4e5e,U+51f1,U+5506,U+55c5,U+58cc,U+59d1,U+5c51,U+5ef7,U+6284,U+62d7,U+6689,U+673d,U+6a2b,U+6a8e,U+6a9c,U+6d63,U+6dd1,U+70b8,U+7235,U+72db,U+72f8,U+7560,U+7c9b,U+7ce7,U+7e1e,U+80af,U+82eb,U+8463,U+8499,U+85dd,U+86ee,U+8a60,U+8a6e,U+8c79,U+8e87,U+8e8a,U+8f5f,U+9010,U+918d,U+9190,U+965b,U+97fb,U+9ab8,U+9bad,U+9d3b,U+9d5c,U+9dfa,U+9e93}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.66.woff2) format("woff2");unicode-range:U+2020,U+3003,U+3231,U+4e9b,U+4f3d,U+4f47,U+51b6,U+51dc,U+53e1,U+5bc5,U+602f,U+60bc,U+61c9,U+633d,U+637b,U+6492,U+65fa,U+660f,U+66f0,U+6703,U+681e,U+6876,U+6893,U+6912,U+698e,U+6c7d,U+714c,U+7169,U+71d5,U+725f,U+72d7,U+745b,U+74dc,U+75e2,U+7891,U+7897,U+7dcb,U+810a,U+8218,U+8339,U+840e,U+852d,U+8823,U+8a0a,U+9089,U+919c,U+971c,U+9ad9,U+ff4a,U+ff5a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.67.woff2) format("woff2");unicode-range:U+2466,U+2600,U+4eab,U+4fe3,U+4ff5,U+51a5,U+51f0,U+536f,U+53d4,U+53f1,U+54a5,U+559d,U+55e3,U+58fa,U+5962,U+59ea,U+5c16,U+5cef,U+5d16,U+5f10,U+5fd6,U+6190,U+6216,U+634f,U+63bb,U+66d6,U+6756,U+6bc5,U+6e26,U+727d,U+731f,U+76f2,U+7729,U+7a7f,U+7aff,U+7c9f,U+818f,U+8236,U+82b9,U+8338,U+85aa,U+88b4,U+8b33,U+904d,U+93a7,U+96cc,U+96eb,U+9aed,U+9b8e,U+fa11}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.68.woff2) format("woff2");unicode-range:U+251c,U+2523,U+4e14,U+545f,U+54bd,U+553e,U+55dc,U+56da,U+589c,U+5b55,U+5bb5,U+5ce1,U+5df4,U+5eb6,U+5ec9,U+6191,U+62f7,U+6357,U+64a5,U+6591,U+65bc,U+6897,U+6e1a,U+7063,U+711a,U+721b,U+722c,U+75b9,U+75d5,U+75fa,U+7766,U+7aae,U+7b48,U+7b8b,U+7d21,U+7e55,U+7f75,U+842c,U+8910,U+8a63,U+8b39,U+8b5a,U+8cdc,U+8d74,U+907d,U+91e7,U+9306,U+96bc,U+98f4,U+9ac4}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.69.woff2) format("woff2");unicode-range:U+2003,U+2312,U+266c,U+4f86,U+51ea,U+5243,U+5256,U+541f,U+5841,U+59dc,U+5df3,U+601c,U+60e7,U+632b,U+638c,U+64ad,U+6881,U+697c,U+69cd,U+6c50,U+6d2a,U+6fc1,U+7027,U+7058,U+70f9,U+714e,U+7345,U+751a,U+760d,U+764c,U+77db,U+7d79,U+7e8f,U+80ce,U+814e,U+81fc,U+8247,U+8278,U+85a9,U+8a03,U+90ed,U+9784,U+9801,U+984e,U+99b3,U+9bc9,U+9bdb,U+9be8,U+9e78,U+ff6b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.70.woff2) format("woff2");unicode-range:U+266b,U+3006,U+5176,U+5197,U+51a8,U+51c6,U+52f2,U+5614,U+5875,U+5a2f,U+5b54,U+5ce0,U+5dba,U+5deb,U+5e63,U+5f59,U+5fcc,U+6068,U+6367,U+68b6,U+6a0b,U+6b64,U+6e15,U+6eba,U+7272,U+72a0,U+7947,U+7985,U+79e6,U+79e9,U+7a3d,U+7a9f,U+7aaf,U+7b95,U+7f60,U+7f9e,U+7fe0,U+8098,U+80ba,U+8106,U+82d4,U+831c,U+87f9,U+8a1f,U+8acf,U+90c1,U+920d,U+9756,U+fe43,U+ff94}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.71.woff2) format("woff2");unicode-range:U+af,U+2465,U+2517,U+33a1,U+4f10,U+50c5,U+51b4,U+5384,U+5606,U+5bb0,U+5cac,U+5ee3,U+618e,U+61f2,U+62c9,U+66ab,U+66f9,U+6816,U+6960,U+6b3e,U+6f20,U+7078,U+72d0,U+73ed,U+7ad9,U+7b1b,U+7be4,U+7d62,U+7f51,U+80b4,U+80f4,U+8154,U+85fb,U+865c,U+8702,U+895f,U+8aed,U+8b90,U+8ced,U+8fbf,U+91d8,U+9418,U+9583,U+9591,U+9813,U+982c,U+9bd6,U+ff46,U+ff7f,U+ff88}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.72.woff2) format("woff2");unicode-range:U+4e91,U+508d,U+50e7,U+514e,U+51f6,U+5446,U+5504,U+584a,U+59a8,U+59d3,U+5a46,U+5ac9,U+6020,U+60a6,U+6148,U+621a,U+6234,U+64c1,U+6523,U+675c,U+67d1,U+6953,U+6ccc,U+6df5,U+6e13,U+6f06,U+723a,U+7325,U+74e6,U+758e,U+75ab,U+75d9,U+7a40,U+8096,U+82fa,U+8587,U+8594,U+8a6b,U+8ab9,U+8b17,U+8b83,U+937c,U+963b,U+9673,U+96db,U+9ce9,U+9f4b,U+ff67,U+ff82,U+ff93}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.73.woff2) format("woff2");unicode-range:U+221e,U+2514,U+51f9,U+5270,U+5449,U+5824,U+59a5,U+5a29,U+5d07,U+5e16,U+60e3,U+614c,U+6276,U+643e,U+64ab,U+6562,U+6681,U+670b,U+6734,U+67af,U+6a3d,U+6b05,U+6dc0,U+6e4a,U+7259,U+732a,U+7409,U+78a7,U+7a6b,U+8015,U+809b,U+817a,U+830e,U+837b,U+85ab,U+8a23,U+8a93,U+8b00,U+8b19,U+8b21,U+8cbf,U+8fb0,U+901d,U+91b8,U+9320,U+932c,U+9688,U+96f6,U+9df2,U+ff6a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.74.woff2) format("woff2");unicode-range:U+2002,U+2025,U+4f8d,U+51e1,U+51f8,U+5507,U+5598,U+58f1,U+5983,U+59ac,U+5c3c,U+5de7,U+5e7d,U+5eca,U+5f61,U+606d,U+60f9,U+636e,U+64ec,U+67da,U+67ff,U+6813,U+68f2,U+693f,U+6b6a,U+6bbb,U+6ef4,U+7092,U+717d,U+7261,U+73c8,U+7432,U+7483,U+76fe,U+7709,U+78d0,U+81a3,U+81b3,U+82af,U+8305,U+8309,U+8870,U+88fe,U+8cd1,U+8d66,U+906e,U+971e,U+9812,U+ff79,U+ff90}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.75.woff2) format("woff2");unicode-range:U+2464,U+2501,U+2640,U+2642,U+339d,U+4f0e,U+5091,U+50b5,U+5132,U+51cc,U+558b,U+55aa,U+585e,U+5bee,U+5dfe,U+60b6,U+62b9,U+6349,U+6566,U+6590,U+6842,U+689d,U+6a58,U+6c70,U+6ff1,U+7815,U+7881,U+7aaa,U+7bc7,U+7def,U+7fa8,U+8017,U+8036,U+8061,U+821f,U+8429,U+8ce0,U+8e74,U+9019,U+90ca,U+9162,U+932f,U+93ae,U+9644,U+990c,U+9cf3,U+ff56,U+ff6e,U+ff7e,U+ff85}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.76.woff2) format("woff2");unicode-range:U+2266-2267,U+4f2f,U+5208,U+5451,U+546a,U+5589,U+576a,U+5815,U+5a9a,U+5b9b,U+5c3a,U+5efb,U+5faa,U+6109,U+6643,U+6652,U+695a,U+69fd,U+6b86,U+6bb4,U+6daf,U+7089,U+70cf,U+7a00,U+7a4f,U+7b39,U+7d33,U+80e1,U+828b,U+82a6,U+86cd,U+8c8c,U+8cca,U+8df3,U+9077,U+9175,U+91dc,U+925b,U+9262,U+9271,U+92ed,U+9855,U+9905,U+9d28,U+ff3f,U+ff58,U+ff68,U+ff6d,U+ff9c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.77.woff2) format("woff2");unicode-range:U+2207,U+25ef,U+309c,U+4e4f,U+5146,U+51dd,U+5351,U+540a,U+5629,U+5eb5,U+5f04,U+5f13,U+60dc,U+6212,U+63b4,U+642c,U+6627,U+66a6,U+66c7,U+66fd,U+674e,U+6b96,U+6c4e,U+6df3,U+6e67,U+6f84,U+72fc,U+733f,U+7c97,U+7db1,U+7e4d,U+816b,U+82d1,U+84cb,U+854e,U+8607,U+86c7,U+871c,U+8776,U+8a89,U+8fc4,U+91a4,U+9285,U+9685,U+9903,U+9b31,U+9f13,U+ff42,U+ff74,U+ff91}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.78.woff2) format("woff2");unicode-range:U+4e32,U+51db,U+53a8,U+53ea,U+5609,U+5674,U+5a92,U+5e7e,U+6115,U+611a,U+62cc,U+62ed,U+63c9,U+64b9,U+64e6,U+65cb,U+6606,U+6731,U+683d,U+6afb,U+7460,U+771e,U+78ef,U+7b26,U+7b51,U+7cde,U+7d10,U+7d2f,U+7d46,U+80de,U+819c,U+84b2,U+85cd,U+865a,U+8ecc,U+9022,U+90b8,U+9192,U+9675,U+96b7,U+99ff,U+ff44,U+ff55,U+ff6c,U+ff73,U+ff75,U+ff86,U+ff8d,U+ff92,U+ffe3}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.79.woff2) format("woff2");unicode-range:U+25b3,U+30f5,U+4eae,U+4f46,U+4f51,U+5203,U+52ff,U+55a7,U+564c,U+565b,U+57f9,U+5805,U+5b64,U+5e06,U+5f70,U+5f90,U+60e8,U+6182,U+62f3,U+62fe,U+63aa,U+64a4,U+65d7,U+673a,U+6851,U+68cb,U+68df,U+6d1e,U+6e58,U+6e9d,U+77b3,U+7832,U+7c3f,U+7db4,U+7f70,U+80aa,U+80c6,U+8105,U+819d,U+8276,U+8679,U+8986,U+8c9d,U+8fc5,U+916c,U+9665,U+9699,U+96c0,U+9a19,U+ff8b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.80.woff2) format("woff2");unicode-range:U+2463,U+25a1,U+4ef0,U+5076,U+5098,U+51fd,U+5302,U+5448,U+54c9,U+570b,U+583a,U+5893,U+58a8,U+58ee,U+5949,U+5bdb,U+5f26,U+5f81,U+6052,U+6170,U+61c7,U+631f,U+635c,U+664b,U+69fb,U+6f01,U+7070,U+722a,U+745e,U+755c,U+76c6,U+78c1,U+79e4,U+7bb8,U+7d0b,U+81a8,U+82d7,U+8b5c,U+8f14,U+8fb1,U+8fbb,U+9283,U+9298,U+9a30,U+ff03,U+ff50,U+ff59,U+ff7b,U+ff8e-ff8f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.81.woff2) format("woff2");unicode-range:U+2010,U+2502,U+25b6,U+4f3a,U+514b,U+5265,U+52c3,U+5339,U+53ec,U+54c0,U+55b0,U+5854,U+5b8f,U+5cb3,U+5e84,U+60da,U+6247,U+6249,U+628a,U+62cd,U+65ac,U+6838,U+690e,U+6cf0,U+6f02,U+6f2c,U+6f70,U+708a,U+7434,U+75be,U+77ef,U+7c60,U+7c98,U+7d1b,U+7e2b,U+80a5,U+81e3,U+820c,U+8210,U+8475,U+862d,U+8650,U+8997,U+906d,U+91c8,U+9700,U+9727,U+9df9,U+ff3a,U+ff9a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.82.woff2) format("woff2");unicode-range:U+2103,U+5049,U+52b1,U+5320,U+5553,U+572d,U+58c7,U+5b5d,U+5bc2,U+5de3,U+5e61,U+5f80,U+61a9,U+67d0,U+67f4,U+6c88,U+6ca1,U+6ce5,U+6d78,U+6e9c,U+6f54,U+731b,U+73b2,U+74a7,U+74f6,U+75e9,U+7b20,U+7c8b,U+7f72,U+809d,U+8108,U+82b3,U+82bd,U+84b8,U+84c4,U+88c2,U+8ae6,U+8ef8,U+902e,U+9065,U+9326,U+935b,U+938c,U+9676,U+9694,U+96f7,U+9ed9,U+ff48,U+ff4c,U+ff81}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.83.woff2) format("woff2");unicode-range:U+2500,U+3008-3009,U+4ead,U+4f0f,U+4fca,U+53eb,U+543e,U+57a2,U+5cf0,U+5e8f,U+5fe0,U+61b2,U+62d8,U+6442,U+64b2,U+6589,U+659c,U+67f1,U+68c4,U+6cb8,U+6d12,U+6de1,U+6fe1,U+70c8,U+723d,U+73e0,U+7656,U+773a,U+7948,U+7b87,U+7c92,U+7d3a,U+7e1b,U+7e4a,U+819a,U+8358,U+83c5,U+84bc,U+864e,U+8912,U+8c9e,U+8d05,U+92fc,U+9396,U+98fd,U+99d2,U+ff64,U+ff7a,U+ff83}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.84.woff2) format("woff2");unicode-range:U+3014-3015,U+4e3c,U+5036,U+5075,U+533f,U+53e9,U+5531,U+5642,U+5984,U+59e6,U+5a01,U+5b6b,U+5c0b,U+5f25,U+6069,U+60a0,U+614e,U+62b5,U+62d2-62d3,U+6597,U+660c,U+674f,U+67cf,U+6841,U+6905,U+6cf3,U+6d32,U+6d69,U+6f64,U+716e,U+7761,U+7b52,U+7be0,U+7dbf,U+7de9,U+7f36,U+81d3,U+8302,U+8389,U+846c,U+84ee,U+8a69,U+9038,U+9d8f,U+ff47,U+ff4b,U+ff76,U+ff9b}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.85.woff2) format("woff2");unicode-range:U+25c7,U+3007,U+504f,U+507d,U+51a0,U+52a3,U+5410,U+5510,U+559a,U+5782,U+582a,U+5c0a,U+5c3f,U+5c48,U+5f6b,U+6176,U+622f,U+6279,U+62bd,U+62dd,U+65ed,U+67b6,U+6817,U+6850,U+6d6a,U+6deb,U+6ea2,U+6edd,U+6f5c,U+72e9,U+73a9,U+7573,U+76bf,U+7950,U+7956,U+7f8a,U+7ffc,U+80a2,U+80c3,U+83ca,U+8a02,U+8a13,U+8df5,U+9375,U+983b,U+99b4,U+ff4e,U+ff71,U+ff89,U+ff97}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.86.woff2) format("woff2");unicode-range:U+24,U+2022,U+2212,U+221f,U+2665,U+4ecf,U+5100,U+51cd,U+52d8,U+5378,U+53f6,U+574a,U+5982,U+5996,U+5c1a,U+5e1d,U+5f84,U+609f,U+61a7,U+61f8,U+6398,U+63ee,U+6676,U+6691,U+6eb6,U+7126,U+71e5,U+7687,U+7965,U+7d17,U+80a1,U+8107,U+8266,U+85a6,U+8987,U+8ca2,U+8cab,U+8e0a,U+9042,U+95c7,U+9810,U+9867,U+98fc,U+ff52-ff54,U+ff61,U+ff77,U+ff98-ff99}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.87.woff2) format("woff2");unicode-range:U+b0,U+226a,U+2462,U+4e39,U+4fc3,U+4fd7,U+50be,U+50da,U+5200,U+5211,U+54f2,U+5618,U+596a,U+5b22,U+5bb4,U+5d50,U+60a3,U+63fa,U+658e,U+65e8,U+6669,U+6795,U+679d,U+67a0,U+6b3a,U+6e09,U+757f,U+7cd6,U+7dbe,U+7ffb,U+83cc,U+83f1,U+840c,U+845b,U+8846,U+8972,U+8a34,U+8a50,U+8a87,U+8edf,U+8ff0,U+90a6,U+9154,U+95a3,U+9663,U+9686,U+96c7,U+ff3c,U+ff7c,U+ff8a}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.88.woff2) format("woff2");unicode-range:U+25bd,U+4e59,U+4ec1,U+4ff3,U+515a,U+518a,U+525b,U+5375,U+552f,U+57a3,U+5b9c,U+5c3d,U+5e3d,U+5e7b,U+5f0a,U+6094,U+6458,U+654f,U+67f3,U+6b8a,U+6bd2,U+6c37,U+6ce1,U+6e56,U+6e7f,U+6ed1,U+6ede,U+6f0f,U+70ad,U+7267,U+7363,U+786c,U+7a42,U+7db2,U+7f85,U+8178,U+829d,U+8896,U+8c5a,U+8cb0,U+8ce2,U+8ed2,U+9047,U+9177,U+970a,U+9ea6,U+ff1b,U+ff31,U+ff39,U+ff80}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.89.woff2) format("woff2");unicode-range:U+a5,U+4e80,U+4f34,U+4f73,U+4f75,U+511f,U+5192,U+52aa,U+53c8,U+570f,U+57cb,U+596e,U+5d8b,U+5f66,U+5fd9,U+62db,U+62f6,U+6328,U+633f,U+63a7,U+6469,U+6bbf,U+6c41,U+6c57,U+6d44,U+6dbc,U+706f,U+72c2,U+72ed,U+7551,U+75f4,U+7949,U+7e26,U+7fd4,U+8150,U+8af8,U+8b0e,U+8b72,U+8ca7,U+934b,U+9a0e,U+9a12,U+9b42,U+ff41,U+ff43,U+ff45,U+ff49,U+ff4f,U+ff62-ff63}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.90.woff2) format("woff2");unicode-range:U+4e18,U+4fb5,U+5104,U+52c7,U+5353,U+5374,U+53e5,U+587e,U+594f,U+5a20,U+5de1,U+5f18,U+5fcd,U+6291,U+62ab,U+6355,U+6392,U+63da,U+63e1,U+656c,U+6687,U+68b0-68b1,U+68d2,U+68da,U+6b27,U+6cbc,U+7159,U+7344,U+73cd,U+76df,U+790e,U+7cf8,U+8102,U+88c1,U+8aa0,U+8e0f,U+9178,U+92ad,U+9670,U+96c5,U+9cf4,U+9db4,U+ff3e,U+ff6f,U+ff72,U+ff78,U+ff7d,U+ff84,U+ff8c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.91.woff2) format("woff2");unicode-range:U+60,U+2200,U+226b,U+2461,U+517c,U+526f,U+5800,U+5b97,U+5bf8,U+5c01,U+5d29,U+5e4c,U+5e81,U+6065,U+61d0,U+667a,U+6696,U+6843,U+6c99,U+6d99,U+6ec5,U+6f22,U+6f6e,U+6fa4,U+6fef,U+71c3,U+72d9,U+7384,U+78e8,U+7a1a,U+7a32,U+7a3c,U+7adc,U+7ca7,U+7d2b,U+7dad,U+7e4b,U+80a9,U+8170,U+81ed,U+820e,U+8a17,U+8afe,U+90aa,U+914e,U+963f,U+99c4,U+9eba,U+9f3b,U+ff38}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.92.woff2) format("woff2");unicode-range:U+2460,U+4e5f,U+4e7e,U+4ed9,U+501f,U+502b,U+5968,U+5974,U+5ac1,U+5b99,U+5ba3,U+5be7,U+5be9,U+5c64,U+5cb8,U+5ec3,U+5f1f,U+616e,U+6297,U+62e0,U+62ec,U+6368,U+642d,U+65e6,U+6717,U+676f,U+6b04,U+732e,U+7652,U+76ca,U+76d7,U+7802,U+7e70,U+7f6a,U+8133,U+81e8,U+866b,U+878d,U+88f8,U+8a5e,U+8cdb,U+8d08,U+907a,U+90e1,U+96f2,U+9f8d,U+ff35,U+ff37,U+ff40,U+ff9d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.93.woff2) format("woff2");unicode-range:U+21d2,U+25ce,U+300a-300b,U+4e89,U+4e9c,U+4ea1,U+5263,U+53cc,U+5426,U+5869,U+5947,U+598a,U+5999,U+5e55,U+5e72,U+5e79,U+5fae,U+5fb9,U+602a,U+6163,U+624d,U+6749,U+6c5a,U+6cbf,U+6d45,U+6dfb,U+6e7e,U+708e,U+725b,U+7763,U+79c0,U+7bc4,U+7c89,U+7e01,U+7e2e,U+8010,U+8033,U+8c6a,U+8cc3,U+8f1d,U+8f9b,U+8fb2,U+907f,U+90f7,U+9707,U+9818,U+9b3c,U+ff0a,U+ff4d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.94.woff2) format("woff2");unicode-range:U+2015,U+2190,U+4e43,U+5019,U+5247,U+52e7,U+5438,U+54b2,U+55ab,U+57f7,U+5bd2,U+5e8a,U+5ef6,U+6016,U+60b2,U+6162,U+6319,U+6551,U+6607,U+66b4,U+675f,U+67d4,U+6b20,U+6b53,U+6ce3,U+719f,U+75b2,U+770b,U+7720,U+77ac,U+79d2,U+7af9,U+7d05,U+7dca,U+8056,U+80f8,U+81f3,U+8352,U+885d,U+8a70,U+8aa4,U+8cbc,U+900f,U+9084,U+91e3,U+9451,U+96c4,U+99c6,U+9ad4,U+ff70}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.95.woff2) format("woff2");unicode-range:U+2193,U+25b2,U+4e4b,U+516d,U+51c4,U+529f,U+52c9,U+5360,U+5442,U+5857,U+5915,U+59eb,U+5a9b,U+5c3b,U+6012,U+61b6,U+62b1,U+6311,U+6577,U+65e2,U+65ec,U+6613,U+6790,U+6cb9,U+7372,U+76ae,U+7d5e,U+7fcc,U+88ab,U+88d5,U+8caf,U+8ddd,U+8ecd,U+8f38,U+8f9e,U+8feb,U+9063,U+90f5,U+93e1,U+968a,U+968f,U+98fe,U+9ec4,U+ff1d,U+ff27,U+ff2a,U+ff36,U+ff3b,U+ff3d,U+ffe5}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.96.woff2) format("woff2");unicode-range:U+4e03,U+4f38,U+50b7,U+5264,U+5348,U+5371,U+585a,U+58ca,U+5951,U+59b9,U+59d4,U+5b98,U+5f8b,U+6388,U+64cd,U+65e7,U+6803,U+6b6f,U+6d66,U+6e0b,U+6ecb,U+6fc3,U+72ac,U+773c,U+77e2,U+7968,U+7a74,U+7dba,U+7dd1,U+7e3e,U+808c,U+811a,U+8179,U+8239,U+8584,U+8a0e,U+8a72,U+8b66,U+8c46,U+8f29,U+90a3,U+9234,U+96f0,U+9769,U+9774,U+9aa8,U+ff26,U+ff28,U+ff9e-ff9f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.97.woff2) format("woff2");unicode-range:U+7e,U+b4,U+25c6,U+2661,U+4e92,U+4eee,U+4ffa,U+5144,U+5237,U+5287,U+52b4,U+58c1,U+5bff,U+5c04,U+5c06,U+5e95,U+5f31,U+5f93,U+63c3,U+640d,U+6557,U+6614,U+662f,U+67d3,U+690d,U+6bba,U+6e6f,U+72af,U+732b,U+7518,U+7ae0,U+7ae5,U+7af6,U+822a,U+89e6,U+8a3a,U+8a98,U+8cb8,U+8de1,U+8e8d,U+95d8,U+961c,U+96a3,U+96ea,U+9bae,U+ff20,U+ff22,U+ff29,U+ff2b-ff2c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.98.woff2) format("woff2");unicode-range:U+25cb,U+4e71,U+4f59,U+50d5,U+520a,U+5217,U+5230,U+523a-523b,U+541b,U+5439,U+5747,U+59c9,U+5bdf,U+5c31,U+5de8,U+5e7c,U+5f69,U+6050,U+60d1,U+63cf,U+663c,U+67c4,U+6885,U+6c38,U+6d6e,U+6db2,U+6df7,U+6e2c,U+6f5f,U+7532,U+76e3-76e4,U+7701,U+793c,U+79f0,U+7a93,U+7d00,U+7de0,U+7e54,U+8328,U+8840,U+969c,U+96e8,U+9811,U+9aea,U+9b5a,U+ff24,U+ff2e,U+ff57}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.99.woff2) format("woff2");unicode-range:U+2191,U+505c,U+52e4,U+5305,U+535a,U+56e0,U+59bb,U+5acc,U+5b09,U+5b87,U+5c90,U+5df1,U+5e2d,U+5e33,U+5f3e,U+6298,U+6383,U+653b,U+6697,U+6804,U+6a39,U+6cca,U+6e90,U+6f2b,U+702c,U+7206,U+7236,U+7559,U+7565,U+7591,U+75c7,U+75db,U+7b4b,U+7bb1,U+7d99,U+7fbd,U+8131,U+885b,U+8b1d,U+8ff7,U+9003,U+9045,U+96a0,U+9732,U+990a,U+99d0,U+9e97,U+9f62,U+ff25,U+ff2d}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.100.woff2) format("woff2");unicode-range:U+4e08,U+4f9d,U+5012,U+514d,U+51b7,U+5275,U+53ca,U+53f8,U+5584,U+57fc,U+5b9d,U+5bfa,U+5c3e,U+5f01,U+5fb4,U+5fd7,U+606f,U+62e1,U+6563,U+6674,U+6cb3,U+6d3e,U+6d74,U+6e1b,U+6e2f,U+718a,U+7247,U+79d8,U+7d14,U+7d66,U+7d71,U+7df4,U+7e41,U+80cc,U+8155,U+83d3,U+8a95,U+8ab2,U+8ad6,U+8ca1,U+9000,U+9006,U+9678,U+97d3,U+9808,U+98ef,U+9a5a,U+9b45,U+ff23,U+ff30}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.101.woff2) format("woff2");unicode-range:U+25bc,U+3012,U+4ef2,U+4f0a,U+516b,U+5373,U+539a,U+53b3,U+559c,U+56f0,U+5727,U+5742,U+5965,U+59ff,U+5bc6,U+5dfb,U+5e45,U+5ead,U+5fb3,U+6211,U+6253,U+639b,U+63a8,U+6545,U+6575,U+6628,U+672d,U+68a8,U+6bdb,U+6d25,U+707d,U+767e,U+7834,U+7b46,U+7bc9,U+8074,U+82e6,U+8349,U+8a2a,U+8d70,U+8da3,U+8fce,U+91cc,U+967d,U+97ff,U+9996,U+ff1c,U+ff2f,U+ff32,U+ff34}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.102.woff2) format("woff2");unicode-range:U+3d,U+5e,U+25cf,U+4e0e,U+4e5d,U+4e73,U+4e94,U+4f3c,U+5009,U+5145,U+51ac,U+5238,U+524a,U+53f3,U+547c,U+5802,U+5922,U+5a66,U+5c0e,U+5de6,U+5fd8,U+5feb,U+6797,U+685c,U+6b7b,U+6c5f-6c60,U+6cc9,U+6ce2,U+6d17,U+6e21,U+7167,U+7642,U+76db,U+8001,U+821e,U+8857,U+89d2,U+8b1b,U+8b70,U+8cb4,U+8cde,U+8f03,U+8f2a,U+968e,U+9b54,U+9e7f,U+9ebb,U+ff05,U+ff33}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.103.woff2) format("woff2");unicode-range:U+500d,U+5074,U+50cd,U+5175,U+52e2,U+5352,U+5354,U+53f2,U+5409,U+56fa,U+5a18,U+5b88,U+5bdd,U+5ca9,U+5f92,U+5fa9,U+60a9,U+623f,U+6483,U+653f,U+666f,U+66ae,U+66f2,U+6a21,U+6b66,U+6bcd,U+6d5c,U+796d,U+7a4d,U+7aef,U+7b56,U+7b97,U+7c4d,U+7e04,U+7fa9,U+8377,U+83dc,U+83ef,U+8535,U+8863,U+88cf,U+88dc,U+8907,U+8acb,U+90ce,U+91dd,U+ff0b,U+ff0d,U+ff19,U+ff65}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.104.woff2) format("woff2");unicode-range:U+4e01,U+4e21,U+4e38,U+52a9,U+547d,U+592e,U+5931,U+5b63,U+5c40,U+5dde,U+5e78,U+5efa,U+5fa1,U+604b,U+6075,U+62c5,U+632f,U+6a19,U+6c0f,U+6c11,U+6c96,U+6e05,U+70ba,U+71b1,U+7387,U+7403,U+75c5,U+77ed,U+795d,U+7b54,U+7cbe,U+7d19,U+7fa4,U+8089,U+81f4,U+8208,U+8336,U+8457,U+8a33,U+8c4a,U+8ca0,U+8ca8,U+8cc0,U+9014,U+964d,U+9803,U+983c,U+98db,U+ff17,U+ff21}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.105.woff2) format("woff2");unicode-range:U+25,U+25a0,U+4e26,U+4f4e,U+5341,U+56f2,U+5bbf,U+5c45,U+5c55,U+5c5e,U+5dee,U+5e9c,U+5f7c,U+6255,U+627f,U+62bc,U+65cf,U+661f,U+666e,U+66dc,U+67fb,U+6975,U+6a4b,U+6b32,U+6df1,U+6e29,U+6fc0,U+738b,U+7686,U+7a76,U+7a81,U+7c73,U+7d75,U+7dd2,U+82e5,U+82f1,U+85ac,U+888b,U+899a,U+8a31,U+8a8c,U+8ab0,U+8b58,U+904a,U+9060,U+9280,U+95b2,U+984d,U+9ce5,U+ff18}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.106.woff2) format("woff2");unicode-range:U+30f6,U+50ac,U+5178,U+51e6,U+5224,U+52dd,U+5883,U+5897,U+590f,U+5a5a,U+5bb3,U+5c65,U+5e03,U+5e2b,U+5e30,U+5eb7,U+6271,U+63f4,U+64ae,U+6574,U+672b,U+679a,U+6a29-6a2a,U+6ca2,U+6cc1,U+6d0b,U+713c,U+74b0,U+7981,U+7a0b,U+7bc0,U+7d1a,U+7d61,U+7fd2,U+822c,U+8996,U+89aa,U+8cac,U+8cbb,U+8d77,U+8def,U+9020,U+9152,U+9244,U+9662,U+967a,U+96e3,U+9759,U+ff16}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.107.woff2) format("woff2");unicode-range:U+23,U+3c,U+2192,U+4e45,U+4efb,U+4f50,U+4f8b,U+4fc2,U+5024,U+5150,U+5272,U+5370,U+53bb,U+542b,U+56db,U+56e3,U+57ce,U+5bc4,U+5bcc,U+5f71,U+60aa,U+6238,U+6280,U+629c,U+6539,U+66ff,U+670d,U+677e-677f,U+6839,U+69cb,U+6b4c,U+6bb5,U+6e96,U+6f14,U+72ec,U+7389,U+7814,U+79cb,U+79d1,U+79fb,U+7a0e,U+7d0d,U+85e4,U+8d64,U+9632,U+96e2,U+9805,U+99ac,U+ff1e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.108.woff2) format("woff2");unicode-range:U+2605-2606,U+301c,U+4e57,U+4fee,U+5065,U+52df,U+533b,U+5357,U+57df,U+58eb,U+58f0,U+591c,U+592a-592b,U+5948,U+5b85,U+5d0e,U+5ea7,U+5ff5,U+6025,U+63a1,U+63a5,U+63db,U+643a,U+65bd,U+671d,U+68ee,U+6982,U+6b73,U+6bd4,U+6d88,U+7570,U+7b11,U+7d76,U+8077,U+8217,U+8c37,U+8c61,U+8cc7,U+8d85,U+901f,U+962a,U+9802,U+9806,U+9854,U+98f2,U+9928,U+99c5,U+9ed2}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.109.woff2) format("woff2");unicode-range:U+266a,U+4f11,U+533a,U+5343,U+534a,U+53cd,U+5404,U+56f3,U+5b57-5b58,U+5bae,U+5c4a,U+5e0c,U+5e2f,U+5eab,U+5f35,U+5f79,U+614b,U+6226,U+629e,U+65c5,U+6625,U+6751,U+6821,U+6b69,U+6b8b,U+6bce,U+6c42,U+706b,U+7c21,U+7cfb,U+805e,U+80b2,U+82b8,U+843d,U+8853,U+88c5,U+8a3c,U+8a66,U+8d8a,U+8fba,U+9069,U+91cf,U+9752,U+975e,U+9999,U+ff0f-ff10,U+ff14-ff15}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.110.woff2) format("woff2");unicode-range:U+40,U+4e86,U+4e95,U+4f01,U+4f1d,U+4fbf,U+5099,U+5171,U+5177,U+53cb,U+53ce,U+53f0,U+5668,U+5712,U+5ba4,U+5ca1,U+5f85,U+60f3,U+653e,U+65ad,U+65e9,U+6620,U+6750,U+6761,U+6b62,U+6b74,U+6e08,U+6e80,U+7248,U+7531,U+7533,U+753a,U+77f3,U+798f,U+7f6e,U+8449,U+88fd,U+89b3,U+8a55,U+8ac7,U+8b77,U+8db3,U+8efd,U+8fd4,U+9031-9032,U+9580,U+9589,U+96d1,U+985e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.111.woff2) format("woff2");unicode-range:U+2b,U+d7,U+300e-300f,U+4e07,U+4e8c,U+512a,U+5149,U+518d,U+5236,U+52b9,U+52d9,U+5468,U+578b,U+57fa,U+5b8c,U+5ba2,U+5c02,U+5de5,U+5f37,U+5f62,U+623b,U+63d0,U+652f,U+672a,U+6848,U+6d41,U+7136,U+7537,U+754c,U+76f4,U+79c1,U+7ba1,U+7d44,U+7d4c,U+7dcf,U+7dda,U+7de8,U+82b1,U+897f,U+8ca9,U+8cfc,U+904e,U+9664,U+982d,U+9858,U+98a8,U+9a13,U+ff13,U+ff5c}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.112.woff2) format("woff2");unicode-range:U+4e16,U+4e3b,U+4ea4,U+4ee4,U+4f4d,U+4f4f,U+4f55,U+4f9b,U+5317,U+5358,U+53c2,U+53e4,U+548c,U+571f,U+59cb,U+5cf6,U+5e38,U+63a2,U+63b2,U+6559,U+662d,U+679c,U+6c7a,U+72b6,U+7523,U+767d,U+770c,U+7a2e,U+7a3f,U+7a7a,U+7b2c,U+7b49,U+7d20,U+7d42,U+8003,U+8272,U+8a08,U+8aac,U+8cb7,U+8eab,U+8ee2,U+9054-9055,U+90fd,U+914d,U+91cd,U+969b,U+97f3,U+984c,U+ff06}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.113.woff2) format("woff2");unicode-range:U+26,U+5f,U+2026,U+203b,U+4e09,U+4eac,U+4ed5,U+4fa1,U+5143,U+5199,U+5207,U+539f,U+53e3,U+53f7,U+5411,U+5473,U+5546,U+55b6,U+5929,U+597d,U+5bb9,U+5c11,U+5c4b,U+5ddd,U+5f97,U+5fc5,U+6295,U+6301,U+6307,U+671b,U+76f8,U+78ba,U+795e,U+7d30,U+7d39,U+7d9a,U+89e3,U+8a00,U+8a73,U+8a8d,U+8a9e,U+8aad,U+8abf,U+8cea,U+8eca,U+8ffd,U+904b,U+9650,U+ff11-ff12}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.114.woff2) format("woff2");unicode-range:U+3e,U+3005,U+4e0d,U+4e88,U+4ecb,U+4ee3,U+4ef6,U+4fdd,U+4fe1,U+500b,U+50cf,U+5186,U+5316,U+53d7,U+540c,U+544a,U+54e1,U+5728,U+58f2,U+5973,U+5b89,U+5c71,U+5e02,U+5e97,U+5f15,U+5fc3,U+5fdc,U+601d,U+611b,U+611f,U+671f,U+6728,U+6765,U+683c,U+6b21,U+6ce8,U+6d3b,U+6d77,U+7530,U+7740,U+7acb,U+7d50,U+826f,U+8f09,U+8fbc,U+9001,U+9053,U+91ce,U+9762,U+98df}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.115.woff2) format("woff2");unicode-range:U+7c,U+3080,U+4ee5,U+5148,U+516c,U+521d,U+5225,U+529b,U+52a0,U+53ef,U+56de,U+56fd,U+5909,U+591a,U+5b66,U+5b9f,U+5bb6,U+5bfe,U+5e73,U+5e83,U+5ea6,U+5f53,U+6027,U+610f,U+6210,U+6240,U+660e,U+66f4,U+66f8,U+6709,U+6771,U+697d,U+69d8,U+6a5f,U+6c34,U+6cbb,U+73fe,U+756a,U+7684,U+771f,U+793a,U+7f8e,U+898f,U+8a2d,U+8a71,U+8fd1,U+9078,U+9577,U+96fb,U+ff5e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.116.woff2) format("woff2");unicode-range:U+a9,U+3010-3011,U+30e2,U+4e0b,U+4eca,U+4ed6,U+4ed8,U+4f53,U+4f5c,U+4f7f,U+53d6,U+540d,U+54c1,U+5730,U+5916,U+5b50,U+5c0f,U+5f8c,U+624b,U+6570,U+6587,U+6599,U+691c,U+696d,U+6cd5,U+7269,U+7279,U+7406,U+767a-767b,U+77e5,U+7d04,U+7d22,U+8005,U+80fd,U+81ea,U+8868,U+8981,U+89a7,U+901a,U+9023,U+90e8,U+91d1,U+9332,U+958b,U+96c6,U+9ad8,U+ff1a,U+ff1f}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.117.woff2) format("woff2");unicode-range:U+4e,U+a0,U+3000,U+300c-300d,U+4e00,U+4e0a,U+4e2d,U+4e8b,U+4eba,U+4f1a,U+5165,U+5168,U+5185,U+51fa,U+5206,U+5229,U+524d,U+52d5,U+5408,U+554f,U+5831,U+5834,U+5927,U+5b9a,U+5e74,U+5f0f,U+60c5,U+65b0,U+65b9,U+6642,U+6700,U+672c,U+682a,U+6b63,U+6c17,U+7121,U+751f,U+7528,U+753b,U+76ee,U+793e,U+884c,U+898b,U+8a18,U+9593,U+95a2,U+ff01,U+ff08-ff09}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.118.woff2) format("woff2");unicode-range:U+21-22,U+27-2a,U+2c-3b,U+3f,U+41-4d,U+4f-5d,U+61-7b,U+7d,U+ab,U+ae,U+b2-b3,U+b7,U+bb,U+c9,U+cd,U+d6,U+d8,U+dc,U+e0-e5,U+e7-ed,U+ef,U+f1-f4,U+f6,U+f8,U+fa,U+fc-fd,U+103,U+14d,U+1b0,U+300-301,U+1ebf,U+1ec7,U+2013-2014,U+201c-201d,U+2039-203a,U+203c,U+2048-2049,U+2113,U+2122,U+65e5,U+6708,U+70b9}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6YnQCWXzO7W5-p9wTrkzI9ywX1Ff4zgPYcAW70.119.woff2) format("woff2");unicode-range:U+20,U+2027,U+3001-3002,U+3041-307f,U+3081-308f,U+3091-3093,U+3099-309a,U+309d-309e,U+30a1-30e1,U+30e3-30ed,U+30ef-30f0,U+30f2-30f4,U+30fb-30fe,U+ff0c,U+ff0e}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6omwqRfTHxT624.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6okQqRfTHxT624.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/kiwimaru/v19/R70YjykGkuuDep-hRg6onwqRfTHxTw.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/sniglet/v17/cIf9MaFLtkE3UjaJ9CChYUsEkIpdQQ.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/sniglet/v17/cIf9MaFLtkE3UjaJ9C6hYUsEkIo.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.i-eos-icons\:three-dots-loading,[i-eos-icons\:three-dots-loading=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='18' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.67' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.33' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='0' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:cloudflare-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437' fill='%23F38020'/%3E%3Cpath d='M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777' fill='%23FCAD32'/%3E%3C/g%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:deepseek-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cpath d='M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z' fill='%234D6BFE'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:fireworks{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:mistral-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cpath d='M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z' fill='gold'/%3E%3Cpath d='M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z' fill='%23FFAF00'/%3E%3Cpath d='M3.428 10.258h17.144v3.428H3.428v-3.428z' fill='%23FF8205'/%3E%3Cpath d='M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z' fill='%23FA500F'/%3E%3Cpath d='M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z' fill='%23E10500'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:moonshot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:novita-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cpath clip-rule='evenodd' d='M9.167 4.17v5.665L0 19.003h9.167v-5.666l5.666 5.666H24L9.167 4.17z' fill='%2323D57C' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:ollama{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:openai,[i-lobe-icons\:openai=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:openrouter{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:together-color{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cg%3E%3Cpath d='M17.385 11.23a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm0 10.77a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm-10.77 0a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23z' opacity='.2'/%3E%3Ccircle cx='6.615' cy='6.615' fill='%230F6FFF' r='4.615'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lobe-icons\:vllm-color{background:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cpath d='M0 4.973h9.324V23L0 4.973z' fill='%23FDB515'/%3E%3Cpath d='M13.986 4.351L22.378 0l-6.216 23H9.324l4.662-18.649z' fill='%2330A2FF'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.i-lobe-icons\:xai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:blocks,[i-lucide\:blocks=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='7' height='7' x='14' y='3' rx='1'/%3E%3Cpath d='M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:book{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:book-copy{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M2 16V4a2 2 0 0 1 2-2h11'/%3E%3Cpath d='M22 18H11a2 2 0 1 0 0 4h10.5a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5H11a2 2 0 0 0-2 2v12m-4-6H4a2 2 0 1 0 0 4h1'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:brain,[i-lucide\:brain=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 5a3 3 0 1 0-5.997.125a4 4 0 0 0-2.526 5.77a4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z'/%3E%3Cpath d='M12 5a3 3 0 1 1 5.997.125a4 4 0 0 1 2.526 5.77a4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z'/%3E%3Cpath d='M15 13a4.5 4.5 0 0 1-3-4a4.5 4.5 0 0 1-3 4m8.599-6.5a3 3 0 0 0 .399-1.375m-11.995 0A3 3 0 0 0 6.401 6.5m-2.924 4.396a4 4 0 0 1 .585-.396m15.876 0a4 4 0 0 1 .585.396M6 18a4 4 0 0 1-1.967-.516m15.934 0A4 4 0 0 1 18 18'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:check,[i-lucide\:check=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:cog,[i-lucide\:cog=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 20a8 8 0 1 0 0-16a8 8 0 0 0 0 16'/%3E%3Cpath d='M12 14a2 2 0 1 0 0-4a2 2 0 0 0 0 4m0-12v2m0 18v-2m5 .66l-1-1.73m-5-8.66L7 3.34M20.66 17l-1.73-1M3.34 7l1.73 1M14 12h8M2 12h2m16.66-5l-1.73 1M3.34 17l1.73-1M17 3.34l-1 1.73m-5 8.66l-4 6.93'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:ear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0'/%3E%3Cpath d='M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:eye{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:ghost,[i-lucide\:ghost=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 10h.01M15 10h.01M12 2a8 8 0 0 0-8 8v12l3-3l2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:mic{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2m7 9v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:paintbrush,[i-lucide\:paintbrush=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14.622 17.897l-10.68-2.913M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0zM9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:person-standing,[i-lucide\:person-standing=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='5' r='1'/%3E%3Cpath d='m9 20l3-6l3 6M6 8l6 2l6-2m-6 2v4'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-lucide\:volume-2,[i-lucide\:volume-2=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298zM16 9a5 5 0 0 1 0 6m3.364 3.364a9 9 0 0 0 0-12.728'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-simple-icons\:discord{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-simple-icons\:elevenlabs{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.604 0v24h4.931V0zm9.86 0v24h4.933V0z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:add-circle-line-duotone,[i-solar\:add-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:alt-arrow-down-bold-duotone,[i-solar\:alt-arrow-down-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m8.303 12.404l3.327 3.431c.213.22.527.22.74 0l6.43-6.63C19.201 8.79 18.958 8 18.43 8h-5.723z'/%3E%3Cpath fill='currentColor' d='M11.293 8H5.57c-.528 0-.771.79-.37 1.205l2.406 2.481z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:alt-arrow-left-bold-duotone,[i-solar\:alt-arrow-left-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M11.596 8.303L8.165 11.63a.5.5 0 0 0 0 .74l6.63 6.43c.414.401 1.205.158 1.205-.37v-5.723z'/%3E%3Cpath fill='currentColor' d='M16 11.293V5.57c0-.528-.791-.771-1.205-.37l-2.482 2.406z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:alt-arrow-left-line-duotone,[i-solar\:alt-arrow-left-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 5l-6 7l6 7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:alt-arrow-right-bold-duotone,[i-solar\:alt-arrow-right-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m12.404 8.303l3.431 3.327c.22.213.22.527 0 .74l-6.63 6.43C8.79 19.201 8 18.958 8 18.43v-5.723z'/%3E%3Cpath fill='currentColor' d='M8 11.293V5.57c0-.528.79-.771 1.205-.37l2.481 2.406z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:arrow-right-line-duotone,[i-solar\:arrow-right-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Cpath fill='currentColor' d='M4 11.25a.75.75 0 0 0 0 1.5zm0 1.5h16v-1.5H4z' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m14 6l6 6l-6 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:bug-bold-duotone,[i-solar\:bug-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M19 11.938V15a7 7 0 0 1-6.25 6.96V15a.75.75 0 0 0-1.5 0v6.96A7 7 0 0 1 5 15v-3.062A3.94 3.94 0 0 1 8.938 8h6.124A3.94 3.94 0 0 1 19 11.938' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19 14.75v-1.5h3a.75.75 0 0 1 0 1.5zm-1.504 4.586c.31-.393.58-.82.801-1.276l2.538 1.27a.75.75 0 1 1-.67 1.34zM5.703 18.06q.333.684.801 1.276l-2.669 1.335a.75.75 0 0 1-.67-1.342zM5 13.25H2a.75.75 0 0 0 0 1.5h3zm12.354-4.515l2.81-1.406a.75.75 0 1 1 .671 1.341L18.42 9.88a4 4 0 0 0-1.065-1.144M6.647 8.735c-.427.306-.79.695-1.067 1.144L3.165 8.67a.75.75 0 0 1 .67-1.341zM16.5 8.27V7.5a4.5 4.5 0 1 0-9 0v.77A3.9 3.9 0 0 1 8.938 8h6.124c.508 0 .993.096 1.438.27'/%3E%3Cpath fill='currentColor' d='M6.376 1.584a.75.75 0 0 0 .208 1.04l2.36 1.573a4.5 4.5 0 0 1 1.387-.877L7.416 1.376a.75.75 0 0 0-1.04.208m8.68 2.613a4.5 4.5 0 0 0-1.387-.877l2.915-1.944a.75.75 0 1 1 .832 1.248z' opacity='.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 14.25a.75.75 0 0 1 .75.75v7h-1.5v-7a.75.75 0 0 1 .75-.75' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:check-circle-line-duotone,[i-solar\:check-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m8.5 12.5l2 2l5-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:close-circle-line-duotone,[i-solar\:close-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='m14.5 9.5l-5 5m0-5l5 5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:danger-triangle-bold-duotone,[i-solar\:danger-triangle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 3c-2.31 0-3.77 2.587-6.688 7.762l-.364.644c-2.425 4.3-3.638 6.45-2.542 8.022S6.214 21 11.636 21h.728c5.422 0 8.134 0 9.23-1.572s-.117-3.722-2.542-8.022l-.364-.645C15.77 5.587 14.311 3 12 3' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 7.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V8a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:dialog-2-bold-duotone,[i-solar\:dialog-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m10.404 22.48l.275-.465c.44-.745.66-1.117 1.012-1.325c.351-.207.81-.222 1.725-.252c.859-.027 1.436-.102 1.93-.306a4.24 4.24 0 0 0 2.295-2.296c.323-.779.323-1.767.323-3.743v-.848c0-2.777 0-4.165-.625-5.185c-.35-.57-.83-1.05-1.4-1.4c-1.02-.625-2.408-.625-5.185-.625H8.21c-2.777 0-4.165 0-5.185.625c-.57.35-1.05.83-1.4 1.4C1 9.08 1 10.468 1 13.245v.848c0 1.976 0 2.964.323 3.744a4.24 4.24 0 0 0 2.295 2.295c.494.204 1.07.28 1.93.306c.916.03 1.374.045 1.725.252c.35.208.571.58 1.012 1.325l.275.465c.41.692 1.434.692 1.844 0m2.789-7.963a1.06 1.06 0 1 0 0-2.12a1.06 1.06 0 0 0 0 2.12m-2.65-1.06a1.06 1.06 0 1 1-2.121 0a1.06 1.06 0 0 1 2.12 0m-4.772 1.06a1.06 1.06 0 1 0 0-2.12a1.06 1.06 0 0 0 0 2.12' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M15.486 1c1.267 0 2.274 0 3.082.077c.829.079 1.53.244 2.153.626a4.8 4.8 0 0 1 1.575 1.575c.383.624.548 1.325.627 2.153c.076.808.076 1.816.076 3.082v.866c0 .901 0 1.619-.04 2.2c-.04.595-.125 1.106-.323 1.584a4.77 4.77 0 0 1-2.67 2.617q-.21.082-.368.135h-1.65c.016-.499.016-1.093.016-1.822v-.848c0-2.777 0-4.165-.625-5.185c-.35-.57-.83-1.05-1.4-1.4c-1.02-.625-2.408-.625-5.185-.625H8.21c-.986 0-1.796 0-2.478.028v-1.65q.05-.17.13-.396q.133-.389.346-.739a4.8 4.8 0 0 1 1.576-1.575c.624-.382 1.324-.547 2.153-.626C10.745 1 11.752 1 13.019 1z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:face-scan-circle-bold-duotone,[i-solar\:face-scan-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.801 2.57a.71.71 0 0 1-.555.838a8.78 8.78 0 0 0-6.838 6.838a.71.71 0 1 1-1.394-.283a10.2 10.2 0 0 1 7.949-7.949a.71.71 0 0 1 .838.556M2.57 13.199a.71.71 0 0 1 .838.555a8.78 8.78 0 0 0 6.838 6.838a.71.71 0 1 1-.283 1.394a10.2 10.2 0 0 1-7.948-7.949a.71.71 0 0 1 .555-.838M13.199 2.57a.71.71 0 0 1 .838-.556a10.2 10.2 0 0 1 7.949 7.949a.711.711 0 0 1-1.394.283a8.78 8.78 0 0 0-6.838-6.838a.71.71 0 0 1-.555-.838m8.231 10.629a.71.71 0 0 1 .556.838a10.2 10.2 0 0 1-7.949 7.949a.711.711 0 0 1-.283-1.394a8.78 8.78 0 0 0 6.838-6.838a.71.71 0 0 1 .838-.555' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M12 19.583a7.583 7.583 0 1 0 0-15.166a7.583 7.583 0 0 0 0 15.166' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.94 14.539a.71.71 0 0 1 .995-.148c.59.437 1.3.69 2.065.69a3.45 3.45 0 0 0 2.065-.69a.71.71 0 1 1 .847 1.142a4.87 4.87 0 0 1-2.912.97a4.87 4.87 0 0 1-2.911-.97a.71.71 0 0 1-.148-.994m5.547-2.895c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244m-4.976 0c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:info-circle-line-duotone,[i-solar\:info-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='M12 17v-6'/%3E%3Ccircle cx='1' cy='1' r='1' fill='currentColor' transform='matrix(1 0 0 -1 11 9)'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:magic-stick-3-bold-duotone,[i-solar\:magic-stick-3-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51c.012-.014.555.503.568.49l4-4c.013-.013-.504-.556-.49-.568L7.922 3.845a2.883 2.883 0 0 0-4.077 0m1.288 11.462a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19.967 9.13a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273z' opacity='.2'/%3E%3Cpath fill='currentColor' d='M16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274z' opacity='.7'/%3E%3Cpath fill='currentColor' d='M10.568 6.49c-.012.014-.555-.503-.568-.49l-4 4c-.013.013.504.556.49.568l9.588 9.587a2.883 2.883 0 1 0 4.078-4.077z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:magnifer-line-duotone,[i-solar\:magnifer-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cdefs%3E%3Cmask id='solarMagniferLineDuotone0'%3E%3Cg fill='none' stroke-width='1.5'%3E%3Ccircle cx='11.5' cy='11.5' r='9.5' stroke='gray'/%3E%3Cpath stroke='%23fff' stroke-linecap='round' d='M18.5 18.5L22 22'/%3E%3C/g%3E%3C/mask%3E%3C/defs%3E%3Cpath fill='currentColor' d='M0 0h24v24H0z' mask='url(%23solarMagniferLineDuotone0)'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:microphone-2-bold-duotone,[i-solar\:microphone-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M4 9a.75.75 0 0 1 .75.75v1a7.25 7.25 0 1 0 14.5 0v-1a.75.75 0 0 1 1.5 0v1a8.75 8.75 0 0 1-8 8.718v2.282a.75.75 0 0 1-1.5 0v-2.282a8.75 8.75 0 0 1-8-8.718v-1A.75.75 0 0 1 4 9' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M9.75 7.75A.75.75 0 0 0 9 7H6.298a5.751 5.751 0 0 1 11.404 0H13.5a.75.75 0 0 0 0 1.5h4.25V10H13.5a.75.75 0 0 0 0 1.5h4.201a5.751 5.751 0 0 1-11.403 0H9A.75.75 0 0 0 9 10H6.25V8.5H9a.75.75 0 0 0 .75-.75' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.75 10.75c0 .414.336.75.75.75h4.201l.049-1.5H13.5a.75.75 0 0 0-.75.75m0-3c0 .414.336.75.75.75h4.25L17.701 7H13.5a.75.75 0 0 0-.75.75m-3 0A.75.75 0 0 0 9 7H6.298L6.25 8.5H9a.75.75 0 0 0 .75-.75m0 3A.75.75 0 0 0 9 10H6.25l.048 1.5H9a.75.75 0 0 0 .75-.75'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:moon-stars-bold-duotone,[i-solar\:moon-stars-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19.9 2.307a.483.483 0 0 0-.9 0l-.43 1.095a.48.48 0 0 1-.272.274l-1.091.432a.486.486 0 0 0 0 .903l1.091.432a.48.48 0 0 1 .272.273L19 6.81c.162.41.74.41.9 0l.43-1.095a.48.48 0 0 1 .273-.273l1.091-.432a.486.486 0 0 0 0-.903l-1.091-.432a.48.48 0 0 1-.273-.274zM16.033 8.13a.483.483 0 0 0-.9 0l-.157.399a.48.48 0 0 1-.272.273l-.398.158a.486.486 0 0 0 0 .903l.398.157c.125.05.223.148.272.274l.157.399c.161.41.739.41.9 0l.157-.4a.48.48 0 0 1 .272-.273l.398-.157a.486.486 0 0 0 0-.903l-.398-.158a.48.48 0 0 1-.272-.273z'/%3E%3Cpath fill='currentColor' d='M12 22c5.523 0 10-4.477 10-10c0-.463-.694-.54-.933-.143a6.5 6.5 0 1 1-8.924-8.924C12.54 2.693 12.463 2 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:pallete-2-bold-duotone,[i-solar\:pallete-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10.847 21.934C5.867 21.362 2 17.133 2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.157-3.283 4.733-6.086 4.37c-1.618-.209-3.075-.397-3.652.518c-.395.626.032 1.406.555 1.929a1.673 1.673 0 0 1 0 2.366c-.523.523-1.235.836-1.97.751' opacity='.5'/%3E%3Cpath fill='currentColor' d='M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0M6.5 13a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m11 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m-3-4.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:people-nearby-bold-duotone,[i-solar\:people-nearby-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19.717 20.362C21.143 19.585 22 18.587 22 17.5c0-1.152-.963-2.204-2.546-3C17.623 13.58 14.962 13 12 13s-5.623.58-7.454 1.5C2.963 15.296 2 16.348 2 17.5s.963 2.204 2.546 3C6.377 21.42 9.038 22 12 22c3.107 0 5.882-.637 7.717-1.638' opacity='.6'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M9.25 4a2.75 2.75 0 1 1 5.5 0a2.75 2.75 0 0 1-5.5 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m8.223 11.574l-2.175-.725a1.532 1.532 0 0 1 .805-2.952l1.898.407l.21.044a15 15 0 0 0 6.288-.044l1.897-.407a1.532 1.532 0 0 1 .806 2.952l-2.175.725c-.263.088-.394.132-.493.193a1 1 0 0 0-.466.986c.016.115.066.244.165.503l1.247 3.242a1.473 1.473 0 0 1-2.654 1.26L12 15l-1.576 2.757a1.473 1.473 0 0 1-2.654-1.26l1.247-3.241c.1-.259.149-.388.165-.503a1 1 0 0 0-.466-.986c-.099-.061-.23-.105-.493-.193'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:running-2-line-duotone,[i-solar\:running-2-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='18.5' cy='4.5' r='2.5' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='m9 17l-1 1.2c-.738.886-1.107 1.328-1.61 1.564S5.31 20 4.157 20H3'/%3E%3Cpath fill='currentColor' d='M13.65 22a.75.75 0 0 0 1.5 0zm-1.085-5.754l.453-.598zm1.184 1.015l.587-.466zm.557 1.12l.727-.186zm-.802-6.826a.75.75 0 0 0-1.009-1.11zm-2.652 1.61l.703.26zm.07 1.555l-.677.323zm2.728 5.219v2.06h1.5v-2.06zm-1.538-3.095c.663.502.887.679 1.05.884l1.174-.934c-.308-.387-.717-.69-1.319-1.146zm3.038 3.095c0-.755.006-1.264-.117-1.744l-1.453.373c.065.254.07.538.07 1.37zm-1.988-2.211c.197.247.339.534.417.84l1.454-.373a3.75 3.75 0 0 0-.697-1.4zm-.667-7.283c-.42.381-.945.836-1.354 1.224c-.21.198-.41.398-.573.586c-.149.172-.327.4-.42.649l1.407.521c-.007.021.014-.035.146-.187c.116-.134.276-.295.471-.48c.4-.38.865-.778 1.332-1.203zm.523 5.203c-.488-.37-.818-.62-1.056-.832c-.233-.208-.32-.33-.363-.418l-1.354.645c.167.35.423.63.72.894c.292.26.679.552 1.147.907zm-2.87-2.744a2.75 2.75 0 0 0 .097 2.139l1.354-.645a1.25 1.25 0 0 1-.044-.973z' opacity='.5'/%3E%3Cpath fill='currentColor' d='m5.436 8.82l-.37-.652zm-1.807.164a.75.75 0 1 0 .742 1.304zm9.778-1.627l-.286.693zm-2.96-.715l-.055-.748zM21 12.75a.75.75 0 1 0 0-1.5zm-5.232-3.213l-.67.335zM5.065 8.168l-1.436.816l.742 1.304l1.435-.816zm8.627-1.505c-1.344-.553-2.08-.857-3.3-.769l.11 1.496c.823-.06 1.255.099 2.62.66zm-7.886 2.81c2.502-1.422 3.552-2 4.695-2.083l-.109-1.496c-1.56.114-2.949.923-5.327 2.274zm13.949 3.276H21v-1.5h-1.245zm-4.658-2.878a5.21 5.21 0 0 0 4.658 2.878v-1.5A3.71 3.71 0 0 1 16.439 9.2zm1.342-.67a5.33 5.33 0 0 0-2.747-2.538l-.57 1.387c.86.354 1.564 1 1.975 1.821z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:settings-bold-duotone,[i-solar\:settings-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M14.279 2.152C13.909 2 13.439 2 12.5 2s-1.408 0-1.779.152a2 2 0 0 0-1.09 1.083c-.094.223-.13.484-.145.863a1.62 1.62 0 0 1-.796 1.353a1.64 1.64 0 0 1-1.579.008c-.338-.178-.583-.276-.825-.308a2.03 2.03 0 0 0-1.49.396c-.318.242-.553.646-1.022 1.453c-.47.807-.704 1.21-.757 1.605c-.07.526.074 1.058.4 1.479c.148.192.357.353.68.555c.477.297.783.803.783 1.361s-.306 1.064-.782 1.36c-.324.203-.533.364-.682.556a2 2 0 0 0-.399 1.479c.053.394.287.798.757 1.605s.704 1.21 1.022 1.453c.424.323.96.465 1.49.396c.242-.032.487-.13.825-.308a1.64 1.64 0 0 1 1.58.008c.486.28.774.795.795 1.353c.015.38.051.64.145.863c.204.49.596.88 1.09 1.083c.37.152.84.152 1.779.152s1.409 0 1.779-.152a2 2 0 0 0 1.09-1.083c.094-.223.13-.483.145-.863c.02-.558.309-1.074.796-1.353a1.64 1.64 0 0 1 1.579-.008c.338.178.583.276.825.308c.53.07 1.066-.073 1.49-.396c.318-.242.553-.646 1.022-1.453c.47-.807.704-1.21.757-1.605a2 2 0 0 0-.4-1.479c-.148-.192-.357-.353-.68-.555c-.477-.297-.783-.803-.783-1.361s.306-1.064.782-1.36c.324-.203.533-.364.682-.556a2 2 0 0 0 .399-1.479c-.053-.394-.287-.798-.757-1.605s-.704-1.21-1.022-1.453a2.03 2.03 0 0 0-1.49-.396c-.242.032-.487.13-.825.308a1.64 1.64 0 0 1-1.58-.008a1.62 1.62 0 0 1-.795-1.353c-.015-.38-.051-.64-.145-.863a2 2 0 0 0-1.09-1.083' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15.523 12c0 1.657-1.354 3-3.023 3s-3.023-1.343-3.023-3S10.83 9 12.5 9s3.023 1.343 3.023 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:settings-minimalistic-bold-duotone,[i-solar\:settings-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.428 2c-1.114 0-2.129.6-4.157 1.802l-.686.406C5.555 5.41 4.542 6.011 3.985 7c-.557.99-.557 2.19-.557 4.594v.812c0 2.403 0 3.605.557 4.594s1.57 1.59 3.6 2.791l.686.407C10.299 21.399 11.314 22 12.428 22s2.128-.6 4.157-1.802l.686-.407c2.028-1.2 3.043-1.802 3.6-2.791c.557-.99.557-2.19.557-4.594v-.812c0-2.403 0-3.605-.557-4.594s-1.572-1.59-3.6-2.792l-.686-.406C14.555 2.601 13.542 2 12.428 2' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.428 8.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:star-fall-2-bold-duotone,[i-solar\:star-fall-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M11.58 4.776c.695-1.77 1.043-2.656 1.769-2.765c.726-.11 1.35.63 2.6 2.109l.323.382c.355.42.532.63.774.75c.24.12.518.137 1.074.17l.506.029c1.955.114 2.932.172 3.271.81c.34.64-.184 1.438-1.231 3.033l-.271.413c-.298.453-.447.68-.487.939s.033.52.179 1.043l.133.477c.513 1.842.77 2.762.253 3.266c-.517.505-1.465.258-3.361-.235l-.49-.127c-.54-.14-.809-.21-1.075-.17s-.499.185-.964.476l-.424.265c-1.638 1.024-2.456 1.536-3.115 1.208c-.659-.327-.72-1.277-.845-3.177l-.033-.492c-.035-.54-.053-.81-.177-1.044s-.34-.406-.774-.75l-.395-.312C7.294 9.865 6.53 9.26 6.64 8.554s1.02-1.047 2.839-1.729l.47-.176c.518-.194.776-.29.965-.475c.19-.185.288-.437.486-.94z'/%3E%3Cpath fill='currentColor' d='M5.31 9.593C2.873 11.92 1.275 15.806 2.331 22c.943-2.603 3.526-4.76 6.581-6.047c-.106-.593-.154-1.317-.204-2.08l-.039-.595a22 22 0 0 0-.032-.43l-.086-.071l-.268-.215l-.475-.376c-.694-.55-1.34-1.06-1.783-1.532c-.253-.269-.536-.624-.715-1.061m5.037 5.83l-.015-.114l.056.101z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:sun-fog-bold-duotone,[i-solar\:sun-fog-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7.25 22a.75.75 0 0 1 .75-.75h8a.75.75 0 0 1 0 1.5H8a.75.75 0 0 1-.75-.75M12 1.25a.75.75 0 0 1 .75.75v1a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75M1.25 12a.75.75 0 0 1 .75-.75h1a.75.75 0 0 1 0 1.5H2a.75.75 0 0 1-.75-.75m19 0a.75.75 0 0 1 .75-.75h1a.75.75 0 0 1 0 1.5h-1a.75.75 0 0 1-.75-.75M6.083 15.25H2a.75.75 0 0 0 0 1.5h20a.75.75 0 0 0 0-1.5z' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M4.25 19a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75m.148-14.602a.75.75 0 0 1 1.061 0l.393.393a.75.75 0 0 1-1.06 1.06l-.394-.392a.75.75 0 0 1 0-1.06m15.202 0a.75.75 0 0 1 0 1.06l-.392.393a.75.75 0 0 1-1.06-1.06l.392-.393a.75.75 0 0 1 1.06 0M5.25 12c0 1.178.302 2.286.833 3.25h11.834A6.75 6.75 0 1 0 5.25 12' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-solar\:trash-bin-trash-bold-duotone,[i-solar\:trash-bin-trash-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 6.386c0-.484.345-.877.771-.877h2.665c.529-.016.996-.399 1.176-.965l.03-.1l.115-.391c.07-.24.131-.45.217-.637c.338-.739.964-1.252 1.687-1.383c.184-.033.378-.033.6-.033h3.478c.223 0 .417 0 .6.033c.723.131 1.35.644 1.687 1.383c.086.187.147.396.218.637l.114.391l.03.1c.18.566.74.95 1.27.965h2.57c.427 0 .772.393.772.877s-.345.877-.771.877H3.77c-.425 0-.77-.393-.77-.877'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M9.425 11.482c.413-.044.78.273.821.707l.5 5.263c.041.433-.26.82-.671.864c-.412.043-.78-.273-.821-.707l-.5-5.263c-.041-.434.26-.821.671-.864m5.15 0c.412.043.713.43.671.864l-.5 5.263c-.04.434-.408.75-.82.707c-.413-.044-.713-.43-.672-.864l.5-5.264c.041-.433.409-.75.82-.707' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M11.596 22h.808c2.783 0 4.174 0 5.08-.886c.904-.886.996-2.339 1.181-5.245l.267-4.188c.1-1.577.15-2.366-.303-2.865c-.454-.5-1.22-.5-2.753-.5H8.124c-1.533 0-2.3 0-2.753.5s-.404 1.288-.303 2.865l.267 4.188c.185 2.906.277 4.36 1.182 5.245c.905.886 2.296.886 5.079.886' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-svg-spinners\:bouncing-ball,[i-svg-spinners\:bouncing-ball=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cellipse cx='12' cy='5' fill='currentColor' rx='4' ry='4'%3E%3Canimate id='svgSpinnersBouncingBall0' fill='freeze' attributeName='cy' begin='0;svgSpinnersBouncingBall2.end' calcMode='spline' dur='0.375s' keySplines='.33,0,.66,.33' values='5;20'/%3E%3Canimate attributeName='rx' begin='svgSpinnersBouncingBall0.end' calcMode='spline' dur='0.05s' keySplines='.33,0,.66,.33;.33,.66,.66,1' values='4;4.8;4'/%3E%3Canimate attributeName='ry' begin='svgSpinnersBouncingBall0.end' calcMode='spline' dur='0.05s' keySplines='.33,0,.66,.33;.33,.66,.66,1' values='4;3;4'/%3E%3Canimate id='svgSpinnersBouncingBall1' attributeName='cy' begin='svgSpinnersBouncingBall0.end' calcMode='spline' dur='0.025s' keySplines='.33,0,.66,.33' values='20;20.5'/%3E%3Canimate id='svgSpinnersBouncingBall2' attributeName='cy' begin='svgSpinnersBouncingBall1.end' calcMode='spline' dur='0.4s' keySplines='.33,.66,.66,1' values='20.5;5'/%3E%3C/ellipse%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em}.i-vscode-icons\:file-type-minecraft{background:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='%2352a535' d='M30 2H2v28h28z'/%3E%3Cpath fill='%2386d562' d='M24.4 13.2h-5.6v.47h5.6zm-5.6 8.4h-5.6v.47h5.6zm2.8 2.8h-2.8v.47h2.8zm-8.4 0h-2.8v.47h2.8zm0-11.2H7.6v.47h5.6z'/%3E%3Cpath d='M24.4 13.2V7.6h-5.6v5.6h-5.6V16h-2.8v8.4h2.8v-2.8h5.6v2.8h2.8V16h-2.8v-2.8zM13.2 7.6H7.6v5.6h5.6z'/%3E%3Cpath fill='%232a641c' d='M24.4 7.6h-5.6v.47h5.6zm-5.6 5.6h-5.6v.47h5.6zm-5.6-5.6H7.6v.47h5.6zm0 8.4h-2.8v.47h2.8zm8.4 0h-2.8v.47h2.8z'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em}.prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-headings);font-weight:600;line-height:1.25}.prose :where(a):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links);text-decoration:underline;font-weight:500}.prose :where(a code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links)}.prose :where(p,ul,ol,pre):not(:where(.not-prose,.not-prose *)){margin:1em 0;line-height:1.75}.prose :where(blockquote):not(:where(.not-prose,.not-prose *)){margin:1em 0;padding-left:1em;font-style:italic;border-left:.25em solid var(--un-prose-borders)}.prose :where(h1):not(:where(.not-prose,.not-prose *)){margin:1rem 0;font-size:2.25em}.prose :where(h2):not(:where(.not-prose,.not-prose *)){margin:1.75em 0 .5em;font-size:1.75em}.prose :where(h3):not(:where(.not-prose,.not-prose *)){margin:1.5em 0 .5em;font-size:1.375em}.prose :where(h4):not(:where(.not-prose,.not-prose *)){margin:1em 0;font-size:1.125em}.prose :where(img,video):not(:where(.not-prose,.not-prose *)){max-width:100%}.prose :where(figure,picture):not(:where(.not-prose,.not-prose *)){margin:1em 0}.prose :where(figcaption):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-captions);font-size:.875em}.prose :where(code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);font-size:.875em;font-weight:600;font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):before,.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):after{content:"`"}.prose :where(pre):not(:where(.not-prose,.not-prose *)){padding:1.25rem 1.5rem;overflow-x:auto;border-radius:.375rem}.prose :where(pre,code):not(:where(.not-prose,.not-prose *)){white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;background:transparent}.prose :where(pre code):not(:where(.not-prose,.not-prose *)){font-weight:inherit}.prose :where(ol,ul):not(:where(.not-prose,.not-prose *)){padding-left:1.25em}.prose :where(ol):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ol[type=A]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ul):not(:where(.not-prose,.not-prose *)){list-style-type:disc}.prose :where(ol>li):not(:where(.not-prose,.not-prose *))::marker,.prose :where(ul>li):not(:where(.not-prose,.not-prose *))::marker,.prose :where(summary):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(hr):not(:where(.not-prose,.not-prose *)){margin:2em 0;border:1px solid var(--un-prose-hr)}.prose :where(table):not(:where(.not-prose,.not-prose *)){display:block;margin:1em 0;border-collapse:collapse;overflow-x:auto}.prose :where(tr):not(:where(.not-prose,.not-prose *)):nth-child(2n){background:var(--un-prose-bg-soft)}.prose :where(td,th):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-borders);padding:.625em 1em}.prose :where(abbr):not(:where(.not-prose,.not-prose *)){cursor:help}.prose :where(kbd):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);border:1px solid;padding:.25rem .5rem;font-size:.875em;border-radius:.25rem}.prose :where(details):not(:where(.not-prose,.not-prose *)){margin:1em 0;padding:1.25rem 1.5rem;background:var(--un-prose-bg-soft)}.prose :where(summary):not(:where(.not-prose,.not-prose *)){cursor:pointer;font-weight:600}.prose{color:var(--un-prose-body);max-width:65ch}.container,[container=""]{width:100%}@media (min-width: 640px){.container,[container=""]{max-width:640px}}@media (min-width: 768px){.container,[container=""]{max-width:768px}}@media (min-width: 1024px){.container,[container=""]{max-width:1024px}}@media (min-width: 1280px){.container,[container=""]{max-width:1280px}}@media (min-width: 1536px){.container,[container=""]{max-width:1536px}}.\[input\:checked\~\&\]{input:checked~&}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none,[pointer-events-none=""]{pointer-events:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.absolute,[absolute=""]{position:absolute}.fixed,[fixed=""]{position:fixed}.relative,[relative=""]{position:relative}.sticky,[sticky=""]{position:sticky}.after\:absolute:after{position:absolute}.inset-0,[inset-0=""]{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-0,[bottom-0=""]{bottom:0}.bottom-11,[bottom-11=""]{bottom:2.75rem}.bottom-4{bottom:1rem}.left-0,[left-0=""]{left:0}.left-1\/2,[left~="1/2"]{left:50%}.left-2{left:.5rem}.right-0,[right-0=""]{right:0}.top-0,[top-0=""]{top:0}.top-1\/2,[top~="50%"]{top:50%}.top-2{top:.5rem}[bottom~="-10"]{bottom:-2.5rem}[bottom~="20%"]{bottom:20%}[bottom~="3"]{bottom:.75rem}[right~="-50%"]{right:-50%}[right~="3"]{right:.75rem}.after\:left-\[2px\]:after{left:2px}.after\:top-\[2px\]:after{top:2px}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.z--1,[z--1=""]{z-index:-1}.z-1,[z-1=""]{z-index:1}.z-10,[z-10=""]{z-index:10}.z-2,[z-2=""]{z-index:2}.z-30,[z-30=""]{z-index:30}.z-50,[z-50=""]{z-index:50}[z~="20"]{z-index:20}.grid,[grid=""],[grid~="~"]{display:grid}.auto-cols-\[350px\]{grid-auto-columns:350px}.grid-flow-col{grid-auto-flow:column}.cols-\[150px_1fr\],[grid~="cols-[150px_1fr]"]{grid-template-columns:150px 1fr}.cols-\[20px_1fr_60px\],[grid~="cols-[20px_1fr_60px]"]{grid-template-columns:20px 1fr 60px}.cols-1,.grid-cols-1,[grid~=cols-1]{grid-template-columns:repeat(1,minmax(0,1fr))}.cols-2,[grid~=cols-2]{grid-template-columns:repeat(2,minmax(0,1fr))}.m-1,[m-1=""]{margin:.25rem}.m-auto{margin:auto}.mx2,[mx2=""]{margin-left:.5rem;margin-right:.5rem}.my{margin-top:1rem;margin-bottom:1rem}.mb-1,[mb-1=""]{margin-bottom:.25rem}.mb-2,.mb2,[mb-2=""],[mb2=""]{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4,[mb-4=""]{margin-bottom:1rem}.mb-6,[mb-6=""]{margin-bottom:1.5rem}.ml{margin-left:1rem}.ml-0\.5,[ml-0\.5=""]{margin-left:.125rem}.ml-2,[ml-2=""]{margin-left:.5rem}.ml-auto{margin-left:auto}.mr{margin-right:1rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2,[mt-2=""]{margin-top:.5rem}.mt-24,[mt-24=""]{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4,[mt-4=""]{margin-top:1rem}[ml~="12"]{margin-left:3rem}[mr~="12"]{margin-right:3rem}.inline,[inline=""]{display:inline}.block,[block=""]{display:block}.inline-block,[inline-block=""]{display:inline-block}.hidden,[hidden=""]{display:none}.size-16,[size-16=""]{width:4rem;height:4rem}.size-24,[size-24=""]{width:6rem;height:6rem}.size-3,[size-3=""]{width:.75rem;height:.75rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-10,[h-10=""]{height:2.5rem}.h-100vh,[h-100vh=""]{height:100vh}.h-2,.h2{height:.5rem}.h-6{height:1.5rem}.h-8,[h-8=""]{height:2rem}.h-fit,[h-fit=""]{height:fit-content}.h-full,[h-full=""]{height:100%}.h1{height:.25rem}.h3{height:.75rem}.max-h-\[10lh\],[max-h~="[10lh]"]{max-height:10lh}.max-w-full,[max-w-full=""]{max-width:100%}.min-h-\[1lh\],[min-h~="[1lh]"]{min-height:1lh}.min-h-16,[min-h-16=""]{min-height:4rem}.min-w-0,[min-w-0=""]{min-width:0}.min-w-20,[min-w-20=""]{min-width:5rem}.min-w-50,[min-w-50=""]{min-width:12.5rem}.w-\[calc\(100\%-16px-40px-16px\)\]{width:calc(100% - 72px)}.w-10{width:2.5rem}.w-100,[w-100=""]{width:25rem}.w-100vw,[w-100vw=""]{width:100vw}.w-11{width:2.75rem}.w-12{width:3rem}.w-32{width:8rem}.w-6{width:1.5rem}.w-8,[w-8=""]{width:2rem}.w-fit,[w-fit=""]{width:fit-content}.w-full,[w-full=""],[w~=full]{width:100%}[h~="[14px]"]{height:14px}[h~="80vh"]{height:80vh}[h~=unset]{height:unset}[max-h~="[75%]"]{max-height:75%}[max-h~="[85vh]"]{max-height:85vh}[max-h~="100"]{max-height:25rem}[max-h~="30vh"]{max-height:30vh}[max-w~="30%"]{max-width:30%}[max-w~="500px"]{max-width:500px}[min-h~="[100px]"]{min-height:100px}[min-h~="100"]{min-height:25rem}[min-w~="1/2"],[min-w~="50%"]{min-width:50%}[min-w~="30%"]{min-width:30%}[min-w~="3em"]{min-width:3em}[min-w~="50vw"]{min-width:50vw}[min-w~="6"]{min-width:1.5rem}[w~="[1px]"]{width:1px}[w~="50%"]{width:50%}.after\:h-5:after{height:1.25rem}.after\:w-5:after{width:1.25rem}.flex,[flex=""],[flex~="~"]{display:flex}.inline-flex{display:inline-flex}.flex-1,[flex-1=""],[flex~="1"]{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-row,[flex-row=""],[flex~=row]{flex-direction:row}[flex~=row-reverse]{flex-direction:row-reverse}.flex-col,[flex-col=""],[flex~=col]{flex-direction:column}.flex-wrap,[flex-wrap=""]{flex-wrap:wrap}.-translate-x-1\/2,.translate-x--1\/2,[transform~="translate-x--1/2"]{--un-translate-x:-50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.-translate-y-1\/2,.translate-y-\[-50\%\],[transform~="translate-y-[-50%]"]{--un-translate-y:-50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-x-\[50\%\],[transform~="translate-x-[50%]"]{--un-translate-x:50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-x-0{--un-translate-x:0;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-x-10,[translate-x-10=""]{--un-translate-x:2.5rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-x-4{--un-translate-x:1rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y--100\%,.translate-y-\[-100\%\],[transform~="translate-y--100%"],[transform~="translate-y-[-100%]"]{--un-translate-y:-100%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y--2,[transform~=translate-y--2]{--un-translate-y:-.5rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y-10,[translate-y-10=""]{--un-translate-y:2.5rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y-2,[translate-y-2=""]{--un-translate-y:.5rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y-4,[translate-y-4=""]{--un-translate-y:1rem;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}[translate-y~="[-80%]"]{--un-translate-y:-80%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.peer:checked~.peer-checked\:after\:translate-x-full:after{--un-translate-x:100%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-180{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:180deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.transform,[transform=""]{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.disabled\:cursor-default:disabled{cursor:default}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.cursor-not-allowed{cursor:not-allowed}.cursor-ew-resize,[cursor-ew-resize=""]{cursor:ew-resize}.select-none,[select-none=""]{-webkit-user-select:none;user-select:none}.resize-none,[resize-none=""]{resize:none}.appearance-none,[appearance-none=""]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.items-start,[items-start=""]{align-items:flex-start}.items-center,[items-center=""]{align-items:center}.justify-end,[justify-end=""]{justify-content:flex-end}.justify-center,[justify-center=""]{justify-content:center}.justify-between,[justify-between=""]{justify-content:space-between}.gap-1,[gap-1=""]{gap:.25rem}.gap-1\.5,[gap-1\.5=""]{gap:.375rem}.gap-2,[gap-2=""],[grid~=gap-2]{gap:.5rem}.gap-3{gap:.75rem}.gap-4,[flex~=gap-4],[gap-4=""],[grid~=gap-4]{gap:1rem}.gap-6,[flex~=gap-6]{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2,[flex~=gap-x-2]{column-gap:.5rem}.gap-y-0,[flex~=gap-y-0]{row-gap:0}.space-x-1>:not([hidden])~:not([hidden]),[space-x-1=""]>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.25rem * calc(1 - var(--un-space-x-reverse)));margin-right:calc(.25rem * var(--un-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.25rem * var(--un-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.5rem * var(--un-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1rem * var(--un-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1.5rem * var(--un-space-y-reverse))}[divide~=y]>:not([hidden])~:not([hidden]){--un-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--un-divide-y-reverse)));border-bottom-width:calc(1px * var(--un-divide-y-reverse))}[divide~="gray/25"]>:not([hidden])~:not([hidden]){border-color:#9ca3af40}[border~=dashed],[divide~=dashed]>:not([hidden])~:not([hidden]){border-style:dashed}.of-clip,[of-clip=""]{overflow:clip}.of-hidden,.overflow-hidden,[of-hidden=""],[overflow-hidden=""]{overflow:hidden}.overflow-auto{overflow:auto}.overflow-scroll,[overflow-scroll=""]{overflow:scroll}.of-x-scroll,[of-x-scroll=""]{overflow-x:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-scroll,[overflow-y-scroll=""]{overflow-y:scroll}.scroll-smooth,[scroll-smooth=""]{scroll-behavior:smooth}.b-2,.border-2,[b-2=""],[border~="2"],[border~="2px"]{border-width:2px}.border,[border~="~"],[border~="1"]{border-width:1px}[border~="4"]{border-width:4px}[border~=b-2]{border-bottom-width:2px}[border~=l-2]{border-left-width:2px}[border~=r-2]{border-right-width:2px}[border~=t-2]{border-top-width:2px}.\[\&\:checked\+div\]\:border-primary-500:checked+div,.border-primary-500{--un-border-opacity:1;border-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.border-amber-200{--un-border-opacity:1;border-color:rgb(253 230 138 / var(--un-border-opacity))}.border-neutral-200,[border~=neutral-200]{--un-border-opacity:1;border-color:rgb(229 229 229 / var(--un-border-opacity))}.border-neutral-300,[border~=neutral-300]{--un-border-opacity:1;border-color:rgb(212 212 212 / var(--un-border-opacity))}.border-primary-100,[border~=primary-100]{border-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-100) calc(var(--theme-colors-hue) + 0)) 80%,oklch(100% 0 360))}.border-primary-200{--un-border-opacity:1;border-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.border-red-200{--un-border-opacity:1;border-color:rgb(254 202 202 / var(--un-border-opacity))}.dark .dark\:\[\&\:checked\+div\]\:border-primary-400:checked+div,.dark .dark\:border-primary-400{--un-border-opacity:1;border-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.dark .dark\:border-amber-800{--un-border-opacity:1;border-color:rgb(146 64 14 / var(--un-border-opacity))}.dark .dark\:border-neutral-600,.dark [border~="dark:neutral-600"]{--un-border-opacity:1;border-color:rgb(82 82 82 / var(--un-border-opacity))}.dark .dark\:border-neutral-700,.dark [border~="dark:neutral-700"]{--un-border-opacity:1;border-color:rgb(64 64 64 / var(--un-border-opacity))}.dark .dark\:border-primary-800{--un-border-opacity:1;border-color:oklch(42% var(--theme-colors-chroma-800) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.dark .dark\:border-primary-900,.dark [border~="dark:primary-900"]{--un-border-opacity:1;border-color:oklch(37% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.dark .dark\:border-red-800{--un-border-opacity:1;border-color:rgb(153 27 27 / var(--un-border-opacity))}.dark [border~="dark:cyan-500/50"]{border-color:#06b6d480}.dark [border~="dark:cyan-800"]{--un-border-opacity:1;border-color:rgb(21 94 117 / var(--un-border-opacity))}.dark [border~="dark:neutral-800"]{--un-border-opacity:1;border-color:rgb(38 38 38 / var(--un-border-opacity))}.dark [border~="dark:primary-400/20"]{border-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2)}.dark [border~="dark:primary-500/50"]{border-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .5)}.dark [border~="dark:violet-500/50"]{border-color:#8b5cf680}.dark [border~="dark:zinc-800"]{--un-border-opacity:1;border-color:rgb(39 39 42 / var(--un-border-opacity))}[border~=cyan-200]{--un-border-opacity:1;border-color:rgb(165 243 252 / var(--un-border-opacity))}[border~="cyan-200/50"]{border-color:#a5f3fc80}[border~="gray/25"]{border-color:#9ca3af40}[border~=neutral-100]{--un-border-opacity:1;border-color:rgb(245 245 245 / var(--un-border-opacity))}[border~="primary-200/50"]{border-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / .5)}[border~="violet-200/50"]{border-color:#ddd6fe80}[border~=zinc-300]{--un-border-opacity:1;border-color:rgb(212 212 216 / var(--un-border-opacity))}.peer:checked~.peer-checked\:after\:border-white:after{--un-border-opacity:1;border-color:rgb(255 255 255 / var(--un-border-opacity))}.dark .dark\:hover\:border-primary-400\/30:hover,.dark [border~="dark:hover:primary-400/30"]:hover{border-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .3)}.hover\:border-primary-500\/30:hover,[border~="hover:primary-500/30"]:hover{border-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .3)}.dark [border~="dark:focus:primary-900"]:focus{--un-border-opacity:1;border-color:oklch(37% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0) / var(--un-border-opacity))}.dark [border~="dark:focus:zinc-600"]:focus{--un-border-opacity:1;border-color:rgb(82 82 91 / var(--un-border-opacity))}[border~="focus:primary-100"]:focus{border-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-100) calc(var(--theme-colors-hue) + 0)) 80%,oklch(100% 0 360))}[border~="focus:zinc-400"]:focus{--un-border-opacity:1;border-color:rgb(161 161 170 / var(--un-border-opacity))}.rounded,[rounded=""]{border-radius:.25rem}.rounded-2xl,[rounded-2xl=""]{border-radius:1rem}.rounded-full,[rounded-full=""]{border-radius:9999px}.rounded-lg,[border~=rounded-lg],[rounded-lg=""],[rounded~=lg]{border-radius:.5rem}.rounded-md,[rounded-md=""]{border-radius:.375rem}.rounded-sm,[rounded-sm=""]{border-radius:.125rem}.rounded-xl,[rounded-xl=""]{border-radius:.75rem}.after\:rounded-full:after{border-radius:9999px}.rounded-l-lg,[rounded-l-lg=""]{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-xl,[rounded-l-xl=""]{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-lg,[rounded-r-lg=""]{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-r-xl,[rounded-r-xl=""]{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-lg,[rounded-t-lg=""]{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl,[rounded-t-xl=""]{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border-none,[border-none=""]{border-style:none}[border~=solid]{border-style:solid}.bg-amber-50{--un-bg-opacity:1;background-color:rgb(255 251 235 / var(--un-bg-opacity))}.bg-black\/40{background-color:#0006}.bg-neutral-100,[bg~=neutral-100]{--un-bg-opacity:1;background-color:rgb(245 245 245 / var(--un-bg-opacity))}.bg-neutral-200{--un-bg-opacity:1;background-color:rgb(229 229 229 / var(--un-bg-opacity))}.bg-neutral-300{--un-bg-opacity:1;background-color:rgb(212 212 212 / var(--un-bg-opacity))}.bg-neutral-50,[bg~=neutral-50]{--un-bg-opacity:1;background-color:rgb(250 250 250 / var(--un-bg-opacity))}.bg-primary-100,[bg~=primary-100]{background-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-100) calc(var(--theme-colors-hue) + 0)) 80%,oklch(100% 0 360))}.bg-primary-50,[bg~=primary-50]{background-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-50) calc(var(--theme-colors-hue) + 0)) 30%,oklch(100% 0 360))}.bg-primary-500,.dark [bg~="dark:primary-500"],[bg~=primary-500],.peer:checked~.peer-checked\:bg-primary-500{--un-bg-opacity:1;background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.bg-red-50{--un-bg-opacity:1;background-color:rgb(254 242 242 / var(--un-bg-opacity))}.bg-white,[bg~=white]{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.bg-zinc-100,[bg-zinc-100=""],[bg~=zinc-100]{--un-bg-opacity:1;background-color:rgb(244 244 245 / var(--un-bg-opacity))}.bg-zinc-200,.dark .dark\:bg-zinc-200{--un-bg-opacity:1;background-color:rgb(228 228 231 / var(--un-bg-opacity))}.bg-zinc-300,[bg-zinc-300=""]{--un-bg-opacity:1;background-color:rgb(212 212 216 / var(--un-bg-opacity))}.dark .dark\:bg-amber-900\/20{background-color:#78350f33}.dark .dark\:bg-neutral-600{--un-bg-opacity:1;background-color:rgb(82 82 82 / var(--un-bg-opacity))}.dark .dark\:bg-neutral-700,.dark [bg~="dark:neutral-700"]{--un-bg-opacity:1;background-color:rgb(64 64 64 / var(--un-bg-opacity))}.dark .dark\:bg-neutral-800,.dark [bg~="dark:neutral-800"]{--un-bg-opacity:1;background-color:rgb(38 38 38 / var(--un-bg-opacity))}.dark .dark\:bg-neutral-900,.dark [bg~="dark:neutral-900"]{--un-bg-opacity:1;background-color:rgb(23 23 23 / var(--un-bg-opacity))}.dark .dark\:bg-neutral-900\/20{background-color:#17171733}.dark .dark\:bg-primary-400,.dark [bg~="dark:primary-400"],[bg~=primary-400]{--un-bg-opacity:1;background-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.dark .dark\:bg-primary-900,[bg~=primary-900]{--un-bg-opacity:1;background-color:oklch(37% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.dark .dark\:bg-primary-900\/20{background-color:oklch(37% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0) / .2)}.dark .dark\:bg-primary-950,.dark [bg~="dark:primary-950"],[bg~=primary-950]{--un-bg-opacity:1;background-color:oklch(29% var(--theme-colors-chroma-950) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.dark .dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark .dark\:bg-zinc-700,.dark [bg~="dark:zinc-700"]{--un-bg-opacity:1;background-color:rgb(63 63 70 / var(--un-bg-opacity))}.dark .dark\:bg-zinc-800,.dark [bg~="dark:zinc-800"]{--un-bg-opacity:1;background-color:rgb(39 39 42 / var(--un-bg-opacity))}.dark [bg~="dark:[#1f1a1d]"]{--un-bg-opacity:1;background-color:rgb(31 26 29 / var(--un-bg-opacity))}.dark [bg~="dark:[#3c2632]"]{--un-bg-opacity:1;background-color:rgb(60 38 50 / var(--un-bg-opacity))}.dark [bg~="dark:[#4e34b9]"]{--un-bg-opacity:1;background-color:rgb(78 52 185 / var(--un-bg-opacity))}.dark [bg~="dark:[#676085]"]{--un-bg-opacity:1;background-color:rgb(103 96 133 / var(--un-bg-opacity))}.dark [bg~="dark:[rgba(0,0,0,0.3)]"]{--un-bg-opacity:.3;background-color:rgba(0,0,0,var(--un-bg-opacity))}.dark [bg~="dark:black/20"]{background-color:#0003}.dark [bg~="dark:complementary-800"]{--un-bg-opacity:1;background-color:oklch(42% var(--theme-colors-chroma-800) calc(var(--theme-colors-hue) + 180) / var(--un-bg-opacity))}.dark [bg~="dark:cyan-900"]{--un-bg-opacity:1;background-color:rgb(22 78 99 / var(--un-bg-opacity))}.dark [bg~="dark:green-600"]{--un-bg-opacity:1;background-color:rgb(22 163 74 / var(--un-bg-opacity))}.dark [bg~="dark:neutral-500"]{--un-bg-opacity:1;background-color:rgb(115 115 115 / var(--un-bg-opacity))}.dark [bg~="dark:primary-400/20"]{background-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2)}.dark [bg~="dark:zinc-400"]{--un-bg-opacity:1;background-color:rgb(161 161 170 / var(--un-bg-opacity))}.dark [bg~="dark:zinc-800/50"]{background-color:#27272a80}[bg~="[#cabeff]"]{--un-bg-opacity:1;background-color:rgb(202 190 255 / var(--un-bg-opacity))}[bg~="[#e6e1fc]"]{--un-bg-opacity:1;background-color:rgb(230 225 252 / var(--un-bg-opacity))}[bg~="[#fffbff]"]{--un-bg-opacity:1;background-color:rgb(255 251 255 / var(--un-bg-opacity))}[bg~=complementary-100]{background-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-100) calc(var(--theme-colors-hue) + 180)) 80%,oklch(100% 0 360))}[bg~=green-500]{--un-bg-opacity:1;background-color:rgb(34 197 94 / var(--un-bg-opacity))}[bg~="neutral-200/50"]{background-color:#e5e5e580}[bg~=neutral-400]{--un-bg-opacity:1;background-color:rgb(163 163 163 / var(--un-bg-opacity))}[bg~=primary-200]{--un-bg-opacity:1;background-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~=primary-300]{--un-bg-opacity:1;background-color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~="primary-500/10"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1)}[bg~="primary-500/20"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2)}[bg~="primary-500/30"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .3)}[bg~="primary-500/40"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .4)}[bg~="primary-500/5"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .05)}[bg~="primary-500/50"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .5)}[bg~="primary-500/60"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .6)}[bg~="primary-500/70"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .7)}[bg~="primary-500/80"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .8)}[bg~="primary-500/90"]{background-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .9)}[bg~=primary-600]{--un-bg-opacity:1;background-color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~=primary-700]{--un-bg-opacity:1;background-color:oklch(49% var(--theme-colors-chroma-700) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~=primary-800]{--un-bg-opacity:1;background-color:oklch(42% var(--theme-colors-chroma-800) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~=transparent]{background-color:transparent}[bg~="zinc-100/70"]{background-color:#f4f4f5b3}[bg~="zinc-200/20"]{background-color:#e4e4e733}.dark [dark\:bg-zinc-700~="default:"]:default{--un-bg-opacity:1;background-color:rgb(63 63 70 / var(--un-bg-opacity))}.dark [dark\:bg-zinc-700~="checked:"]:checked{--un-bg-opacity:1;background-color:rgb(63 63 70 / var(--un-bg-opacity))}.dark .\[\&_div_span\]\:dark\:hover\:bg-cyan-300:hover div span{--un-bg-opacity:1;background-color:rgb(103 232 249 / var(--un-bg-opacity))}.dark .\[\&_div_span\]\:dark\:hover\:bg-cyan-900:hover div span{--un-bg-opacity:1;background-color:rgb(22 78 99 / var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-700:hover{--un-bg-opacity:1;background-color:rgb(64 64 64 / var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-800:hover{--un-bg-opacity:1;background-color:rgb(38 38 38 / var(--un-bg-opacity))}.dark [bg~="dark:hover:complementary-700"]:hover{--un-bg-opacity:1;background-color:oklch(49% var(--theme-colors-chroma-700) calc(var(--theme-colors-hue) + 180) / var(--un-bg-opacity))}.dark [bg~="dark:hover:primary-900"]:hover{--un-bg-opacity:1;background-color:oklch(37% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}.dark [dark\:hover\:bg-cyan-300=""]:hover{--un-bg-opacity:1;background-color:rgb(103 232 249 / var(--un-bg-opacity))}.dark [hover~="dark:bg-neutral-700"]:hover{--un-bg-opacity:1;background-color:rgb(64 64 64 / var(--un-bg-opacity))}.dark [hover~="dark:bg-zinc-700"]:hover{--un-bg-opacity:1;background-color:rgb(63 63 70 / var(--un-bg-opacity))}.hover\:bg-neutral-100:hover{--un-bg-opacity:1;background-color:rgb(245 245 245 / var(--un-bg-opacity))}.hover\:bg-neutral-200:hover{--un-bg-opacity:1;background-color:rgb(229 229 229 / var(--un-bg-opacity))}.hover\:bg-primary-600:hover{--un-bg-opacity:1;background-color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-bg-opacity))}[bg~="hover:complementary-200"]:hover{--un-bg-opacity:1;background-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 180) / var(--un-bg-opacity))}[bg~="hover:primary-100"]:hover{background-color:color-mix(in srgb,oklch(95% var(--theme-colors-chroma-100) calc(var(--theme-colors-hue) + 0)) 80%,oklch(100% 0 360))}[hover~=bg-neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229 / var(--un-bg-opacity))}[hover~=bg-zinc-200]:hover{--un-bg-opacity:1;background-color:rgb(228 228 231 / var(--un-bg-opacity))}.after\:bg-white:after{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .dark\:from-primary-400\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to)}.dark .dark\:from-primary-400\/20{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to)}.from-primary-500\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to)}.from-primary-500\/20{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to)}.dark .dark\:via-primary-400\/10{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to)}.via-primary-500\/10{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to)}.dark .dark\:to-primary-400\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.dark .dark\:to-transparent,.to-transparent{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.to-primary-500\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.bg-gradient-to-r{--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.p-2,.p2,[p-2=""],[p~="2"],[p2=""]{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4,[p-4=""]{padding:1rem}.p-5,[p-5=""]{padding:1.25rem}.px,.px-4,[px-4=""],[px=""]{padding-left:1rem;padding-right:1rem}.px-0{padding-left:0;padding-right:0}.px-10,[px-10=""]{padding-left:2.5rem;padding-right:2.5rem}.px-2,.px2,[px-2=""],[px~="2"],[px2=""]{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py,.py-4,[py~="4"]{padding-top:1rem;padding-bottom:1rem}.py-1,.py1,[py-1=""],[py~="1"],[py1=""]{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2,[py-2=""]{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3,[py-3=""]{padding-top:.75rem;padding-bottom:.75rem}.py-6,[py-6=""]{padding-top:1.5rem;padding-bottom:1.5rem}[px~="12"]{padding-left:3rem;padding-right:3rem}.pb-2,[pb-2=""]{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pl-5,[pl-5=""]{padding-left:1.25rem}.pr-\[20px\]{padding-right:20px}.pr-3{padding-right:.75rem}.pr-4,[pr-4=""]{padding-right:1rem}.pt-2,[pt-2=""]{padding-top:.5rem}.pt-4,[pt-4=""]{padding-top:1rem}.text-center{text-align:center}.text-left,[text-left=""]{text-align:left}.text-right,[text-right=""],[text~=right]{text-align:right}.text-wrap,[text-wrap=""]{text-wrap:wrap}.text-nowrap,[text-nowrap=""]{text-wrap:nowrap}.align-middle{vertical-align:middle}.text-2xl,[text-2xl=""],[text~="2xl"]{font-size:1.5rem;line-height:2rem}.text-3xl,[text-3xl=""]{font-size:1.875rem;line-height:2.25rem}.text-base,[text-base=""],[text~=base]{font-size:1rem;line-height:1.5rem}.text-lg,[text-lg=""],[text~=lg]{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""],[text~=sm]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""],[text~=xl]{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""]{font-size:.75rem;line-height:1rem}[text~="40"]{font-size:10rem}.dark .dark\:text-amber-400{--un-text-opacity:1;color:rgb(251 191 36 / var(--un-text-opacity))}.dark .dark\:text-neutral-300,[text~=neutral-300]{--un-text-opacity:1;color:rgb(212 212 212 / var(--un-text-opacity))}.dark .dark\:text-neutral-400,.dark [text~="dark:neutral-400"],.text-neutral-400,[text~=neutral-400]{--un-text-opacity:1;color:rgb(163 163 163 / var(--un-text-opacity))}.dark .dark\:text-neutral-500,.dark [text~="dark:neutral-500"],.text-neutral-500,[text~=neutral-500]{--un-text-opacity:1;color:rgb(115 115 115 / var(--un-text-opacity))}.dark .dark\:text-neutral-500\/20,.dark [text~="dark:neutral-500/20"]{color:#73737333}.dark .dark\:text-neutral-600,.text-neutral-600{--un-text-opacity:1;color:rgb(82 82 82 / var(--un-text-opacity))}.dark .dark\:text-primary-400,.text-primary-400,[text~=primary-400]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .dark\:text-primary-500,.text-primary-500{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .dark\:text-red-400{--un-text-opacity:1;color:rgb(248 113 113 / var(--un-text-opacity))}.dark .dark\:text-white,.dark [dark\:text-white=""],.dark [text~="dark:white"],.text-white,[text-white=""],[text~=white]{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.dark .dark\:text-white\/50{color:#ffffff80}.dark .dark\:text-zinc-400,.dark [text~="dark:zinc-400"],.text-zinc-400,[text~=zinc-400]{--un-text-opacity:1;color:rgb(161 161 170 / var(--un-text-opacity))}.dark .dark\:text-zinc-600{--un-text-opacity:1;color:rgb(82 82 91 / var(--un-text-opacity))}.dark [text~="dark:[#905073]"]{--un-text-opacity:1;color:rgb(144 80 115 / var(--un-text-opacity))}.dark [text~="dark:cyan-600/90"]{color:#0891b2e6}.dark [text~="dark:gray-200"]{--un-text-opacity:1;color:rgb(229 231 235 / var(--un-text-opacity))}.dark [text~="dark:neutral-100"]{--un-text-opacity:1;color:rgb(245 245 245 / var(--un-text-opacity))}.dark [text~="dark:neutral-600/50"]{color:#52525280}.dark [text~="dark:primary-300/50"]{color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / .5)}.dark [text~="dark:primary-600/90"]{color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / .9)}.dark [text~="dark:violet-600/90"]{color:#7c3aede6}.dark [text~="dark:zinc-100"]{--un-text-opacity:1;color:rgb(244 244 245 / var(--un-text-opacity))}.dark [text~="dark:zinc-200/80"]{color:#e4e4e7cc}.dark [text~="dark:zinc-500"],.text-zinc-500,[text~=zinc-500]{--un-text-opacity:1;color:rgb(113 113 122 / var(--un-text-opacity))}.text-amber-500{--un-text-opacity:1;color:rgb(245 158 11 / var(--un-text-opacity))}.text-amber-600{--un-text-opacity:1;color:rgb(217 119 6 / var(--un-text-opacity))}.text-black,[text-black=""]{--un-text-opacity:1;color:rgb(0 0 0 / var(--un-text-opacity))}.text-cyan,[text~=cyan-400]{--un-text-opacity:1;color:rgb(34 211 238 / var(--un-text-opacity))}.text-neutral-100\/80,[text~="neutral-100/80"]{color:#f5f5f5cc}.text-neutral-700{--un-text-opacity:1;color:rgb(64 64 64 / var(--un-text-opacity))}.text-primary-300,[text~=primary-300]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.text-primary-600,[text~=primary-600]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.text-red-500{--un-text-opacity:1;color:rgb(239 68 68 / var(--un-text-opacity))}.text-red-600{--un-text-opacity:1;color:rgb(220 38 38 / var(--un-text-opacity))}.text-violet-500,[text-violet-500=""]{--un-text-opacity:1;color:rgb(139 92 246 / var(--un-text-opacity))}[text~=complementary-400]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 180) / var(--un-text-opacity))}[text~="cyan-400/90"]{color:#22d3eee6}[text~=gray-700]{--un-text-opacity:1;color:rgb(55 65 81 / var(--un-text-opacity))}[text~="neutral-100/50"]{color:#f5f5f580}[text~="neutral-400/50"]{color:#a3a3a380}[text~=neutral-800]{--un-text-opacity:1;color:rgb(38 38 38 / var(--un-text-opacity))}[text~="primary-400/90"]{color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .9)}[text~="violet-400/90"]{color:#a78bfae6}[text~=zinc-800]{--un-text-opacity:1;color:rgb(39 39 42 / var(--un-text-opacity))}[text~="zinc-800/80"]{color:#27272acc}.dark .dark\:hover\:text-neutral-200:hover{--un-text-opacity:1;color:rgb(229 229 229 / var(--un-text-opacity))}.dark [text~="dark:hover:primary-500"]:hover{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark [text~="dark:hover:primary-600"]:hover{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.hover\:text-neutral-700:hover{--un-text-opacity:1;color:rgb(64 64 64 / var(--un-text-opacity))}.hover\:text-red-600:hover{--un-text-opacity:1;color:rgb(220 38 38 / var(--un-text-opacity))}[text~="hover:primary-500"]:hover{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}[text~="hover:primary-600"]:hover{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark [text~="placeholder:dark:[#905073]"]::placeholder{--un-text-opacity:1;color:rgb(144 80 115 / var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-600"]:hover::placeholder{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark [text~="placeholder:dark:primary-300/50"]::placeholder{color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / .5)}[text~="placeholder:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}[text~="placeholder:hover:primary-600"]:hover::placeholder{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}[text~="placeholder:primary-300"]::placeholder{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}[text~="placeholder:primary-400"]::placeholder{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.font-bold,[font-bold=""]{font-weight:700}.font-medium,[font-medium=""]{font-weight:500}.font-semibold,[font-semibold=""]{font-weight:600}.font-cute,[font-cute=""]{font-family:Kiwi Maru}.font-cuteen,[font-cuteen=""]{font-family:Sniglet}.font-mono,[font-mono=""]{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans,[font-sans=""]{font-family:DM Sans,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.tab,[aria-checked~=tab][aria-checked=true],[tab=""]{-moz-tab-size:4;-o-tab-size:4;tab-size:4}[checked~=tab]:checked{-moz-tab-size:4;-o-tab-size:4;tab-size:4}.\[\&\:checked\+div_\.radio-dot\]\:opacity-100:checked+div .radio-dot,.opacity-100{opacity:1}.op50,[op50=""]{opacity:.5}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-60{opacity:.6}.focus\:opacity-50:focus{opacity:.5}.disabled\:opacity-50:disabled{opacity:.5}.dark [shadow~="dark:none"]{--un-shadow:0 0 var(--un-shadow-color, rgb(0 0 0 / 0));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-sm,[shadow-sm=""]{--un-shadow:var(--un-shadow-inset) 0 1px 2px 0 var(--un-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[shadow~="cyan-200/50"]{--un-shadow-color:rgb(165 243 252 / .5) }[shadow~=md]{--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[shadow~="primary-200/50"]{--un-shadow-color:oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / .5) }[shadow~="violet-200/50"]{--un-shadow-color:rgb(221 214 254 / .5) }.outline{outline-style:solid}.outline-none,[outline-none=""],[outline~=none]{outline:2px solid transparent;outline-offset:2px}.ring{--un-ring-width:3px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[ring~="0"]{--un-ring-width:0px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[ring~="focus:2"]:focus{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[ring~="focus:offset-0"]:focus{--un-ring-offset-width:0px}.dark [ring~="dark:focus:primary-400"]:focus{--un-ring-opacity:1;--un-ring-color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-ring-opacity)) }[ring~="focus:primary-500"]:focus{--un-ring-opacity:1;--un-ring-color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-ring-opacity)) }[ring~="focus:opacity-50"]:focus{--un-ring-opacity:.5}.backdrop-blur-sm,[backdrop-blur-sm=""]{--un-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.backdrop-blur-xl,[backdrop-blur-xl=""]{--un-backdrop-blur:blur(24px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.drop-shadow{--un-drop-shadow:drop-shadow(0 1px 2px var(--un-drop-shadow-color, rgb(0 0 0 / .1))) drop-shadow(0 1px 1px var(--un-drop-shadow-color, rgb(0 0 0 / .06)));filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}[drop-shadow~=none],.dark [drop-shadow~="dark:hover:none"]:hover{--un-drop-shadow:drop-shadow(0 0 var(--un-drop-shadow-color, rgb(0 0 0 / 0)));filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}[drop-shadow~="hover:[0px_4px_4px_rgba(220,220,220,0.4)]"]:hover{--un-drop-shadow:drop-shadow(0px 4px 4px rgba(220,220,220,.4));filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}[drop-shadow~="active:[0px_0px_0px_rgba(220,220,220,0.25)]"]:active{--un-drop-shadow:drop-shadow(0px 0px 0px rgba(220,220,220,.25));filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.\[\&_\.provider-icon\]\:grayscale-100 .provider-icon,.grayscale-100,[grayscale-100=""]{--un-grayscale:grayscale(1);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.\[\&_\.provider-icon\]\:hover\:grayscale-0:hover .provider-icon{--un-grayscale:grayscale(0);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors,[transition~=colors]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform,[transition~=transform]{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[transition~=all]{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[transition~=border]{transition-property:border;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[transition~=filter]{transition-property:filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[transition~="placeholder:all"]::placeholder{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:transition-all:after{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200,[transition~=duration-200]{transition-duration:.2s}.duration-250,[duration-250=""],[transition~=duration-250]{transition-duration:.25s}.duration-500,[transition~=duration-500]{transition-duration:.5s}.placeholder\:duration-250::placeholder{transition-duration:.25s}[placeholder\:duration-250=""]::placeholder{transition-duration:.25s}[transition~="placeholder:duration-250"]::placeholder{transition-duration:.25s}.ease,.ease-in-out,[ease-in-out=""],[transition~=ease-in-out]{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:ease-in-out::placeholder{transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~="placeholder:ease-in-out"]::placeholder{transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:content-\[\'\'\]:after{content:""}.bg-dotted-\[neutral-200\/80\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.8}.dark .dark\:bg-dotted-\[neutral-700\/50\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .dark\:hover\:bg-dotted-\[primary-200\/20\]:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.hover\:bg-dotted-\[primary-300\/50\]:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}@media (max-width: 1023.9px){[min-w~="(p(),m(u,null,[t("div",f,[t("button",{onClick:e[0]||(e[0]=k=>o(i).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e[2]||(e[2]=t("h1",{relative:""},[t("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[t("span",{text:"neutral-300 dark:neutral-500"},"Settings")]),t("div",{"text-3xl":"","font-semibold":""}," Models ")],-1))]),t("div",x,[r(o(a),{w:"50%",h:"80vh"}),r(s,{w:"50%",h:"80vh"})]),e[3]||(e[3]=t("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",text:"neutral-100/80 dark:neutral-500/20"},[t("div",{text:"40","i-lucide:person-standing":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof n=="function"&&n(v);export{v as default}; diff --git a/assets/index-Du_4Mb4C.js b/assets/index-Du_4Mb4C.js deleted file mode 100644 index a86c2c4cace6b1c90ea3f6178359563e42d6ad08..0000000000000000000000000000000000000000 --- a/assets/index-Du_4Mb4C.js +++ /dev/null @@ -1 +0,0 @@ -import{d,s as l,h as m,c as n,o as t,a as e,e as u,F as s,C as f,j as g}from"./index-SpDrDth7.js";import{I as p}from"./IconStatusItem-DizX_200.js";import{b as r}from"./route-block-B_A1xBdJ.js";const y="/assets/factorio-P3v2tIeq.png",v={flex:"~ row","items-center":"","gap-2":""},h={grid:"~ cols-1 sm:cols-2 gap-4"},k=d({__name:"index",setup(x){const c=l(),a=m(()=>[{id:"consciousness",name:"Consciousness",description:"Thinking, vision, speech synthesis, gaming, etc.",icon:"i-lucide:ghost",to:"/settings/modules/consciousness",configured:!1},{id:"hearing",name:"Hearing",description:"Hearing, speech recognition, etc.",icon:"i-lucide:ear",to:"",configured:!1},{id:"messaging-discord",name:"Discord",description:"Messaging, notifications, etc.",icon:"i-simple-icons:discord",to:"",configured:!1},{id:"speech",name:"Speech",description:"Speech synthesis, etc.",icon:"i-lucide:mic",to:"",configured:!1},{id:"memory-short-term",name:"Short-Term Memory",description:"Short-term memory, etc.",icon:"i-lucide:book",to:"",configured:!1},{id:"memory-long-term",name:"Long-Term Memory",description:"Long-term memory, etc.",icon:"i-lucide:book-copy",to:"",configured:!1},{id:"vision",name:"Vision",description:"Vision, etc.",icon:"i-lucide:eye",to:"",configured:!1},{id:"game-minecraft",name:"Minecraft",description:"Playing Minecraft with you, etc.",iconColor:"i-vscode-icons:file-type-minecraft",to:"",configured:!1},{id:"game-factorio",name:"Factorio",description:"Playing Factorio with you, etc.",iconImage:y,to:"",configured:!1}]);return(b,o)=>(t(),n(s,null,[e("div",v,[e("button",{onClick:o[0]||(o[0]=i=>u(c).back())},o[1]||(o[1]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),o[2]||(o[2]=e("h1",{relative:""},[e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Settings")]),e("div",{"text-3xl":"","font-semibold":""}," Modules ")],-1))]),e("div",h,[(t(!0),n(s,null,f(a.value,i=>(t(),g(p,{key:i.id,title:i.name,description:i.description,icon:i.icon,"icon-color":i.iconColor,"icon-image":i.iconImage,to:i.to,configured:i.configured},null,8,["title","description","icon","icon-color","icon-image","to","configured"]))),128))]),o[3]||(o[3]=e("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",text:"neutral-100/80 dark:neutral-500/20"},[e("div",{text:"40","i-lucide:blocks":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof r=="function"&&r(k);export{k as default}; diff --git a/assets/index-SpDrDth7.js b/assets/index-lQIQ1Nea.js similarity index 76% rename from assets/index-SpDrDth7.js rename to assets/index-lQIQ1Nea.js index 44c839b31450ec49a44859265aa6d26069196031..532402528c068a30b77085a76299decb785a16f4 100644 --- a/assets/index-SpDrDth7.js +++ b/assets/index-lQIQ1Nea.js @@ -1,29 +1,29 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-DQA6qRZU.js","assets/HeaderLink-BKyhECz0.js","assets/HeaderLink-DsxHr3rn.css","assets/index-BJB7QhK6.js","assets/Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js","assets/Stage-BSOKcxWs.css","assets/emotions-D2WM87AE.js","assets/Live2DSettings.vue_vue_type_script_setup_true_lang-kg4G8Afm.js","assets/providers-CpyZMi_V.js","assets/queue-DqQ_HXOh.js","assets/queues-wwQOO-CJ.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-BcCSAMoU.js","assets/MobileInteractiveArea.vue_vue_type_script_setup_true_lang-Ds2PSx0x.js","assets/BasicTextarea.vue_vue_type_script_setup_true_lang-CfG2YTbd.js","assets/index-aMTQzeGD.js","assets/MobileInteractiveArea-C9fsJcq-.css","assets/route-block-B_A1xBdJ.js","assets/index-CsnOP7QS.css","assets/image-CVeI_914.js","assets/image-BhuwcwI9.css","assets/queue-a2h6DuYq.js","assets/index-DGm83CNQ.js","assets/index-G3kYDETb.css","assets/index-D5YcQgBT.js","assets/index-Du_4Mb4C.js","assets/IconStatusItem-DizX_200.js","assets/IconStatusItem-Dc5qdu-a.css","assets/consciousness-BqZoJErm.js","assets/index-D5R3unYH.js","assets/openai-DzkjcTpL.js","assets/openrouter-CH2Z6_wJ.js","assets/index-BGoaX9jF.js","assets/index-Cqww2nts.css","assets/delays-EUbdoOBL.js","assets/emotions-D6NX8Gz6.js","assets/messages-CXAlPtRI.js","assets/v2-BX1iC0HQ.js"])))=>i.map(i=>d[i]); -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();const ew="modulepreload",tw=function(n){return"/"+n},A_={},Gt=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(t.map(l=>{if(l=tw(l),l in A_)return;A_[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":ew,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,d)=>{f.addEventListener("load",h),f.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-Dk8xwEGd.js","assets/HeaderLink-Cxo-rQt1.js","assets/HeaderLink-DsxHr3rn.css","assets/index-2bw7rTOf.js","assets/Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js","assets/Stage-CFqYomWq.css","assets/emotions-D2WM87AE.js","assets/Live2DSettings.vue_vue_type_script_setup_true_lang-BZ13gadG.js","assets/providers-B5WAuhMk.js","assets/queue-BJ5EFzA4.js","assets/queues-Bj3v4TZ0.js","assets/speech-Dj8k8vbX.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js","assets/MobileInteractiveArea.vue_vue_type_script_setup_true_lang-DFvt4_Ml.js","assets/BasicTextarea.vue_vue_type_script_setup_true_lang-DTJgscnz.js","assets/consciousness-CCzKId_z.js","assets/index-CBwQWPyY.js","assets/MobileInteractiveArea-olUfoEr4.css","assets/route-block-B_A1xBdJ.js","assets/index-CsnOP7QS.css","assets/image-BIETLXD0.js","assets/image-BhuwcwI9.css","assets/queue-B8LsoNb_.js","assets/index-Bp-4JWYg.js","assets/index-G3kYDETb.css","assets/index-CHGD8voK.js","assets/index-BoxcUgjw.js","assets/IconStatusItem-C5d32Rl8.js","assets/IconStatusItem-Dc5qdu-a.css","assets/consciousness-jUPNmBFs.js","assets/RadioCardSimple.vue_vue_type_script_setup_true_lang-BPQCQDzL.js","assets/speech-DOiNlGmE.js","assets/index-CJP4FDm3.js","assets/elevenlabs-Bohuloj3.js","assets/openai-Cno5TrKr.js","assets/openrouter-DeKZSuQ4.js","assets/index-BfrnsB2c.js","assets/index-Cqww2nts.css","assets/delays-BqxW5uC2.js","assets/emotions-Cv9Jr9zp.js","assets/messages-BElHmTzU.js","assets/v2-frchrMBQ.js"])))=>i.map(i=>d[i]); +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();const QT="modulepreload",ew=function(n){return"/"+n},w_={},Bt=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(t.map(l=>{if(l=ew(l),l in w_)return;w_[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":QT,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,d)=>{f.addEventListener("load",h),f.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function Dm(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const pt={},jo=[],Gi=()=>{},nw=()=>!1,Zf=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),Om=n=>n.startsWith("onUpdate:"),Kt=Object.assign,Nm=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},iw=Object.prototype.hasOwnProperty,yt=(n,e)=>iw.call(n,e),Fe=Array.isArray,Ko=n=>Jl(n)==="[object Map]",pa=n=>Jl(n)==="[object Set]",C_=n=>Jl(n)==="[object Date]",$e=n=>typeof n=="function",It=n=>typeof n=="string",Ai=n=>typeof n=="symbol",wt=n=>n!==null&&typeof n=="object",Mx=n=>(wt(n)||$e(n))&&$e(n.then)&&$e(n.catch),Ex=Object.prototype.toString,Jl=n=>Ex.call(n),rw=n=>Jl(n).slice(8,-1),Tx=n=>Jl(n)==="[object Object]",Um=n=>It(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,Xa=Dm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Jf=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},sw=/-(\w)/g,ti=Jf(n=>n.replace(sw,(e,t)=>t?t.toUpperCase():"")),ow=/\B([A-Z])/g,os=Jf(n=>n.replace(ow,"-$1").toLowerCase()),Qf=Jf(n=>n.charAt(0).toUpperCase()+n.slice(1)),od=Jf(n=>n?`on${Qf(n)}`:""),Gn=(n,e)=>!Object.is(n,e),Pu=(n,...e)=>{for(let t=0;t{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},$u=n=>{const e=parseFloat(n);return isNaN(e)?n:e},aw=n=>{const e=It(n)?Number(n):NaN;return isNaN(e)?n:e};let R_;const eh=()=>R_||(R_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gi(n){if(Fe(n)){const e={};for(let t=0;t{if(t){const i=t.split(cw);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function ma(n){let e="";if(It(n))e=n;else if(Fe(n))for(let t=0;tno(t,e))}const Cx=n=>!!(n&&n.__v_isRef===!0),mw=n=>It(n)?n:n==null?"":Fe(n)||wt(n)&&(n.toString===Ex||!$e(n.toString))?Cx(n)?mw(n.value):JSON.stringify(n,Rx,2):String(n),Rx=(n,e)=>Cx(e)?Rx(n,e.value):Ko(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,r],s)=>(t[ad(i,s)+" =>"]=r,t),{})}:pa(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>ad(t))}:Ai(e)?ad(e):wt(e)&&!Fe(e)&&!Tx(e)?String(e):e,ad=(n,e="")=>{var t;return Ai(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/** +**//*! #__NO_SIDE_EFFECTS__ */function Lm(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const pt={},jo=[],Hi=()=>{},tw=()=>!1,Zf=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),Dm=n=>n.startsWith("onUpdate:"),Kt=Object.assign,Om=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},nw=Object.prototype.hasOwnProperty,yt=(n,e)=>nw.call(n,e),Fe=Array.isArray,Ko=n=>Jl(n)==="[object Map]",pa=n=>Jl(n)==="[object Set]",A_=n=>Jl(n)==="[object Date]",$e=n=>typeof n=="function",It=n=>typeof n=="string",wi=n=>typeof n=="symbol",wt=n=>n!==null&&typeof n=="object",Sx=n=>(wt(n)||$e(n))&&$e(n.then)&&$e(n.catch),Mx=Object.prototype.toString,Jl=n=>Mx.call(n),iw=n=>Jl(n).slice(8,-1),Ex=n=>Jl(n)==="[object Object]",Nm=n=>It(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,Xa=Lm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Jf=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},rw=/-(\w)/g,ei=Jf(n=>n.replace(rw,(e,t)=>t?t.toUpperCase():"")),sw=/\B([A-Z])/g,os=Jf(n=>n.replace(sw,"-$1").toLowerCase()),Qf=Jf(n=>n.charAt(0).toUpperCase()+n.slice(1)),od=Jf(n=>n?`on${Qf(n)}`:""),Hn=(n,e)=>!Object.is(n,e),Pu=(n,...e)=>{for(let t=0;t{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},$u=n=>{const e=parseFloat(n);return isNaN(e)?n:e},ow=n=>{const e=It(n)?Number(n):NaN;return isNaN(e)?n:e};let C_;const eh=()=>C_||(C_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function mi(n){if(Fe(n)){const e={};for(let t=0;t{if(t){const i=t.split(lw);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function ma(n){let e="";if(It(n))e=n;else if(Fe(n))for(let t=0;tno(t,e))}const Ax=n=>!!(n&&n.__v_isRef===!0),pw=n=>It(n)?n:n==null?"":Fe(n)||wt(n)&&(n.toString===Mx||!$e(n.toString))?Ax(n)?pw(n.value):JSON.stringify(n,Cx,2):String(n),Cx=(n,e)=>Ax(e)?Cx(n,e.value):Ko(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,r],s)=>(t[ad(i,s)+" =>"]=r,t),{})}:pa(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>ad(t))}:wi(e)?ad(e):wt(e)&&!Fe(e)&&!Ex(e)?String(e):e,ad=(n,e="")=>{var t;return wi(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/** * @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Tn;class Px{constructor(e=!1){this.detached=e,this._active=!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)return;if(qa){let e=qa;for(qa=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;$a;){let e=$a;for($a=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 Ox(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Nx(n){let e,t=n.depsTail,i=t;for(;i;){const r=i.prevDep;i.version===-1?(i===t&&(t=r),Vm(i),gw(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}n.deps=e,n.depsTail=t}function Ep(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Ux(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function Ux(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===gl))return;n.globalVersion=gl;const e=n.dep;if(n.flags|=2,e.version>0&&!n.isSSR&&n.deps&&!Ep(n)){n.flags&=-3;return}const t=Ct,i=wi;Ct=n,wi=!0;try{Ox(n);const r=n.fn(n._value);(e.version===0||Gn(r,n._value))&&(n._value=r,e.version++)}catch(r){throw e.version++,r}finally{Ct=t,wi=i,Nx(n),n.flags&=-3}}function Vm(n,e=!1){const{dep:t,prevSub:i,nextSub:r}=n;if(i&&(i.nextSub=r,n.prevSub=void 0),r&&(r.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let s=t.computed.deps;s;s=s.nextDep)Vm(s,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function gw(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let wi=!0;const Fx=[];function as(){Fx.push(wi),wi=!1}function ls(){const n=Fx.pop();wi=n===void 0?!0:n}function P_(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=Ct;Ct=void 0;try{e()}finally{Ct=t}}}let gl=0;class _w{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 nh{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(!Ct||!wi||Ct===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Ct)t=this.activeLink=new _w(Ct,this),Ct.deps?(t.prevDep=Ct.depsTail,Ct.depsTail.nextDep=t,Ct.depsTail=t):Ct.deps=Ct.depsTail=t,Bx(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=Ct.depsTail,t.nextDep=void 0,Ct.depsTail.nextDep=t,Ct.depsTail=t,Ct.deps===t&&(Ct.deps=i)}return t}trigger(e){this.version++,gl++,this.notify(e)}notify(e){km();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{zm()}}}function Bx(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)Bx(i)}const t=n.dep.subs;t!==n&&(n.prevSub=t,t&&(t.nextSub=n)),n.dep.subs=n}}const qu=new WeakMap,Ks=Symbol(""),Tp=Symbol(""),_l=Symbol("");function pn(n,e,t){if(wi&&Ct){let i=qu.get(n);i||qu.set(n,i=new Map);let r=i.get(t);r||(i.set(t,r=new nh),r.map=i,r.key=t),r.track()}}function ur(n,e,t,i,r,s){const o=qu.get(n);if(!o){gl++;return}const a=l=>{l&&l.trigger()};if(km(),e==="clear")o.forEach(a);else{const l=Fe(n),c=l&&Um(t);if(l&&t==="length"){const u=Number(i);o.forEach((f,h)=>{(h==="length"||h===_l||!Ai(h)&&h>=u)&&a(f)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),c&&a(o.get(_l)),e){case"add":l?c&&a(o.get("length")):(a(o.get(Ks)),Ko(n)&&a(o.get(Tp)));break;case"delete":l||(a(o.get(Ks)),Ko(n)&&a(o.get(Tp)));break;case"set":Ko(n)&&a(o.get(Ks));break}}zm()}function vw(n,e){const t=qu.get(n);return t&&t.get(e)}function xo(n){const e=st(n);return e===n?e:(pn(e,"iterate",_l),ci(n)?e:e.map(mn))}function ih(n){return pn(n=st(n),"iterate",_l),n}const yw={__proto__:null,[Symbol.iterator](){return cd(this,Symbol.iterator,mn)},concat(...n){return xo(this).concat(...n.map(e=>Fe(e)?xo(e):e))},entries(){return cd(this,"entries",n=>(n[1]=mn(n[1]),n))},every(n,e){return Qi(this,"every",n,e,void 0,arguments)},filter(n,e){return Qi(this,"filter",n,e,t=>t.map(mn),arguments)},find(n,e){return Qi(this,"find",n,e,mn,arguments)},findIndex(n,e){return Qi(this,"findIndex",n,e,void 0,arguments)},findLast(n,e){return Qi(this,"findLast",n,e,mn,arguments)},findLastIndex(n,e){return Qi(this,"findLastIndex",n,e,void 0,arguments)},forEach(n,e){return Qi(this,"forEach",n,e,void 0,arguments)},includes(...n){return ud(this,"includes",n)},indexOf(...n){return ud(this,"indexOf",n)},join(n){return xo(this).join(n)},lastIndexOf(...n){return ud(this,"lastIndexOf",n)},map(n,e){return Qi(this,"map",n,e,void 0,arguments)},pop(){return Ma(this,"pop")},push(...n){return Ma(this,"push",n)},reduce(n,...e){return I_(this,"reduce",n,e)},reduceRight(n,...e){return I_(this,"reduceRight",n,e)},shift(){return Ma(this,"shift")},some(n,e){return Qi(this,"some",n,e,void 0,arguments)},splice(...n){return Ma(this,"splice",n)},toReversed(){return xo(this).toReversed()},toSorted(n){return xo(this).toSorted(n)},toSpliced(...n){return xo(this).toSpliced(...n)},unshift(...n){return Ma(this,"unshift",n)},values(){return cd(this,"values",mn)}};function cd(n,e,t){const i=ih(n),r=i[e]();return i!==n&&!ci(n)&&(r._next=r.next,r.next=()=>{const s=r._next();return s.value&&(s.value=t(s.value)),s}),r}const xw=Array.prototype;function Qi(n,e,t,i,r,s){const o=ih(n),a=o!==n&&!ci(n),l=o[e];if(l!==xw[e]){const f=l.apply(n,s);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&&r?r(u):u}function I_(n,e,t,i){const r=ih(n);let s=t;return r!==n&&(ci(n)?t.length>3&&(s=function(o,a,l){return t.call(this,o,a,l,n)}):s=function(o,a,l){return t.call(this,o,mn(a),l,n)}),r[e](s,...i)}function ud(n,e,t){const i=st(n);pn(i,"iterate",_l);const r=i[e](...t);return(r===-1||r===!1)&&Wm(t[0])?(t[0]=st(t[0]),i[e](...t)):r}function Ma(n,e,t=[]){as(),km();const i=st(n)[e].apply(n,t);return zm(),ls(),i}const bw=Dm("__proto__,__v_isRef,__isVue"),kx=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Ai));function Sw(n){Ai(n)||(n=String(n));const e=st(this);return pn(e,"has",n),e.hasOwnProperty(n)}class zx{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const r=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!r;if(t==="__v_isReadonly")return r;if(t==="__v_isShallow")return s;if(t==="__v_raw")return i===(r?s?Lw:Wx:s?Gx:Hx).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Fe(e);if(!r){let l;if(o&&(l=yw[t]))return l;if(t==="hasOwnProperty")return Sw}const a=Reflect.get(e,t,Mt(e)?e:i);return(Ai(t)?kx.has(t):bw(t))||(r||pn(e,"get",t),s)?a:Mt(a)?o&&Um(t)?a:a.value:wt(a)?r?di(a):hi(a):a}}class Vx extends zx{constructor(e=!1){super(!1,e)}set(e,t,i,r){let s=e[t];if(!this._isShallow){const l=io(s);if(!ci(i)&&!io(i)&&(s=st(s),i=st(i)),!Fe(e)&&Mt(s)&&!Mt(i))return l?!1:(s.value=i,!0)}const o=Fe(e)&&Um(t)?Number(t)n,Sc=n=>Reflect.getPrototypeOf(n);function Aw(n,e,t){return function(...i){const r=this.__v_raw,s=st(r),o=Ko(s),a=n==="entries"||n===Symbol.iterator&&o,l=n==="keys"&&o,c=r[n](...i),u=t?wp:e?Ap:mn;return!e&&pn(s,"iterate",l?Tp:Ks),{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 Mc(n){return function(...e){return n==="delete"?!1:n==="clear"?void 0:this}}function Cw(n,e){const t={get(r){const s=this.__v_raw,o=st(s),a=st(r);n||(Gn(r,a)&&pn(o,"get",r),pn(o,"get",a));const{has:l}=Sc(o),c=e?wp:n?Ap:mn;if(l.call(o,r))return c(s.get(r));if(l.call(o,a))return c(s.get(a));s!==o&&s.get(r)},get size(){const r=this.__v_raw;return!n&&pn(st(r),"iterate",Ks),Reflect.get(r,"size",r)},has(r){const s=this.__v_raw,o=st(s),a=st(r);return n||(Gn(r,a)&&pn(o,"has",r),pn(o,"has",a)),r===a?s.has(r):s.has(r)||s.has(a)},forEach(r,s){const o=this,a=o.__v_raw,l=st(a),c=e?wp:n?Ap:mn;return!n&&pn(l,"iterate",Ks),a.forEach((u,f)=>r.call(s,c(u),c(f),o))}};return Kt(t,n?{add:Mc("add"),set:Mc("set"),delete:Mc("delete"),clear:Mc("clear")}:{add(r){!e&&!ci(r)&&!io(r)&&(r=st(r));const s=st(this);return Sc(s).has.call(s,r)||(s.add(r),ur(s,"add",r,r)),this},set(r,s){!e&&!ci(s)&&!io(s)&&(s=st(s));const o=st(this),{has:a,get:l}=Sc(o);let c=a.call(o,r);c||(r=st(r),c=a.call(o,r));const u=l.call(o,r);return o.set(r,s),c?Gn(s,u)&&ur(o,"set",r,s):ur(o,"add",r,s),this},delete(r){const s=st(this),{has:o,get:a}=Sc(s);let l=o.call(s,r);l||(r=st(r),l=o.call(s,r)),a&&a.call(s,r);const c=s.delete(r);return l&&ur(s,"delete",r,void 0),c},clear(){const r=st(this),s=r.size!==0,o=r.clear();return s&&ur(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=Aw(r,n,e)}),t}function Hm(n,e){const t=Cw(n,e);return(i,r,s)=>r==="__v_isReactive"?!n:r==="__v_isReadonly"?n:r==="__v_raw"?i:Reflect.get(yt(t,r)&&r in i?t:i,r,s)}const Rw={get:Hm(!1,!1)},Pw={get:Hm(!1,!0)},Iw={get:Hm(!0,!1)};const Hx=new WeakMap,Gx=new WeakMap,Wx=new WeakMap,Lw=new WeakMap;function Dw(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ow(n){return n.__v_skip||!Object.isExtensible(n)?0:Dw(rw(n))}function hi(n){return io(n)?n:Gm(n,!1,Ew,Rw,Hx)}function Xx(n){return Gm(n,!1,ww,Pw,Gx)}function di(n){return Gm(n,!0,Tw,Iw,Wx)}function Gm(n,e,t,i,r){if(!wt(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const s=r.get(n);if(s)return s;const o=Ow(n);if(o===0)return n;const a=new Proxy(n,o===2?i:t);return r.set(n,a),a}function yr(n){return io(n)?yr(n.__v_raw):!!(n&&n.__v_isReactive)}function io(n){return!!(n&&n.__v_isReadonly)}function ci(n){return!!(n&&n.__v_isShallow)}function Wm(n){return n?!!n.__v_raw:!1}function st(n){const e=n&&n.__v_raw;return e?st(e):n}function Xm(n){return!yt(n,"__v_skip")&&Object.isExtensible(n)&&wx(n,"__v_skip",!0),n}const mn=n=>wt(n)?hi(n):n,Ap=n=>wt(n)?di(n):n;function Mt(n){return n?n.__v_isRef===!0:!1}function Xe(n){return $x(n,!1)}function ze(n){return $x(n,!0)}function $x(n,e){return Mt(n)?n:new Nw(n,e)}class Nw{constructor(e,t){this.dep=new nh,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:st(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||ci(e)||io(e);e=i?e:st(e),Gn(e,t)&&(this._rawValue=e,this._value=i?e:mn(e),this.dep.trigger())}}function Rt(n){return Mt(n)?n.value:n}function ot(n){return $e(n)?n():Rt(n)}const Uw={get:(n,e,t)=>e==="__v_raw"?n:Rt(Reflect.get(n,e,t)),set:(n,e,t,i)=>{const r=n[e];return Mt(r)&&!Mt(t)?(r.value=t,!0):Reflect.set(n,e,t,i)}};function qx(n){return yr(n)?n:new Proxy(n,Uw)}class Fw{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new nh,{get:i,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function $m(n){return new Fw(n)}function Yx(n){const e=Fe(n)?new Array(n.length):{};for(const t in n)e[t]=Kx(n,t);return e}class Bw{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 vw(st(this._object),this._key)}}class kw{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 jx(n,e,t){return Mt(n)?n:$e(n)?new kw(n):wt(n)&&arguments.length>1?Kx(n,e,t):Xe(n)}function Kx(n,e,t){const i=n[e];return Mt(i)?i:new Bw(n,e,t)}class zw{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new nh(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=gl-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Ct!==this)return Dx(this,!0),!0}get value(){const e=this.dep.track();return Ux(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Vw(n,e,t=!1){let i,r;return $e(n)?i=n:(i=n.get,r=n.set),new zw(i,r,t)}const Ec={},Yu=new WeakMap;let Fs;function Hw(n,e=!1,t=Fs){if(t){let i=Yu.get(t);i||Yu.set(t,i=[]),i.push(n)}}function Gw(n,e,t=pt){const{immediate:i,deep:r,once:s,scheduler:o,augmentJob:a,call:l}=t,c=v=>r?v:ci(v)||r===!1||r===0?fr(v,1):fr(v);let u,f,h,d,p=!1,_=!1;if(Mt(n)?(f=()=>n.value,p=ci(n)):yr(n)?(f=()=>c(n),p=!0):Fe(n)?(_=!0,p=n.some(v=>yr(v)||ci(v)),f=()=>n.map(v=>{if(Mt(v))return v.value;if(yr(v))return c(v);if($e(v))return l?l(v,2):v()})):$e(n)?e?f=l?()=>l(n,2):n:f=()=>{if(h){as();try{h()}finally{ls()}}const v=Fs;Fs=u;try{return l?l(n,3,[d]):n(d)}finally{Fs=v}}:f=Gi,e&&r){const v=f,E=r===!0?1/0:r;f=()=>fr(v(),E)}const g=th(),m=()=>{u.stop(),g&&g.active&&Nm(g.effects,u)};if(s&&e){const v=e;e=(...E)=>{v(...E),m()}}let y=_?new Array(n.length).fill(Ec):Ec;const x=v=>{if(!(!(u.flags&1)||!u.dirty&&!v))if(e){const E=u.run();if(r||p||(_?E.some((T,M)=>Gn(T,y[M])):Gn(E,y))){h&&h();const T=Fs;Fs=u;try{const M=[E,y===Ec?void 0:_&&y[0]===Ec?[]:y,d];l?l(e,3,M):e(...M),y=E}finally{Fs=T}}}else u.run()};return a&&a(x),u=new Ix(f),u.scheduler=o?()=>o(x,!1):x,d=v=>Hw(v,!1,u),h=u.onStop=()=>{const v=Yu.get(u);if(v){if(l)l(v,4);else for(const E of v)E();Yu.delete(u)}},e?i?x(!0):y=u.run():o?o(x.bind(null,!0),!0):u.run(),m.pause=u.pause.bind(u),m.resume=u.resume.bind(u),m.stop=m,m}function fr(n,e=1/0,t){if(e<=0||!wt(n)||n.__v_skip||(t=t||new Set,t.has(n)))return n;if(t.add(n),e--,Mt(n))fr(n.value,e,t);else if(Fe(n))for(let i=0;i{fr(i,e,t)});else if(Tx(n)){for(const i in n)fr(n[i],e,t);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&fr(n[i],e,t)}return n}/** +**/let Tn;class Rx{constructor(e=!1){this.detached=e,this._active=!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)return;if(qa){let e=qa;for(qa=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;$a;){let e=$a;for($a=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 Dx(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ox(n){let e,t=n.depsTail,i=t;for(;i;){const r=i.prevDep;i.version===-1?(i===t&&(t=r),Vm(i),mw(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}n.deps=e,n.depsTail=t}function Ep(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Nx(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function Nx(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===gl))return;n.globalVersion=gl;const e=n.dep;if(n.flags|=2,e.version>0&&!n.isSSR&&n.deps&&!Ep(n)){n.flags&=-3;return}const t=Ct,i=Ti;Ct=n,Ti=!0;try{Dx(n);const r=n.fn(n._value);(e.version===0||Hn(r,n._value))&&(n._value=r,e.version++)}catch(r){throw e.version++,r}finally{Ct=t,Ti=i,Ox(n),n.flags&=-3}}function Vm(n,e=!1){const{dep:t,prevSub:i,nextSub:r}=n;if(i&&(i.nextSub=r,n.prevSub=void 0),r&&(r.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let s=t.computed.deps;s;s=s.nextDep)Vm(s,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function mw(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let Ti=!0;const Ux=[];function as(){Ux.push(Ti),Ti=!1}function ls(){const n=Ux.pop();Ti=n===void 0?!0:n}function R_(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=Ct;Ct=void 0;try{e()}finally{Ct=t}}}let gl=0;class gw{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 nh{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(!Ct||!Ti||Ct===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Ct)t=this.activeLink=new gw(Ct,this),Ct.deps?(t.prevDep=Ct.depsTail,Ct.depsTail.nextDep=t,Ct.depsTail=t):Ct.deps=Ct.depsTail=t,Fx(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=Ct.depsTail,t.nextDep=void 0,Ct.depsTail.nextDep=t,Ct.depsTail=t,Ct.deps===t&&(Ct.deps=i)}return t}trigger(e){this.version++,gl++,this.notify(e)}notify(e){Bm();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{km()}}}function Fx(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)Fx(i)}const t=n.dep.subs;t!==n&&(n.prevSub=t,t&&(t.nextSub=n)),n.dep.subs=n}}const qu=new WeakMap,Ks=Symbol(""),Tp=Symbol(""),_l=Symbol("");function pn(n,e,t){if(Ti&&Ct){let i=qu.get(n);i||qu.set(n,i=new Map);let r=i.get(t);r||(i.set(t,r=new nh),r.map=i,r.key=t),r.track()}}function cr(n,e,t,i,r,s){const o=qu.get(n);if(!o){gl++;return}const a=l=>{l&&l.trigger()};if(Bm(),e==="clear")o.forEach(a);else{const l=Fe(n),c=l&&Nm(t);if(l&&t==="length"){const u=Number(i);o.forEach((f,h)=>{(h==="length"||h===_l||!wi(h)&&h>=u)&&a(f)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),c&&a(o.get(_l)),e){case"add":l?c&&a(o.get("length")):(a(o.get(Ks)),Ko(n)&&a(o.get(Tp)));break;case"delete":l||(a(o.get(Ks)),Ko(n)&&a(o.get(Tp)));break;case"set":Ko(n)&&a(o.get(Ks));break}}km()}function _w(n,e){const t=qu.get(n);return t&&t.get(e)}function xo(n){const e=st(n);return e===n?e:(pn(e,"iterate",_l),li(n)?e:e.map(mn))}function ih(n){return pn(n=st(n),"iterate",_l),n}const vw={__proto__:null,[Symbol.iterator](){return cd(this,Symbol.iterator,mn)},concat(...n){return xo(this).concat(...n.map(e=>Fe(e)?xo(e):e))},entries(){return cd(this,"entries",n=>(n[1]=mn(n[1]),n))},every(n,e){return Ji(this,"every",n,e,void 0,arguments)},filter(n,e){return Ji(this,"filter",n,e,t=>t.map(mn),arguments)},find(n,e){return Ji(this,"find",n,e,mn,arguments)},findIndex(n,e){return Ji(this,"findIndex",n,e,void 0,arguments)},findLast(n,e){return Ji(this,"findLast",n,e,mn,arguments)},findLastIndex(n,e){return Ji(this,"findLastIndex",n,e,void 0,arguments)},forEach(n,e){return Ji(this,"forEach",n,e,void 0,arguments)},includes(...n){return ud(this,"includes",n)},indexOf(...n){return ud(this,"indexOf",n)},join(n){return xo(this).join(n)},lastIndexOf(...n){return ud(this,"lastIndexOf",n)},map(n,e){return Ji(this,"map",n,e,void 0,arguments)},pop(){return Ma(this,"pop")},push(...n){return Ma(this,"push",n)},reduce(n,...e){return P_(this,"reduce",n,e)},reduceRight(n,...e){return P_(this,"reduceRight",n,e)},shift(){return Ma(this,"shift")},some(n,e){return Ji(this,"some",n,e,void 0,arguments)},splice(...n){return Ma(this,"splice",n)},toReversed(){return xo(this).toReversed()},toSorted(n){return xo(this).toSorted(n)},toSpliced(...n){return xo(this).toSpliced(...n)},unshift(...n){return Ma(this,"unshift",n)},values(){return cd(this,"values",mn)}};function cd(n,e,t){const i=ih(n),r=i[e]();return i!==n&&!li(n)&&(r._next=r.next,r.next=()=>{const s=r._next();return s.value&&(s.value=t(s.value)),s}),r}const yw=Array.prototype;function Ji(n,e,t,i,r,s){const o=ih(n),a=o!==n&&!li(n),l=o[e];if(l!==yw[e]){const f=l.apply(n,s);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&&r?r(u):u}function P_(n,e,t,i){const r=ih(n);let s=t;return r!==n&&(li(n)?t.length>3&&(s=function(o,a,l){return t.call(this,o,a,l,n)}):s=function(o,a,l){return t.call(this,o,mn(a),l,n)}),r[e](s,...i)}function ud(n,e,t){const i=st(n);pn(i,"iterate",_l);const r=i[e](...t);return(r===-1||r===!1)&&Gm(t[0])?(t[0]=st(t[0]),i[e](...t)):r}function Ma(n,e,t=[]){as(),Bm();const i=st(n)[e].apply(n,t);return km(),ls(),i}const xw=Lm("__proto__,__v_isRef,__isVue"),Bx=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(wi));function bw(n){wi(n)||(n=String(n));const e=st(this);return pn(e,"has",n),e.hasOwnProperty(n)}class kx{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const r=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!r;if(t==="__v_isReadonly")return r;if(t==="__v_isShallow")return s;if(t==="__v_raw")return i===(r?s?Iw:Gx:s?Hx:zx).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Fe(e);if(!r){let l;if(o&&(l=vw[t]))return l;if(t==="hasOwnProperty")return bw}const a=Reflect.get(e,t,Mt(e)?e:i);return(wi(t)?Bx.has(t):xw(t))||(r||pn(e,"get",t),s)?a:Mt(a)?o&&Nm(t)?a:a.value:wt(a)?r?hi(a):fi(a):a}}class Vx extends kx{constructor(e=!1){super(!1,e)}set(e,t,i,r){let s=e[t];if(!this._isShallow){const l=io(s);if(!li(i)&&!io(i)&&(s=st(s),i=st(i)),!Fe(e)&&Mt(s)&&!Mt(i))return l?!1:(s.value=i,!0)}const o=Fe(e)&&Nm(t)?Number(t)n,Sc=n=>Reflect.getPrototypeOf(n);function ww(n,e,t){return function(...i){const r=this.__v_raw,s=st(r),o=Ko(s),a=n==="entries"||n===Symbol.iterator&&o,l=n==="keys"&&o,c=r[n](...i),u=t?wp:e?Ap:mn;return!e&&pn(s,"iterate",l?Tp:Ks),{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 Mc(n){return function(...e){return n==="delete"?!1:n==="clear"?void 0:this}}function Aw(n,e){const t={get(r){const s=this.__v_raw,o=st(s),a=st(r);n||(Hn(r,a)&&pn(o,"get",r),pn(o,"get",a));const{has:l}=Sc(o),c=e?wp:n?Ap:mn;if(l.call(o,r))return c(s.get(r));if(l.call(o,a))return c(s.get(a));s!==o&&s.get(r)},get size(){const r=this.__v_raw;return!n&&pn(st(r),"iterate",Ks),Reflect.get(r,"size",r)},has(r){const s=this.__v_raw,o=st(s),a=st(r);return n||(Hn(r,a)&&pn(o,"has",r),pn(o,"has",a)),r===a?s.has(r):s.has(r)||s.has(a)},forEach(r,s){const o=this,a=o.__v_raw,l=st(a),c=e?wp:n?Ap:mn;return!n&&pn(l,"iterate",Ks),a.forEach((u,f)=>r.call(s,c(u),c(f),o))}};return Kt(t,n?{add:Mc("add"),set:Mc("set"),delete:Mc("delete"),clear:Mc("clear")}:{add(r){!e&&!li(r)&&!io(r)&&(r=st(r));const s=st(this);return Sc(s).has.call(s,r)||(s.add(r),cr(s,"add",r,r)),this},set(r,s){!e&&!li(s)&&!io(s)&&(s=st(s));const o=st(this),{has:a,get:l}=Sc(o);let c=a.call(o,r);c||(r=st(r),c=a.call(o,r));const u=l.call(o,r);return o.set(r,s),c?Hn(s,u)&&cr(o,"set",r,s):cr(o,"add",r,s),this},delete(r){const s=st(this),{has:o,get:a}=Sc(s);let l=o.call(s,r);l||(r=st(r),l=o.call(s,r)),a&&a.call(s,r);const c=s.delete(r);return l&&cr(s,"delete",r,void 0),c},clear(){const r=st(this),s=r.size!==0,o=r.clear();return s&&cr(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=ww(r,n,e)}),t}function zm(n,e){const t=Aw(n,e);return(i,r,s)=>r==="__v_isReactive"?!n:r==="__v_isReadonly"?n:r==="__v_raw"?i:Reflect.get(yt(t,r)&&r in i?t:i,r,s)}const Cw={get:zm(!1,!1)},Rw={get:zm(!1,!0)},Pw={get:zm(!0,!1)};const zx=new WeakMap,Hx=new WeakMap,Gx=new WeakMap,Iw=new WeakMap;function Lw(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Dw(n){return n.__v_skip||!Object.isExtensible(n)?0:Lw(iw(n))}function fi(n){return io(n)?n:Hm(n,!1,Mw,Cw,zx)}function Wx(n){return Hm(n,!1,Tw,Rw,Hx)}function hi(n){return Hm(n,!0,Ew,Pw,Gx)}function Hm(n,e,t,i,r){if(!wt(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const s=r.get(n);if(s)return s;const o=Dw(n);if(o===0)return n;const a=new Proxy(n,o===2?i:t);return r.set(n,a),a}function vr(n){return io(n)?vr(n.__v_raw):!!(n&&n.__v_isReactive)}function io(n){return!!(n&&n.__v_isReadonly)}function li(n){return!!(n&&n.__v_isShallow)}function Gm(n){return n?!!n.__v_raw:!1}function st(n){const e=n&&n.__v_raw;return e?st(e):n}function Wm(n){return!yt(n,"__v_skip")&&Object.isExtensible(n)&&Tx(n,"__v_skip",!0),n}const mn=n=>wt(n)?fi(n):n,Ap=n=>wt(n)?hi(n):n;function Mt(n){return n?n.__v_isRef===!0:!1}function Xe(n){return Xx(n,!1)}function Ve(n){return Xx(n,!0)}function Xx(n,e){return Mt(n)?n:new Ow(n,e)}class Ow{constructor(e,t){this.dep=new nh,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:st(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||li(e)||io(e);e=i?e:st(e),Hn(e,t)&&(this._rawValue=e,this._value=i?e:mn(e),this.dep.trigger())}}function Rt(n){return Mt(n)?n.value:n}function ot(n){return $e(n)?n():Rt(n)}const Nw={get:(n,e,t)=>e==="__v_raw"?n:Rt(Reflect.get(n,e,t)),set:(n,e,t,i)=>{const r=n[e];return Mt(r)&&!Mt(t)?(r.value=t,!0):Reflect.set(n,e,t,i)}};function $x(n){return vr(n)?n:new Proxy(n,Nw)}class Uw{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new nh,{get:i,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function Xm(n){return new Uw(n)}function qx(n){const e=Fe(n)?new Array(n.length):{};for(const t in n)e[t]=jx(n,t);return e}class Fw{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 _w(st(this._object),this._key)}}class Bw{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 Yx(n,e,t){return Mt(n)?n:$e(n)?new Bw(n):wt(n)&&arguments.length>1?jx(n,e,t):Xe(n)}function jx(n,e,t){const i=n[e];return Mt(i)?i:new Fw(n,e,t)}class kw{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new nh(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=gl-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Ct!==this)return Lx(this,!0),!0}get value(){const e=this.dep.track();return Nx(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Vw(n,e,t=!1){let i,r;return $e(n)?i=n:(i=n.get,r=n.set),new kw(i,r,t)}const Ec={},Yu=new WeakMap;let Fs;function zw(n,e=!1,t=Fs){if(t){let i=Yu.get(t);i||Yu.set(t,i=[]),i.push(n)}}function Hw(n,e,t=pt){const{immediate:i,deep:r,once:s,scheduler:o,augmentJob:a,call:l}=t,c=v=>r?v:li(v)||r===!1||r===0?ur(v,1):ur(v);let u,f,h,d,p=!1,_=!1;if(Mt(n)?(f=()=>n.value,p=li(n)):vr(n)?(f=()=>c(n),p=!0):Fe(n)?(_=!0,p=n.some(v=>vr(v)||li(v)),f=()=>n.map(v=>{if(Mt(v))return v.value;if(vr(v))return c(v);if($e(v))return l?l(v,2):v()})):$e(n)?e?f=l?()=>l(n,2):n:f=()=>{if(h){as();try{h()}finally{ls()}}const v=Fs;Fs=u;try{return l?l(n,3,[d]):n(d)}finally{Fs=v}}:f=Hi,e&&r){const v=f,E=r===!0?1/0:r;f=()=>ur(v(),E)}const g=th(),m=()=>{u.stop(),g&&g.active&&Om(g.effects,u)};if(s&&e){const v=e;e=(...E)=>{v(...E),m()}}let y=_?new Array(n.length).fill(Ec):Ec;const x=v=>{if(!(!(u.flags&1)||!u.dirty&&!v))if(e){const E=u.run();if(r||p||(_?E.some((T,M)=>Hn(T,y[M])):Hn(E,y))){h&&h();const T=Fs;Fs=u;try{const M=[E,y===Ec?void 0:_&&y[0]===Ec?[]:y,d];l?l(e,3,M):e(...M),y=E}finally{Fs=T}}}else u.run()};return a&&a(x),u=new Px(f),u.scheduler=o?()=>o(x,!1):x,d=v=>zw(v,!1,u),h=u.onStop=()=>{const v=Yu.get(u);if(v){if(l)l(v,4);else for(const E of v)E();Yu.delete(u)}},e?i?x(!0):y=u.run():o?o(x.bind(null,!0),!0):u.run(),m.pause=u.pause.bind(u),m.resume=u.resume.bind(u),m.stop=m,m}function ur(n,e=1/0,t){if(e<=0||!wt(n)||n.__v_skip||(t=t||new Set,t.has(n)))return n;if(t.add(n),e--,Mt(n))ur(n.value,e,t);else if(Fe(n))for(let i=0;i{ur(i,e,t)});else if(Ex(n)){for(const i in n)ur(n[i],e,t);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&ur(n[i],e,t)}return n}/** * @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function ec(n,e,t,i){try{return i?n(...i):n()}catch(r){rh(r,e,t)}}function Ci(n,e,t,i){if($e(n)){const r=ec(n,e,t,i);return r&&Mx(r)&&r.catch(s=>{rh(s,e,t)}),r}if(Fe(n)){const r=[];for(let s=0;s>>1,r=An[i],s=vl(r);s=vl(t)?An.push(n):An.splice(Xw(e),0,n),n.flags|=1,Jx()}}function Jx(){ju||(ju=Zx.then(eb))}function $w(n){Fe(n)?Zo.push(...n):Vr&&n.id===-1?Vr.splice(zo+1,0,n):n.flags&1||(Zo.push(n),n.flags|=1),Jx()}function L_(n,e,t=Bi+1){for(;tvl(t)-vl(i));if(Zo.length=0,Vr){Vr.push(...e);return}for(Vr=e,zo=0;zon.id==null?n.flags&2?-1:1/0:n.id;function eb(n){try{for(Bi=0;Bi{i._d&&X_(-1);const s=Ku(e);let o;try{o=n(...r)}finally{Ku(s),i._d&&X_(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function h4(n,e){if(qt===null)return n;const t=uh(qt),i=n.dirs||(n.dirs=[]);for(let r=0;rn.__isTeleport,Ya=n=>n&&(n.disabled||n.disabled===""),D_=n=>n&&(n.defer||n.defer===""),O_=n=>typeof SVGElement<"u"&&n instanceof SVGElement,N_=n=>typeof MathMLElement=="function"&&n instanceof MathMLElement,Cp=(n,e)=>{const t=n&&n.to;return It(t)?e?e(t):null:t},sb={name:"Teleport",__isTeleport:!0,process(n,e,t,i,r,s,o,a,l,c){const{mc:u,pc:f,pbc:h,o:{insert:d,querySelector:p,createText:_,createComment:g}}=c,m=Ya(e.props);let{shapeFlag:y,children:x,dynamicChildren:v}=e;if(n==null){const E=e.el=_(""),T=e.anchor=_("");d(E,t,i),d(T,t,i);const M=(b,S)=>{y&16&&(r&&r.isCE&&(r.ce._teleportTarget=b),u(x,b,S,r,s,o,a,l))},P=()=>{const b=e.target=Cp(e.props,p),S=ob(b,e,_,d);b&&(o!=="svg"&&O_(b)?o="svg":o!=="mathml"&&N_(b)&&(o="mathml"),m||(M(b,S),Iu(e,!1)))};m&&(M(t,T),Iu(e,!0)),D_(e.props)?En(()=>{P(),e.el.__isMounted=!0},s):P()}else{if(D_(e.props)&&!n.el.__isMounted){En(()=>{sb.process(n,e,t,i,r,s,o,a,l,c),delete n.el.__isMounted},s);return}e.el=n.el,e.targetStart=n.targetStart;const E=e.anchor=n.anchor,T=e.target=n.target,M=e.targetAnchor=n.targetAnchor,P=Ya(n.props),b=P?t:T,S=P?E:M;if(o==="svg"||O_(T)?o="svg":(o==="mathml"||N_(T))&&(o="mathml"),v?(h(n.dynamicChildren,v,b,r,s,o,a),eg(n,e,!0)):l||f(n,e,b,S,r,s,o,a,!1),m)P?e.props&&n.props&&e.props.to!==n.props.to&&(e.props.to=n.props.to):Tc(e,t,E,c,1);else if((e.props&&e.props.to)!==(n.props&&n.props.to)){const D=e.target=Cp(e.props,p);D&&Tc(e,D,null,c,0)}else P&&Tc(e,T,M,c,1);Iu(e,m)}},remove(n,e,t,{um:i,o:{remove:r}},s){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:f,props:h}=n;if(f&&(r(c),r(u)),s&&r(l),o&16){const d=s||!Ya(h);for(let p=0;p{n.isMounted=!0}),Ym(()=>{n.isUnmounting=!0}),n}const si=[Function,Array],ab={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:si,onEnter:si,onAfterEnter:si,onEnterCancelled:si,onBeforeLeave:si,onLeave:si,onAfterLeave:si,onLeaveCancelled:si,onBeforeAppear:si,onAppear:si,onAfterAppear:si,onAppearCancelled:si},lb=n=>{const e=n.subTree;return e.component?lb(e.component):e},jw={name:"BaseTransition",props:ab,setup(n,{slots:e}){const t=On(),i=Yw();return()=>{const r=e.default&&fb(e.default(),!0);if(!r||!r.length)return;const s=cb(r),o=st(n),{mode:a}=o;if(i.isLeaving)return fd(s);const l=U_(s);if(!l)return fd(s);let c=Rp(l,o,i,t,f=>c=f);l.type!==Cn&&yl(l,c);let u=t.subTree&&U_(t.subTree);if(u&&u.type!==Cn&&!Hs(l,u)&&lb(t).type!==Cn){let f=Rp(u,o,i,t);if(yl(u,f),a==="out-in"&&l.type!==Cn)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete f.afterLeave,u=void 0},fd(s);a==="in-out"&&l.type!==Cn?f.delayLeave=(h,d,p)=>{const _=ub(i,u);_[String(u.key)]=u,h[Hr]=()=>{d(),h[Hr]=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 s}}};function cb(n){let e=n[0];if(n.length>1){for(const t of n)if(t.type!==Cn){e=t;break}}return e}const Kw=jw;function ub(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 Rp(n,e,t,i,r){const{appear:s,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:y,onAppearCancelled:x}=e,v=String(n.key),E=ub(t,n),T=(b,S)=>{b&&Ci(b,i,9,S)},M=(b,S)=>{const D=S[1];T(b,S),Fe(b)?b.every(B=>B.length<=1)&&D():b.length<=1&&D()},P={mode:o,persisted:a,beforeEnter(b){let S=l;if(!t.isMounted)if(s)S=g||l;else return;b[Hr]&&b[Hr](!0);const D=E[v];D&&Hs(n,D)&&D.el[Hr]&&D.el[Hr](),T(S,[b])},enter(b){let S=c,D=u,B=f;if(!t.isMounted)if(s)S=m||c,D=y||u,B=x||f;else return;let H=!1;const $=b[wc]=ee=>{H||(H=!0,ee?T(B,[b]):T(D,[b]),P.delayedLeave&&P.delayedLeave(),b[wc]=void 0)};S?M(S,[b,$]):$()},leave(b,S){const D=String(n.key);if(b[wc]&&b[wc](!0),t.isUnmounting)return S();T(h,[b]);let B=!1;const H=b[Hr]=$=>{B||(B=!0,S(),$?T(_,[b]):T(p,[b]),b[Hr]=void 0,E[D]===n&&delete E[D])};E[D]=n,d?M(d,[b,H]):H()},clone(b){const S=Rp(b,e,t,i,r);return r&&r(S),S}};return P}function fd(n){if(sh(n))return n=Qr(n),n.children=null,n}function U_(n){if(!sh(n))return rb(n.type)&&n.children?cb(n.children):n;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&$e(t.default))return t.default()}}function yl(n,e){n.shapeFlag&6&&n.component?(n.transition=e,yl(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 fb(n,e=!1,t){let i=[],r=0;for(let s=0;s1)for(let s=0;sZu(p,e&&(Fe(e)?e[_]:e),t,i,r));return}if(Jo(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Zu(n,e,t,i.component.subTree);return}const s=i.shapeFlag&4?uh(i.component):i.el,o=r?null:s,{i:a,r:l}=n,c=e&&e.r,u=a.refs===pt?a.refs={}:a.refs,f=a.setupState,h=st(f),d=f===pt?()=>!1:p=>yt(h,p);if(c!=null&&c!==l&&(It(c)?(u[c]=null,d(c)&&(f[c]=null)):Mt(c)&&(c.value=null)),$e(l))ec(l,a,12,[o,u]);else{const p=It(l),_=Mt(l);if(p||_){const g=()=>{if(n.f){const m=p?d(l)?f[l]:u[l]:l.value;r?Fe(m)&&Nm(m,s):Fe(m)?m.includes(s)||m.push(s):p?(u[l]=[s],d(l)&&(f[l]=u[l])):(l.value=[s],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,En(g,t)):g()}}}eh().requestIdleCallback;eh().cancelIdleCallback;const Jo=n=>!!n.type.__asyncLoader,sh=n=>n.type.__isKeepAlive;function Zw(n,e){db(n,"a",e)}function Jw(n,e){db(n,"da",e)}function db(n,e,t=en){const i=n.__wdc||(n.__wdc=()=>{let r=t;for(;r;){if(r.isDeactivated)return;r=r.parent}return n()});if(oh(e,i,t),t){let r=t.parent;for(;r&&r.parent;)sh(r.parent.vnode)&&Qw(i,e,t,r),r=r.parent}}function Qw(n,e,t,i){const r=oh(e,n,i,!0);qi(()=>{Nm(i[e],r)},t)}function oh(n,e,t=en,i=!1){if(t){const r=t[n]||(t[n]=[]),s=e.__weh||(e.__weh=(...o)=>{as();const a=nc(t),l=Ci(e,t,n,o);return a(),ls(),l});return i?r.unshift(s):r.push(s),s}}const Ar=n=>(e,t=en)=>{(!Ml||n==="sp")&&oh(n,(...i)=>e(...i),t)},eA=Ar("bm"),Nn=Ar("m"),tA=Ar("bu"),pb=Ar("u"),Ym=Ar("bum"),qi=Ar("um"),nA=Ar("sp"),iA=Ar("rtg"),rA=Ar("rtc");function sA(n,e=en){oh("ec",n,e)}const jm="components",oA="directives";function m4(n,e){return Km(jm,n,!0,e)||n}const mb=Symbol.for("v-ndc");function aA(n){return It(n)?Km(jm,n,!1)||n:n||mb}function g4(n){return Km(oA,n)}function Km(n,e,t=!0,i=!1){const r=qt||en;if(r){const s=r.type;if(n===jm){const a=jA(s,!1);if(a&&(a===e||a===ti(e)||a===Qf(ti(e))))return s}const o=F_(r[n]||s[n],e)||F_(r.appContext[n],e);return!o&&i?s:o}}function F_(n,e){return n&&(n[e]||n[ti(e)]||n[Qf(ti(e))])}function lA(n,e,t,i){let r;const s=t,o=Fe(n);if(o||It(n)){const a=o&&yr(n);let l=!1;a&&(l=!ci(n),n=ih(n)),r=new Array(n.length);for(let c=0,u=n.length;ce(a,l,void 0,s));else{const a=Object.keys(n);r=new Array(a.length);for(let l=0,c=a.length;lSl(e)?!(e.type===Cn||e.type===Wt&&!gb(e.children)):!0)?n:null}const Pp=n=>n?Bb(n)?uh(n):Pp(n.parent):null,ja=Kt(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=>Pp(n.parent),$root:n=>Pp(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>yb(n),$forceUpdate:n=>n.f||(n.f=()=>{qm(n.update)}),$nextTick:n=>n.n||(n.n=cs.bind(n.proxy)),$watch:n=>PA.bind(n)}),hd=(n,e)=>n!==pt&&!n.__isScriptSetup&&yt(n,e),uA={get({_:n},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:r,props:s,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 r[e];case 4:return t[e];case 3:return s[e]}else{if(hd(i,e))return o[e]=1,i[e];if(r!==pt&&yt(r,e))return o[e]=2,r[e];if((c=n.propsOptions[0])&&yt(c,e))return o[e]=3,s[e];if(t!==pt&&yt(t,e))return o[e]=4,t[e];Ip&&(o[e]=0)}}const u=ja[e];let f,h;if(u)return e==="$attrs"&&pn(n.attrs,"get",""),u(n);if((f=a.__cssModules)&&(f=f[e]))return f;if(t!==pt&&yt(t,e))return o[e]=4,t[e];if(h=l.config.globalProperties,yt(h,e))return h[e]},set({_:n},e,t){const{data:i,setupState:r,ctx:s}=n;return hd(r,e)?(r[e]=t,!0):i!==pt&&yt(i,e)?(i[e]=t,!0):yt(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(s[e]=t,!0)},has({_:{data:n,setupState:e,accessCache:t,ctx:i,appContext:r,propsOptions:s}},o){let a;return!!t[o]||n!==pt&&yt(n,o)||hd(e,o)||(a=s[0])&&yt(a,o)||yt(i,o)||yt(ja,o)||yt(r.config.globalProperties,o)},defineProperty(n,e,t){return t.get!=null?n._.accessCache[e]=0:yt(t,"value")&&this.set(n,e,t.value,null),Reflect.defineProperty(n,e,t)}};function Zm(){return _b().slots}function _4(){return _b().attrs}function _b(){const n=On();return n.setupContext||(n.setupContext=zb(n))}function Ju(n){return Fe(n)?n.reduce((e,t)=>(e[t]=null,e),{}):n}function v4(n,e){return!n||!e?n||e:Fe(n)&&Fe(e)?n.concat(e):Kt({},Ju(n),Ju(e))}let Ip=!0;function fA(n){const e=yb(n),t=n.proxy,i=n.ctx;Ip=!1,e.beforeCreate&&B_(e.beforeCreate,n,"bc");const{data:r,computed:s,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:d,updated:p,activated:_,deactivated:g,beforeDestroy:m,beforeUnmount:y,destroyed:x,unmounted:v,render:E,renderTracked:T,renderTriggered:M,errorCaptured:P,serverPrefetch:b,expose:S,inheritAttrs:D,components:B,directives:H,filters:$}=e;if(c&&hA(c,i,null),o)for(const te in o){const Q=o[te];$e(Q)&&(i[te]=Q.bind(t))}if(r){const te=r.call(t,t);wt(te)&&(n.data=hi(te))}if(Ip=!0,s)for(const te in s){const Q=s[te],pe=$e(Q)?Q.bind(t,t):$e(Q.get)?Q.get.bind(t,t):Gi,ve=!$e(Q)&&$e(Q.set)?Q.set.bind(t):Gi,re=Ce({get:pe,set:ve});Object.defineProperty(i,te,{enumerable:!0,configurable:!0,get:()=>re.value,set:xe=>re.value=xe})}if(a)for(const te in a)vb(a[te],i,t,te);if(l){const te=$e(l)?l.call(t):l;Reflect.ownKeys(te).forEach(Q=>{Jr(Q,te[Q])})}u&&B_(u,n,"c");function Z(te,Q){Fe(Q)?Q.forEach(pe=>te(pe.bind(t))):Q&&te(Q.bind(t))}if(Z(eA,f),Z(Nn,h),Z(tA,d),Z(pb,p),Z(Zw,_),Z(Jw,g),Z(sA,P),Z(rA,T),Z(iA,M),Z(Ym,y),Z(qi,v),Z(nA,b),Fe(S))if(S.length){const te=n.exposed||(n.exposed={});S.forEach(Q=>{Object.defineProperty(te,Q,{get:()=>t[Q],set:pe=>t[Q]=pe})})}else n.exposed||(n.exposed={});E&&n.render===Gi&&(n.render=E),D!=null&&(n.inheritAttrs=D),B&&(n.components=B),H&&(n.directives=H),b&&hb(n)}function hA(n,e,t=Gi){Fe(n)&&(n=Lp(n));for(const i in n){const r=n[i];let s;wt(r)?"default"in r?s=In(r.from||i,r.default,!0):s=In(r.from||i):s=In(r),Mt(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function B_(n,e,t){Ci(Fe(n)?n.map(i=>i.bind(e.proxy)):n.bind(e.proxy),e,t)}function vb(n,e,t,i){let r=i.includes(".")?Lb(t,i):()=>t[i];if(It(n)){const s=e[n];$e(s)&&qe(r,s)}else if($e(n))qe(r,n.bind(t));else if(wt(n))if(Fe(n))n.forEach(s=>vb(s,e,t,i));else{const s=$e(n.handler)?n.handler.bind(t):e[n.handler];$e(s)&&qe(r,s,n)}}function yb(n){const e=n.type,{mixins:t,extends:i}=e,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=n.appContext,a=s.get(e);let l;return a?l=a:!r.length&&!t&&!i?l=e:(l={},r.length&&r.forEach(c=>Qu(l,c,o,!0)),Qu(l,e,o)),wt(e)&&s.set(e,l),l}function Qu(n,e,t,i=!1){const{mixins:r,extends:s}=e;s&&Qu(n,s,t,!0),r&&r.forEach(o=>Qu(n,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=dA[o]||t&&t[o];n[o]=a?a(n[o],e[o]):e[o]}return n}const dA={data:k_,props:z_,emits:z_,methods:Va,computed:Va,beforeCreate:bn,created:bn,beforeMount:bn,mounted:bn,beforeUpdate:bn,updated:bn,beforeDestroy:bn,beforeUnmount:bn,destroyed:bn,unmounted:bn,activated:bn,deactivated:bn,errorCaptured:bn,serverPrefetch:bn,components:Va,directives:Va,watch:mA,provide:k_,inject:pA};function k_(n,e){return e?n?function(){return Kt($e(n)?n.call(this,this):n,$e(e)?e.call(this,this):e)}:e:n}function pA(n,e){return Va(Lp(n),Lp(e))}function Lp(n){if(Fe(n)){const e={};for(let t=0;t1)return t&&$e(e)?e.call(i&&i.proxy):e}}function Jm(){return!!(en||qt||Zs)}const bb={},Sb=()=>Object.create(bb),Mb=n=>Object.getPrototypeOf(n)===bb;function vA(n,e,t,i=!1){const r={},s=Sb();n.propsDefaults=Object.create(null),Eb(n,e,r,s);for(const o in n.propsOptions[0])o in r||(r[o]=void 0);t?n.props=i?r:Xx(r):n.type.props?n.props=r:n.props=s,n.attrs=s}function yA(n,e,t,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=n,a=st(r),[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]=Tb(f,e,!0);Kt(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(!s&&!l)return wt(n)&&i.set(n,jo),jo;if(Fe(s))for(let u=0;un[0]==="_"||n==="$stable",Qm=n=>Fe(n)?n.map(Vi):[Vi(n)],bA=(n,e,t)=>{if(e._n)return e;const i=nb((...r)=>Qm(e(...r)),t);return i._c=!1,i},Ab=(n,e,t)=>{const i=n._ctx;for(const r in n){if(wb(r))continue;const s=n[r];if($e(s))e[r]=bA(r,s,i);else if(s!=null){const o=Qm(s);e[r]=()=>o}}},Cb=(n,e)=>{const t=Qm(e);n.slots.default=()=>t},Rb=(n,e,t)=>{for(const i in e)(t||i!=="_")&&(n[i]=e[i])},SA=(n,e,t)=>{const i=n.slots=Sb();if(n.vnode.shapeFlag&32){const r=e._;r?(Rb(i,e,t),t&&wx(i,"_",r,!0)):Ab(e,i)}else e&&Cb(n,e)},MA=(n,e,t)=>{const{vnode:i,slots:r}=n;let s=!0,o=pt;if(i.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:Rb(r,e,t):(s=!e.$stable,Ab(e,r)),o=e}else e&&(Cb(n,e),o={default:1});if(s)for(const a in r)!wb(a)&&o[a]==null&&delete r[a]},En=UA;function Pb(n){return EA(n)}function EA(n,e){const t=eh();t.__VUE__=!0;const{insert:i,remove:r,patchProp:s,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:d=Gi,insertStaticContent:p}=n,_=(I,L,w,j=null,G=null,q=null,R=void 0,N=null,z=!!L.dynamicChildren)=>{if(I===L)return;I&&!Hs(I,L)&&(j=W(I),xe(I,G,q,!0),I=null),L.patchFlag===-2&&(z=!1,L.dynamicChildren=null);const{type:A,ref:C,shapeFlag:k}=L;switch(A){case tc:g(I,L,w,j);break;case Cn:m(I,L,w,j);break;case Lu:I==null&&y(L,w,j,R);break;case Wt:B(I,L,w,j,G,q,R,N,z);break;default:k&1?E(I,L,w,j,G,q,R,N,z):k&6?H(I,L,w,j,G,q,R,N,z):(k&64||k&128)&&A.process(I,L,w,j,G,q,R,N,z,le)}C!=null&&G&&Zu(C,I&&I.ref,q,L||I,!L)},g=(I,L,w,j)=>{if(I==null)i(L.el=a(L.children),w,j);else{const G=L.el=I.el;L.children!==I.children&&c(G,L.children)}},m=(I,L,w,j)=>{I==null?i(L.el=l(L.children||""),w,j):L.el=I.el},y=(I,L,w,j)=>{[I.el,I.anchor]=p(I.children,L,w,j,I.el,I.anchor)},x=({el:I,anchor:L},w,j)=>{let G;for(;I&&I!==L;)G=h(I),i(I,w,j),I=G;i(L,w,j)},v=({el:I,anchor:L})=>{let w;for(;I&&I!==L;)w=h(I),r(I),I=w;r(L)},E=(I,L,w,j,G,q,R,N,z)=>{L.type==="svg"?R="svg":L.type==="math"&&(R="mathml"),I==null?T(L,w,j,G,q,R,N,z):b(I,L,G,q,R,N,z)},T=(I,L,w,j,G,q,R,N)=>{let z,A;const{props:C,shapeFlag:k,transition:U,dirs:V}=I;if(z=I.el=o(I.type,q,C&&C.is,C),k&8?u(z,I.children):k&16&&P(I.children,z,null,j,G,dd(I,q),R,N),V&&vs(I,null,j,"created"),M(z,I,I.scopeId,R,j),C){for(const he in C)he!=="value"&&!Xa(he)&&s(z,he,null,C[he],q,j);"value"in C&&s(z,"value",null,C.value,q),(A=C.onVnodeBeforeMount)&&Oi(A,j,I)}V&&vs(I,null,j,"beforeMount");const Y=TA(G,U);Y&&U.beforeEnter(z),i(z,L,w),((A=C&&C.onVnodeMounted)||Y||V)&&En(()=>{A&&Oi(A,j,I),Y&&U.enter(z),V&&vs(I,null,j,"mounted")},G)},M=(I,L,w,j,G)=>{if(w&&d(I,w),j)for(let q=0;q{for(let A=z;A{const N=L.el=I.el;let{patchFlag:z,dynamicChildren:A,dirs:C}=L;z|=I.patchFlag&16;const k=I.props||pt,U=L.props||pt;let V;if(w&&ys(w,!1),(V=U.onVnodeBeforeUpdate)&&Oi(V,w,L,I),C&&vs(L,I,w,"beforeUpdate"),w&&ys(w,!0),(k.innerHTML&&U.innerHTML==null||k.textContent&&U.textContent==null)&&u(N,""),A?S(I.dynamicChildren,A,N,w,j,dd(L,G),q):R||Q(I,L,N,null,w,j,dd(L,G),q,!1),z>0){if(z&16)D(N,k,U,w,G);else if(z&2&&k.class!==U.class&&s(N,"class",null,U.class,G),z&4&&s(N,"style",k.style,U.style,G),z&8){const Y=L.dynamicProps;for(let he=0;he{V&&Oi(V,w,L,I),C&&vs(L,I,w,"updated")},j)},S=(I,L,w,j,G,q,R)=>{for(let N=0;N{if(L!==w){if(L!==pt)for(const q in L)!Xa(q)&&!(q in w)&&s(I,q,L[q],null,G,j);for(const q in w){if(Xa(q))continue;const R=w[q],N=L[q];R!==N&&q!=="value"&&s(I,q,N,R,G,j)}"value"in w&&s(I,"value",L.value,w.value,G)}},B=(I,L,w,j,G,q,R,N,z)=>{const A=L.el=I?I.el:a(""),C=L.anchor=I?I.anchor:a("");let{patchFlag:k,dynamicChildren:U,slotScopeIds:V}=L;V&&(N=N?N.concat(V):V),I==null?(i(A,w,j),i(C,w,j),P(L.children||[],w,C,G,q,R,N,z)):k>0&&k&64&&U&&I.dynamicChildren?(S(I.dynamicChildren,U,w,G,q,R,N),(L.key!=null||G&&L===G.subTree)&&eg(I,L,!0)):Q(I,L,w,C,G,q,R,N,z)},H=(I,L,w,j,G,q,R,N,z)=>{L.slotScopeIds=N,I==null?L.shapeFlag&512?G.ctx.activate(L,w,j,R,z):$(L,w,j,G,q,R,z):ee(I,L,z)},$=(I,L,w,j,G,q,R)=>{const N=I.component=XA(I,j,G);if(sh(I)&&(N.ctx.renderer=le),$A(N,!1,R),N.asyncDep){if(G&&G.registerDep(N,Z,R),!I.el){const z=N.subTree=an(Cn);m(null,z,L,w)}}else Z(N,I,L,w,G,q,R)},ee=(I,L,w)=>{const j=L.component=I.component;if(OA(I,L,w))if(j.asyncDep&&!j.asyncResolved){te(j,L,w);return}else j.next=L,j.update();else L.el=I.el,j.vnode=L},Z=(I,L,w,j,G,q,R)=>{const N=()=>{if(I.isMounted){let{next:k,bu:U,u:V,parent:Y,vnode:he}=I;{const Ee=Ib(I);if(Ee){k&&(k.el=he.el,te(I,k,R)),Ee.asyncDep.then(()=>{I.isUnmounted||N()});return}}let ce=k,ye;ys(I,!1),k?(k.el=he.el,te(I,k,R)):k=he,U&&Pu(U),(ye=k.props&&k.props.onVnodeBeforeUpdate)&&Oi(ye,Y,k,he),ys(I,!0);const Ue=G_(I),me=I.subTree;I.subTree=Ue,_(me,Ue,f(me.el),W(me),I,G,q),k.el=Ue.el,ce===null&&NA(I,Ue.el),V&&En(V,G),(ye=k.props&&k.props.onVnodeUpdated)&&En(()=>Oi(ye,Y,k,he),G)}else{let k;const{el:U,props:V}=L,{bm:Y,m:he,parent:ce,root:ye,type:Ue}=I,me=Jo(L);ys(I,!1),Y&&Pu(Y),!me&&(k=V&&V.onVnodeBeforeMount)&&Oi(k,ce,L),ys(I,!0);{ye.ce&&ye.ce._injectChildStyle(Ue);const Ee=I.subTree=G_(I);_(null,Ee,w,j,I,G,q),L.el=Ee.el}if(he&&En(he,G),!me&&(k=V&&V.onVnodeMounted)){const Ee=L;En(()=>Oi(k,ce,Ee),G)}(L.shapeFlag&256||ce&&Jo(ce.vnode)&&ce.vnode.shapeFlag&256)&&I.a&&En(I.a,G),I.isMounted=!0,L=w=j=null}};I.scope.on();const z=I.effect=new Ix(N);I.scope.off();const A=I.update=z.run.bind(z),C=I.job=z.runIfDirty.bind(z);C.i=I,C.id=I.uid,z.scheduler=()=>qm(C),ys(I,!0),A()},te=(I,L,w)=>{L.component=I;const j=I.vnode.props;I.vnode=L,I.next=null,yA(I,L.props,j,w),MA(I,L.children,w),as(),L_(I),ls()},Q=(I,L,w,j,G,q,R,N,z=!1)=>{const A=I&&I.children,C=I?I.shapeFlag:0,k=L.children,{patchFlag:U,shapeFlag:V}=L;if(U>0){if(U&128){ve(A,k,w,j,G,q,R,N,z);return}else if(U&256){pe(A,k,w,j,G,q,R,N,z);return}}V&8?(C&16&&be(A,G,q),k!==A&&u(w,k)):C&16?V&16?ve(A,k,w,j,G,q,R,N,z):be(A,G,q,!0):(C&8&&u(w,""),V&16&&P(k,w,j,G,q,R,N,z))},pe=(I,L,w,j,G,q,R,N,z)=>{I=I||jo,L=L||jo;const A=I.length,C=L.length,k=Math.min(A,C);let U;for(U=0;UC?be(I,G,q,!0,!1,k):P(L,w,j,G,q,R,N,z,k)},ve=(I,L,w,j,G,q,R,N,z)=>{let A=0;const C=L.length;let k=I.length-1,U=C-1;for(;A<=k&&A<=U;){const V=I[A],Y=L[A]=z?Wr(L[A]):Vi(L[A]);if(Hs(V,Y))_(V,Y,w,null,G,q,R,N,z);else break;A++}for(;A<=k&&A<=U;){const V=I[k],Y=L[U]=z?Wr(L[U]):Vi(L[U]);if(Hs(V,Y))_(V,Y,w,null,G,q,R,N,z);else break;k--,U--}if(A>k){if(A<=U){const V=U+1,Y=VU)for(;A<=k;)xe(I[A],G,q,!0),A++;else{const V=A,Y=A,he=new Map;for(A=Y;A<=U;A++){const Se=L[A]=z?Wr(L[A]):Vi(L[A]);Se.key!=null&&he.set(Se.key,A)}let ce,ye=0;const Ue=U-Y+1;let me=!1,Ee=0;const Be=new Array(Ue);for(A=0;A=Ue){xe(Se,G,q,!0);continue}let Ye;if(Se.key!=null)Ye=he.get(Se.key);else for(ce=Y;ce<=U;ce++)if(Be[ce-Y]===0&&Hs(Se,L[ce])){Ye=ce;break}Ye===void 0?xe(Se,G,q,!0):(Be[Ye-Y]=A+1,Ye>=Ee?Ee=Ye:me=!0,_(Se,L[Ye],w,null,G,q,R,N,z),ye++)}const Ge=me?wA(Be):jo;for(ce=Ge.length-1,A=Ue-1;A>=0;A--){const Se=Y+A,Ye=L[Se],Je=Se+1{const{el:q,type:R,transition:N,children:z,shapeFlag:A}=I;if(A&6){re(I.component.subTree,L,w,j);return}if(A&128){I.suspense.move(L,w,j);return}if(A&64){R.move(I,L,w,le);return}if(R===Wt){i(q,L,w);for(let k=0;kN.enter(q),G);else{const{leave:k,delayLeave:U,afterLeave:V}=N,Y=()=>i(q,L,w),he=()=>{k(q,()=>{Y(),V&&V()})};U?U(q,Y,he):he()}else i(q,L,w)},xe=(I,L,w,j=!1,G=!1)=>{const{type:q,props:R,ref:N,children:z,dynamicChildren:A,shapeFlag:C,patchFlag:k,dirs:U,cacheIndex:V}=I;if(k===-2&&(G=!1),N!=null&&Zu(N,null,w,I,!0),V!=null&&(L.renderCache[V]=void 0),C&256){L.ctx.deactivate(I);return}const Y=C&1&&U,he=!Jo(I);let ce;if(he&&(ce=R&&R.onVnodeBeforeUnmount)&&Oi(ce,L,I),C&6)ge(I.component,w,j);else{if(C&128){I.suspense.unmount(w,j);return}Y&&vs(I,null,L,"beforeUnmount"),C&64?I.type.remove(I,L,w,le,j):A&&!A.hasOnce&&(q!==Wt||k>0&&k&64)?be(A,L,w,!1,!0):(q===Wt&&k&384||!G&&C&16)&&be(z,L,w),j&&Ve(I)}(he&&(ce=R&&R.onVnodeUnmounted)||Y)&&En(()=>{ce&&Oi(ce,L,I),Y&&vs(I,null,L,"unmounted")},w)},Ve=I=>{const{type:L,el:w,anchor:j,transition:G}=I;if(L===Wt){se(w,j);return}if(L===Lu){v(I);return}const q=()=>{r(w),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(I.shapeFlag&1&&G&&!G.persisted){const{leave:R,delayLeave:N}=G,z=()=>R(w,q);N?N(I.el,q,z):z()}else q()},se=(I,L)=>{let w;for(;I!==L;)w=h(I),r(I),I=w;r(L)},ge=(I,L,w)=>{const{bum:j,scope:G,job:q,subTree:R,um:N,m:z,a:A}=I;H_(z),H_(A),j&&Pu(j),G.stop(),q&&(q.flags|=8,xe(R,I,L,w)),N&&En(N,L),En(()=>{I.isUnmounted=!0},L),L&&L.pendingBranch&&!L.isUnmounted&&I.asyncDep&&!I.asyncResolved&&I.suspenseId===L.pendingId&&(L.deps--,L.deps===0&&L.resolve())},be=(I,L,w,j=!1,G=!1,q=0)=>{for(let R=q;R{if(I.shapeFlag&6)return W(I.component.subTree);if(I.shapeFlag&128)return I.suspense.next();const L=h(I.anchor||I.el),w=L&&L[ib];return w?h(w):L};let ae=!1;const ue=(I,L,w)=>{I==null?L._vnode&&xe(L._vnode,null,null,!0):_(L._vnode||null,I,L,null,null,null,w),L._vnode=I,ae||(ae=!0,L_(),Qx(),ae=!1)},le={p:_,um:xe,m:re,r:Ve,mt:$,mc:P,pc:Q,pbc:S,n:W,o:n};return{render:ue,hydrate:void 0,createApp:_A(ue)}}function dd({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 ys({effect:n,job:e},t){t?(n.flags|=32,e.flags|=4):(n.flags&=-33,e.flags&=-5)}function TA(n,e){return(!n||n&&!n.pendingBranch)&&e&&!e.persisted}function eg(n,e,t=!1){const i=n.children,r=e.children;if(Fe(i)&&Fe(r))for(let s=0;s>1,n[t[a]]0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function Ib(n){const e=n.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Ib(e)}function H_(n){if(n)for(let e=0;eIn(AA);function ah(n,e){return lh(n,null,e)}function RA(n,e){return lh(n,null,{flush:"sync"})}function qe(n,e,t){return lh(n,e,t)}function lh(n,e,t=pt){const{immediate:i,deep:r,flush:s,once:o}=t,a=Kt({},t),l=e&&i||!e&&s!=="post";let c;if(Ml){if(s==="sync"){const d=CA();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=Gi,d.resume=Gi,d.pause=Gi,d}}const u=en;a.call=(d,p,_)=>Ci(d,u,p,_);let f=!1;s==="post"?a.scheduler=d=>{En(d,u&&u.suspense)}:s!=="sync"&&(f=!0,a.scheduler=(d,p)=>{p?d():qm(d)}),a.augmentJob=d=>{e&&(d.flags|=4),f&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const h=Gw(n,e,a);return Ml&&(c?c.push(h):l&&h()),h}function PA(n,e,t){const i=this.proxy,r=It(n)?n.includes(".")?Lb(i,n):()=>i[n]:n.bind(i,i);let s;$e(e)?s=e:(s=e.handler,t=e);const o=nc(this),a=lh(r,s.bind(i),t);return o(),a}function Lb(n,e){const t=e.split(".");return()=>{let i=n;for(let r=0;r{let u,f=pt,h;return RA(()=>{const d=n[r];Gn(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(!Gn(p,u)&&!(f!==pt&&Gn(d,f)))return;const _=i.vnode.props;_&&(e in _||r in _||s in _)&&(`onUpdate:${e}`in _||`onUpdate:${r}`in _||`onUpdate:${s}`in _)||(u=d,c()),i.emit(`update:${e}`,p),Gn(d,p)&&Gn(d,f)&&!Gn(p,h)&&c(),f=d,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||pt:a,done:!1}:{done:!0}}}},a}const Db=(n,e)=>e==="modelValue"||e==="model-value"?n.modelModifiers:n[`${e}Modifiers`]||n[`${ti(e)}Modifiers`]||n[`${os(e)}Modifiers`];function IA(n,e,...t){if(n.isUnmounted)return;const i=n.vnode.props||pt;let r=t;const s=e.startsWith("update:"),o=s&&Db(i,e.slice(7));o&&(o.trim&&(r=t.map(u=>It(u)?u.trim():u)),o.number&&(r=t.map($u)));let a,l=i[a=od(e)]||i[a=od(ti(e))];!l&&s&&(l=i[a=od(os(e))]),l&&Ci(l,n,6,r);const c=i[a+"Once"];if(c){if(!n.emitted)n.emitted={};else if(n.emitted[a])return;n.emitted[a]=!0,Ci(c,n,6,r)}}function Ob(n,e,t=!1){const i=e.emitsCache,r=i.get(n);if(r!==void 0)return r;const s=n.emits;let o={},a=!1;if(!$e(n)){const l=c=>{const u=Ob(c,e,!0);u&&(a=!0,Kt(o,u))};!t&&e.mixins.length&&e.mixins.forEach(l),n.extends&&l(n.extends),n.mixins&&n.mixins.forEach(l)}return!s&&!a?(wt(n)&&i.set(n,null),null):(Fe(s)?s.forEach(l=>o[l]=null):Kt(o,s),wt(n)&&i.set(n,o),o)}function ch(n,e){return!n||!Zf(e)?!1:(e=e.slice(2).replace(/Once$/,""),yt(n,e[0].toLowerCase()+e.slice(1))||yt(n,os(e))||yt(n,e))}function G_(n){const{type:e,vnode:t,proxy:i,withProxy:r,propsOptions:[s],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:h,setupState:d,ctx:p,inheritAttrs:_}=n,g=Ku(n);let m,y;try{if(t.shapeFlag&4){const v=r||i,E=v;m=Vi(c.call(E,v,u,f,d,h,p)),y=a}else{const v=e;m=Vi(v.length>1?v(f,{attrs:a,slots:o,emit:l}):v(f,null)),y=e.props?a:LA(a)}}catch(v){Ka.length=0,rh(v,n,1),m=an(Cn)}let x=m;if(y&&_!==!1){const v=Object.keys(y),{shapeFlag:E}=x;v.length&&E&7&&(s&&v.some(Om)&&(y=DA(y,s)),x=Qr(x,y,!1,!0))}return t.dirs&&(x=Qr(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(t.dirs):t.dirs),t.transition&&yl(x,t.transition),m=x,Ku(g),m}const LA=n=>{let e;for(const t in n)(t==="class"||t==="style"||Zf(t))&&((e||(e={}))[t]=n[t]);return e},DA=(n,e)=>{const t={};for(const i in n)(!Om(i)||!(i.slice(9)in e))&&(t[i]=n[i]);return t};function OA(n,e,t){const{props:i,children:r,component:s}=n,{props:o,children:a,patchFlag:l}=e,c=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&l>=0){if(l&1024)return!0;if(l&16)return i?W_(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let f=0;fn.__isSuspense;function UA(n,e){e&&e.pendingBranch?Fe(n)?e.effects.push(...n):e.effects.push(n):$w(n)}const Wt=Symbol.for("v-fgt"),tc=Symbol.for("v-txt"),Cn=Symbol.for("v-cmt"),Lu=Symbol.for("v-stc"),Ka=[];let Qn=null;function ln(n=!1){Ka.push(Qn=n?null:[])}function FA(){Ka.pop(),Qn=Ka[Ka.length-1]||null}let xl=1;function X_(n,e=!1){xl+=n,n<0&&Qn&&e&&(Qn.hasOnce=!0)}function Ub(n){return n.dynamicChildren=xl>0?Qn||jo:null,FA(),xl>0&&Qn&&Qn.push(n),n}function ui(n,e,t,i,r,s){return Ub(Gr(n,e,t,i,r,s,!0))}function bl(n,e,t,i,r){return Ub(an(n,e,t,i,r,!0))}function Sl(n){return n?n.__v_isVNode===!0:!1}function Hs(n,e){return n.type===e.type&&n.key===e.key}const Fb=({key:n})=>n??null,Du=({ref:n,ref_key:e,ref_for:t})=>(typeof n=="number"&&(n=""+n),n!=null?It(n)||Mt(n)||$e(n)?{i:qt,r:n,k:e,f:!!t}:n:null);function Gr(n,e=null,t=null,i=0,r=null,s=n===Wt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&Fb(e),ref:e&&Du(e),scopeId:tb,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:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:qt};return a?(tg(l,t),s&128&&n.normalize(l)):t&&(l.shapeFlag|=It(t)?8:16),xl>0&&!o&&Qn&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Qn.push(l),l}const an=BA;function BA(n,e=null,t=null,i=0,r=null,s=!1){if((!n||n===mb)&&(n=Cn),Sl(n)){const a=Qr(n,e,!0);return t&&tg(a,t),xl>0&&!s&&Qn&&(a.shapeFlag&6?Qn[Qn.indexOf(n)]=a:Qn.push(a)),a.patchFlag=-2,a}if(KA(n)&&(n=n.__vccOpts),e){e=kA(e);let{class:a,style:l}=e;a&&!It(a)&&(e.class=ma(a)),wt(l)&&(Wm(l)&&!Fe(l)&&(l=Kt({},l)),e.style=gi(l))}const o=It(n)?1:Nb(n)?128:rb(n)?64:wt(n)?4:$e(n)?2:0;return Gr(n,e,t,i,r,o,s,!0)}function kA(n){return n?Wm(n)||Mb(n)?Kt({},n):n:null}function Qr(n,e,t=!1,i=!1){const{props:r,ref:s,patchFlag:o,children:a,transition:l}=n,c=e?HA(r||{},e):r,u={__v_isVNode:!0,__v_skip:!0,type:n.type,props:c,key:c&&Fb(c),ref:e&&e.ref?t&&s?Fe(s)?s.concat(Du(e)):[s,Du(e)]:Du(e):s,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!==Wt?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&&Qr(n.ssContent),ssFallback:n.ssFallback&&Qr(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce};return l&&i&&yl(u,l.clone(u)),u}function zA(n=" ",e=0){return an(tc,null,n,e)}function VA(n,e){const t=an(Lu,null,n);return t.staticCount=e,t}function $_(n="",e=!1){return e?(ln(),bl(Cn,null,n)):an(Cn,null,n)}function Vi(n){return n==null||typeof n=="boolean"?an(Cn):Fe(n)?an(Wt,null,n.slice()):Sl(n)?Wr(n):an(tc,null,String(n))}function Wr(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:Qr(n)}function tg(n,e){let t=0;const{shapeFlag:i}=n;if(e==null)e=null;else if(Fe(e))t=16;else if(typeof e=="object")if(i&65){const r=e.default;r&&(r._c&&(r._d=!1),tg(n,r()),r._c&&(r._d=!0));return}else{t=32;const r=e._;!r&&!Mb(e)?e._ctx=qt:r===3&&qt&&(qt.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else $e(e)?(e={default:e,_ctx:qt},t=32):(e=String(e),i&64?(t=16,e=[zA(e)]):t=8);n.children=e,n.shapeFlag|=t}function HA(...n){const e={};for(let t=0;ten||qt;let ef,Op;{const n=eh(),e=(t,i)=>{let r;return(r=n[t])||(r=n[t]=[]),r.push(i),s=>{r.length>1?r.forEach(o=>o(s)):r[0](s)}};ef=e("__VUE_INSTANCE_SETTERS__",t=>en=t),Op=e("__VUE_SSR_SETTERS__",t=>Ml=t)}const nc=n=>{const e=en;return ef(n),n.scope.on(),()=>{n.scope.off(),ef(e)}},q_=()=>{en&&en.scope.off(),ef(null)};function Bb(n){return n.vnode.shapeFlag&4}let Ml=!1;function $A(n,e=!1,t=!1){e&&Op(e);const{props:i,children:r}=n.vnode,s=Bb(n);vA(n,i,s,e),SA(n,r,t);const o=s?qA(n,e):void 0;return e&&Op(!1),o}function qA(n,e){const t=n.type;n.accessCache=Object.create(null),n.proxy=new Proxy(n.ctx,uA);const{setup:i}=t;if(i){as();const r=n.setupContext=i.length>1?zb(n):null,s=nc(n),o=ec(i,n,0,[n.props,r]),a=Mx(o);if(ls(),s(),(a||n.sp)&&!Jo(n)&&hb(n),a){if(o.then(q_,q_),e)return o.then(l=>{Y_(n,l)}).catch(l=>{rh(l,n,0)});n.asyncDep=o}else Y_(n,o)}else kb(n)}function Y_(n,e,t){$e(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:wt(e)&&(n.setupState=qx(e)),kb(n)}function kb(n,e,t){const i=n.type;n.render||(n.render=i.render||Gi);{const r=nc(n);as();try{fA(n)}finally{ls(),r()}}}const YA={get(n,e){return pn(n,"get",""),n[e]}};function zb(n){const e=t=>{n.exposed=t||{}};return{attrs:new Proxy(n.attrs,YA),slots:n.slots,emit:n.emit,expose:e}}function uh(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(qx(Xm(n.exposed)),{get(e,t){if(t in e)return e[t];if(t in ja)return ja[t](n)},has(e,t){return t in e||t in ja}})):n.proxy}function jA(n,e=!0){return $e(n)?n.displayName||n.name:n.name||e&&n.__name}function KA(n){return $e(n)&&"__vccOpts"in n}const Ce=(n,e)=>Vw(n,e,Ml);function Sr(n,e,t){const i=arguments.length;return i===2?wt(e)&&!Fe(e)?Sl(e)?an(n,null,[e]):an(n,e):an(n,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Sl(t)&&(t=[t]),an(n,e,t))}const ZA="3.5.13";/** +**/function ec(n,e,t,i){try{return i?n(...i):n()}catch(r){rh(r,e,t)}}function Ai(n,e,t,i){if($e(n)){const r=ec(n,e,t,i);return r&&Sx(r)&&r.catch(s=>{rh(s,e,t)}),r}if(Fe(n)){const r=[];for(let s=0;s>>1,r=An[i],s=vl(r);s=vl(t)?An.push(n):An.splice(Ww(e),0,n),n.flags|=1,Zx()}}function Zx(){ju||(ju=Kx.then(Qx))}function Xw(n){Fe(n)?Zo.push(...n):zr&&n.id===-1?zr.splice(Vo+1,0,n):n.flags&1||(Zo.push(n),n.flags|=1),Zx()}function I_(n,e,t=Fi+1){for(;tvl(t)-vl(i));if(Zo.length=0,zr){zr.push(...e);return}for(zr=e,Vo=0;Von.id==null?n.flags&2?-1:1/0:n.id;function Qx(n){try{for(Fi=0;Fi{i._d&&W_(-1);const s=Ku(e);let o;try{o=n(...r)}finally{Ku(s),i._d&&W_(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function f4(n,e){if(qt===null)return n;const t=uh(qt),i=n.dirs||(n.dirs=[]);for(let r=0;rn.__isTeleport,Ya=n=>n&&(n.disabled||n.disabled===""),L_=n=>n&&(n.defer||n.defer===""),D_=n=>typeof SVGElement<"u"&&n instanceof SVGElement,O_=n=>typeof MathMLElement=="function"&&n instanceof MathMLElement,Cp=(n,e)=>{const t=n&&n.to;return It(t)?e?e(t):null:t},rb={name:"Teleport",__isTeleport:!0,process(n,e,t,i,r,s,o,a,l,c){const{mc:u,pc:f,pbc:h,o:{insert:d,querySelector:p,createText:_,createComment:g}}=c,m=Ya(e.props);let{shapeFlag:y,children:x,dynamicChildren:v}=e;if(n==null){const E=e.el=_(""),T=e.anchor=_("");d(E,t,i),d(T,t,i);const M=(b,S)=>{y&16&&(r&&r.isCE&&(r.ce._teleportTarget=b),u(x,b,S,r,s,o,a,l))},P=()=>{const b=e.target=Cp(e.props,p),S=sb(b,e,_,d);b&&(o!=="svg"&&D_(b)?o="svg":o!=="mathml"&&O_(b)&&(o="mathml"),m||(M(b,S),Iu(e,!1)))};m&&(M(t,T),Iu(e,!0)),L_(e.props)?En(()=>{P(),e.el.__isMounted=!0},s):P()}else{if(L_(e.props)&&!n.el.__isMounted){En(()=>{rb.process(n,e,t,i,r,s,o,a,l,c),delete n.el.__isMounted},s);return}e.el=n.el,e.targetStart=n.targetStart;const E=e.anchor=n.anchor,T=e.target=n.target,M=e.targetAnchor=n.targetAnchor,P=Ya(n.props),b=P?t:T,S=P?E:M;if(o==="svg"||D_(T)?o="svg":(o==="mathml"||O_(T))&&(o="mathml"),v?(h(n.dynamicChildren,v,b,r,s,o,a),Qm(n,e,!0)):l||f(n,e,b,S,r,s,o,a,!1),m)P?e.props&&n.props&&e.props.to!==n.props.to&&(e.props.to=n.props.to):Tc(e,t,E,c,1);else if((e.props&&e.props.to)!==(n.props&&n.props.to)){const D=e.target=Cp(e.props,p);D&&Tc(e,D,null,c,0)}else P&&Tc(e,T,M,c,1);Iu(e,m)}},remove(n,e,t,{um:i,o:{remove:r}},s){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:f,props:h}=n;if(f&&(r(c),r(u)),s&&r(l),o&16){const d=s||!Ya(h);for(let p=0;p{n.isMounted=!0}),qm(()=>{n.isUnmounting=!0}),n}const ri=[Function,Array],ob={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ri,onEnter:ri,onAfterEnter:ri,onEnterCancelled:ri,onBeforeLeave:ri,onLeave:ri,onAfterLeave:ri,onLeaveCancelled:ri,onBeforeAppear:ri,onAppear:ri,onAfterAppear:ri,onAppearCancelled:ri},ab=n=>{const e=n.subTree;return e.component?ab(e.component):e},Yw={name:"BaseTransition",props:ob,setup(n,{slots:e}){const t=On(),i=qw();return()=>{const r=e.default&&ub(e.default(),!0);if(!r||!r.length)return;const s=lb(r),o=st(n),{mode:a}=o;if(i.isLeaving)return fd(s);const l=N_(s);if(!l)return fd(s);let c=Rp(l,o,i,t,f=>c=f);l.type!==Cn&&yl(l,c);let u=t.subTree&&N_(t.subTree);if(u&&u.type!==Cn&&!Hs(l,u)&&ab(t).type!==Cn){let f=Rp(u,o,i,t);if(yl(u,f),a==="out-in"&&l.type!==Cn)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete f.afterLeave,u=void 0},fd(s);a==="in-out"&&l.type!==Cn?f.delayLeave=(h,d,p)=>{const _=cb(i,u);_[String(u.key)]=u,h[Hr]=()=>{d(),h[Hr]=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 s}}};function lb(n){let e=n[0];if(n.length>1){for(const t of n)if(t.type!==Cn){e=t;break}}return e}const jw=Yw;function cb(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 Rp(n,e,t,i,r){const{appear:s,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:y,onAppearCancelled:x}=e,v=String(n.key),E=cb(t,n),T=(b,S)=>{b&&Ai(b,i,9,S)},M=(b,S)=>{const D=S[1];T(b,S),Fe(b)?b.every(B=>B.length<=1)&&D():b.length<=1&&D()},P={mode:o,persisted:a,beforeEnter(b){let S=l;if(!t.isMounted)if(s)S=g||l;else return;b[Hr]&&b[Hr](!0);const D=E[v];D&&Hs(n,D)&&D.el[Hr]&&D.el[Hr](),T(S,[b])},enter(b){let S=c,D=u,B=f;if(!t.isMounted)if(s)S=m||c,D=y||u,B=x||f;else return;let H=!1;const $=b[wc]=ee=>{H||(H=!0,ee?T(B,[b]):T(D,[b]),P.delayedLeave&&P.delayedLeave(),b[wc]=void 0)};S?M(S,[b,$]):$()},leave(b,S){const D=String(n.key);if(b[wc]&&b[wc](!0),t.isUnmounting)return S();T(h,[b]);let B=!1;const H=b[Hr]=$=>{B||(B=!0,S(),$?T(_,[b]):T(p,[b]),b[Hr]=void 0,E[D]===n&&delete E[D])};E[D]=n,d?M(d,[b,H]):H()},clone(b){const S=Rp(b,e,t,i,r);return r&&r(S),S}};return P}function fd(n){if(sh(n))return n=Qr(n),n.children=null,n}function N_(n){if(!sh(n))return ib(n.type)&&n.children?lb(n.children):n;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&$e(t.default))return t.default()}}function yl(n,e){n.shapeFlag&6&&n.component?(n.transition=e,yl(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 ub(n,e=!1,t){let i=[],r=0;for(let s=0;s1)for(let s=0;sZu(p,e&&(Fe(e)?e[_]:e),t,i,r));return}if(Jo(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Zu(n,e,t,i.component.subTree);return}const s=i.shapeFlag&4?uh(i.component):i.el,o=r?null:s,{i:a,r:l}=n,c=e&&e.r,u=a.refs===pt?a.refs={}:a.refs,f=a.setupState,h=st(f),d=f===pt?()=>!1:p=>yt(h,p);if(c!=null&&c!==l&&(It(c)?(u[c]=null,d(c)&&(f[c]=null)):Mt(c)&&(c.value=null)),$e(l))ec(l,a,12,[o,u]);else{const p=It(l),_=Mt(l);if(p||_){const g=()=>{if(n.f){const m=p?d(l)?f[l]:u[l]:l.value;r?Fe(m)&&Om(m,s):Fe(m)?m.includes(s)||m.push(s):p?(u[l]=[s],d(l)&&(f[l]=u[l])):(l.value=[s],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,En(g,t)):g()}}}eh().requestIdleCallback;eh().cancelIdleCallback;const Jo=n=>!!n.type.__asyncLoader,sh=n=>n.type.__isKeepAlive;function Kw(n,e){hb(n,"a",e)}function Zw(n,e){hb(n,"da",e)}function hb(n,e,t=en){const i=n.__wdc||(n.__wdc=()=>{let r=t;for(;r;){if(r.isDeactivated)return;r=r.parent}return n()});if(oh(e,i,t),t){let r=t.parent;for(;r&&r.parent;)sh(r.parent.vnode)&&Jw(i,e,t,r),r=r.parent}}function Jw(n,e,t,i){const r=oh(e,n,i,!0);$i(()=>{Om(i[e],r)},t)}function oh(n,e,t=en,i=!1){if(t){const r=t[n]||(t[n]=[]),s=e.__weh||(e.__weh=(...o)=>{as();const a=nc(t),l=Ai(e,t,n,o);return a(),ls(),l});return i?r.unshift(s):r.push(s),s}}const wr=n=>(e,t=en)=>{(!Ml||n==="sp")&&oh(n,(...i)=>e(...i),t)},Qw=wr("bm"),Nn=wr("m"),eA=wr("bu"),db=wr("u"),qm=wr("bum"),$i=wr("um"),tA=wr("sp"),nA=wr("rtg"),iA=wr("rtc");function rA(n,e=en){oh("ec",n,e)}const Ym="components",sA="directives";function p4(n,e){return jm(Ym,n,!0,e)||n}const pb=Symbol.for("v-ndc");function oA(n){return It(n)?jm(Ym,n,!1)||n:n||pb}function m4(n){return jm(sA,n)}function jm(n,e,t=!0,i=!1){const r=qt||en;if(r){const s=r.type;if(n===Ym){const a=YA(s,!1);if(a&&(a===e||a===ei(e)||a===Qf(ei(e))))return s}const o=U_(r[n]||s[n],e)||U_(r.appContext[n],e);return!o&&i?s:o}}function U_(n,e){return n&&(n[e]||n[ei(e)]||n[Qf(ei(e))])}function aA(n,e,t,i){let r;const s=t,o=Fe(n);if(o||It(n)){const a=o&&vr(n);let l=!1;a&&(l=!li(n),n=ih(n)),r=new Array(n.length);for(let c=0,u=n.length;ce(a,l,void 0,s));else{const a=Object.keys(n);r=new Array(a.length);for(let l=0,c=a.length;lSl(e)?!(e.type===Cn||e.type===Wt&&!mb(e.children)):!0)?n:null}const Pp=n=>n?Fb(n)?uh(n):Pp(n.parent):null,ja=Kt(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=>Pp(n.parent),$root:n=>Pp(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>vb(n),$forceUpdate:n=>n.f||(n.f=()=>{$m(n.update)}),$nextTick:n=>n.n||(n.n=cs.bind(n.proxy)),$watch:n=>RA.bind(n)}),hd=(n,e)=>n!==pt&&!n.__isScriptSetup&&yt(n,e),cA={get({_:n},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:r,props:s,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 r[e];case 4:return t[e];case 3:return s[e]}else{if(hd(i,e))return o[e]=1,i[e];if(r!==pt&&yt(r,e))return o[e]=2,r[e];if((c=n.propsOptions[0])&&yt(c,e))return o[e]=3,s[e];if(t!==pt&&yt(t,e))return o[e]=4,t[e];Ip&&(o[e]=0)}}const u=ja[e];let f,h;if(u)return e==="$attrs"&&pn(n.attrs,"get",""),u(n);if((f=a.__cssModules)&&(f=f[e]))return f;if(t!==pt&&yt(t,e))return o[e]=4,t[e];if(h=l.config.globalProperties,yt(h,e))return h[e]},set({_:n},e,t){const{data:i,setupState:r,ctx:s}=n;return hd(r,e)?(r[e]=t,!0):i!==pt&&yt(i,e)?(i[e]=t,!0):yt(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(s[e]=t,!0)},has({_:{data:n,setupState:e,accessCache:t,ctx:i,appContext:r,propsOptions:s}},o){let a;return!!t[o]||n!==pt&&yt(n,o)||hd(e,o)||(a=s[0])&&yt(a,o)||yt(i,o)||yt(ja,o)||yt(r.config.globalProperties,o)},defineProperty(n,e,t){return t.get!=null?n._.accessCache[e]=0:yt(t,"value")&&this.set(n,e,t.value,null),Reflect.defineProperty(n,e,t)}};function Km(){return gb().slots}function g4(){return gb().attrs}function gb(){const n=On();return n.setupContext||(n.setupContext=kb(n))}function Ju(n){return Fe(n)?n.reduce((e,t)=>(e[t]=null,e),{}):n}function _4(n,e){return!n||!e?n||e:Fe(n)&&Fe(e)?n.concat(e):Kt({},Ju(n),Ju(e))}let Ip=!0;function uA(n){const e=vb(n),t=n.proxy,i=n.ctx;Ip=!1,e.beforeCreate&&F_(e.beforeCreate,n,"bc");const{data:r,computed:s,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:d,updated:p,activated:_,deactivated:g,beforeDestroy:m,beforeUnmount:y,destroyed:x,unmounted:v,render:E,renderTracked:T,renderTriggered:M,errorCaptured:P,serverPrefetch:b,expose:S,inheritAttrs:D,components:B,directives:H,filters:$}=e;if(c&&fA(c,i,null),o)for(const te in o){const Q=o[te];$e(Q)&&(i[te]=Q.bind(t))}if(r){const te=r.call(t,t);wt(te)&&(n.data=fi(te))}if(Ip=!0,s)for(const te in s){const Q=s[te],pe=$e(Q)?Q.bind(t,t):$e(Q.get)?Q.get.bind(t,t):Hi,ve=!$e(Q)&&$e(Q.set)?Q.set.bind(t):Hi,re=Ce({get:pe,set:ve});Object.defineProperty(i,te,{enumerable:!0,configurable:!0,get:()=>re.value,set:xe=>re.value=xe})}if(a)for(const te in a)_b(a[te],i,t,te);if(l){const te=$e(l)?l.call(t):l;Reflect.ownKeys(te).forEach(Q=>{Jr(Q,te[Q])})}u&&F_(u,n,"c");function Z(te,Q){Fe(Q)?Q.forEach(pe=>te(pe.bind(t))):Q&&te(Q.bind(t))}if(Z(Qw,f),Z(Nn,h),Z(eA,d),Z(db,p),Z(Kw,_),Z(Zw,g),Z(rA,P),Z(iA,T),Z(nA,M),Z(qm,y),Z($i,v),Z(tA,b),Fe(S))if(S.length){const te=n.exposed||(n.exposed={});S.forEach(Q=>{Object.defineProperty(te,Q,{get:()=>t[Q],set:pe=>t[Q]=pe})})}else n.exposed||(n.exposed={});E&&n.render===Hi&&(n.render=E),D!=null&&(n.inheritAttrs=D),B&&(n.components=B),H&&(n.directives=H),b&&fb(n)}function fA(n,e,t=Hi){Fe(n)&&(n=Lp(n));for(const i in n){const r=n[i];let s;wt(r)?"default"in r?s=In(r.from||i,r.default,!0):s=In(r.from||i):s=In(r),Mt(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function F_(n,e,t){Ai(Fe(n)?n.map(i=>i.bind(e.proxy)):n.bind(e.proxy),e,t)}function _b(n,e,t,i){let r=i.includes(".")?Ib(t,i):()=>t[i];if(It(n)){const s=e[n];$e(s)&&qe(r,s)}else if($e(n))qe(r,n.bind(t));else if(wt(n))if(Fe(n))n.forEach(s=>_b(s,e,t,i));else{const s=$e(n.handler)?n.handler.bind(t):e[n.handler];$e(s)&&qe(r,s,n)}}function vb(n){const e=n.type,{mixins:t,extends:i}=e,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=n.appContext,a=s.get(e);let l;return a?l=a:!r.length&&!t&&!i?l=e:(l={},r.length&&r.forEach(c=>Qu(l,c,o,!0)),Qu(l,e,o)),wt(e)&&s.set(e,l),l}function Qu(n,e,t,i=!1){const{mixins:r,extends:s}=e;s&&Qu(n,s,t,!0),r&&r.forEach(o=>Qu(n,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=hA[o]||t&&t[o];n[o]=a?a(n[o],e[o]):e[o]}return n}const hA={data:B_,props:k_,emits:k_,methods:za,computed:za,beforeCreate:bn,created:bn,beforeMount:bn,mounted:bn,beforeUpdate:bn,updated:bn,beforeDestroy:bn,beforeUnmount:bn,destroyed:bn,unmounted:bn,activated:bn,deactivated:bn,errorCaptured:bn,serverPrefetch:bn,components:za,directives:za,watch:pA,provide:B_,inject:dA};function B_(n,e){return e?n?function(){return Kt($e(n)?n.call(this,this):n,$e(e)?e.call(this,this):e)}:e:n}function dA(n,e){return za(Lp(n),Lp(e))}function Lp(n){if(Fe(n)){const e={};for(let t=0;t1)return t&&$e(e)?e.call(i&&i.proxy):e}}function Zm(){return!!(en||qt||Zs)}const xb={},bb=()=>Object.create(xb),Sb=n=>Object.getPrototypeOf(n)===xb;function _A(n,e,t,i=!1){const r={},s=bb();n.propsDefaults=Object.create(null),Mb(n,e,r,s);for(const o in n.propsOptions[0])o in r||(r[o]=void 0);t?n.props=i?r:Wx(r):n.type.props?n.props=r:n.props=s,n.attrs=s}function vA(n,e,t,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=n,a=st(r),[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]=Eb(f,e,!0);Kt(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(!s&&!l)return wt(n)&&i.set(n,jo),jo;if(Fe(s))for(let u=0;un[0]==="_"||n==="$stable",Jm=n=>Fe(n)?n.map(Vi):[Vi(n)],xA=(n,e,t)=>{if(e._n)return e;const i=tb((...r)=>Jm(e(...r)),t);return i._c=!1,i},wb=(n,e,t)=>{const i=n._ctx;for(const r in n){if(Tb(r))continue;const s=n[r];if($e(s))e[r]=xA(r,s,i);else if(s!=null){const o=Jm(s);e[r]=()=>o}}},Ab=(n,e)=>{const t=Jm(e);n.slots.default=()=>t},Cb=(n,e,t)=>{for(const i in e)(t||i!=="_")&&(n[i]=e[i])},bA=(n,e,t)=>{const i=n.slots=bb();if(n.vnode.shapeFlag&32){const r=e._;r?(Cb(i,e,t),t&&Tx(i,"_",r,!0)):wb(e,i)}else e&&Ab(n,e)},SA=(n,e,t)=>{const{vnode:i,slots:r}=n;let s=!0,o=pt;if(i.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:Cb(r,e,t):(s=!e.$stable,wb(e,r)),o=e}else e&&(Ab(n,e),o={default:1});if(s)for(const a in r)!Tb(a)&&o[a]==null&&delete r[a]},En=NA;function Rb(n){return MA(n)}function MA(n,e){const t=eh();t.__VUE__=!0;const{insert:i,remove:r,patchProp:s,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:d=Hi,insertStaticContent:p}=n,_=(I,L,w,j=null,G=null,q=null,R=void 0,N=null,V=!!L.dynamicChildren)=>{if(I===L)return;I&&!Hs(I,L)&&(j=W(I),xe(I,G,q,!0),I=null),L.patchFlag===-2&&(V=!1,L.dynamicChildren=null);const{type:A,ref:C,shapeFlag:k}=L;switch(A){case tc:g(I,L,w,j);break;case Cn:m(I,L,w,j);break;case Lu:I==null&&y(L,w,j,R);break;case Wt:B(I,L,w,j,G,q,R,N,V);break;default:k&1?E(I,L,w,j,G,q,R,N,V):k&6?H(I,L,w,j,G,q,R,N,V):(k&64||k&128)&&A.process(I,L,w,j,G,q,R,N,V,le)}C!=null&&G&&Zu(C,I&&I.ref,q,L||I,!L)},g=(I,L,w,j)=>{if(I==null)i(L.el=a(L.children),w,j);else{const G=L.el=I.el;L.children!==I.children&&c(G,L.children)}},m=(I,L,w,j)=>{I==null?i(L.el=l(L.children||""),w,j):L.el=I.el},y=(I,L,w,j)=>{[I.el,I.anchor]=p(I.children,L,w,j,I.el,I.anchor)},x=({el:I,anchor:L},w,j)=>{let G;for(;I&&I!==L;)G=h(I),i(I,w,j),I=G;i(L,w,j)},v=({el:I,anchor:L})=>{let w;for(;I&&I!==L;)w=h(I),r(I),I=w;r(L)},E=(I,L,w,j,G,q,R,N,V)=>{L.type==="svg"?R="svg":L.type==="math"&&(R="mathml"),I==null?T(L,w,j,G,q,R,N,V):b(I,L,G,q,R,N,V)},T=(I,L,w,j,G,q,R,N)=>{let V,A;const{props:C,shapeFlag:k,transition:U,dirs:z}=I;if(V=I.el=o(I.type,q,C&&C.is,C),k&8?u(V,I.children):k&16&&P(I.children,V,null,j,G,dd(I,q),R,N),z&&vs(I,null,j,"created"),M(V,I,I.scopeId,R,j),C){for(const he in C)he!=="value"&&!Xa(he)&&s(V,he,null,C[he],q,j);"value"in C&&s(V,"value",null,C.value,q),(A=C.onVnodeBeforeMount)&&Di(A,j,I)}z&&vs(I,null,j,"beforeMount");const Y=EA(G,U);Y&&U.beforeEnter(V),i(V,L,w),((A=C&&C.onVnodeMounted)||Y||z)&&En(()=>{A&&Di(A,j,I),Y&&U.enter(V),z&&vs(I,null,j,"mounted")},G)},M=(I,L,w,j,G)=>{if(w&&d(I,w),j)for(let q=0;q{for(let A=V;A{const N=L.el=I.el;let{patchFlag:V,dynamicChildren:A,dirs:C}=L;V|=I.patchFlag&16;const k=I.props||pt,U=L.props||pt;let z;if(w&&ys(w,!1),(z=U.onVnodeBeforeUpdate)&&Di(z,w,L,I),C&&vs(L,I,w,"beforeUpdate"),w&&ys(w,!0),(k.innerHTML&&U.innerHTML==null||k.textContent&&U.textContent==null)&&u(N,""),A?S(I.dynamicChildren,A,N,w,j,dd(L,G),q):R||Q(I,L,N,null,w,j,dd(L,G),q,!1),V>0){if(V&16)D(N,k,U,w,G);else if(V&2&&k.class!==U.class&&s(N,"class",null,U.class,G),V&4&&s(N,"style",k.style,U.style,G),V&8){const Y=L.dynamicProps;for(let he=0;he{z&&Di(z,w,L,I),C&&vs(L,I,w,"updated")},j)},S=(I,L,w,j,G,q,R)=>{for(let N=0;N{if(L!==w){if(L!==pt)for(const q in L)!Xa(q)&&!(q in w)&&s(I,q,L[q],null,G,j);for(const q in w){if(Xa(q))continue;const R=w[q],N=L[q];R!==N&&q!=="value"&&s(I,q,N,R,G,j)}"value"in w&&s(I,"value",L.value,w.value,G)}},B=(I,L,w,j,G,q,R,N,V)=>{const A=L.el=I?I.el:a(""),C=L.anchor=I?I.anchor:a("");let{patchFlag:k,dynamicChildren:U,slotScopeIds:z}=L;z&&(N=N?N.concat(z):z),I==null?(i(A,w,j),i(C,w,j),P(L.children||[],w,C,G,q,R,N,V)):k>0&&k&64&&U&&I.dynamicChildren?(S(I.dynamicChildren,U,w,G,q,R,N),(L.key!=null||G&&L===G.subTree)&&Qm(I,L,!0)):Q(I,L,w,C,G,q,R,N,V)},H=(I,L,w,j,G,q,R,N,V)=>{L.slotScopeIds=N,I==null?L.shapeFlag&512?G.ctx.activate(L,w,j,R,V):$(L,w,j,G,q,R,V):ee(I,L,V)},$=(I,L,w,j,G,q,R)=>{const N=I.component=WA(I,j,G);if(sh(I)&&(N.ctx.renderer=le),XA(N,!1,R),N.asyncDep){if(G&&G.registerDep(N,Z,R),!I.el){const V=N.subTree=an(Cn);m(null,V,L,w)}}else Z(N,I,L,w,G,q,R)},ee=(I,L,w)=>{const j=L.component=I.component;if(DA(I,L,w))if(j.asyncDep&&!j.asyncResolved){te(j,L,w);return}else j.next=L,j.update();else L.el=I.el,j.vnode=L},Z=(I,L,w,j,G,q,R)=>{const N=()=>{if(I.isMounted){let{next:k,bu:U,u:z,parent:Y,vnode:he}=I;{const Ee=Pb(I);if(Ee){k&&(k.el=he.el,te(I,k,R)),Ee.asyncDep.then(()=>{I.isUnmounted||N()});return}}let ce=k,ye;ys(I,!1),k?(k.el=he.el,te(I,k,R)):k=he,U&&Pu(U),(ye=k.props&&k.props.onVnodeBeforeUpdate)&&Di(ye,Y,k,he),ys(I,!0);const Ue=H_(I),me=I.subTree;I.subTree=Ue,_(me,Ue,f(me.el),W(me),I,G,q),k.el=Ue.el,ce===null&&OA(I,Ue.el),z&&En(z,G),(ye=k.props&&k.props.onVnodeUpdated)&&En(()=>Di(ye,Y,k,he),G)}else{let k;const{el:U,props:z}=L,{bm:Y,m:he,parent:ce,root:ye,type:Ue}=I,me=Jo(L);ys(I,!1),Y&&Pu(Y),!me&&(k=z&&z.onVnodeBeforeMount)&&Di(k,ce,L),ys(I,!0);{ye.ce&&ye.ce._injectChildStyle(Ue);const Ee=I.subTree=H_(I);_(null,Ee,w,j,I,G,q),L.el=Ee.el}if(he&&En(he,G),!me&&(k=z&&z.onVnodeMounted)){const Ee=L;En(()=>Di(k,ce,Ee),G)}(L.shapeFlag&256||ce&&Jo(ce.vnode)&&ce.vnode.shapeFlag&256)&&I.a&&En(I.a,G),I.isMounted=!0,L=w=j=null}};I.scope.on();const V=I.effect=new Px(N);I.scope.off();const A=I.update=V.run.bind(V),C=I.job=V.runIfDirty.bind(V);C.i=I,C.id=I.uid,V.scheduler=()=>$m(C),ys(I,!0),A()},te=(I,L,w)=>{L.component=I;const j=I.vnode.props;I.vnode=L,I.next=null,vA(I,L.props,j,w),SA(I,L.children,w),as(),I_(I),ls()},Q=(I,L,w,j,G,q,R,N,V=!1)=>{const A=I&&I.children,C=I?I.shapeFlag:0,k=L.children,{patchFlag:U,shapeFlag:z}=L;if(U>0){if(U&128){ve(A,k,w,j,G,q,R,N,V);return}else if(U&256){pe(A,k,w,j,G,q,R,N,V);return}}z&8?(C&16&&be(A,G,q),k!==A&&u(w,k)):C&16?z&16?ve(A,k,w,j,G,q,R,N,V):be(A,G,q,!0):(C&8&&u(w,""),z&16&&P(k,w,j,G,q,R,N,V))},pe=(I,L,w,j,G,q,R,N,V)=>{I=I||jo,L=L||jo;const A=I.length,C=L.length,k=Math.min(A,C);let U;for(U=0;UC?be(I,G,q,!0,!1,k):P(L,w,j,G,q,R,N,V,k)},ve=(I,L,w,j,G,q,R,N,V)=>{let A=0;const C=L.length;let k=I.length-1,U=C-1;for(;A<=k&&A<=U;){const z=I[A],Y=L[A]=V?Wr(L[A]):Vi(L[A]);if(Hs(z,Y))_(z,Y,w,null,G,q,R,N,V);else break;A++}for(;A<=k&&A<=U;){const z=I[k],Y=L[U]=V?Wr(L[U]):Vi(L[U]);if(Hs(z,Y))_(z,Y,w,null,G,q,R,N,V);else break;k--,U--}if(A>k){if(A<=U){const z=U+1,Y=zU)for(;A<=k;)xe(I[A],G,q,!0),A++;else{const z=A,Y=A,he=new Map;for(A=Y;A<=U;A++){const Se=L[A]=V?Wr(L[A]):Vi(L[A]);Se.key!=null&&he.set(Se.key,A)}let ce,ye=0;const Ue=U-Y+1;let me=!1,Ee=0;const Be=new Array(Ue);for(A=0;A=Ue){xe(Se,G,q,!0);continue}let Ye;if(Se.key!=null)Ye=he.get(Se.key);else for(ce=Y;ce<=U;ce++)if(Be[ce-Y]===0&&Hs(Se,L[ce])){Ye=ce;break}Ye===void 0?xe(Se,G,q,!0):(Be[Ye-Y]=A+1,Ye>=Ee?Ee=Ye:me=!0,_(Se,L[Ye],w,null,G,q,R,N,V),ye++)}const Ge=me?TA(Be):jo;for(ce=Ge.length-1,A=Ue-1;A>=0;A--){const Se=Y+A,Ye=L[Se],Je=Se+1{const{el:q,type:R,transition:N,children:V,shapeFlag:A}=I;if(A&6){re(I.component.subTree,L,w,j);return}if(A&128){I.suspense.move(L,w,j);return}if(A&64){R.move(I,L,w,le);return}if(R===Wt){i(q,L,w);for(let k=0;kN.enter(q),G);else{const{leave:k,delayLeave:U,afterLeave:z}=N,Y=()=>i(q,L,w),he=()=>{k(q,()=>{Y(),z&&z()})};U?U(q,Y,he):he()}else i(q,L,w)},xe=(I,L,w,j=!1,G=!1)=>{const{type:q,props:R,ref:N,children:V,dynamicChildren:A,shapeFlag:C,patchFlag:k,dirs:U,cacheIndex:z}=I;if(k===-2&&(G=!1),N!=null&&Zu(N,null,w,I,!0),z!=null&&(L.renderCache[z]=void 0),C&256){L.ctx.deactivate(I);return}const Y=C&1&&U,he=!Jo(I);let ce;if(he&&(ce=R&&R.onVnodeBeforeUnmount)&&Di(ce,L,I),C&6)ge(I.component,w,j);else{if(C&128){I.suspense.unmount(w,j);return}Y&&vs(I,null,L,"beforeUnmount"),C&64?I.type.remove(I,L,w,le,j):A&&!A.hasOnce&&(q!==Wt||k>0&&k&64)?be(A,L,w,!1,!0):(q===Wt&&k&384||!G&&C&16)&&be(V,L,w),j&&ze(I)}(he&&(ce=R&&R.onVnodeUnmounted)||Y)&&En(()=>{ce&&Di(ce,L,I),Y&&vs(I,null,L,"unmounted")},w)},ze=I=>{const{type:L,el:w,anchor:j,transition:G}=I;if(L===Wt){se(w,j);return}if(L===Lu){v(I);return}const q=()=>{r(w),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(I.shapeFlag&1&&G&&!G.persisted){const{leave:R,delayLeave:N}=G,V=()=>R(w,q);N?N(I.el,q,V):V()}else q()},se=(I,L)=>{let w;for(;I!==L;)w=h(I),r(I),I=w;r(L)},ge=(I,L,w)=>{const{bum:j,scope:G,job:q,subTree:R,um:N,m:V,a:A}=I;z_(V),z_(A),j&&Pu(j),G.stop(),q&&(q.flags|=8,xe(R,I,L,w)),N&&En(N,L),En(()=>{I.isUnmounted=!0},L),L&&L.pendingBranch&&!L.isUnmounted&&I.asyncDep&&!I.asyncResolved&&I.suspenseId===L.pendingId&&(L.deps--,L.deps===0&&L.resolve())},be=(I,L,w,j=!1,G=!1,q=0)=>{for(let R=q;R{if(I.shapeFlag&6)return W(I.component.subTree);if(I.shapeFlag&128)return I.suspense.next();const L=h(I.anchor||I.el),w=L&&L[nb];return w?h(w):L};let ae=!1;const ue=(I,L,w)=>{I==null?L._vnode&&xe(L._vnode,null,null,!0):_(L._vnode||null,I,L,null,null,null,w),L._vnode=I,ae||(ae=!0,I_(),Jx(),ae=!1)},le={p:_,um:xe,m:re,r:ze,mt:$,mc:P,pc:Q,pbc:S,n:W,o:n};return{render:ue,hydrate:void 0,createApp:gA(ue)}}function dd({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 ys({effect:n,job:e},t){t?(n.flags|=32,e.flags|=4):(n.flags&=-33,e.flags&=-5)}function EA(n,e){return(!n||n&&!n.pendingBranch)&&e&&!e.persisted}function Qm(n,e,t=!1){const i=n.children,r=e.children;if(Fe(i)&&Fe(r))for(let s=0;s>1,n[t[a]]0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function Pb(n){const e=n.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Pb(e)}function z_(n){if(n)for(let e=0;eIn(wA);function ah(n,e){return lh(n,null,e)}function CA(n,e){return lh(n,null,{flush:"sync"})}function qe(n,e,t){return lh(n,e,t)}function lh(n,e,t=pt){const{immediate:i,deep:r,flush:s,once:o}=t,a=Kt({},t),l=e&&i||!e&&s!=="post";let c;if(Ml){if(s==="sync"){const d=AA();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=Hi,d.resume=Hi,d.pause=Hi,d}}const u=en;a.call=(d,p,_)=>Ai(d,u,p,_);let f=!1;s==="post"?a.scheduler=d=>{En(d,u&&u.suspense)}:s!=="sync"&&(f=!0,a.scheduler=(d,p)=>{p?d():$m(d)}),a.augmentJob=d=>{e&&(d.flags|=4),f&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const h=Hw(n,e,a);return Ml&&(c?c.push(h):l&&h()),h}function RA(n,e,t){const i=this.proxy,r=It(n)?n.includes(".")?Ib(i,n):()=>i[n]:n.bind(i,i);let s;$e(e)?s=e:(s=e.handler,t=e);const o=nc(this),a=lh(r,s.bind(i),t);return o(),a}function Ib(n,e){const t=e.split(".");return()=>{let i=n;for(let r=0;r{let u,f=pt,h;return CA(()=>{const d=n[r];Hn(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(!Hn(p,u)&&!(f!==pt&&Hn(d,f)))return;const _=i.vnode.props;_&&(e in _||r in _||s in _)&&(`onUpdate:${e}`in _||`onUpdate:${r}`in _||`onUpdate:${s}`in _)||(u=d,c()),i.emit(`update:${e}`,p),Hn(d,p)&&Hn(d,f)&&!Hn(p,h)&&c(),f=d,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||pt:a,done:!1}:{done:!0}}}},a}const Lb=(n,e)=>e==="modelValue"||e==="model-value"?n.modelModifiers:n[`${e}Modifiers`]||n[`${ei(e)}Modifiers`]||n[`${os(e)}Modifiers`];function PA(n,e,...t){if(n.isUnmounted)return;const i=n.vnode.props||pt;let r=t;const s=e.startsWith("update:"),o=s&&Lb(i,e.slice(7));o&&(o.trim&&(r=t.map(u=>It(u)?u.trim():u)),o.number&&(r=t.map($u)));let a,l=i[a=od(e)]||i[a=od(ei(e))];!l&&s&&(l=i[a=od(os(e))]),l&&Ai(l,n,6,r);const c=i[a+"Once"];if(c){if(!n.emitted)n.emitted={};else if(n.emitted[a])return;n.emitted[a]=!0,Ai(c,n,6,r)}}function Db(n,e,t=!1){const i=e.emitsCache,r=i.get(n);if(r!==void 0)return r;const s=n.emits;let o={},a=!1;if(!$e(n)){const l=c=>{const u=Db(c,e,!0);u&&(a=!0,Kt(o,u))};!t&&e.mixins.length&&e.mixins.forEach(l),n.extends&&l(n.extends),n.mixins&&n.mixins.forEach(l)}return!s&&!a?(wt(n)&&i.set(n,null),null):(Fe(s)?s.forEach(l=>o[l]=null):Kt(o,s),wt(n)&&i.set(n,o),o)}function ch(n,e){return!n||!Zf(e)?!1:(e=e.slice(2).replace(/Once$/,""),yt(n,e[0].toLowerCase()+e.slice(1))||yt(n,os(e))||yt(n,e))}function H_(n){const{type:e,vnode:t,proxy:i,withProxy:r,propsOptions:[s],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:h,setupState:d,ctx:p,inheritAttrs:_}=n,g=Ku(n);let m,y;try{if(t.shapeFlag&4){const v=r||i,E=v;m=Vi(c.call(E,v,u,f,d,h,p)),y=a}else{const v=e;m=Vi(v.length>1?v(f,{attrs:a,slots:o,emit:l}):v(f,null)),y=e.props?a:IA(a)}}catch(v){Ka.length=0,rh(v,n,1),m=an(Cn)}let x=m;if(y&&_!==!1){const v=Object.keys(y),{shapeFlag:E}=x;v.length&&E&7&&(s&&v.some(Dm)&&(y=LA(y,s)),x=Qr(x,y,!1,!0))}return t.dirs&&(x=Qr(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(t.dirs):t.dirs),t.transition&&yl(x,t.transition),m=x,Ku(g),m}const IA=n=>{let e;for(const t in n)(t==="class"||t==="style"||Zf(t))&&((e||(e={}))[t]=n[t]);return e},LA=(n,e)=>{const t={};for(const i in n)(!Dm(i)||!(i.slice(9)in e))&&(t[i]=n[i]);return t};function DA(n,e,t){const{props:i,children:r,component:s}=n,{props:o,children:a,patchFlag:l}=e,c=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&l>=0){if(l&1024)return!0;if(l&16)return i?G_(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let f=0;fn.__isSuspense;function NA(n,e){e&&e.pendingBranch?Fe(n)?e.effects.push(...n):e.effects.push(n):Xw(n)}const Wt=Symbol.for("v-fgt"),tc=Symbol.for("v-txt"),Cn=Symbol.for("v-cmt"),Lu=Symbol.for("v-stc"),Ka=[];let Jn=null;function ln(n=!1){Ka.push(Jn=n?null:[])}function UA(){Ka.pop(),Jn=Ka[Ka.length-1]||null}let xl=1;function W_(n,e=!1){xl+=n,n<0&&Jn&&e&&(Jn.hasOnce=!0)}function Nb(n){return n.dynamicChildren=xl>0?Jn||jo:null,UA(),xl>0&&Jn&&Jn.push(n),n}function ci(n,e,t,i,r,s){return Nb(Gr(n,e,t,i,r,s,!0))}function bl(n,e,t,i,r){return Nb(an(n,e,t,i,r,!0))}function Sl(n){return n?n.__v_isVNode===!0:!1}function Hs(n,e){return n.type===e.type&&n.key===e.key}const Ub=({key:n})=>n??null,Du=({ref:n,ref_key:e,ref_for:t})=>(typeof n=="number"&&(n=""+n),n!=null?It(n)||Mt(n)||$e(n)?{i:qt,r:n,k:e,f:!!t}:n:null);function Gr(n,e=null,t=null,i=0,r=null,s=n===Wt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&Ub(e),ref:e&&Du(e),scopeId:eb,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:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:qt};return a?(eg(l,t),s&128&&n.normalize(l)):t&&(l.shapeFlag|=It(t)?8:16),xl>0&&!o&&Jn&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Jn.push(l),l}const an=FA;function FA(n,e=null,t=null,i=0,r=null,s=!1){if((!n||n===pb)&&(n=Cn),Sl(n)){const a=Qr(n,e,!0);return t&&eg(a,t),xl>0&&!s&&Jn&&(a.shapeFlag&6?Jn[Jn.indexOf(n)]=a:Jn.push(a)),a.patchFlag=-2,a}if(jA(n)&&(n=n.__vccOpts),e){e=BA(e);let{class:a,style:l}=e;a&&!It(a)&&(e.class=ma(a)),wt(l)&&(Gm(l)&&!Fe(l)&&(l=Kt({},l)),e.style=mi(l))}const o=It(n)?1:Ob(n)?128:ib(n)?64:wt(n)?4:$e(n)?2:0;return Gr(n,e,t,i,r,o,s,!0)}function BA(n){return n?Gm(n)||Sb(n)?Kt({},n):n:null}function Qr(n,e,t=!1,i=!1){const{props:r,ref:s,patchFlag:o,children:a,transition:l}=n,c=e?zA(r||{},e):r,u={__v_isVNode:!0,__v_skip:!0,type:n.type,props:c,key:c&&Ub(c),ref:e&&e.ref?t&&s?Fe(s)?s.concat(Du(e)):[s,Du(e)]:Du(e):s,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!==Wt?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&&Qr(n.ssContent),ssFallback:n.ssFallback&&Qr(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce};return l&&i&&yl(u,l.clone(u)),u}function kA(n=" ",e=0){return an(tc,null,n,e)}function VA(n,e){const t=an(Lu,null,n);return t.staticCount=e,t}function X_(n="",e=!1){return e?(ln(),bl(Cn,null,n)):an(Cn,null,n)}function Vi(n){return n==null||typeof n=="boolean"?an(Cn):Fe(n)?an(Wt,null,n.slice()):Sl(n)?Wr(n):an(tc,null,String(n))}function Wr(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:Qr(n)}function eg(n,e){let t=0;const{shapeFlag:i}=n;if(e==null)e=null;else if(Fe(e))t=16;else if(typeof e=="object")if(i&65){const r=e.default;r&&(r._c&&(r._d=!1),eg(n,r()),r._c&&(r._d=!0));return}else{t=32;const r=e._;!r&&!Sb(e)?e._ctx=qt:r===3&&qt&&(qt.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else $e(e)?(e={default:e,_ctx:qt},t=32):(e=String(e),i&64?(t=16,e=[kA(e)]):t=8);n.children=e,n.shapeFlag|=t}function zA(...n){const e={};for(let t=0;ten||qt;let ef,Op;{const n=eh(),e=(t,i)=>{let r;return(r=n[t])||(r=n[t]=[]),r.push(i),s=>{r.length>1?r.forEach(o=>o(s)):r[0](s)}};ef=e("__VUE_INSTANCE_SETTERS__",t=>en=t),Op=e("__VUE_SSR_SETTERS__",t=>Ml=t)}const nc=n=>{const e=en;return ef(n),n.scope.on(),()=>{n.scope.off(),ef(e)}},$_=()=>{en&&en.scope.off(),ef(null)};function Fb(n){return n.vnode.shapeFlag&4}let Ml=!1;function XA(n,e=!1,t=!1){e&&Op(e);const{props:i,children:r}=n.vnode,s=Fb(n);_A(n,i,s,e),bA(n,r,t);const o=s?$A(n,e):void 0;return e&&Op(!1),o}function $A(n,e){const t=n.type;n.accessCache=Object.create(null),n.proxy=new Proxy(n.ctx,cA);const{setup:i}=t;if(i){as();const r=n.setupContext=i.length>1?kb(n):null,s=nc(n),o=ec(i,n,0,[n.props,r]),a=Sx(o);if(ls(),s(),(a||n.sp)&&!Jo(n)&&fb(n),a){if(o.then($_,$_),e)return o.then(l=>{q_(n,l)}).catch(l=>{rh(l,n,0)});n.asyncDep=o}else q_(n,o)}else Bb(n)}function q_(n,e,t){$e(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:wt(e)&&(n.setupState=$x(e)),Bb(n)}function Bb(n,e,t){const i=n.type;n.render||(n.render=i.render||Hi);{const r=nc(n);as();try{uA(n)}finally{ls(),r()}}}const qA={get(n,e){return pn(n,"get",""),n[e]}};function kb(n){const e=t=>{n.exposed=t||{}};return{attrs:new Proxy(n.attrs,qA),slots:n.slots,emit:n.emit,expose:e}}function uh(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy($x(Wm(n.exposed)),{get(e,t){if(t in e)return e[t];if(t in ja)return ja[t](n)},has(e,t){return t in e||t in ja}})):n.proxy}function YA(n,e=!0){return $e(n)?n.displayName||n.name:n.name||e&&n.__name}function jA(n){return $e(n)&&"__vccOpts"in n}const Ce=(n,e)=>Vw(n,e,Ml);function br(n,e,t){const i=arguments.length;return i===2?wt(e)&&!Fe(e)?Sl(e)?an(n,null,[e]):an(n,e):an(n,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Sl(t)&&(t=[t]),an(n,e,t))}const KA="3.5.13";/** * @vue/runtime-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Np;const j_=typeof window<"u"&&window.trustedTypes;if(j_)try{Np=j_.createPolicy("vue",{createHTML:n=>n})}catch{}const Vb=Np?n=>Np.createHTML(n):n=>n,JA="http://www.w3.org/2000/svg",QA="http://www.w3.org/1998/Math/MathML",cr=typeof document<"u"?document:null,K_=cr&&cr.createElement("template"),e1={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 r=e==="svg"?cr.createElementNS(JA,n):e==="mathml"?cr.createElementNS(QA,n):t?cr.createElement(n,{is:t}):cr.createElement(n);return n==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:n=>cr.createTextNode(n),createComment:n=>cr.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>cr.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,r,s){const o=t?t.previousSibling:e.lastChild;if(r&&(r===s||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),t),!(r===s||!(r=r.nextSibling)););else{K_.innerHTML=Vb(i==="svg"?`${n}`:i==="mathml"?`${n}`:n);const a=K_.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]}},Pr="transition",Ea="animation",El=Symbol("_vtc"),Hb={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},t1=Kt({},ab,Hb),n1=n=>(n.displayName="Transition",n.props=t1,n),x4=n1((n,{slots:e})=>Sr(Kw,i1(n),e)),xs=(n,e=[])=>{Fe(n)?n.forEach(t=>t(...e)):n&&n(...e)},Z_=n=>n?Fe(n)?n.some(e=>e.length>1):n.length>1:!1;function i1(n){const e={};for(const B in n)B in Hb||(e[B]=n[B]);if(n.css===!1)return e;const{name:t="v",type:i,duration:r,enterFromClass:s=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:l=s,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:f=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:d=`${t}-leave-to`}=n,p=r1(r),_=p&&p[0],g=p&&p[1],{onBeforeEnter:m,onEnter:y,onEnterCancelled:x,onLeave:v,onLeaveCancelled:E,onBeforeAppear:T=m,onAppear:M=y,onAppearCancelled:P=x}=e,b=(B,H,$,ee)=>{B._enterCancelled=ee,bs(B,H?u:a),bs(B,H?c:o),$&&$()},S=(B,H)=>{B._isLeaving=!1,bs(B,f),bs(B,d),bs(B,h),H&&H()},D=B=>(H,$)=>{const ee=B?M:y,Z=()=>b(H,B,$);xs(ee,[H,Z]),J_(()=>{bs(H,B?l:s),er(H,B?u:a),Z_(ee)||Q_(H,i,_,Z)})};return Kt(e,{onBeforeEnter(B){xs(m,[B]),er(B,s),er(B,o)},onBeforeAppear(B){xs(T,[B]),er(B,l),er(B,c)},onEnter:D(!1),onAppear:D(!0),onLeave(B,H){B._isLeaving=!0;const $=()=>S(B,H);er(B,f),B._enterCancelled?(er(B,h),nv()):(nv(),er(B,h)),J_(()=>{B._isLeaving&&(bs(B,f),er(B,d),Z_(v)||Q_(B,i,g,$))}),xs(v,[B,$])},onEnterCancelled(B){b(B,!1,void 0,!0),xs(x,[B])},onAppearCancelled(B){b(B,!0,void 0,!0),xs(P,[B])},onLeaveCancelled(B){S(B),xs(E,[B])}})}function r1(n){if(n==null)return null;if(wt(n))return[pd(n.enter),pd(n.leave)];{const e=pd(n);return[e,e]}}function pd(n){return aw(n)}function er(n,e){e.split(/\s+/).forEach(t=>t&&n.classList.add(t)),(n[El]||(n[El]=new Set)).add(e)}function bs(n,e){e.split(/\s+/).forEach(i=>i&&n.classList.remove(i));const t=n[El];t&&(t.delete(e),t.size||(n[El]=void 0))}function J_(n){requestAnimationFrame(()=>{requestAnimationFrame(n)})}let s1=0;function Q_(n,e,t,i){const r=n._endId=++s1,s=()=>{r===n._endId&&i()};if(t!=null)return setTimeout(s,t);const{type:o,timeout:a,propCount:l}=o1(n,e);if(!o)return i();const c=o+"end";let u=0;const f=()=>{n.removeEventListener(c,h),s()},h=d=>{d.target===n&&++u>=l&&f()};setTimeout(()=>{u(t[p]||"").split(", "),r=i(`${Pr}Delay`),s=i(`${Pr}Duration`),o=ev(r,s),a=i(`${Ea}Delay`),l=i(`${Ea}Duration`),c=ev(a,l);let u=null,f=0,h=0;e===Pr?o>0&&(u=Pr,f=o,h=s.length):e===Ea?c>0&&(u=Ea,f=c,h=l.length):(f=Math.max(o,c),u=f>0?o>c?Pr:Ea:null,h=u?u===Pr?s.length:l.length:0);const d=u===Pr&&/\b(transform|all)(,|$)/.test(i(`${Pr}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:d}}function ev(n,e){for(;n.lengthtv(t)+tv(n[i])))}function tv(n){return n==="auto"?0:Number(n.slice(0,-1).replace(",","."))*1e3}function nv(){return document.body.offsetHeight}function a1(n,e,t){const i=n[El];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const iv=Symbol("_vod"),l1=Symbol("_vsh"),c1=Symbol(""),u1=/(^|;)\s*display\s*:/;function f1(n,e,t){const i=n.style,r=It(t);let s=!1;if(t&&!r){if(e)if(It(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&Ou(i,a,"")}else for(const o in e)t[o]==null&&Ou(i,o,"");for(const o in t)o==="display"&&(s=!0),Ou(i,o,t[o])}else if(r){if(e!==t){const o=i[c1];o&&(t+=";"+o),i.cssText=t,s=u1.test(t)}}else e&&n.removeAttribute("style");iv in n&&(n[iv]=s?i.display:"",n[l1]&&(i.display="none"))}const rv=/\s*!important$/;function Ou(n,e,t){if(Fe(t))t.forEach(i=>Ou(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=h1(n,e);rv.test(t)?n.setProperty(os(i),t.replace(rv,""),"important"):n[i]=t}}const sv=["Webkit","Moz","ms"],md={};function h1(n,e){const t=md[e];if(t)return t;let i=ti(e);if(i!=="filter"&&i in n)return md[e]=i;i=Qf(i);for(let r=0;rgd||(g1.then(()=>gd=0),gd=Date.now());function v1(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;Ci(y1(i,t.value),e,5,[i])};return t.value=n,t.attached=_1(),t}function y1(n,e){if(Fe(e)){const t=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{t.call(n),n._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const fv=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,x1=(n,e,t,i,r,s)=>{const o=r==="svg";e==="class"?a1(n,i,o):e==="style"?f1(n,t,i):Zf(e)?Om(e)||p1(n,e,t,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):b1(n,e,i,o))?(lv(n,e,i),!n.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&av(n,e,i,o,s,e!=="value")):n._isVueCE&&(/[A-Z]/.test(e)||!It(i))?lv(n,ti(e),i,s,e):(e==="true-value"?n._trueValue=i:e==="false-value"&&(n._falseValue=i),av(n,e,i,o))};function b1(n,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in n&&fv(e)&&$e(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=n.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return fv(e)&&It(t)?!1:e in n}const es=n=>{const e=n.props["onUpdate:modelValue"]||!1;return Fe(e)?t=>Pu(e,t):e};function S1(n){n.target.composing=!0}function hv(n){const e=n.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const fi=Symbol("_assign"),b4={created(n,{modifiers:{lazy:e,trim:t,number:i}},r){n[fi]=es(r);const s=i||r.props&&r.props.type==="number";hr(n,e?"change":"input",o=>{if(o.target.composing)return;let a=n.value;t&&(a=a.trim()),s&&(a=$u(a)),n[fi](a)}),t&&hr(n,"change",()=>{n.value=n.value.trim()}),e||(hr(n,"compositionstart",S1),hr(n,"compositionend",hv),hr(n,"change",hv))},mounted(n,{value:e}){n.value=e??""},beforeUpdate(n,{value:e,oldValue:t,modifiers:{lazy:i,trim:r,number:s}},o){if(n[fi]=es(o),n.composing)return;const a=(s||n.type==="number")&&!/^0\d/.test(n.value)?$u(n.value):n.value,l=e??"";a!==l&&(document.activeElement===n&&n.type!=="range"&&(i&&e===t||r&&n.value.trim()===l)||(n.value=l))}},S4={deep:!0,created(n,e,t){n[fi]=es(t),hr(n,"change",()=>{const i=n._modelValue,r=ta(n),s=n.checked,o=n[fi];if(Fe(i)){const a=Fm(i,r),l=a!==-1;if(s&&!l)o(i.concat(r));else if(!s&&l){const c=[...i];c.splice(a,1),o(c)}}else if(pa(i)){const a=new Set(i);s?a.add(r):a.delete(r),o(a)}else o(Gb(n,s))})},mounted:dv,beforeUpdate(n,e,t){n[fi]=es(t),dv(n,e,t)}};function dv(n,{value:e,oldValue:t},i){n._modelValue=e;let r;if(Fe(e))r=Fm(e,i.props.value)>-1;else if(pa(e))r=e.has(i.props.value);else{if(e===t)return;r=no(e,Gb(n,!0))}n.checked!==r&&(n.checked=r)}const M4={created(n,{value:e},t){n.checked=no(e,t.props.value),n[fi]=es(t),hr(n,"change",()=>{n[fi](ta(n))})},beforeUpdate(n,{value:e,oldValue:t},i){n[fi]=es(i),e!==t&&(n.checked=no(e,i.props.value))}},E4={deep:!0,created(n,{value:e,modifiers:{number:t}},i){const r=pa(e);hr(n,"change",()=>{const s=Array.prototype.filter.call(n.options,o=>o.selected).map(o=>t?$u(ta(o)):ta(o));n[fi](n.multiple?r?new Set(s):s:s[0]),n._assigning=!0,cs(()=>{n._assigning=!1})}),n[fi]=es(i)},mounted(n,{value:e}){pv(n,e)},beforeUpdate(n,e,t){n[fi]=es(t)},updated(n,{value:e}){n._assigning||pv(n,e)}};function pv(n,e){const t=n.multiple,i=Fe(e);if(!(t&&!i&&!pa(e))){for(let r=0,s=n.options.length;rString(c)===String(a)):o.selected=Fm(e,a)>-1}else o.selected=e.has(a);else if(no(ta(o),e)){n.selectedIndex!==r&&(n.selectedIndex=r);return}}!t&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function ta(n){return"_value"in n?n._value:n.value}function Gb(n,e){const t=e?"_trueValue":"_falseValue";return t in n?n[t]:e}const M1=["ctrl","shift","alt","meta"],E1={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)=>M1.some(t=>n[`${t}Key`]&&!e.includes(t))},T4=(n,e)=>{const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=(r,...s)=>{for(let o=0;o{Wb().render(...n)},w1=(...n)=>{const e=Wb().createApp(...n),{mount:t}=e;return e.mount=i=>{const r=C1(i);if(!r)return;const s=e._component;!$e(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=t(r,!1,A1(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e};function A1(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function C1(n){return It(n)?document.querySelector(n):n}const Xb=new Set,qn=new WeakMap,na=new WeakMap,ro=new WeakMap,Up=new WeakMap,R1=new WeakMap,ia=new WeakMap,tf=new WeakMap,Ha=new WeakSet;let ts,ng=0,ig=0;const mr="__aa_tgt",Tl="__aa_del",nf="__aa_new",P1=n=>{const e=U1(n);e&&e.forEach(t=>F1(t))},I1=n=>{n.forEach(e=>{e.target===ts&&D1(),qn.has(e.target)&&fo(e.target)})};function L1(n){const e=Up.get(n);e==null||e.disconnect();let t=qn.get(n),i=0;const r=5;t||(t=ra(n),qn.set(n,t));const{offsetWidth:s,offsetHeight:o}=ts,l=[t.top-r,s-(t.left+r+t.width),o-(t.top+r+t.height),t.left-r].map(u=>`${-1*Math.floor(u)}px`).join(" "),c=new IntersectionObserver(()=>{++i>1&&fo(n)},{root:ts,threshold:1,rootMargin:l});c.observe(n),Up.set(n,c)}function fo(n){clearTimeout(tf.get(n));const e=fh(n),t=wl(e)?500:e.duration;tf.set(n,setTimeout(async()=>{const i=ro.get(n);try{await(i==null?void 0:i.finished),qn.set(n,ra(n)),L1(n)}catch{}},t))}function D1(){clearTimeout(tf.get(ts)),tf.set(ts,setTimeout(()=>{Xb.forEach(n=>jb(n,e=>$b(()=>fo(e))))},100))}function O1(n){setTimeout(()=>{R1.set(n,setInterval(()=>$b(fo.bind(null,n)),2e3))},Math.round(2e3*Math.random()))}function $b(n){typeof requestIdleCallback=="function"?requestIdleCallback(()=>n()):requestAnimationFrame(()=>n())}let Fp,Go;const N1=typeof window<"u"&&"ResizeObserver"in window;N1&&(ts=document.documentElement,Fp=new MutationObserver(P1),Go=new ResizeObserver(I1),window.addEventListener("scroll",()=>{ig=window.scrollY,ng=window.scrollX}),Go.observe(ts));function U1(n){return n.reduce((i,r)=>[...i,...Array.from(r.addedNodes),...Array.from(r.removedNodes)],[]).every(i=>i.nodeName==="#comment")?!1:n.reduce((i,r)=>{if(i===!1)return!1;if(r.target instanceof Element){if(_d(r.target),!i.has(r.target)){i.add(r.target);for(let s=0;st(n,ia.has(n)));for(let t=0;tr(i,ia.has(i)))}}function sg(n){return Array.isArray(n)?n:[n]}function wl(n){return typeof n=="function"}function k1(n){const e=qn.get(n),t=ra(n);if(!rg(n))return qn.set(n,t);let i;if(!e)return;const r=fh(n);if(typeof r!="function"){const s=e.left-t.left,o=e.top-t.top,[a,l,c,u]=qb(n,e,t),f={transform:`translate(${s}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:r.duration,easing:r.easing})}else{const[s]=sg(r(n,"remain",e,t));i=new Animation(s),i.play()}ro.set(n,i),qn.set(n,t),i.addEventListener("finish",fo.bind(null,n))}function gv(n){nf in n&&delete n[nf];const e=ra(n);qn.set(n,e);const t=fh(n);if(!rg(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[r]=sg(t(n,"add",e));i=new Animation(r),i.play()}ro.set(n,i),i.addEventListener("finish",fo.bind(null,n))}function _v(n,e){var t;n.remove(),qn.delete(n),na.delete(n),ro.delete(n),(t=Up.get(n))===null||t===void 0||t.disconnect(),setTimeout(()=>{if(Tl in n&&delete n[Tl],Object.defineProperty(n,nf,{value:!0,configurable:!0}),e&&n instanceof HTMLElement)for(const i in e)n.style[i]=""},0)}function z1(n){var e;if(!na.has(n)||!qn.has(n))return;const[t,i]=na.get(n);Object.defineProperty(n,Tl,{value:!0,configurable:!0});const r=window.scrollX,s=window.scrollY;if(i&&i.parentNode&&i.parentNode instanceof Element?i.parentNode.insertBefore(n,i):t&&t.parentNode?t.parentNode.appendChild(n):(e=Yb(n))===null||e===void 0||e.appendChild(n),!rg(n))return _v(n);const[o,a,l,c]=H1(n),u=fh(n),f=qn.get(n);(r!==ng||s!==ig)&&V1(n,r,s,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(!wl(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,_]=sg(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()}ro.set(n,h),h.addEventListener("finish",_v.bind(null,n,d))}function V1(n,e,t,i){const r=ng-e,s=ig-t,o=document.documentElement.style.scrollBehavior;if(getComputedStyle(ts).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+r,window.scrollY+s),!n.parentElement)return;const l=n.parentElement;let c=l.clientHeight,u=l.clientWidth;const f=performance.now();function h(){requestAnimationFrame(()=>{if(!wl(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 H1(n){const e=qn.get(n),[t,,i]=qb(n,e,ra(n));let r=n.parentElement;for(;r&&(getComputedStyle(r).position==="static"||r instanceof HTMLBodyElement);)r=r.parentElement;r||(r=document.body);const s=getComputedStyle(r),o=qn.get(r)||ra(r),a=Math.round(e.top-o.top)-ki(s.borderTopWidth),l=Math.round(e.left-o.left)-ki(s.borderLeftWidth);return[a,l,t,i]}function G1(n,e={}){return Fp&&Go&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!wl(e)&&!e.disrespectUserMotionPreference||(Ha.add(n),getComputedStyle(n).position==="static"&&Object.assign(n.style,{position:"relative"}),jb(n,fo,O1,r=>Go==null?void 0:Go.observe(r)),wl(e)?ia.set(n,e):ia.set(n,{duration:250,easing:"ease-in-out",...e}),Fp.observe(n,{childList:!0}),Xb.add(n))),Object.freeze({parent:n,enable:()=>{Ha.add(n)},disable:()=>{Ha.delete(n)},isEnabled:()=>Ha.has(n)})}const W1={mounted:(n,e)=>{G1(n,e.value||{})},getSSRProps:()=>({})},X1=W1,$1={install(n){n.directive("auto-animate",X1)}};/** +**/let Np;const Y_=typeof window<"u"&&window.trustedTypes;if(Y_)try{Np=Y_.createPolicy("vue",{createHTML:n=>n})}catch{}const Vb=Np?n=>Np.createHTML(n):n=>n,ZA="http://www.w3.org/2000/svg",JA="http://www.w3.org/1998/Math/MathML",lr=typeof document<"u"?document:null,j_=lr&&lr.createElement("template"),QA={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 r=e==="svg"?lr.createElementNS(ZA,n):e==="mathml"?lr.createElementNS(JA,n):t?lr.createElement(n,{is:t}):lr.createElement(n);return n==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:n=>lr.createTextNode(n),createComment:n=>lr.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>lr.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,r,s){const o=t?t.previousSibling:e.lastChild;if(r&&(r===s||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),t),!(r===s||!(r=r.nextSibling)););else{j_.innerHTML=Vb(i==="svg"?`${n}`:i==="mathml"?`${n}`:n);const a=j_.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]}},Rr="transition",Ea="animation",El=Symbol("_vtc"),zb={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},e1=Kt({},ob,zb),t1=n=>(n.displayName="Transition",n.props=e1,n),y4=t1((n,{slots:e})=>br(jw,n1(n),e)),xs=(n,e=[])=>{Fe(n)?n.forEach(t=>t(...e)):n&&n(...e)},K_=n=>n?Fe(n)?n.some(e=>e.length>1):n.length>1:!1;function n1(n){const e={};for(const B in n)B in zb||(e[B]=n[B]);if(n.css===!1)return e;const{name:t="v",type:i,duration:r,enterFromClass:s=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:l=s,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:f=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:d=`${t}-leave-to`}=n,p=i1(r),_=p&&p[0],g=p&&p[1],{onBeforeEnter:m,onEnter:y,onEnterCancelled:x,onLeave:v,onLeaveCancelled:E,onBeforeAppear:T=m,onAppear:M=y,onAppearCancelled:P=x}=e,b=(B,H,$,ee)=>{B._enterCancelled=ee,bs(B,H?u:a),bs(B,H?c:o),$&&$()},S=(B,H)=>{B._isLeaving=!1,bs(B,f),bs(B,d),bs(B,h),H&&H()},D=B=>(H,$)=>{const ee=B?M:y,Z=()=>b(H,B,$);xs(ee,[H,Z]),Z_(()=>{bs(H,B?l:s),Qi(H,B?u:a),K_(ee)||J_(H,i,_,Z)})};return Kt(e,{onBeforeEnter(B){xs(m,[B]),Qi(B,s),Qi(B,o)},onBeforeAppear(B){xs(T,[B]),Qi(B,l),Qi(B,c)},onEnter:D(!1),onAppear:D(!0),onLeave(B,H){B._isLeaving=!0;const $=()=>S(B,H);Qi(B,f),B._enterCancelled?(Qi(B,h),tv()):(tv(),Qi(B,h)),Z_(()=>{B._isLeaving&&(bs(B,f),Qi(B,d),K_(v)||J_(B,i,g,$))}),xs(v,[B,$])},onEnterCancelled(B){b(B,!1,void 0,!0),xs(x,[B])},onAppearCancelled(B){b(B,!0,void 0,!0),xs(P,[B])},onLeaveCancelled(B){S(B),xs(E,[B])}})}function i1(n){if(n==null)return null;if(wt(n))return[pd(n.enter),pd(n.leave)];{const e=pd(n);return[e,e]}}function pd(n){return ow(n)}function Qi(n,e){e.split(/\s+/).forEach(t=>t&&n.classList.add(t)),(n[El]||(n[El]=new Set)).add(e)}function bs(n,e){e.split(/\s+/).forEach(i=>i&&n.classList.remove(i));const t=n[El];t&&(t.delete(e),t.size||(n[El]=void 0))}function Z_(n){requestAnimationFrame(()=>{requestAnimationFrame(n)})}let r1=0;function J_(n,e,t,i){const r=n._endId=++r1,s=()=>{r===n._endId&&i()};if(t!=null)return setTimeout(s,t);const{type:o,timeout:a,propCount:l}=s1(n,e);if(!o)return i();const c=o+"end";let u=0;const f=()=>{n.removeEventListener(c,h),s()},h=d=>{d.target===n&&++u>=l&&f()};setTimeout(()=>{u(t[p]||"").split(", "),r=i(`${Rr}Delay`),s=i(`${Rr}Duration`),o=Q_(r,s),a=i(`${Ea}Delay`),l=i(`${Ea}Duration`),c=Q_(a,l);let u=null,f=0,h=0;e===Rr?o>0&&(u=Rr,f=o,h=s.length):e===Ea?c>0&&(u=Ea,f=c,h=l.length):(f=Math.max(o,c),u=f>0?o>c?Rr:Ea:null,h=u?u===Rr?s.length:l.length:0);const d=u===Rr&&/\b(transform|all)(,|$)/.test(i(`${Rr}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:d}}function Q_(n,e){for(;n.lengthev(t)+ev(n[i])))}function ev(n){return n==="auto"?0:Number(n.slice(0,-1).replace(",","."))*1e3}function tv(){return document.body.offsetHeight}function o1(n,e,t){const i=n[El];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const nv=Symbol("_vod"),a1=Symbol("_vsh"),l1=Symbol(""),c1=/(^|;)\s*display\s*:/;function u1(n,e,t){const i=n.style,r=It(t);let s=!1;if(t&&!r){if(e)if(It(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&Ou(i,a,"")}else for(const o in e)t[o]==null&&Ou(i,o,"");for(const o in t)o==="display"&&(s=!0),Ou(i,o,t[o])}else if(r){if(e!==t){const o=i[l1];o&&(t+=";"+o),i.cssText=t,s=c1.test(t)}}else e&&n.removeAttribute("style");nv in n&&(n[nv]=s?i.display:"",n[a1]&&(i.display="none"))}const iv=/\s*!important$/;function Ou(n,e,t){if(Fe(t))t.forEach(i=>Ou(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=f1(n,e);iv.test(t)?n.setProperty(os(i),t.replace(iv,""),"important"):n[i]=t}}const rv=["Webkit","Moz","ms"],md={};function f1(n,e){const t=md[e];if(t)return t;let i=ei(e);if(i!=="filter"&&i in n)return md[e]=i;i=Qf(i);for(let r=0;rgd||(m1.then(()=>gd=0),gd=Date.now());function _1(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;Ai(v1(i,t.value),e,5,[i])};return t.value=n,t.attached=g1(),t}function v1(n,e){if(Fe(e)){const t=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{t.call(n),n._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const uv=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,y1=(n,e,t,i,r,s)=>{const o=r==="svg";e==="class"?o1(n,i,o):e==="style"?u1(n,t,i):Zf(e)?Dm(e)||d1(n,e,t,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):x1(n,e,i,o))?(av(n,e,i),!n.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&ov(n,e,i,o,s,e!=="value")):n._isVueCE&&(/[A-Z]/.test(e)||!It(i))?av(n,ei(e),i,s,e):(e==="true-value"?n._trueValue=i:e==="false-value"&&(n._falseValue=i),ov(n,e,i,o))};function x1(n,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in n&&uv(e)&&$e(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=n.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return uv(e)&&It(t)?!1:e in n}const es=n=>{const e=n.props["onUpdate:modelValue"]||!1;return Fe(e)?t=>Pu(e,t):e};function b1(n){n.target.composing=!0}function fv(n){const e=n.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ui=Symbol("_assign"),x4={created(n,{modifiers:{lazy:e,trim:t,number:i}},r){n[ui]=es(r);const s=i||r.props&&r.props.type==="number";fr(n,e?"change":"input",o=>{if(o.target.composing)return;let a=n.value;t&&(a=a.trim()),s&&(a=$u(a)),n[ui](a)}),t&&fr(n,"change",()=>{n.value=n.value.trim()}),e||(fr(n,"compositionstart",b1),fr(n,"compositionend",fv),fr(n,"change",fv))},mounted(n,{value:e}){n.value=e??""},beforeUpdate(n,{value:e,oldValue:t,modifiers:{lazy:i,trim:r,number:s}},o){if(n[ui]=es(o),n.composing)return;const a=(s||n.type==="number")&&!/^0\d/.test(n.value)?$u(n.value):n.value,l=e??"";a!==l&&(document.activeElement===n&&n.type!=="range"&&(i&&e===t||r&&n.value.trim()===l)||(n.value=l))}},b4={deep:!0,created(n,e,t){n[ui]=es(t),fr(n,"change",()=>{const i=n._modelValue,r=ta(n),s=n.checked,o=n[ui];if(Fe(i)){const a=Um(i,r),l=a!==-1;if(s&&!l)o(i.concat(r));else if(!s&&l){const c=[...i];c.splice(a,1),o(c)}}else if(pa(i)){const a=new Set(i);s?a.add(r):a.delete(r),o(a)}else o(Hb(n,s))})},mounted:hv,beforeUpdate(n,e,t){n[ui]=es(t),hv(n,e,t)}};function hv(n,{value:e,oldValue:t},i){n._modelValue=e;let r;if(Fe(e))r=Um(e,i.props.value)>-1;else if(pa(e))r=e.has(i.props.value);else{if(e===t)return;r=no(e,Hb(n,!0))}n.checked!==r&&(n.checked=r)}const S4={created(n,{value:e},t){n.checked=no(e,t.props.value),n[ui]=es(t),fr(n,"change",()=>{n[ui](ta(n))})},beforeUpdate(n,{value:e,oldValue:t},i){n[ui]=es(i),e!==t&&(n.checked=no(e,i.props.value))}},M4={deep:!0,created(n,{value:e,modifiers:{number:t}},i){const r=pa(e);fr(n,"change",()=>{const s=Array.prototype.filter.call(n.options,o=>o.selected).map(o=>t?$u(ta(o)):ta(o));n[ui](n.multiple?r?new Set(s):s:s[0]),n._assigning=!0,cs(()=>{n._assigning=!1})}),n[ui]=es(i)},mounted(n,{value:e}){dv(n,e)},beforeUpdate(n,e,t){n[ui]=es(t)},updated(n,{value:e}){n._assigning||dv(n,e)}};function dv(n,e){const t=n.multiple,i=Fe(e);if(!(t&&!i&&!pa(e))){for(let r=0,s=n.options.length;rString(c)===String(a)):o.selected=Um(e,a)>-1}else o.selected=e.has(a);else if(no(ta(o),e)){n.selectedIndex!==r&&(n.selectedIndex=r);return}}!t&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function ta(n){return"_value"in n?n._value:n.value}function Hb(n,e){const t=e?"_trueValue":"_falseValue";return t in n?n[t]:e}const S1=["ctrl","shift","alt","meta"],M1={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)=>S1.some(t=>n[`${t}Key`]&&!e.includes(t))},E4=(n,e)=>{const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=(r,...s)=>{for(let o=0;o{Gb().render(...n)},T1=(...n)=>{const e=Gb().createApp(...n),{mount:t}=e;return e.mount=i=>{const r=A1(i);if(!r)return;const s=e._component;!$e(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=t(r,!1,w1(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e};function w1(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function A1(n){return It(n)?document.querySelector(n):n}const Wb=new Set,$n=new WeakMap,na=new WeakMap,ro=new WeakMap,Up=new WeakMap,C1=new WeakMap,ia=new WeakMap,tf=new WeakMap,Ha=new WeakSet;let ts,tg=0,ng=0;const pr="__aa_tgt",Tl="__aa_del",nf="__aa_new",R1=n=>{const e=N1(n);e&&e.forEach(t=>U1(t))},P1=n=>{n.forEach(e=>{e.target===ts&&L1(),$n.has(e.target)&&fo(e.target)})};function I1(n){const e=Up.get(n);e==null||e.disconnect();let t=$n.get(n),i=0;const r=5;t||(t=ra(n),$n.set(n,t));const{offsetWidth:s,offsetHeight:o}=ts,l=[t.top-r,s-(t.left+r+t.width),o-(t.top+r+t.height),t.left-r].map(u=>`${-1*Math.floor(u)}px`).join(" "),c=new IntersectionObserver(()=>{++i>1&&fo(n)},{root:ts,threshold:1,rootMargin:l});c.observe(n),Up.set(n,c)}function fo(n){clearTimeout(tf.get(n));const e=fh(n),t=wl(e)?500:e.duration;tf.set(n,setTimeout(async()=>{const i=ro.get(n);try{await(i==null?void 0:i.finished),$n.set(n,ra(n)),I1(n)}catch{}},t))}function L1(){clearTimeout(tf.get(ts)),tf.set(ts,setTimeout(()=>{Wb.forEach(n=>Yb(n,e=>Xb(()=>fo(e))))},100))}function D1(n){setTimeout(()=>{C1.set(n,setInterval(()=>Xb(fo.bind(null,n)),2e3))},Math.round(2e3*Math.random()))}function Xb(n){typeof requestIdleCallback=="function"?requestIdleCallback(()=>n()):requestAnimationFrame(()=>n())}let Fp,Go;const O1=typeof window<"u"&&"ResizeObserver"in window;O1&&(ts=document.documentElement,Fp=new MutationObserver(R1),Go=new ResizeObserver(P1),window.addEventListener("scroll",()=>{ng=window.scrollY,tg=window.scrollX}),Go.observe(ts));function N1(n){return n.reduce((i,r)=>[...i,...Array.from(r.addedNodes),...Array.from(r.removedNodes)],[]).every(i=>i.nodeName==="#comment")?!1:n.reduce((i,r)=>{if(i===!1)return!1;if(r.target instanceof Element){if(_d(r.target),!i.has(r.target)){i.add(r.target);for(let s=0;st(n,ia.has(n)));for(let t=0;tr(i,ia.has(i)))}}function rg(n){return Array.isArray(n)?n:[n]}function wl(n){return typeof n=="function"}function B1(n){const e=$n.get(n),t=ra(n);if(!ig(n))return $n.set(n,t);let i;if(!e)return;const r=fh(n);if(typeof r!="function"){const s=e.left-t.left,o=e.top-t.top,[a,l,c,u]=$b(n,e,t),f={transform:`translate(${s}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:r.duration,easing:r.easing})}else{const[s]=rg(r(n,"remain",e,t));i=new Animation(s),i.play()}ro.set(n,i),$n.set(n,t),i.addEventListener("finish",fo.bind(null,n))}function mv(n){nf in n&&delete n[nf];const e=ra(n);$n.set(n,e);const t=fh(n);if(!ig(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[r]=rg(t(n,"add",e));i=new Animation(r),i.play()}ro.set(n,i),i.addEventListener("finish",fo.bind(null,n))}function gv(n,e){var t;n.remove(),$n.delete(n),na.delete(n),ro.delete(n),(t=Up.get(n))===null||t===void 0||t.disconnect(),setTimeout(()=>{if(Tl in n&&delete n[Tl],Object.defineProperty(n,nf,{value:!0,configurable:!0}),e&&n instanceof HTMLElement)for(const i in e)n.style[i]=""},0)}function k1(n){var e;if(!na.has(n)||!$n.has(n))return;const[t,i]=na.get(n);Object.defineProperty(n,Tl,{value:!0,configurable:!0});const r=window.scrollX,s=window.scrollY;if(i&&i.parentNode&&i.parentNode instanceof Element?i.parentNode.insertBefore(n,i):t&&t.parentNode?t.parentNode.appendChild(n):(e=qb(n))===null||e===void 0||e.appendChild(n),!ig(n))return gv(n);const[o,a,l,c]=z1(n),u=fh(n),f=$n.get(n);(r!==tg||s!==ng)&&V1(n,r,s,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(!wl(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,_]=rg(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()}ro.set(n,h),h.addEventListener("finish",gv.bind(null,n,d))}function V1(n,e,t,i){const r=tg-e,s=ng-t,o=document.documentElement.style.scrollBehavior;if(getComputedStyle(ts).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+r,window.scrollY+s),!n.parentElement)return;const l=n.parentElement;let c=l.clientHeight,u=l.clientWidth;const f=performance.now();function h(){requestAnimationFrame(()=>{if(!wl(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 z1(n){const e=$n.get(n),[t,,i]=$b(n,e,ra(n));let r=n.parentElement;for(;r&&(getComputedStyle(r).position==="static"||r instanceof HTMLBodyElement);)r=r.parentElement;r||(r=document.body);const s=getComputedStyle(r),o=$n.get(r)||ra(r),a=Math.round(e.top-o.top)-Bi(s.borderTopWidth),l=Math.round(e.left-o.left)-Bi(s.borderLeftWidth);return[a,l,t,i]}function H1(n,e={}){return Fp&&Go&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!wl(e)&&!e.disrespectUserMotionPreference||(Ha.add(n),getComputedStyle(n).position==="static"&&Object.assign(n.style,{position:"relative"}),Yb(n,fo,D1,r=>Go==null?void 0:Go.observe(r)),wl(e)?ia.set(n,e):ia.set(n,{duration:250,easing:"ease-in-out",...e}),Fp.observe(n,{childList:!0}),Wb.add(n))),Object.freeze({parent:n,enable:()=>{Ha.add(n)},disable:()=>{Ha.delete(n)},isEnabled:()=>Ha.has(n)})}const G1={mounted:(n,e)=>{H1(n,e.value||{})},getSSRProps:()=>({})},W1=G1,X1={install(n){n.directive("auto-animate",W1)}};/** * @license * Copyright 2010-2025 Three.js Authors * SPDX-License-Identifier: MIT - */const ic="174",q1={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Y1={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Kb=0,Bp=1,Zb=2,j1=3,K1=0,og=1,ag=2,zi=3,Mr=0,Ln=1,Mi=2,xr=0,Js=1,kp=2,zp=3,Vp=4,Jb=5,qr=100,Qb=101,eS=102,tS=103,nS=104,iS=200,rS=201,sS=202,oS=203,rf=204,sf=205,aS=206,lS=207,cS=208,uS=209,fS=210,hS=211,dS=212,pS=213,mS=214,of=0,af=1,lf=2,so=3,cf=4,uf=5,ff=6,hf=7,rc=0,gS=1,_S=2,Wi=0,vS=1,yS=2,xS=3,hh=4,bS=5,SS=6,MS=7,Hp="attached",ES="detached",dh=300,Er=301,ns=302,Al=303,Cl=304,ga=306,Rl=1e3,li=1001,Pl=1002,cn=1003,lg=1004,Z1=1004,Wo=1005,J1=1005,Yt=1006,Za=1007,Q1=1007,Hi=1008,eC=1008,Yi=1009,cg=1010,ug=1011,sa=1012,ph=1013,Tr=1014,Xn=1015,_a=1016,mh=1017,gh=1018,oo=1020,fg=35902,hg=1021,dg=1022,Pn=1023,pg=1024,mg=1025,Qs=1026,ao=1027,_h=1028,sc=1029,gg=1030,vh=1031,tC=1032,yh=1033,Ja=33776,Qa=33777,el=33778,tl=33779,df=35840,pf=35841,mf=35842,gf=35843,_f=36196,vf=37492,yf=37496,xf=37808,bf=37809,Sf=37810,Mf=37811,Ef=37812,Tf=37813,wf=37814,Af=37815,Cf=37816,Rf=37817,Pf=37818,If=37819,Lf=37820,Df=37821,nl=36492,Of=36494,Nf=36495,_g=36283,Uf=36284,Ff=36285,Bf=36286,TS=2200,wS=2201,AS=2202,Il=2300,kf=2301,Nu=2302,$s=2400,qs=2401,Ll=2402,xh=2500,vg=2501,nC=0,iC=1,rC=2,CS=3200,RS=3201,sC=3202,oC=3203,us=0,PS=1,dr="",wn="srgb",lo="srgb-linear",Dl="linear",bt="srgb",aC=0,Bs=7680,lC=7681,cC=7682,uC=7683,fC=34055,hC=34056,dC=5386,pC=512,mC=513,gC=514,_C=515,vC=516,yC=517,xC=518,Gp=519,IS=512,LS=513,DS=514,yg=515,OS=516,NS=517,US=518,FS=519,Ol=35044,bC=35048,SC=35040,MC=35045,EC=35049,TC=35041,wC=35046,AC=35050,CC=35042,RC="100",Wp="300 es",Ei=2e3,Nl=2001,PC={COMPUTE:"compute",RENDER:"render"};class Ki{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 r=i[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,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 r=i.slice(0);for(let s=0,o=r.length;s>8&255]+fn[n>>16&255]+fn[n>>24&255]+"-"+fn[e&255]+fn[e>>8&255]+"-"+fn[e>>16&15|64]+fn[e>>24&255]+"-"+fn[t&63|128]+fn[t>>8&255]+"-"+fn[t>>16&255]+fn[t>>24&255]+fn[i&255]+fn[i>>8&255]+fn[i>>16&255]+fn[i>>24&255]).toLowerCase()}function Ze(n,e,t){return Math.max(e,Math.min(t,n))}function xg(n,e){return(n%e+e)%e}function IC(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function LC(n,e,t){return n!==e?(t-n)/(e-n):0}function il(n,e,t){return(1-t)*n+t*e}function DC(n,e,t,i){return il(n,e,1-Math.exp(-t*i))}function OC(n,e=1){return e-Math.abs(xg(n,e*2)-e)}function NC(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function UC(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function FC(n,e){return n+Math.floor(Math.random()*(e-n+1))}function BC(n,e){return n+Math.random()*(e-n)}function kC(n){return n*(.5-Math.random())}function zC(n){n!==void 0&&(vv=n);let e=vv+=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 VC(n){return n*eo}function HC(n){return n*oa}function GC(n){return(n&n-1)===0&&n!==0}function WC(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function XC(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function $C(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),c=s((e+i)/2),u=o((e+i)/2),f=s((e-i)/2),h=o((e-i)/2),d=s((i-e)/2),p=o((i-e)/2);switch(r){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: "+r)}}function Rn(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 et(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 bg={DEG2RAD:eo,RAD2DEG:oa,generateUUID:ei,clamp:Ze,euclideanModulo:xg,mapLinear:IC,inverseLerp:LC,lerp:il,damp:DC,pingpong:OC,smoothstep:NC,smootherstep:UC,randInt:FC,randFloat:BC,randFloatSpread:kC,seededRandom:zC,degToRad:VC,radToDeg:HC,isPowerOfTwo:GC,ceilPowerOfTwo:WC,floorPowerOfTwo:XC,setQuaternionFromProperEuler:$C,normalize:et,denormalize:Rn};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,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[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=Ze(this.x,e.x,t.x),this.y=Ze(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ze(this.x,e,t),this.y=Ze(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Ze(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(Ze(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),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+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 Qe{constructor(e,t,i,r,s,o,a,l,c){Qe.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,l,c)}set(e,t,i,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=s,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,r=t.elements,s=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],_=r[0],g=r[3],m=r[6],y=r[1],x=r[4],v=r[7],E=r[2],T=r[5],M=r[8];return s[0]=o*_+a*y+l*E,s[3]=o*g+a*x+l*T,s[6]=o*m+a*v+l*M,s[1]=c*_+u*y+f*E,s[4]=c*g+u*x+f*T,s[7]=c*m+u*v+f*M,s[2]=h*_+d*y+p*E,s[5]=h*g+d*x+p*T,s[8]=h*m+d*v+p*M,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],r=e[2],s=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*s*u+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=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*s,d=c*s-o*l,p=t*f+i*h+r*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]=(r*c-u*i)*_,e[2]=(a*i-r*o)*_,e[3]=h*_,e[4]=(u*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=d*_,e[7]=(i*l-c*t)*_,e[8]=(o*t-i*s)*_,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,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(vd.makeScale(e,t)),this}rotate(e){return this.premultiply(vd.makeRotation(-e)),this}translate(e,t){return this.premultiply(vd.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 r=0;r<9;r++)if(t[r]!==i[r])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 vd=new Qe;function BS(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const qC={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Xo(n,e){return new qC[n](e)}function Ul(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function kS(){const n=Ul("canvas");return n.style.display="block",n}const yv={};function ks(n){n in yv||(yv[n]=!0,console.warn(n))}function YC(n,e,t){return new Promise(function(i,r){function s(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:i()}}setTimeout(s,t)})}function jC(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 KC(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 xv=new Qe().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),bv=new Qe().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function ZC(){const n={enabled:!0,workingColorSpace:lo,spaces:{},convert:function(r,s,o){return this.enabled===!1||s===o||!s||!o||(this.spaces[s].transfer===bt&&(r.r=br(r.r),r.g=br(r.g),r.b=br(r.b)),this.spaces[s].primaries!==this.spaces[o].primaries&&(r.applyMatrix3(this.spaces[s].toXYZ),r.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===bt&&(r.r=Qo(r.r),r.g=Qo(r.g),r.b=Qo(r.b))),r},fromWorkingColorSpace:function(r,s){return this.convert(r,this.workingColorSpace,s)},toWorkingColorSpace:function(r,s){return this.convert(r,s,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===dr?Dl:this.spaces[r].transfer},getLuminanceCoefficients:function(r,s=this.workingColorSpace){return r.fromArray(this.spaces[s].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,s,o){return r.copy(this.spaces[s].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[lo]:{primaries:e,whitePoint:i,transfer:Dl,toXYZ:xv,fromXYZ:bv,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:wn},outputColorSpaceConfig:{drawingBufferColorSpace:wn}},[wn]:{primaries:e,whitePoint:i,transfer:bt,toXYZ:xv,fromXYZ:bv,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:wn}}}),n}const at=ZC();function br(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Qo(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let bo;class zS{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{bo===void 0&&(bo=Ul("canvas")),bo.width=e.width,bo.height=e.height;const i=bo.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=bo}return t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Ul("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==dh)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Rl:e.x=e.x-Math.floor(e.x);break;case li:e.x=e.x<0?0:1;break;case Pl: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 Rl:e.y=e.y-Math.floor(e.y);break;case li:e.y=e.y<0?0:1;break;case Pl: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++}}Bt.DEFAULT_IMAGE=null;Bt.DEFAULT_MAPPING=dh;Bt.DEFAULT_ANISOTROPY=1;class ht{constructor(e=0,t=0,i=0,r=1){ht.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}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,r){return this.x=e,this.y=t,this.z=i,this.w=r,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,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,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,r,s;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 x=(c+1)/2,v=(d+1)/2,E=(m+1)/2,T=(u+h)/4,M=(f+_)/4,P=(p+g)/4;return x>v&&x>E?x<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(x),r=T/i,s=M/i):v>E?v<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(v),i=T/r,s=P/r):E<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(E),i=M/s,r=P/s),this.set(i,r,s,t),this}let y=Math.sqrt((g-p)*(g-p)+(f-_)*(f-_)+(h-u)*(h-u));return Math.abs(y)<.001&&(y=1),this.x=(g-p)/y,this.y=(f-_)/y,this.z=(h-u)/y,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=Ze(this.x,e.x,t.x),this.y=Ze(this.y,e.y,t.y),this.z=Ze(this.z,e.z,t.z),this.w=Ze(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ze(this.x,e,t),this.y=Ze(this.y,e,t),this.z=Ze(this.z,e,t),this.w=Ze(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Ze(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 bh extends Ki{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new ht(0,0,e,t),this.scissorTest=!1,this.viewport=new ht(0,0,e,t);const r={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Yt,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new Bt(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);s.flipY=!1,s.generateMipmaps=i.generateMipmaps,s.internalFormat=i.internalFormat,this.textures=[];const o=i.count;for(let a=0;a=0?1:-1,x=1-m*m;if(x>Number.EPSILON){const E=Math.sqrt(x),T=Math.atan2(E,m*y);g=Math.sin(g*T)/E,a=Math.sin(a*T)/E}const v=a*y;if(l=l*g+h*v,c=c*g+d*v,u=u*g+p*v,f=f*g+_*v,g===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=E,c*=E,u*=E,f*=E}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],f=s[o],h=s[o+1],d=s[o+2],p=s[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,r){return this._x=e,this._y=t,this._z=i,this._w=r,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,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),f=a(s/2),h=l(i/2),d=l(r/2),p=l(s/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,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=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=(s-c)*d,this._z=(o-r)*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=(r+o)/d,this._z=(s+c)/d}else if(a>f){const d=2*Math.sqrt(1+a-i-f);this._w=(s-c)/d,this._x=(r+o)/d,this._y=.25*d,this._z=(l+u)/d}else{const d=2*Math.sqrt(1+f-i-a);this._w=(o-r)/d,this._x=(s+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(Ze(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),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,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-i*c,this._z=s*u+o*c+i*l-r*a,this._w=o*u-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*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=r,this._z=s,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*r+t*this._y,this._z=d*s+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=r*f+this._y*h,this._z=s*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(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(t),s*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 F{constructor(e=0,t=0,i=0){F.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(Sv.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Sv.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*i),u=2*(a*t-s*r),f=2*(s*i-o*t);return this.x=t+l*c+o*f-a*u,this.y=i+l*u+a*c-s*f,this.z=r+l*f+s*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,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,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=Ze(this.x,e.x,t.x),this.y=Ze(this.y,e.y,t.y),this.z=Ze(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ze(this.x,e,t),this.y=Ze(this.y,e,t),this.z=Ze(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Ze(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,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*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 xd.copy(this).projectOnVector(e),this.sub(xd)}reflect(e){return this.sub(xd.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(Ze(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}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 r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*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(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,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 xd=new F,Sv=new Yn;class Dn{constructor(e=new F(1/0,1/0,1/0),t=new F(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.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,yi),yi.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(Ta),Cc.subVectors(this.max,Ta),So.subVectors(e.a,Ta),Mo.subVectors(e.b,Ta),Eo.subVectors(e.c,Ta),Ir.subVectors(Mo,So),Lr.subVectors(Eo,Mo),Ss.subVectors(So,Eo);let t=[0,-Ir.z,Ir.y,0,-Lr.z,Lr.y,0,-Ss.z,Ss.y,Ir.z,0,-Ir.x,Lr.z,0,-Lr.x,Ss.z,0,-Ss.x,-Ir.y,Ir.x,0,-Lr.y,Lr.x,0,-Ss.y,Ss.x,0];return!bd(t,So,Mo,Eo,Cc)||(t=[1,0,0,0,1,0,0,0,1],!bd(t,So,Mo,Eo,Cc))?!1:(Rc.crossVectors(Ir,Lr),t=[Rc.x,Rc.y,Rc.z],bd(t,So,Mo,Eo,Cc))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,yi).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(yi).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:(tr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),tr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),tr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),tr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),tr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),tr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),tr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),tr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(tr),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 tr=[new F,new F,new F,new F,new F,new F,new F,new F],yi=new F,Ac=new Dn,So=new F,Mo=new F,Eo=new F,Ir=new F,Lr=new F,Ss=new F,Ta=new F,Cc=new F,Rc=new F,Ms=new F;function bd(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Ms.fromArray(n,s);const a=r.x*Math.abs(Ms.x)+r.y*Math.abs(Ms.y)+r.z*Math.abs(Ms.z),l=e.dot(Ms),c=t.dot(Ms),u=i.dot(Ms);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const nR=new Dn,wa=new F,Sd=new F;class gn{constructor(e=new F,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):nR.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.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;wa.subVectors(e,this.center);const t=wa.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(wa,r/i),this.radius+=r}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):(Sd.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(wa.copy(e.center).add(Sd)),this.expandByPoint(wa.copy(e.center).sub(Sd))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const nr=new F,Md=new F,Pc=new F,Dr=new F,Ed=new F,Ic=new F,Td=new F;class va{constructor(e=new F,t=new F(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,nr)),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=nr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(nr.copy(this.origin).addScaledVector(this.direction,t),nr.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Md.copy(e).add(t).multiplyScalar(.5),Pc.copy(t).sub(e).normalize(),Dr.copy(this.origin).sub(Md);const s=e.distanceTo(t)*.5,o=-this.direction.dot(Pc),a=Dr.dot(this.direction),l=-Dr.dot(Pc),c=Dr.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=s*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=s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h=-s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h<=-p?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-l),s),d=-f*f+h*(h+2*l)+c):h<=p?(f=0,h=Math.min(Math.max(-s,-l),s),d=h*(h+2*l)+c):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-l),s),d=-f*f+h*(h+2*l)+c);else h=o>0?-s:s,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),r&&r.copy(Md).addScaledVector(Pc,h),d}intersectSphere(e,t){nr.subVectors(e.center,this.origin);const i=nr.dot(this.direction),r=nr.dot(nr)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return 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,r,s,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,r=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),u>=0?(s=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(s=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||s>r||((s>i||isNaN(i))&&(i=s),(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>r)||((a>i||i!==i)&&(i=a),(l=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,nr)!==null}intersectTriangle(e,t,i,r,s){Ed.subVectors(t,e),Ic.subVectors(i,e),Td.crossVectors(Ed,Ic);let o=this.direction.dot(Td),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Dr.subVectors(this.origin,e);const l=a*this.direction.dot(Ic.crossVectors(Dr,Ic));if(l<0)return null;const c=a*this.direction.dot(Ed.cross(Dr));if(c<0||l+c>o)return null;const u=-a*Dr.dot(Td);return u<0?null:this.at(u/o,s)}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 We{constructor(e,t,i,r,s,o,a,l,c,u,f,h,d,p,_,g){We.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,r,s,o,a,l,c,u,f,h,d,p,_,g)}set(e,t,i,r,s,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]=r,m[1]=s,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 We().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,r=1/To.setFromMatrixColumn(e,0).length(),s=1/To.setFromMatrixColumn(e,1).length(),o=1/To.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,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,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),f=Math.sin(s);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(iR,e,rR)}lookAt(e,t,i){const r=this.elements;return Zn.subVectors(e,t),Zn.lengthSq()===0&&(Zn.z=1),Zn.normalize(),Or.crossVectors(i,Zn),Or.lengthSq()===0&&(Math.abs(i.z)===1?Zn.x+=1e-4:Zn.z+=1e-4,Zn.normalize(),Or.crossVectors(i,Zn)),Or.normalize(),Lc.crossVectors(Zn,Or),r[0]=Or.x,r[4]=Lc.x,r[8]=Zn.x,r[1]=Or.y,r[5]=Lc.y,r[9]=Zn.y,r[2]=Or.z,r[6]=Lc.z,r[10]=Zn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=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],y=i[3],x=i[7],v=i[11],E=i[15],T=r[0],M=r[4],P=r[8],b=r[12],S=r[1],D=r[5],B=r[9],H=r[13],$=r[2],ee=r[6],Z=r[10],te=r[14],Q=r[3],pe=r[7],ve=r[11],re=r[15];return s[0]=o*T+a*S+l*$+c*Q,s[4]=o*M+a*D+l*ee+c*pe,s[8]=o*P+a*B+l*Z+c*ve,s[12]=o*b+a*H+l*te+c*re,s[1]=u*T+f*S+h*$+d*Q,s[5]=u*M+f*D+h*ee+d*pe,s[9]=u*P+f*B+h*Z+d*ve,s[13]=u*b+f*H+h*te+d*re,s[2]=p*T+_*S+g*$+m*Q,s[6]=p*M+_*D+g*ee+m*pe,s[10]=p*P+_*B+g*Z+m*ve,s[14]=p*b+_*H+g*te+m*re,s[3]=y*T+x*S+v*$+E*Q,s[7]=y*M+x*D+v*ee+E*pe,s[11]=y*P+x*B+v*Z+E*ve,s[15]=y*b+x*H+v*te+E*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],r=e[8],s=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*(+s*l*f-r*c*f-s*a*h+i*c*h+r*a*d-i*l*d)+_*(+t*l*d-t*c*h+s*o*h-r*o*d+r*c*u-s*l*u)+g*(+t*c*f-t*a*d-s*o*f+i*o*d+s*a*u-i*c*u)+m*(-r*a*u-t*l*f+t*a*h+r*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 r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=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],y=f*g*c-_*h*c+_*l*d-a*g*d-f*l*m+a*h*m,x=p*h*c-u*g*c-p*l*d+o*g*d+u*l*m-o*h*m,v=u*_*c-p*f*c+p*a*d-o*_*d-u*a*m+o*f*m,E=p*f*l-u*_*l-p*a*h+o*_*h+u*a*g-o*f*g,T=t*y+i*x+r*v+s*E;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/T;return e[0]=y*M,e[1]=(_*h*s-f*g*s-_*r*d+i*g*d+f*r*m-i*h*m)*M,e[2]=(a*g*s-_*l*s+_*r*c-i*g*c-a*r*m+i*l*m)*M,e[3]=(f*l*s-a*h*s-f*r*c+i*h*c+a*r*d-i*l*d)*M,e[4]=x*M,e[5]=(u*g*s-p*h*s+p*r*d-t*g*d-u*r*m+t*h*m)*M,e[6]=(p*l*s-o*g*s-p*r*c+t*g*c+o*r*m-t*l*m)*M,e[7]=(o*h*s-u*l*s+u*r*c-t*h*c-o*r*d+t*l*d)*M,e[8]=v*M,e[9]=(p*f*s-u*_*s-p*i*d+t*_*d+u*i*m-t*f*m)*M,e[10]=(o*_*s-p*a*s+p*i*c-t*_*c-o*i*m+t*a*m)*M,e[11]=(u*a*s-o*f*s-u*i*c+t*f*c+o*i*d-t*a*d)*M,e[12]=E*M,e[13]=(u*_*r-p*f*r+p*i*h-t*_*h-u*i*g+t*f*g)*M,e[14]=(p*a*r-o*_*r-p*i*l+t*_*l+o*i*g-t*a*g)*M,e[15]=(o*f*r-u*a*r+u*i*l-t*f*l-o*i*h+t*a*h)*M,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,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],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}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),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*o,0,c*l-r*a,u*l+r*o,s*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,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,c=s+s,u=o+o,f=a+a,h=s*c,d=s*u,p=s*f,_=o*u,g=o*f,m=a*f,y=l*c,x=l*u,v=l*f,E=i.x,T=i.y,M=i.z;return r[0]=(1-(_+m))*E,r[1]=(d+v)*E,r[2]=(p-x)*E,r[3]=0,r[4]=(d-v)*T,r[5]=(1-(h+m))*T,r[6]=(g+y)*T,r[7]=0,r[8]=(p+x)*M,r[9]=(g-y)*M,r[10]=(1-(h+_))*M,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=To.set(r[0],r[1],r[2]).length();const o=To.set(r[4],r[5],r[6]).length(),a=To.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],xi.copy(this);const c=1/s,u=1/o,f=1/a;return xi.elements[0]*=c,xi.elements[1]*=c,xi.elements[2]*=c,xi.elements[4]*=u,xi.elements[5]*=u,xi.elements[6]*=u,xi.elements[8]*=f,xi.elements[9]*=f,xi.elements[10]*=f,t.setFromRotationMatrix(xi),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=Ei){const l=this.elements,c=2*s/(t-e),u=2*s/(i-r),f=(t+e)/(t-e),h=(i+r)/(i-r);let d,p;if(a===Ei)d=-(o+s)/(o-s),p=-2*o*s/(o-s);else if(a===Nl)d=-o/(o-s),p=-o*s/(o-s);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,r,s,o,a=Ei){const l=this.elements,c=1/(t-e),u=1/(i-r),f=1/(o-s),h=(t+e)*c,d=(i+r)*u;let p,_;if(a===Ei)p=(o+s)*f,_=-2*f;else if(a===Nl)p=s*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 r=0;r<16;r++)if(t[r]!==i[r])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 To=new F,xi=new We,iR=new F(0,0,0),rR=new F(1,1,1),Or=new F,Lc=new F,Zn=new F,Mv=new We,Ev=new Yn;class ni{constructor(e=0,t=0,i=0,r=ni.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}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,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,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 r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],c=r[5],u=r[9],f=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(Ze(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Ze(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Ze(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,s));break;case"ZYX":this._y=Math.asin(-Ze(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Ze(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-Ze(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,s)):(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 Mv.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Mv,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Ev.setFromEuler(this),this.setFromQuaternion(Ev,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}}ni.DEFAULT_ORDER="XYZ";class Mh{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&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(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){r.children=[];for(let a=0;a0){r.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=r,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?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){bi.subVectors(r,t),rr.subVectors(i,t),Ad.subVectors(e,t);const o=bi.dot(bi),a=bi.dot(rr),l=bi.dot(Ad),c=rr.dot(rr),u=rr.dot(Ad),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;const h=1/f,d=(c*l-a*u)*h,p=(o*u-a*l)*h;return s.set(1-d-p,p,d)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,sr)===null?!1:sr.x>=0&&sr.y>=0&&sr.x+sr.y<=1}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,sr)===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(s,sr.x),l.addScaledVector(o,sr.y),l.addScaledVector(a,sr.z),l)}static getInterpolatedAttribute(e,t,i,r,s,o){return Id.setScalar(0),Ld.setScalar(0),Dd.setScalar(0),Id.fromBufferAttribute(e,t),Ld.fromBufferAttribute(e,i),Dd.fromBufferAttribute(e,r),o.setScalar(0),o.addScaledVector(Id,s.x),o.addScaledVector(Ld,s.y),o.addScaledVector(Dd,s.z),o}static isFrontFacing(e,t,i,r){return bi.subVectors(i,t),rr.subVectors(e,t),bi.cross(rr).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),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 bi.subVectors(this.c,this.b),rr.subVectors(this.a,this.b),bi.cross(rr).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Wn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Wn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return Wn.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Wn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Wn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;Co.subVectors(r,i),Ro.subVectors(s,i),Cd.subVectors(e,i);const l=Co.dot(Cd),c=Ro.dot(Cd);if(l<=0&&c<=0)return t.copy(i);Rd.subVectors(e,r);const u=Co.dot(Rd),f=Ro.dot(Rd);if(u>=0&&f<=u)return t.copy(r);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(Co,o);Pd.subVectors(e,s);const d=Co.dot(Pd),p=Ro.dot(Pd);if(p>=0&&d<=p)return t.copy(s);const _=d*c-l*p;if(_<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector(Ro,a);const g=u*p-d*f;if(g<=0&&f-u>=0&&d-p>=0)return Pv.subVectors(s,r),a=(f-u)/(f-u+(d-p)),t.copy(r).addScaledVector(Pv,a);const m=1/(g+_+h);return o=_*m,a=h*m,t.copy(i).addScaledVector(Co,o).addScaledVector(Ro,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const VS={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},Nr={h:0,s:0,l:0},Oc={h:0,s:0,l:0};function Od(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 Te{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 r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=wn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,at.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=at.workingColorSpace){return this.r=e,this.g=t,this.b=i,at.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=at.workingColorSpace){if(e=xg(e,1),t=Ze(t,0,1),i=Ze(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=Od(o,s,e+1/3),this.g=Od(o,s,e),this.b=Od(o,s,e-1/3)}return at.toWorkingColorSpace(this,r),this}setStyle(e,t=wn){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,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=wn){const i=VS[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=br(e.r),this.g=br(e.g),this.b=br(e.b),this}copyLinearToSRGB(e){return this.r=Qo(e.r),this.g=Qo(e.g),this.b=Qo(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=wn){return at.fromWorkingColorSpace(hn.copy(this),e),Math.round(Ze(hn.r*255,0,255))*65536+Math.round(Ze(hn.g*255,0,255))*256+Math.round(Ze(hn.b*255,0,255))}getHexString(e=wn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=at.workingColorSpace){at.fromWorkingColorSpace(hn.copy(this),t);const i=hn.r,r=hn.g,s=hn.b,o=Math.max(i,r,s),a=Math.min(i,r,s);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=(r-s)/f+(r0!=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 r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,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!==Js&&(i.blending=this.blending),this.side!==Mr&&(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!==rf&&(i.blendSrc=this.blendSrc),this.blendDst!==sf&&(i.blendDst=this.blendDst),this.blendEquation!==qr&&(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!==Gp&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Bs&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Bs&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Bs&&(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 r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),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 r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].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++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class Cr extends vn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Te(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 ni,this.combine=rc,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 pr=uR();function uR(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),r=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(i[l]=0,i[l|256]=32768,r[l]=24,r[l|256]=24):c<-14?(i[l]=1024>>-c-14,i[l|256]=1024>>-c-14|32768,r[l]=-c-1,r[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,r[l]=13,r[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=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,s[l]=c|u}for(let l=1024;l<2048;++l)s[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:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function zn(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=Ze(n,-65504,65504),pr.floatView[0]=n;const e=pr.uint32View[0],t=e>>23&511;return pr.baseTable[t]+((e&8388607)>>pr.shiftTable[t])}function Ga(n){const e=n>>10;return pr.uint32View[0]=pr.mantissaTable[pr.offsetTable[e]+(n&1023)]+pr.exponentTable[e],pr.floatView[0]}class fR{static toHalfFloat(e){return zn(e)}static fromHalfFloat(e){return Ga(e)}}const Ht=new F,Nc=new fe;let hR=0;class Et{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:hR++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Ol,this.updateRanges=[],this.gpuType=Xn,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 r=0,s=this.itemSize;rt.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 Dn);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 F(-1/0,-1/0,-1/0),new F(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=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 r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(r[l]=u,s=!0)}s&&(e.data.morphAttributes=r,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={center:a.center.toArray(),radius:a.radius}),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(t));const r=e.attributes;for(const c in r){const u=r[c];this.setAttribute(c,u.clone(t))}const s=e.morphAttributes;for(const c in s){const u=[],f=s[c];for(let h=0,d=f.length;h0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))&&(Iv.copy(s).invert(),Es.copy(e.ray).applyMatrix4(Iv),!(i.boundingBox!==null&&Es.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Es)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,f=s.attributes.normal,h=s.groups,d=s.drawRange;if(a!==null)if(Array.isArray(o))for(let p=0,_=h.length;p<_;p++){const g=h[p],m=o[g.materialIndex],y=Math.max(g.start,d.start),x=Math.min(a.count,Math.min(g.start+g.count,d.start+d.count));for(let v=y,E=x;vt.far?null:{distance:c,point:Vc.clone(),object:n}}function Hc(n,e,t,i,r,s,o,a,l,c){n.getVertexPosition(a,Fc),n.getVertexPosition(l,Bc),n.getVertexPosition(c,kc);const u=xR(n,e,t,i,Fc,Bc,kc,Dv);if(u){const f=new F;Wn.getBarycoord(Dv,Fc,Bc,kc,f),r&&(u.uv=Wn.getInterpolatedAttribute(r,a,l,c,f,new fe)),s&&(u.uv1=Wn.getInterpolatedAttribute(s,a,l,c,f,new fe)),o&&(u.normal=Wn.getInterpolatedAttribute(o,a,l,c,f,new F),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new F,materialIndex:0};Wn.getNormal(Fc,Bc,kc,h.normal),u.face=h,u.barycoord=f}return u}class ho extends rt{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,d=0;p("z","y","x",-1,-1,i,t,e,o,s,0),p("z","y","x",1,-1,i,t,-e,o,s,1),p("x","z","y",1,1,e,i,t,r,o,2),p("x","z","y",1,-1,e,i,-t,r,o,3),p("x","y","z",1,-1,e,t,i,r,s,4),p("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new Ne(c,3)),this.setAttribute("normal",new Ne(u,3)),this.setAttribute("uv",new Ne(f,2));function p(_,g,m,y,x,v,E,T,M,P,b){const S=v/M,D=E/P,B=v/2,H=E/2,$=T/2,ee=M+1,Z=P+1;let te=0,Q=0;const pe=new F;for(let ve=0;ve0?1:-1,u.push(pe.x,pe.y,pe.z),f.push(xe/M),f.push(1-ve/P),te+=1}}for(let ve=0;ve>8&255]+fn[n>>16&255]+fn[n>>24&255]+"-"+fn[e&255]+fn[e>>8&255]+"-"+fn[e>>16&15|64]+fn[e>>24&255]+"-"+fn[t&63|128]+fn[t>>8&255]+"-"+fn[t>>16&255]+fn[t>>24&255]+fn[i&255]+fn[i>>8&255]+fn[i>>16&255]+fn[i>>24&255]).toLowerCase()}function Ze(n,e,t){return Math.max(e,Math.min(t,n))}function yg(n,e){return(n%e+e)%e}function PC(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function IC(n,e,t){return n!==e?(t-n)/(e-n):0}function il(n,e,t){return(1-t)*n+t*e}function LC(n,e,t,i){return il(n,e,1-Math.exp(-t*i))}function DC(n,e=1){return e-Math.abs(yg(n,e*2)-e)}function OC(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function NC(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function UC(n,e){return n+Math.floor(Math.random()*(e-n+1))}function FC(n,e){return n+Math.random()*(e-n)}function BC(n){return n*(.5-Math.random())}function kC(n){n!==void 0&&(_v=n);let e=_v+=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 VC(n){return n*eo}function zC(n){return n*oa}function HC(n){return(n&n-1)===0&&n!==0}function GC(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function WC(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function XC(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),c=s((e+i)/2),u=o((e+i)/2),f=s((e-i)/2),h=o((e-i)/2),d=s((i-e)/2),p=o((i-e)/2);switch(r){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: "+r)}}function Rn(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 et(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 xg={DEG2RAD:eo,RAD2DEG:oa,generateUUID:Qn,clamp:Ze,euclideanModulo:yg,mapLinear:PC,inverseLerp:IC,lerp:il,damp:LC,pingpong:DC,smoothstep:OC,smootherstep:NC,randInt:UC,randFloat:FC,randFloatSpread:BC,seededRandom:kC,degToRad:VC,radToDeg:zC,isPowerOfTwo:HC,ceilPowerOfTwo:GC,floorPowerOfTwo:WC,setQuaternionFromProperEuler:XC,normalize:et,denormalize:Rn};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,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[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=Ze(this.x,e.x,t.x),this.y=Ze(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ze(this.x,e,t),this.y=Ze(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Ze(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(Ze(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),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+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 Qe{constructor(e,t,i,r,s,o,a,l,c){Qe.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,l,c)}set(e,t,i,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=s,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,r=t.elements,s=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],_=r[0],g=r[3],m=r[6],y=r[1],x=r[4],v=r[7],E=r[2],T=r[5],M=r[8];return s[0]=o*_+a*y+l*E,s[3]=o*g+a*x+l*T,s[6]=o*m+a*v+l*M,s[1]=c*_+u*y+f*E,s[4]=c*g+u*x+f*T,s[7]=c*m+u*v+f*M,s[2]=h*_+d*y+p*E,s[5]=h*g+d*x+p*T,s[8]=h*m+d*v+p*M,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],r=e[2],s=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*s*u+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=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*s,d=c*s-o*l,p=t*f+i*h+r*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]=(r*c-u*i)*_,e[2]=(a*i-r*o)*_,e[3]=h*_,e[4]=(u*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=d*_,e[7]=(i*l-c*t)*_,e[8]=(o*t-i*s)*_,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,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(vd.makeScale(e,t)),this}rotate(e){return this.premultiply(vd.makeRotation(-e)),this}translate(e,t){return this.premultiply(vd.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 r=0;r<9;r++)if(t[r]!==i[r])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 vd=new Qe;function FS(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const $C={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Xo(n,e){return new $C[n](e)}function Ul(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function BS(){const n=Ul("canvas");return n.style.display="block",n}const vv={};function ks(n){n in vv||(vv[n]=!0,console.warn(n))}function qC(n,e,t){return new Promise(function(i,r){function s(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:i()}}setTimeout(s,t)})}function YC(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 jC(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 yv=new Qe().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),xv=new Qe().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function KC(){const n={enabled:!0,workingColorSpace:lo,spaces:{},convert:function(r,s,o){return this.enabled===!1||s===o||!s||!o||(this.spaces[s].transfer===bt&&(r.r=xr(r.r),r.g=xr(r.g),r.b=xr(r.b)),this.spaces[s].primaries!==this.spaces[o].primaries&&(r.applyMatrix3(this.spaces[s].toXYZ),r.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===bt&&(r.r=Qo(r.r),r.g=Qo(r.g),r.b=Qo(r.b))),r},fromWorkingColorSpace:function(r,s){return this.convert(r,this.workingColorSpace,s)},toWorkingColorSpace:function(r,s){return this.convert(r,s,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===hr?Dl:this.spaces[r].transfer},getLuminanceCoefficients:function(r,s=this.workingColorSpace){return r.fromArray(this.spaces[s].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,s,o){return r.copy(this.spaces[s].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[lo]:{primaries:e,whitePoint:i,transfer:Dl,toXYZ:yv,fromXYZ:xv,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:wn},outputColorSpaceConfig:{drawingBufferColorSpace:wn}},[wn]:{primaries:e,whitePoint:i,transfer:bt,toXYZ:yv,fromXYZ:xv,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:wn}}}),n}const at=KC();function xr(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Qo(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let bo;class kS{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{bo===void 0&&(bo=Ul("canvas")),bo.width=e.width,bo.height=e.height;const i=bo.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=bo}return t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Ul("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==dh)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Rl:e.x=e.x-Math.floor(e.x);break;case ai:e.x=e.x<0?0:1;break;case Pl: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 Rl:e.y=e.y-Math.floor(e.y);break;case ai:e.y=e.y<0?0:1;break;case Pl: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++}}kt.DEFAULT_IMAGE=null;kt.DEFAULT_MAPPING=dh;kt.DEFAULT_ANISOTROPY=1;class ht{constructor(e=0,t=0,i=0,r=1){ht.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}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,r){return this.x=e,this.y=t,this.z=i,this.w=r,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,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,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,r,s;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 x=(c+1)/2,v=(d+1)/2,E=(m+1)/2,T=(u+h)/4,M=(f+_)/4,P=(p+g)/4;return x>v&&x>E?x<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(x),r=T/i,s=M/i):v>E?v<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(v),i=T/r,s=P/r):E<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(E),i=M/s,r=P/s),this.set(i,r,s,t),this}let y=Math.sqrt((g-p)*(g-p)+(f-_)*(f-_)+(h-u)*(h-u));return Math.abs(y)<.001&&(y=1),this.x=(g-p)/y,this.y=(f-_)/y,this.z=(h-u)/y,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=Ze(this.x,e.x,t.x),this.y=Ze(this.y,e.y,t.y),this.z=Ze(this.z,e.z,t.z),this.w=Ze(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ze(this.x,e,t),this.y=Ze(this.y,e,t),this.z=Ze(this.z,e,t),this.w=Ze(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Ze(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 bh extends ji{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new ht(0,0,e,t),this.scissorTest=!1,this.viewport=new ht(0,0,e,t);const r={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Yt,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new kt(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);s.flipY=!1,s.generateMipmaps=i.generateMipmaps,s.internalFormat=i.internalFormat,this.textures=[];const o=i.count;for(let a=0;a=0?1:-1,x=1-m*m;if(x>Number.EPSILON){const E=Math.sqrt(x),T=Math.atan2(E,m*y);g=Math.sin(g*T)/E,a=Math.sin(a*T)/E}const v=a*y;if(l=l*g+h*v,c=c*g+d*v,u=u*g+p*v,f=f*g+_*v,g===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=E,c*=E,u*=E,f*=E}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],f=s[o],h=s[o+1],d=s[o+2],p=s[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,r){return this._x=e,this._y=t,this._z=i,this._w=r,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,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),f=a(s/2),h=l(i/2),d=l(r/2),p=l(s/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,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=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=(s-c)*d,this._z=(o-r)*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=(r+o)/d,this._z=(s+c)/d}else if(a>f){const d=2*Math.sqrt(1+a-i-f);this._w=(s-c)/d,this._x=(r+o)/d,this._y=.25*d,this._z=(l+u)/d}else{const d=2*Math.sqrt(1+f-i-a);this._w=(o-r)/d,this._x=(s+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(Ze(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),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,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-i*c,this._z=s*u+o*c+i*l-r*a,this._w=o*u-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*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=r,this._z=s,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*r+t*this._y,this._z=d*s+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=r*f+this._y*h,this._z=s*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(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(t),s*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 F{constructor(e=0,t=0,i=0){F.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(bv.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(bv.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*i),u=2*(a*t-s*r),f=2*(s*i-o*t);return this.x=t+l*c+o*f-a*u,this.y=i+l*u+a*c-s*f,this.z=r+l*f+s*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,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,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=Ze(this.x,e.x,t.x),this.y=Ze(this.y,e.y,t.y),this.z=Ze(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ze(this.x,e,t),this.y=Ze(this.y,e,t),this.z=Ze(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Ze(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,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*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 xd.copy(this).projectOnVector(e),this.sub(xd)}reflect(e){return this.sub(xd.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(Ze(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}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 r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*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(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,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 xd=new F,bv=new qn;class Dn{constructor(e=new F(1/0,1/0,1/0),t=new F(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.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,vi),vi.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(Ta),Cc.subVectors(this.max,Ta),So.subVectors(e.a,Ta),Mo.subVectors(e.b,Ta),Eo.subVectors(e.c,Ta),Pr.subVectors(Mo,So),Ir.subVectors(Eo,Mo),Ss.subVectors(So,Eo);let t=[0,-Pr.z,Pr.y,0,-Ir.z,Ir.y,0,-Ss.z,Ss.y,Pr.z,0,-Pr.x,Ir.z,0,-Ir.x,Ss.z,0,-Ss.x,-Pr.y,Pr.x,0,-Ir.y,Ir.x,0,-Ss.y,Ss.x,0];return!bd(t,So,Mo,Eo,Cc)||(t=[1,0,0,0,1,0,0,0,1],!bd(t,So,Mo,Eo,Cc))?!1:(Rc.crossVectors(Pr,Ir),t=[Rc.x,Rc.y,Rc.z],bd(t,So,Mo,Eo,Cc))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,vi).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(vi).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:(er[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),er[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),er[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),er[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),er[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),er[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),er[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),er[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(er),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 er=[new F,new F,new F,new F,new F,new F,new F,new F],vi=new F,Ac=new Dn,So=new F,Mo=new F,Eo=new F,Pr=new F,Ir=new F,Ss=new F,Ta=new F,Cc=new F,Rc=new F,Ms=new F;function bd(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Ms.fromArray(n,s);const a=r.x*Math.abs(Ms.x)+r.y*Math.abs(Ms.y)+r.z*Math.abs(Ms.z),l=e.dot(Ms),c=t.dot(Ms),u=i.dot(Ms);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const tR=new Dn,wa=new F,Sd=new F;class gn{constructor(e=new F,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):tR.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.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;wa.subVectors(e,this.center);const t=wa.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(wa,r/i),this.radius+=r}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):(Sd.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(wa.copy(e.center).add(Sd)),this.expandByPoint(wa.copy(e.center).sub(Sd))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const tr=new F,Md=new F,Pc=new F,Lr=new F,Ed=new F,Ic=new F,Td=new F;class va{constructor(e=new F,t=new F(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,tr)),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=tr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(tr.copy(this.origin).addScaledVector(this.direction,t),tr.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Md.copy(e).add(t).multiplyScalar(.5),Pc.copy(t).sub(e).normalize(),Lr.copy(this.origin).sub(Md);const s=e.distanceTo(t)*.5,o=-this.direction.dot(Pc),a=Lr.dot(this.direction),l=-Lr.dot(Pc),c=Lr.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=s*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=s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h=-s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h<=-p?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-l),s),d=-f*f+h*(h+2*l)+c):h<=p?(f=0,h=Math.min(Math.max(-s,-l),s),d=h*(h+2*l)+c):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-l),s),d=-f*f+h*(h+2*l)+c);else h=o>0?-s:s,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),r&&r.copy(Md).addScaledVector(Pc,h),d}intersectSphere(e,t){tr.subVectors(e.center,this.origin);const i=tr.dot(this.direction),r=tr.dot(tr)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return 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,r,s,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,r=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),u>=0?(s=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(s=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||s>r||((s>i||isNaN(i))&&(i=s),(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>r)||((a>i||i!==i)&&(i=a),(l=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,tr)!==null}intersectTriangle(e,t,i,r,s){Ed.subVectors(t,e),Ic.subVectors(i,e),Td.crossVectors(Ed,Ic);let o=this.direction.dot(Td),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Lr.subVectors(this.origin,e);const l=a*this.direction.dot(Ic.crossVectors(Lr,Ic));if(l<0)return null;const c=a*this.direction.dot(Ed.cross(Lr));if(c<0||l+c>o)return null;const u=-a*Lr.dot(Td);return u<0?null:this.at(u/o,s)}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 We{constructor(e,t,i,r,s,o,a,l,c,u,f,h,d,p,_,g){We.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,r,s,o,a,l,c,u,f,h,d,p,_,g)}set(e,t,i,r,s,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]=r,m[1]=s,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 We().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,r=1/To.setFromMatrixColumn(e,0).length(),s=1/To.setFromMatrixColumn(e,1).length(),o=1/To.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,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,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),f=Math.sin(s);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(nR,e,iR)}lookAt(e,t,i){const r=this.elements;return Kn.subVectors(e,t),Kn.lengthSq()===0&&(Kn.z=1),Kn.normalize(),Dr.crossVectors(i,Kn),Dr.lengthSq()===0&&(Math.abs(i.z)===1?Kn.x+=1e-4:Kn.z+=1e-4,Kn.normalize(),Dr.crossVectors(i,Kn)),Dr.normalize(),Lc.crossVectors(Kn,Dr),r[0]=Dr.x,r[4]=Lc.x,r[8]=Kn.x,r[1]=Dr.y,r[5]=Lc.y,r[9]=Kn.y,r[2]=Dr.z,r[6]=Lc.z,r[10]=Kn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=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],y=i[3],x=i[7],v=i[11],E=i[15],T=r[0],M=r[4],P=r[8],b=r[12],S=r[1],D=r[5],B=r[9],H=r[13],$=r[2],ee=r[6],Z=r[10],te=r[14],Q=r[3],pe=r[7],ve=r[11],re=r[15];return s[0]=o*T+a*S+l*$+c*Q,s[4]=o*M+a*D+l*ee+c*pe,s[8]=o*P+a*B+l*Z+c*ve,s[12]=o*b+a*H+l*te+c*re,s[1]=u*T+f*S+h*$+d*Q,s[5]=u*M+f*D+h*ee+d*pe,s[9]=u*P+f*B+h*Z+d*ve,s[13]=u*b+f*H+h*te+d*re,s[2]=p*T+_*S+g*$+m*Q,s[6]=p*M+_*D+g*ee+m*pe,s[10]=p*P+_*B+g*Z+m*ve,s[14]=p*b+_*H+g*te+m*re,s[3]=y*T+x*S+v*$+E*Q,s[7]=y*M+x*D+v*ee+E*pe,s[11]=y*P+x*B+v*Z+E*ve,s[15]=y*b+x*H+v*te+E*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],r=e[8],s=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*(+s*l*f-r*c*f-s*a*h+i*c*h+r*a*d-i*l*d)+_*(+t*l*d-t*c*h+s*o*h-r*o*d+r*c*u-s*l*u)+g*(+t*c*f-t*a*d-s*o*f+i*o*d+s*a*u-i*c*u)+m*(-r*a*u-t*l*f+t*a*h+r*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 r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=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],y=f*g*c-_*h*c+_*l*d-a*g*d-f*l*m+a*h*m,x=p*h*c-u*g*c-p*l*d+o*g*d+u*l*m-o*h*m,v=u*_*c-p*f*c+p*a*d-o*_*d-u*a*m+o*f*m,E=p*f*l-u*_*l-p*a*h+o*_*h+u*a*g-o*f*g,T=t*y+i*x+r*v+s*E;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/T;return e[0]=y*M,e[1]=(_*h*s-f*g*s-_*r*d+i*g*d+f*r*m-i*h*m)*M,e[2]=(a*g*s-_*l*s+_*r*c-i*g*c-a*r*m+i*l*m)*M,e[3]=(f*l*s-a*h*s-f*r*c+i*h*c+a*r*d-i*l*d)*M,e[4]=x*M,e[5]=(u*g*s-p*h*s+p*r*d-t*g*d-u*r*m+t*h*m)*M,e[6]=(p*l*s-o*g*s-p*r*c+t*g*c+o*r*m-t*l*m)*M,e[7]=(o*h*s-u*l*s+u*r*c-t*h*c-o*r*d+t*l*d)*M,e[8]=v*M,e[9]=(p*f*s-u*_*s-p*i*d+t*_*d+u*i*m-t*f*m)*M,e[10]=(o*_*s-p*a*s+p*i*c-t*_*c-o*i*m+t*a*m)*M,e[11]=(u*a*s-o*f*s-u*i*c+t*f*c+o*i*d-t*a*d)*M,e[12]=E*M,e[13]=(u*_*r-p*f*r+p*i*h-t*_*h-u*i*g+t*f*g)*M,e[14]=(p*a*r-o*_*r-p*i*l+t*_*l+o*i*g-t*a*g)*M,e[15]=(o*f*r-u*a*r+u*i*l-t*f*l-o*i*h+t*a*h)*M,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,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],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}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),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*o,0,c*l-r*a,u*l+r*o,s*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,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,c=s+s,u=o+o,f=a+a,h=s*c,d=s*u,p=s*f,_=o*u,g=o*f,m=a*f,y=l*c,x=l*u,v=l*f,E=i.x,T=i.y,M=i.z;return r[0]=(1-(_+m))*E,r[1]=(d+v)*E,r[2]=(p-x)*E,r[3]=0,r[4]=(d-v)*T,r[5]=(1-(h+m))*T,r[6]=(g+y)*T,r[7]=0,r[8]=(p+x)*M,r[9]=(g-y)*M,r[10]=(1-(h+_))*M,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=To.set(r[0],r[1],r[2]).length();const o=To.set(r[4],r[5],r[6]).length(),a=To.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],yi.copy(this);const c=1/s,u=1/o,f=1/a;return yi.elements[0]*=c,yi.elements[1]*=c,yi.elements[2]*=c,yi.elements[4]*=u,yi.elements[5]*=u,yi.elements[6]*=u,yi.elements[8]*=f,yi.elements[9]*=f,yi.elements[10]*=f,t.setFromRotationMatrix(yi),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=Mi){const l=this.elements,c=2*s/(t-e),u=2*s/(i-r),f=(t+e)/(t-e),h=(i+r)/(i-r);let d,p;if(a===Mi)d=-(o+s)/(o-s),p=-2*o*s/(o-s);else if(a===Nl)d=-o/(o-s),p=-o*s/(o-s);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,r,s,o,a=Mi){const l=this.elements,c=1/(t-e),u=1/(i-r),f=1/(o-s),h=(t+e)*c,d=(i+r)*u;let p,_;if(a===Mi)p=(o+s)*f,_=-2*f;else if(a===Nl)p=s*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 r=0;r<16;r++)if(t[r]!==i[r])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 To=new F,yi=new We,nR=new F(0,0,0),iR=new F(1,1,1),Dr=new F,Lc=new F,Kn=new F,Sv=new We,Mv=new qn;class ti{constructor(e=0,t=0,i=0,r=ti.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}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,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,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 r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],c=r[5],u=r[9],f=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(Ze(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Ze(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Ze(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,s));break;case"ZYX":this._y=Math.asin(-Ze(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Ze(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-Ze(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,s)):(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 Sv.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Sv,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Mv.setFromEuler(this),this.setFromQuaternion(Mv,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}}ti.DEFAULT_ORDER="XYZ";class Mh{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&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(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){r.children=[];for(let a=0;a0){r.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=r,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?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){xi.subVectors(r,t),ir.subVectors(i,t),Ad.subVectors(e,t);const o=xi.dot(xi),a=xi.dot(ir),l=xi.dot(Ad),c=ir.dot(ir),u=ir.dot(Ad),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;const h=1/f,d=(c*l-a*u)*h,p=(o*u-a*l)*h;return s.set(1-d-p,p,d)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,rr)===null?!1:rr.x>=0&&rr.y>=0&&rr.x+rr.y<=1}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,rr)===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(s,rr.x),l.addScaledVector(o,rr.y),l.addScaledVector(a,rr.z),l)}static getInterpolatedAttribute(e,t,i,r,s,o){return Id.setScalar(0),Ld.setScalar(0),Dd.setScalar(0),Id.fromBufferAttribute(e,t),Ld.fromBufferAttribute(e,i),Dd.fromBufferAttribute(e,r),o.setScalar(0),o.addScaledVector(Id,s.x),o.addScaledVector(Ld,s.y),o.addScaledVector(Dd,s.z),o}static isFrontFacing(e,t,i,r){return xi.subVectors(i,t),ir.subVectors(e,t),xi.cross(ir).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),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 xi.subVectors(this.c,this.b),ir.subVectors(this.a,this.b),xi.cross(ir).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Gn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Gn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return Gn.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Gn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Gn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;Co.subVectors(r,i),Ro.subVectors(s,i),Cd.subVectors(e,i);const l=Co.dot(Cd),c=Ro.dot(Cd);if(l<=0&&c<=0)return t.copy(i);Rd.subVectors(e,r);const u=Co.dot(Rd),f=Ro.dot(Rd);if(u>=0&&f<=u)return t.copy(r);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(Co,o);Pd.subVectors(e,s);const d=Co.dot(Pd),p=Ro.dot(Pd);if(p>=0&&d<=p)return t.copy(s);const _=d*c-l*p;if(_<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector(Ro,a);const g=u*p-d*f;if(g<=0&&f-u>=0&&d-p>=0)return Rv.subVectors(s,r),a=(f-u)/(f-u+(d-p)),t.copy(r).addScaledVector(Rv,a);const m=1/(g+_+h);return o=_*m,a=h*m,t.copy(i).addScaledVector(Co,o).addScaledVector(Ro,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const VS={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},Or={h:0,s:0,l:0},Oc={h:0,s:0,l:0};function Od(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 Te{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 r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=wn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,at.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=at.workingColorSpace){return this.r=e,this.g=t,this.b=i,at.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=at.workingColorSpace){if(e=yg(e,1),t=Ze(t,0,1),i=Ze(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=Od(o,s,e+1/3),this.g=Od(o,s,e),this.b=Od(o,s,e-1/3)}return at.toWorkingColorSpace(this,r),this}setStyle(e,t=wn){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,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=wn){const i=VS[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=xr(e.r),this.g=xr(e.g),this.b=xr(e.b),this}copyLinearToSRGB(e){return this.r=Qo(e.r),this.g=Qo(e.g),this.b=Qo(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=wn){return at.fromWorkingColorSpace(hn.copy(this),e),Math.round(Ze(hn.r*255,0,255))*65536+Math.round(Ze(hn.g*255,0,255))*256+Math.round(Ze(hn.b*255,0,255))}getHexString(e=wn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=at.workingColorSpace){at.fromWorkingColorSpace(hn.copy(this),t);const i=hn.r,r=hn.g,s=hn.b,o=Math.max(i,r,s),a=Math.min(i,r,s);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=(r-s)/f+(r0!=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 r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,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!==Js&&(i.blending=this.blending),this.side!==Sr&&(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!==rf&&(i.blendSrc=this.blendSrc),this.blendDst!==sf&&(i.blendDst=this.blendDst),this.blendEquation!==qr&&(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!==Gp&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Bs&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Bs&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Bs&&(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 r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),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 r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].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++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class Ar extends vn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Te(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 ti,this.combine=rc,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 dr=cR();function cR(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),r=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(i[l]=0,i[l|256]=32768,r[l]=24,r[l|256]=24):c<-14?(i[l]=1024>>-c-14,i[l|256]=1024>>-c-14|32768,r[l]=-c-1,r[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,r[l]=13,r[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=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,s[l]=c|u}for(let l=1024;l<2048;++l)s[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:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function kn(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=Ze(n,-65504,65504),dr.floatView[0]=n;const e=dr.uint32View[0],t=e>>23&511;return dr.baseTable[t]+((e&8388607)>>dr.shiftTable[t])}function Ga(n){const e=n>>10;return dr.uint32View[0]=dr.mantissaTable[dr.offsetTable[e]+(n&1023)]+dr.exponentTable[e],dr.floatView[0]}class uR{static toHalfFloat(e){return kn(e)}static fromHalfFloat(e){return Ga(e)}}const Gt=new F,Nc=new fe;let fR=0;class Et{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:fR++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Ol,this.updateRanges=[],this.gpuType=Wn,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 r=0,s=this.itemSize;rt.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 Dn);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 F(-1/0,-1/0,-1/0),new F(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=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 r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(r[l]=u,s=!0)}s&&(e.data.morphAttributes=r,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={center:a.center.toArray(),radius:a.radius}),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(t));const r=e.attributes;for(const c in r){const u=r[c];this.setAttribute(c,u.clone(t))}const s=e.morphAttributes;for(const c in s){const u=[],f=s[c];for(let h=0,d=f.length;h0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))&&(Pv.copy(s).invert(),Es.copy(e.ray).applyMatrix4(Pv),!(i.boundingBox!==null&&Es.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Es)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,f=s.attributes.normal,h=s.groups,d=s.drawRange;if(a!==null)if(Array.isArray(o))for(let p=0,_=h.length;p<_;p++){const g=h[p],m=o[g.materialIndex],y=Math.max(g.start,d.start),x=Math.min(a.count,Math.min(g.start+g.count,d.start+d.count));for(let v=y,E=x;vt.far?null:{distance:c,point:zc.clone(),object:n}}function Hc(n,e,t,i,r,s,o,a,l,c){n.getVertexPosition(a,Fc),n.getVertexPosition(l,Bc),n.getVertexPosition(c,kc);const u=yR(n,e,t,i,Fc,Bc,kc,Lv);if(u){const f=new F;Gn.getBarycoord(Lv,Fc,Bc,kc,f),r&&(u.uv=Gn.getInterpolatedAttribute(r,a,l,c,f,new fe)),s&&(u.uv1=Gn.getInterpolatedAttribute(s,a,l,c,f,new fe)),o&&(u.normal=Gn.getInterpolatedAttribute(o,a,l,c,f,new F),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new F,materialIndex:0};Gn.getNormal(Fc,Bc,kc,h.normal),u.face=h,u.barycoord=f}return u}class ho extends rt{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,d=0;p("z","y","x",-1,-1,i,t,e,o,s,0),p("z","y","x",1,-1,i,t,-e,o,s,1),p("x","z","y",1,1,e,i,t,r,o,2),p("x","z","y",1,-1,e,i,-t,r,o,3),p("x","y","z",1,-1,e,t,i,r,s,4),p("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new Ne(c,3)),this.setAttribute("normal",new Ne(u,3)),this.setAttribute("uv",new Ne(f,2));function p(_,g,m,y,x,v,E,T,M,P,b){const S=v/M,D=E/P,B=v/2,H=E/2,$=T/2,ee=M+1,Z=P+1;let te=0,Q=0;const pe=new F;for(let ve=0;ve0?1:-1,u.push(pe.x,pe.y,pe.z),f.push(xe/M),f.push(1-ve/P),te+=1}}for(let ve=0;ve0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class ac extends ct{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new We,this.projectionMatrix=new We,this.projectionMatrixInverse=new We,this.coordinateSystem=Ei}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 Ur=new F,Ov=new fe,Nv=new fe;class Xt extends ac{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,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=oa*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(eo*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return oa*2*Math.atan(Math.tan(eo*.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){Ur.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Ur.x,Ur.y).multiplyScalar(-e/Ur.z),Ur.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Ur.x,Ur.y).multiplyScalar(-e/Ur.z)}getViewSize(e,t){return this.getViewBounds(e,Ov,Nv),t.subVectors(Nv,Ov)}setViewOffset(e,t,i,r,s,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=r,this.view.width=s,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(eo*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,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 Io=-90,Lo=1;class WS extends ct{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new Xt(Io,Lo,e,t);r.layers=this.layers,this.add(r);const s=new Xt(Io,Lo,e,t);s.layers=this.layers,this.add(s);const o=new Xt(Io,Lo,e,t);o.layers=this.layers,this.add(o);const a=new Xt(Io,Lo,e,t);a.layers=this.layers,this.add(a);const l=new Xt(Io,Lo,e,t);l.layers=this.layers,this.add(l);const c=new Xt(Io,Lo,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,l]=t;for(const c of t)this.remove(c);if(e===Ei)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.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===Nl)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.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:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,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,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,l),e.setRenderTarget(i,4,r),e.render(t,c),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,r),e.render(t,u),e.setRenderTarget(f,h,d),e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class lc extends Bt{constructor(e,t,i,r,s,o,a,l,c,u){e=e!==void 0?e:[],t=t!==void 0?t:Er,super(e,t,i,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class XS extends ji{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new lc(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Yt}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 Ci extends vn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=bR,this.fragmentShader=SR,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=aa(e.uniforms),this.uniformsGroups=xR(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 r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?t.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[r]={type:"m4",value:o.toArray()}:t.uniforms[r]={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 r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class ac extends ct{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new We,this.projectionMatrix=new We,this.projectionMatrixInverse=new We,this.coordinateSystem=Mi}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 Nr=new F,Dv=new fe,Ov=new fe;class Xt extends ac{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,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=oa*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(eo*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return oa*2*Math.atan(Math.tan(eo*.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){Nr.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Nr.x,Nr.y).multiplyScalar(-e/Nr.z),Nr.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Nr.x,Nr.y).multiplyScalar(-e/Nr.z)}getViewSize(e,t){return this.getViewBounds(e,Dv,Ov),t.subVectors(Ov,Dv)}setViewOffset(e,t,i,r,s,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=r,this.view.width=s,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(eo*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,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 Io=-90,Lo=1;class GS extends ct{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new Xt(Io,Lo,e,t);r.layers=this.layers,this.add(r);const s=new Xt(Io,Lo,e,t);s.layers=this.layers,this.add(s);const o=new Xt(Io,Lo,e,t);o.layers=this.layers,this.add(o);const a=new Xt(Io,Lo,e,t);a.layers=this.layers,this.add(a);const l=new Xt(Io,Lo,e,t);l.layers=this.layers,this.add(l);const c=new Xt(Io,Lo,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,l]=t;for(const c of t)this.remove(c);if(e===Mi)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.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===Nl)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.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:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,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,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,l),e.setRenderTarget(i,4,r),e.render(t,c),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,r),e.render(t,u),e.setRenderTarget(f,h,d),e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class lc extends kt{constructor(e,t,i,r,s,o,a,l,c,u){e=e!==void 0?e:[],t=t!==void 0?t:Mr,super(e,t,i,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class WS extends Yi{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new lc(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Yt}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,13 +58,13 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-DQA6qRZ gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},r=new ho(5,5,5),s=new Ri({name:"CubemapFromEquirect",uniforms:aa(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Ln,blending:xr});s.uniforms.tEquirect.value=t;const o=new zt(r,s),a=t.minFilter;return t.minFilter===Hi&&(t.minFilter=Yt),new WS(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}class $o extends ct{constructor(){super(),this.isGroup=!0,this.type="Group"}}const ER={type:"move"};class Uu{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new $o,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 $o,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new F,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new F),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new $o,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new F,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new F),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 r=null,s=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&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(ER)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new $o;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class Eh{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Te(e),this.density=t}clone(){return new Eh(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Th{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Te(e),this.near=t,this.far=i}clone(){return new Th(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class wh extends ct{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 ni,this.environmentIntensity=1,this.environmentRotation=new ni,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 Ah{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Ol,this.updateRanges=[],this.version=0,this.uuid=ei()}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 r=0,s=this.stride;re.far||t.push({distance:l,point:Ra.clone(),uv:Wn.getInterpolation(Ra,Gc,Ia,Wc,Uv,Fd,Fv,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 Xc(n,e,t,i,r,s){Uo.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Pa.x=s*Uo.x-r*Uo.y,Pa.y=r*Uo.x+s*Uo.y):Pa.copy(Uo),n.copy(e),n.x+=Pa.x,n.y+=Pa.y,n.applyMatrix4($S)}const $c=new F,Bv=new F;class YS extends ct{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,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){$c.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo($c);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){$c.setFromMatrixPosition(e.matrixWorld),Bv.setFromMatrixPosition(this.matrixWorld);const i=$c.distanceTo(Bv)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r1?null:t.copy(e.start).addScaledVector(i,s)}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||RR.getNormalMatrix(e),r=this.coplanarPoint(zd).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),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 Ts=new gn,jc=new F;class cc{constructor(e=new Xr,t=new Xr,i=new Xr,r=new Xr,s=new Xr,o=new Xr){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),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=Ei){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],u=r[5],f=r[6],h=r[7],d=r[8],p=r[9],_=r[10],g=r[11],m=r[12],y=r[13],x=r[14],v=r[15];if(i[0].setComponents(l-s,h-c,g-d,v-m).normalize(),i[1].setComponents(l+s,h+c,g+d,v+m).normalize(),i[2].setComponents(l+o,h+u,g+p,v+y).normalize(),i[3].setComponents(l-o,h-u,g-p,v-y).normalize(),i[4].setComponents(l-a,h-f,g-_,v-x).normalize(),t===Ei)i[5].setComponents(l+a,h+f,g+_,v+x).normalize();else if(t===Nl)i[5].setComponents(a,f,_,x).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(),Ts.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ts.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ts)}intersectsSprite(e){return Ts.center.set(0,0,0),Ts.radius=.7071067811865476,Ts.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ts)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,jc.y=r.normal.y>0?e.max.y:e.min.y,jc.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(jc)<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)}}function Vd(n,e){return n-e}function PR(n,e){return n.z-e.z}function IR(n,e){return e.z-n.z}class LR{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,i,r){const s=this.pool,o=this.list;this.index>=s.length&&s.push({start:-1,count:-1,z:-1,index:-1});const a=s[this.index];o.push(a),this.index++,a.start=e,a.count=t,a.z=i,a.index=r}reset(){this.list.length=0,this.index=0}}const Bn=new We,DR=new Te(1,1,1),Hd=new cc,Kc=new Dn,ws=new gn,Oa=new F,qv=new F,OR=new F,Gd=new LR,dn=new zt,Zc=[];function NR(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const r=n.count;for(let s=0;s65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new Et(s,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 r=e.getAttribute(i),s=t.getAttribute(i);if(r.itemSize!==s.itemSize||r.normalized!==s.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 Dn);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,r=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 r=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Vd),r=this._availableInstanceIds.shift(),this._instanceInfo[r]=i):(r=this._instanceInfo.length,this._instanceInfo.push(i));const s=this._matricesTexture;Bn.identity().toArray(s.image.data,r*16),s.needsUpdate=!0;const o=this._colorsTexture;return o&&(DR.toArray(o.image.data,r*4),o.needsUpdate=!0),this._visibilityChanged=!0,r}addGeometry(e,t=-1,i=-1){this._initializeGeometry(e),this._validateGeometry(e);const r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},s=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const o=e.getIndex();if(o!==null&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=i===-1?o.count:i),r.indexStart!==-1&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.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(Vd),l=this._availableGeometryIds.shift(),s[l]=r):(l=this._geometryCount,this._geometryCount++,s.push(r)),this.setGeometryAt(l,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.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,r=i.getIndex()!==null,s=i.getIndex(),o=t.getIndex(),a=this._geometryInfo[e];if(r&&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);NR(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 r=0,s=i.length;ra).sort((o,a)=>i[o].vertexStart-i[a].vertexStart),s=this.geometry;for(let o=0,a=i.length;o=this._geometryCount)return null;const i=this.geometry,r=this._geometryInfo[e];if(r.boundingBox===null){const s=new Dn,o=i.index,a=i.attributes.position;for(let l=r.start,c=r.start+r.count;l=this._geometryCount)return null;const i=this.geometry,r=this._geometryInfo[e];if(r.boundingSphere===null){const s=new gn;this.getBoundingBoxAt(e,Kc),Kc.getCenter(s.center);const o=i.index,a=i.attributes.position;let l=0;for(let c=r.start,u=r.start+r.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 s=this.geometry;s.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new rt,this._initializeGeometry(s));const o=this.geometry;s.index&&As(s.index.array,o.index.array);for(const a in s.attributes)As(s.attributes[a].array,o.attributes[a].array)}raycast(e,t){const i=this._instanceInfo,r=this._geometryInfo,s=this.matrixWorld,o=this.geometry;dn.material=this.material,dn.geometry.index=o.index,dn.geometry.attributes=o.attributes,dn.geometry.boundingBox===null&&(dn.geometry.boundingBox=new Dn),dn.geometry.boundingSphere===null&&(dn.geometry.boundingSphere=new gn);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._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.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,r,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=r.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;h&&(Bn.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),Hd.setFromProjectionMatrix(Bn,e.coordinateSystem));let _=0;if(this.sortObjects){Bn.copy(this.matrixWorld).invert(),Oa.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Bn),qv.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(Bn);for(let y=0,x=l.length;y0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;si)return;Wd.applyMatrix4(n.matrixWorld);const c=e.ray.origin.distanceTo(Wd);if(!(ce.far))return{distance:c,point:jv.clone().applyMatrix4(n.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:n}}const Kv=new F,Zv=new F;class Zi extends is{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 r=0,s=t.count;r0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class eM extends Bt{constructor(e,t,i,r,s,o,a,l,c){super(e,t,i,r,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Yt,this.magFilter=s!==void 0?s:Yt,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 UR extends eM{constructor(e,t,i,r,s,o,a,l){super({},e,t,i,r,s,o,a,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class FR extends Bt{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=cn,this.minFilter=cn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Rh extends Bt{constructor(e,t,i,r,s,o,a,l,c,u,f,h){super(null,o,a,l,c,u,r,s,f,h),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class BR extends Rh{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=li,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class kR extends Rh{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,Er),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class zR extends Bt{constructor(e,t,i,r,s,o,a,l,c){super(e,t,i,r,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Ag extends Bt{constructor(e,t,i,r,s,o,a,l,c,u=Qs){if(u!==Qs&&u!==ao)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===Qs&&(i=Tr),i===void 0&&u===ao&&(i=oo),super(null,r,s,o,a,l,u,i,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:cn,this.minFilter=l!==void 0?l:cn,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new jr(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 Li{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,l=s-1,c;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-o,c<0)a=r+1;else if(c>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const u=i[r],h=i[r+1]-u,d=(o-u)/h;return(r+d)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new fe:new F);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 F,r=[],s=[],o=[],a=new F,l=new We;for(let d=0;d<=e;d++){const p=d/e;r[d]=this.getTangentAt(p,new F)}s[0]=new F,o[0]=new F;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),f=Math.abs(r[0].y),h=Math.abs(r[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(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let d=1;d<=e;d++){if(s[d]=s[d-1].clone(),o[d]=o[d-1].clone(),a.crossVectors(r[d-1],r[d]),a.length()>Number.EPSILON){a.normalize();const p=Math.acos(Ze(r[d-1].dot(r[d]),-1,1));s[d].applyMatrix4(l.makeRotationAxis(a,p))}o[d].crossVectors(r[d],s[d])}if(t===!0){let d=Math.acos(Ze(s[0].dot(s[e]),-1,1));d/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(d=-d);for(let p=1;p<=e;p++)s[p].applyMatrix4(l.makeRotationAxis(r[p],d*p)),o[p].crossVectors(r[p],s[p])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Ph extends Li{constructor(e=0,t=0,i=1,r=1,s=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=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new fe){const i=t,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,u;this.closed||a>0?c=r[(a-1)%s]:(nu.subVectors(r[0],r[1]).add(r[0]),c=nu);const f=r[a%s],h=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],f=r[o>r.length-3?r.length-1:o+2];return i.set(e0(a,l.x,c.x,u.x,f.x),e0(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=r[s]-i,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}s++}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,r=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 uc extends rt{constructor(e=[new fe(0,-.5),new fe(.5,0),new fe(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=Ze(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],u=1/t,f=new F,h=new fe,d=new F,p=new F,_=new F;let g=0,m=0;for(let y=0;y<=e.length-1;y++)switch(y){case 0:g=e[y+1].x-e[y].x,m=e[y+1].y-e[y].y,d.x=m*1,d.y=-g,d.z=m*0,_.copy(d),d.normalize(),l.push(d.x,d.y,d.z);break;case e.length-1:l.push(_.x,_.y,_.z);break;default:g=e[y+1].x-e[y].x,m=e[y+1].y-e[y].y,d.x=m*1,d.y=-g,d.z=m*0,p.copy(d),d.x+=_.x,d.y+=_.y,d.z+=_.z,d.normalize(),l.push(d.x,d.y,d.z),_.copy(p)}for(let y=0;y<=t;y++){const x=i+y*u*r,v=Math.sin(x),E=Math.cos(x);for(let T=0;T<=e.length-1;T++){f.x=e[T].x*v,f.y=e[T].y,f.z=e[T].x*E,o.push(f.x,f.y,f.z),h.x=y/t,h.y=T/(e.length-1),a.push(h.x,h.y);const M=l[3*T+0]*v,P=l[3*T+1],b=l[3*T+0]*E;c.push(M,P,b)}}for(let y=0;y0&&x(!0),t>0&&x(!1)),this.setIndex(u),this.setAttribute("position",new Ne(f,3)),this.setAttribute("normal",new Ne(h,3)),this.setAttribute("uv",new Ne(d,2));function y(){const v=new F,E=new F;let T=0;const M=(t-e)/i;for(let P=0;P<=s;P++){const b=[],S=P/s,D=S*(t-e)+e;for(let B=0;B<=r;B++){const H=B/r,$=H*l+a,ee=Math.sin($),Z=Math.cos($);E.x=D*ee,E.y=-S*i+g,E.z=D*Z,f.push(E.x,E.y,E.z),v.set(ee,M,Z).normalize(),h.push(v.x,v.y,v.z),d.push(H,1-S),b.push(p++)}_.push(b)}for(let P=0;P0||b!==0)&&(u.push(S,D,H),T+=3),(t>0||b!==s-1)&&(u.push(D,B,H),T+=3)}c.addGroup(m,T,0),m+=T}function x(v){const E=p,T=new fe,M=new F;let P=0;const b=v===!0?e:t,S=v===!0?1:-1;for(let B=1;B<=r;B++)f.push(0,g*S,0),h.push(0,S,0),d.push(.5,.5),p++;const D=p;for(let B=0;B<=r;B++){const $=B/r*l+a,ee=Math.cos($),Z=Math.sin($);M.x=b*Z,M.y=g*S,M.z=b*ee,f.push(M.x,M.y,M.z),h.push(0,S,0),T.x=ee*.5+.5,T.y=Z*.5*S+.5,d.push(T.x,T.y),p++}for(let B=0;B.9&&M<.1&&(x<.2&&(o[y+0]+=1),v<.2&&(o[y+2]+=1),E<.2&&(o[y+4]+=1))}}function h(y){s.push(y.x,y.y,y.z)}function d(y,x){const v=y*3;x.x=e[v+0],x.y=e[v+1],x.z=e[v+2]}function p(){const y=new F,x=new F,v=new F,E=new F,T=new fe,M=new fe,P=new fe;for(let b=0,S=0;b80*i){l=u=e[0],c=f=e[1];for(let _=i;_u&&(u=h),d>f&&(f=d);p=Math.max(u-l,f-c),p=p!==0?32767/p:0}return Bl(o,a,i,l,c,p,0),a}}function aM(n,e,t,i,r){let s,o;if(r===uP(n,e,t,i)>0)for(s=e;s=e;s-=i)o=t0(s,n[s],n[s+1],o);return o&&Nh(o,o.next)&&(zl(o),o=o.next),o}function uo(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Nh(t,t.next)||Ot(t.prev,t,t.next)===0)){if(zl(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Bl(n,e,t,i,r,s,o){if(!n)return;!o&&s&&rP(n,i,r,s);let a=n,l,c;for(;n.prev!==n.next;){if(l=n.prev,c=n.next,s?KR(n,i,r,s):jR(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(c.i/t|0),zl(n),n=c.next,a=c.next;continue}if(n=c,n===a){o?o===1?(n=ZR(uo(n),e,t),Bl(n,e,t,i,r,s,2)):o===2&&JR(n,e,t,i,r,s):Bl(uo(n),e,t,i,r,s,1);break}}}function jR(n){const e=n.prev,t=n,i=n.next;if(Ot(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,c=i.y,u=rs?r>o?r:o:s>o?s:o,d=a>l?a>c?a:c:l>c?l:c;let p=i.next;for(;p!==e;){if(p.x>=u&&p.x<=h&&p.y>=f&&p.y<=d&&qo(r,a,s,l,o,c,p.x,p.y)&&Ot(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function KR(n,e,t,i){const r=n.prev,s=n,o=n.next;if(Ot(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,u=r.y,f=s.y,h=o.y,d=al?a>c?a:c:l>c?l:c,g=u>f?u>h?u:h:f>h?f:h,m=$p(d,p,e,t,i),y=$p(_,g,e,t,i);let x=n.prevZ,v=n.nextZ;for(;x&&x.z>=m&&v&&v.z<=y;){if(x.x>=d&&x.x<=_&&x.y>=p&&x.y<=g&&x!==r&&x!==o&&qo(a,u,l,f,c,h,x.x,x.y)&&Ot(x.prev,x,x.next)>=0||(x=x.prevZ,v.x>=d&&v.x<=_&&v.y>=p&&v.y<=g&&v!==r&&v!==o&&qo(a,u,l,f,c,h,v.x,v.y)&&Ot(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;x&&x.z>=m;){if(x.x>=d&&x.x<=_&&x.y>=p&&x.y<=g&&x!==r&&x!==o&&qo(a,u,l,f,c,h,x.x,x.y)&&Ot(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;v&&v.z<=y;){if(v.x>=d&&v.x<=_&&v.y>=p&&v.y<=g&&v!==r&&v!==o&&qo(a,u,l,f,c,h,v.x,v.y)&&Ot(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function ZR(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Nh(r,s)&&lM(r,i,i.next,s)&&kl(r,s)&&kl(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),zl(i),zl(i.next),i=n=s),i=i.next}while(i!==n);return uo(i)}function JR(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&aP(o,a)){let l=cM(o,a);o=uo(o,o.next),l=uo(l,l.next),Bl(o,e,t,i,r,s,0),Bl(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function QR(n,e,t,i){const r=[];let s,o,a,l,c;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const h=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(h<=s&&h>i&&(i=h,r=t.x=t.x&&t.x>=l&&s!==t.x&&qo(or.x||t.x===r.x&&iP(r,t)))&&(r=t,u=f)),t=t.next;while(t!==a);return r}function iP(n,e){return Ot(n.prev,n,e.prev)<0&&Ot(e.next,n,n.next)<0}function rP(n,e,t,i){let r=n;do r.z===0&&(r.z=$p(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,sP(r)}function sP(n){let e,t,i,r,s,o,a,l,c=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,c*=2}while(o>1);return n}function $p(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|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 oP(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function aP(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!lP(n,e)&&(kl(n,e)&&kl(e,n)&&cP(n,e)&&(Ot(n.prev,n,e.prev)||Ot(n,e.prev,e))||Nh(n,e)&&Ot(n.prev,n,n.next)>0&&Ot(e.prev,e,e.next)>0)}function Ot(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Nh(n,e){return n.x===e.x&&n.y===e.y}function lM(n,e,t,i){const r=au(Ot(n,e,t)),s=au(Ot(n,e,i)),o=au(Ot(t,i,n)),a=au(Ot(t,i,e));return!!(r!==s&&o!==a||r===0&&ou(n,t,e)||s===0&&ou(n,i,e)||o===0&&ou(t,n,i)||a===0&&ou(t,e,i))}function ou(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 au(n){return n>0?1:n<0?-1:0}function lP(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&&lM(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function kl(n,e){return Ot(n.prev,n,n.next)<0?Ot(n,e,n.next)>=0&&Ot(n,n.prev,e)>=0:Ot(n,e,n.prev)<0||Ot(n,n.next,e)<0}function cP(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function cM(n,e){const t=new qp(n.i,n.x,n.y),i=new qp(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function t0(n,e,t,i){const r=new qp(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function zl(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 qp(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function uP(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function i0(n,e){for(let t=0;tNumber.EPSILON){const U=Math.sqrt(C),V=Math.sqrt(z*z+A*A),Y=L.x-N/U,he=L.y+R/U,ce=w.x-A/V,ye=w.y+z/V,Ue=((ce-Y)*A-(ye-he)*z)/(R*A-N*z);j=Y+R*Ue-I.x,G=he+N*Ue-I.y;const me=j*j+G*G;if(me<=2)return new fe(j,G);q=Math.sqrt(me/2)}else{let U=!1;R>Number.EPSILON?z>Number.EPSILON&&(U=!0):R<-Number.EPSILON?z<-Number.EPSILON&&(U=!0):Math.sign(N)===Math.sign(A)&&(U=!0),U?(j=-N,G=R,q=Math.sqrt(C)):(j=R,G=N,q=Math.sqrt(C/2))}return new fe(j/q,G/q)}const pe=[];for(let I=0,L=$.length,w=L-1,j=I+1;I=0;I--){const L=I/g,w=d*Math.cos(L*Math.PI/2),j=p*Math.sin(L*Math.PI/2)+_;for(let G=0,q=$.length;G=0;){const j=w;let G=w-1;G<0&&(G=I.length-1);for(let q=0,R=u+g*2;q0)&&d.push(x,v,T),(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 pM extends vn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Te(16777215),this.specular=new Te(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 ni,this.combine=rc,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 mM extends vn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Te(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 gM extends vn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 _M extends vn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Te(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 ni,this.combine=rc,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 Ng extends vn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=CS,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 Ug extends vn{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 vM extends vn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Te(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 yM extends Un{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 Ys(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function xM(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function bM(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function Yp(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function Fg(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push(...o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function pP(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){f.push(c.times[d]);for(let _=0;_s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[p]){const m=p*f+u,y=m+f-u;_=a.values.slice(m,y)}else{const m=a.createInterpolant(),y=u,x=f-u;m.evaluate(s),_=m.resultBuffer.slice(y,x)}l==="quaternion"&&new Yn().fromArray(_).normalize().conjugate().toArray(_);const g=c.times.length;for(let m=0;m=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*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,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;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(r!==void 0&&xM(r))for(let a=0,l=r.length;a!==l;++a){const c=r[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(),r=this.getInterpolation()===Nu,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*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,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Di.prototype.TimeBufferType=Float32Array;Di.prototype.ValueBufferType=Float32Array;Di.prototype.DefaultInterpolation=kf;class po extends Di{constructor(e,t,i){super(e,t,i)}}po.prototype.ValueTypeName="bool";po.prototype.ValueBufferType=Array;po.prototype.DefaultInterpolation=Il;po.prototype.InterpolantFactoryMethodLinear=void 0;po.prototype.InterpolantFactoryMethodSmooth=void 0;class kg extends Di{}kg.prototype.ValueTypeName="color";class Vl extends Di{}Vl.prototype.ValueTypeName="number";class EM extends dc{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let c=e*a;for(let u=c+a;c!==u;c+=4)Yn.slerpFlat(s,0,o,c-a,o,c,l);return s}}class pc extends Di{InterpolantFactoryMethodLinear(e){return new EM(this.times,this.values,this.getValueSize(),e)}}pc.prototype.ValueTypeName="quaternion";pc.prototype.InterpolantFactoryMethodSmooth=void 0;class mo extends Di{constructor(e,t,i){super(e,t,i)}}mo.prototype.ValueTypeName="string";mo.prototype.ValueBufferType=Array;mo.prototype.DefaultInterpolation=Il;mo.prototype.InterpolantFactoryMethodLinear=void 0;mo.prototype.InterpolantFactoryMethodSmooth=void 0;class Hl extends Di{}Hl.prototype.ValueTypeName="vector";class Gl{constructor(e="",t=-1,i=[],r=xh){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=ei(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(vP(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Di.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const f=u[1];let h=r[f];h||(r[f]=h=[]),h.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!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=[];Fg(d,g,m,p),g.length!==0&&_.push(new f(h,g,m))}},r=[],s=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(s),this.manager.itemEnd(e)},0),s;if(or[e]!==void 0){or[e].push({onLoad:t,onProgress:i,onError:r});return}or[e]=[],or[e].push({onLoad:t,onProgress:i,onError:r});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=or[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){y();function y(){f.read().then(({done:x,value:v})=>{if(x)m.close();else{_+=v.byteLength;const E=new ProgressEvent("progress",{lengthComputable:p,loaded:_,total:d});for(let T=0,M=u.length;T{m.error(x)})}}});return new Response(g)}else throw new yP(`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===void 0)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=>{gr.add(e,c);const u=or[e];delete or[e];for(let f=0,h=u.length;f{const u=or[e];if(u===void 0)throw this.manager.itemError(e),c;delete or[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 xP extends jn{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new wr(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Te().setHex(o.value);break;case"v2":r.uniforms[s].value=new fe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new F().fromArray(o.value);break;case"v4":r.uniforms[s].value=new ht().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Qe().fromArray(o.value);break;case"m4":r.uniforms[s].value=new We().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new fe().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapRotation!==void 0&&r.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new fe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return Xh.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:fM,SpriteMaterial:Eg,RawShaderMaterial:hM,ShaderMaterial:Ri,PointsMaterial:wg,MeshPhysicalMaterial:dM,MeshStandardMaterial:Og,MeshPhongMaterial:pM,MeshToonMaterial:mM,MeshNormalMaterial:gM,MeshLambertMaterial:_M,MeshDepthMaterial:Ng,MeshDistanceMaterial:Ug,MeshBasicMaterial:Cr,MeshMatcapMaterial:vM,LineDashedMaterial:yM,LineBasicMaterial:Un,Material:vn};return new t[e]}}class jp{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const l=new zg(t);s=new Wl(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){r=new Wl(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const g=new Dn;g.min.fromArray(_.boxMin),g.max.fromArray(_.boxMax);const m=new gn;return m.radius=_.sphereRadius,m.center.fromArray(_.sphereCenter),{boxInitialized:_.boxInitialized,box:g,sphereInitialized:_.sphereInitialized,sphere:m}}),o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":o=new YS;break;case"Line":o=new is(a(e.geometry),l(e.material));break;case"LineLoop":o=new JS(a(e.geometry),l(e.material));break;case"LineSegments":o=new Zi(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new QS(a(e.geometry),l(e.material));break;case"Sprite":o=new qS(l(e.material));break;case"Group":o=new $o;break;case"Bone":o=new Tg;break;default:o=new ct}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,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=gr.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{t&&t(c),s.manager.itemEnd(e)}).catch(c=>{r&&r(c)});return}return setTimeout(function(){t&&t(o),s.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(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return gr.add(e,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){r&&r(c),gr.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});gr.add(e,l),s.manager.itemStart(e)}}let lu;class Hg{static getContext(){return lu===void 0&&(lu=new(window.AudioContext||window.webkitAudioContext)),lu}static setContext(e){lu=e}}class IP extends jn{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new wr(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);Hg.getContext().decodeAudioData(c,function(f){t(f)}).catch(a)}catch(c){a(c)}},i,r);function a(l){r?r(l):console.error(l),s.manager.itemError(e)}}}const f0=new We,h0=new We,Cs=new We;class LP{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Xt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Xt,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,Cs.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(eo*t.fov*.5)/t.zoom;let a,l;h0.elements[12]=-r,f0.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,Cs.elements[0]=2*t.near/(l-a),Cs.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Cs),a=-o*t.aspect-s,l=o*t.aspect-s,Cs.elements[0]=2*t.near/(l-a),Cs.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Cs)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(h0),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(f0)}}class UM extends Xt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e,this.index=0}}class $h{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=d0(),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=d0();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function d0(){return performance.now()}const Rs=new F,p0=new Yn,DP=new F,Ps=new F;class OP extends ct{constructor(){super(),this.type="AudioListener",this.context=Hg.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new $h}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,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Rs,p0,DP),Ps.set(0,0,-1).applyQuaternion(p0),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Rs.x,r),t.positionY.linearRampToValueAtTime(Rs.y,r),t.positionZ.linearRampToValueAtTime(Rs.z,r),t.forwardX.linearRampToValueAtTime(Ps.x,r),t.forwardY.linearRampToValueAtTime(Ps.y,r),t.forwardZ.linearRampToValueAtTime(Ps.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Rs.x,Rs.y,Rs.z),t.setOrientation(Ps.x,Ps.y,Ps.z,i.x,i.y,i.z)}}class FM extends ct{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,r,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(i[l]!==i[l+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%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!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){Yn.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;Yn.multiplyQuaternionsFlat(e,o,e,t,e,i),Yn.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const Gg="\\[\\]\\.:\\/",BP=new RegExp("["+Gg+"]","g"),Wg="[^"+Gg+"]",kP="[^"+Gg.replace("\\.","")+"]",zP=/((?:WC+[\/:])*)/.source.replace("WC",Wg),VP=/(WCOD+)?/.source.replace("WCOD",kP),HP=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Wg),GP=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Wg),WP=new RegExp("^"+zP+VP+HP+GP+"$"),XP=["material","materials","bones","map"];class $P{constructor(e,t,i){const r=i||ft.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].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 ft{constructor(e,t,i){this.path=t,this.parsedPath=i||ft.parseTrackName(t),this.node=ft.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 ft.Composite(e,t,i):new ft(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(BP,"")}static parseTrackName(e){const t=WP.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]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);XP.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}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(s){for(let o=0;o=s){const f=s++,h=e[f];t[h.uuid]=u,e[u]=h,t[c]=f,e[f]=l;for(let d=0,p=r;d!==p;++d){const _=i[d],g=_[f],m=_[u];_[u]=g,_[f]=m}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=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,_=r;p!==_;++p){const g=i[p];g[f]=g[h],g.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(f);for(let h=u,d=l.length;h!==d;++h){const p=l[h];f[h]=new ft(p,e,t)}return f}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class kM{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:$s,endingEnd:$s};for(let c=0;c!==o;++c){const u=s[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=wS,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){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){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 r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+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,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*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 vg:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case xh:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===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 r=i.evaluate(e)[0];t*=r,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 r=this.time+e,s=this._loopCount;const o=i===AS;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===TS){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,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=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=qs,r.endingEnd=qs):(e?r.endingStart=this.zeroSlopeAtStart?qs:$s:r.endingStart=Ll,t?r.endingEnd=this.zeroSlopeAtEnd?qs:$s:r.endingEnd=Ll)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const YP=new Float32Array(1);class jP extends Ki{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,r=e._clip.tracks,s=r.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!==s;++f){const h=r[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 BM(ft.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,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}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,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)t[c]._update(r,e,s,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,v0).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 y0=new F,cu=new F;class sI{constructor(e=new F,t=new F){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){y0.subVectors(e,this.start),cu.subVectors(this.end,this.start);const i=cu.dot(cu);let s=cu.dot(y0)/i;return t&&(s=Ze(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).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 x0=new F;class oI extends ct{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new rt,r=[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{T0.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(T0,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 yI extends Zi{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],r=new rt;r.setAttribute("position",new Ne(t,3)),r.setAttribute("color",new Ne(i,3));const s=new Un({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Te,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class xI{constructor(){this.type="ShapePath",this.color=new Te,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Fl,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,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const y=[];for(let x=0,v=m.length;xNumber.EPSILON){if(S<0&&(M=y[T],b=-b,P=y[E],S=-S),m.yP.y)continue;if(m.y===M.y){if(m.x===M.x)return!0}else{const D=S*(m.x-M.x)-b*(m.y-M.y);if(D===0)return!0;if(D<0)continue;v=!v}}else{if(m.y!==M.y)continue;if(P.x<=m.x&&m.x<=M.x||M.x<=m.x&&m.x<=P.x)return!0}}return v}const r=$i.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new to,l.curves=a.curves,c.push(l),c;let u=!r(s[0].getPoints());u=e?!u:u;const f=[],h=[];let d=[],p=0,_;h[p]=void 0,d[p]=[];for(let m=0,y=s.length;m1){let m=!1,y=0;for(let x=0,v=h.length;x0&&m===!1&&(d=f)}let g;for(let m=0,y=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 MI(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 EI(n){return n.repeat.x=1,n.repeat.y=1,n.offset.x=0,n.offset.y=0,n}function Zp(n,e,t,i){const r=TI(i);switch(t){case hg:return n*e;case pg:return n*e;case mg:return n*e*2;case _h:return n*e/r.components*r.byteLength;case sc:return n*e/r.components*r.byteLength;case gg:return n*e*2/r.components*r.byteLength;case vh:return n*e*2/r.components*r.byteLength;case dg:return n*e*3/r.components*r.byteLength;case Pn:return n*e*4/r.components*r.byteLength;case yh:return n*e*4/r.components*r.byteLength;case Ja:case Qa:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case el:case tl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case pf:case gf:return Math.max(n,16)*Math.max(e,8)/4;case df:case mf:return Math.max(n,8)*Math.max(e,8)/2;case _f:case vf:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case yf:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case xf:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case bf:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case Sf:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case Mf:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case Ef:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case Tf:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case wf:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case Af:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case Cf:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case Rf:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case Pf:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case If:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case Lf:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case Df:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case nl:case Of:case Nf:return Math.ceil(n/4)*Math.ceil(e/4)*16;case _g:case Uf:return Math.ceil(n/4)*Math.ceil(e/4)*8;case Ff:case Bf:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function TI(n){switch(n){case Yi:case cg:return{byteLength:1,components:1};case sa:case ug:case _a:return{byteLength:2,components:1};case mh:case gh:return{byteLength:2,components:4};case Tr:case ph:case Xn:return{byteLength:4,components:1};case fg:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}class wI{static contain(e,t){return SI(e,t)}static cover(e,t){return MI(e,t)}static fill(e){return EI(e)}static getByteLength(e,t,i,r){return Zp(e,t,i,r)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:ic}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=ic);/** + `},r=new ho(5,5,5),s=new Ci({name:"CubemapFromEquirect",uniforms:aa(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Ln,blending:yr});s.uniforms.tEquirect.value=t;const o=new zt(r,s),a=t.minFilter;return t.minFilter===zi&&(t.minFilter=Yt),new GS(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}class $o extends ct{constructor(){super(),this.isGroup=!0,this.type="Group"}}const MR={type:"move"};class Uu{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new $o,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 $o,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new F,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new F),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new $o,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new F,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new F),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 r=null,s=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&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(MR)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new $o;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class Eh{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Te(e),this.density=t}clone(){return new Eh(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Th{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Te(e),this.near=t,this.far=i}clone(){return new Th(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class wh extends ct{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 ti,this.environmentIntensity=1,this.environmentRotation=new ti,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 Ah{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Ol,this.updateRanges=[],this.version=0,this.uuid=Qn()}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 r=0,s=this.stride;re.far||t.push({distance:l,point:Ra.clone(),uv:Gn.getInterpolation(Ra,Gc,Ia,Wc,Nv,Fd,Uv,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 Xc(n,e,t,i,r,s){Uo.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Pa.x=s*Uo.x-r*Uo.y,Pa.y=r*Uo.x+s*Uo.y):Pa.copy(Uo),n.copy(e),n.x+=Pa.x,n.y+=Pa.y,n.applyMatrix4(XS)}const $c=new F,Fv=new F;class qS extends ct{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,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){$c.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo($c);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){$c.setFromMatrixPosition(e.matrixWorld),Fv.setFromMatrixPosition(this.matrixWorld);const i=$c.distanceTo(Fv)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r1?null:t.copy(e.start).addScaledVector(i,s)}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||CR.getNormalMatrix(e),r=this.coplanarPoint(Vd).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),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 Ts=new gn,jc=new F;class cc{constructor(e=new Xr,t=new Xr,i=new Xr,r=new Xr,s=new Xr,o=new Xr){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),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=Mi){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],u=r[5],f=r[6],h=r[7],d=r[8],p=r[9],_=r[10],g=r[11],m=r[12],y=r[13],x=r[14],v=r[15];if(i[0].setComponents(l-s,h-c,g-d,v-m).normalize(),i[1].setComponents(l+s,h+c,g+d,v+m).normalize(),i[2].setComponents(l+o,h+u,g+p,v+y).normalize(),i[3].setComponents(l-o,h-u,g-p,v-y).normalize(),i[4].setComponents(l-a,h-f,g-_,v-x).normalize(),t===Mi)i[5].setComponents(l+a,h+f,g+_,v+x).normalize();else if(t===Nl)i[5].setComponents(a,f,_,x).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(),Ts.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ts.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ts)}intersectsSprite(e){return Ts.center.set(0,0,0),Ts.radius=.7071067811865476,Ts.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ts)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,jc.y=r.normal.y>0?e.max.y:e.min.y,jc.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(jc)<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)}}function zd(n,e){return n-e}function RR(n,e){return n.z-e.z}function PR(n,e){return e.z-n.z}class IR{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,i,r){const s=this.pool,o=this.list;this.index>=s.length&&s.push({start:-1,count:-1,z:-1,index:-1});const a=s[this.index];o.push(a),this.index++,a.start=e,a.count=t,a.z=i,a.index=r}reset(){this.list.length=0,this.index=0}}const Bn=new We,LR=new Te(1,1,1),Hd=new cc,Kc=new Dn,ws=new gn,Oa=new F,$v=new F,DR=new F,Gd=new IR,dn=new zt,Zc=[];function OR(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const r=n.count;for(let s=0;s65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new Et(s,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 r=e.getAttribute(i),s=t.getAttribute(i);if(r.itemSize!==s.itemSize||r.normalized!==s.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 Dn);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,r=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 r=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(zd),r=this._availableInstanceIds.shift(),this._instanceInfo[r]=i):(r=this._instanceInfo.length,this._instanceInfo.push(i));const s=this._matricesTexture;Bn.identity().toArray(s.image.data,r*16),s.needsUpdate=!0;const o=this._colorsTexture;return o&&(LR.toArray(o.image.data,r*4),o.needsUpdate=!0),this._visibilityChanged=!0,r}addGeometry(e,t=-1,i=-1){this._initializeGeometry(e),this._validateGeometry(e);const r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},s=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const o=e.getIndex();if(o!==null&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=i===-1?o.count:i),r.indexStart!==-1&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.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(zd),l=this._availableGeometryIds.shift(),s[l]=r):(l=this._geometryCount,this._geometryCount++,s.push(r)),this.setGeometryAt(l,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.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,r=i.getIndex()!==null,s=i.getIndex(),o=t.getIndex(),a=this._geometryInfo[e];if(r&&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);OR(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 r=0,s=i.length;ra).sort((o,a)=>i[o].vertexStart-i[a].vertexStart),s=this.geometry;for(let o=0,a=i.length;o=this._geometryCount)return null;const i=this.geometry,r=this._geometryInfo[e];if(r.boundingBox===null){const s=new Dn,o=i.index,a=i.attributes.position;for(let l=r.start,c=r.start+r.count;l=this._geometryCount)return null;const i=this.geometry,r=this._geometryInfo[e];if(r.boundingSphere===null){const s=new gn;this.getBoundingBoxAt(e,Kc),Kc.getCenter(s.center);const o=i.index,a=i.attributes.position;let l=0;for(let c=r.start,u=r.start+r.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 s=this.geometry;s.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new rt,this._initializeGeometry(s));const o=this.geometry;s.index&&As(s.index.array,o.index.array);for(const a in s.attributes)As(s.attributes[a].array,o.attributes[a].array)}raycast(e,t){const i=this._instanceInfo,r=this._geometryInfo,s=this.matrixWorld,o=this.geometry;dn.material=this.material,dn.geometry.index=o.index,dn.geometry.attributes=o.attributes,dn.geometry.boundingBox===null&&(dn.geometry.boundingBox=new Dn),dn.geometry.boundingSphere===null&&(dn.geometry.boundingSphere=new gn);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._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.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,r,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=r.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;h&&(Bn.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),Hd.setFromProjectionMatrix(Bn,e.coordinateSystem));let _=0;if(this.sortObjects){Bn.copy(this.matrixWorld).invert(),Oa.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Bn),$v.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(Bn);for(let y=0,x=l.length;y0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;si)return;Wd.applyMatrix4(n.matrixWorld);const c=e.ray.origin.distanceTo(Wd);if(!(ce.far))return{distance:c,point:Yv.clone().applyMatrix4(n.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:n}}const jv=new F,Kv=new F;class Ki extends is{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 r=0,s=t.count;r0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class QS extends kt{constructor(e,t,i,r,s,o,a,l,c){super(e,t,i,r,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Yt,this.magFilter=s!==void 0?s:Yt,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 NR extends QS{constructor(e,t,i,r,s,o,a,l){super({},e,t,i,r,s,o,a,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class UR extends kt{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=cn,this.minFilter=cn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Rh extends kt{constructor(e,t,i,r,s,o,a,l,c,u,f,h){super(null,o,a,l,c,u,r,s,f,h),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class FR extends Rh{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=ai,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class BR extends Rh{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,Mr),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class kR extends kt{constructor(e,t,i,r,s,o,a,l,c){super(e,t,i,r,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class wg extends kt{constructor(e,t,i,r,s,o,a,l,c,u=Qs){if(u!==Qs&&u!==ao)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===Qs&&(i=Er),i===void 0&&u===ao&&(i=oo),super(null,r,s,o,a,l,u,i,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:cn,this.minFilter=l!==void 0?l:cn,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new jr(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 Ii{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,l=s-1,c;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-o,c<0)a=r+1;else if(c>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const u=i[r],h=i[r+1]-u,d=(o-u)/h;return(r+d)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new fe:new F);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 F,r=[],s=[],o=[],a=new F,l=new We;for(let d=0;d<=e;d++){const p=d/e;r[d]=this.getTangentAt(p,new F)}s[0]=new F,o[0]=new F;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),f=Math.abs(r[0].y),h=Math.abs(r[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(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let d=1;d<=e;d++){if(s[d]=s[d-1].clone(),o[d]=o[d-1].clone(),a.crossVectors(r[d-1],r[d]),a.length()>Number.EPSILON){a.normalize();const p=Math.acos(Ze(r[d-1].dot(r[d]),-1,1));s[d].applyMatrix4(l.makeRotationAxis(a,p))}o[d].crossVectors(r[d],s[d])}if(t===!0){let d=Math.acos(Ze(s[0].dot(s[e]),-1,1));d/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(d=-d);for(let p=1;p<=e;p++)s[p].applyMatrix4(l.makeRotationAxis(r[p],d*p)),o[p].crossVectors(r[p],s[p])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Ph extends Ii{constructor(e=0,t=0,i=1,r=1,s=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=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new fe){const i=t,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,u;this.closed||a>0?c=r[(a-1)%s]:(nu.subVectors(r[0],r[1]).add(r[0]),c=nu);const f=r[a%s],h=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],f=r[o>r.length-3?r.length-1:o+2];return i.set(Qv(a,l.x,c.x,u.x,f.x),Qv(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=r[s]-i,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}s++}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,r=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 uc extends rt{constructor(e=[new fe(0,-.5),new fe(.5,0),new fe(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=Ze(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],u=1/t,f=new F,h=new fe,d=new F,p=new F,_=new F;let g=0,m=0;for(let y=0;y<=e.length-1;y++)switch(y){case 0:g=e[y+1].x-e[y].x,m=e[y+1].y-e[y].y,d.x=m*1,d.y=-g,d.z=m*0,_.copy(d),d.normalize(),l.push(d.x,d.y,d.z);break;case e.length-1:l.push(_.x,_.y,_.z);break;default:g=e[y+1].x-e[y].x,m=e[y+1].y-e[y].y,d.x=m*1,d.y=-g,d.z=m*0,p.copy(d),d.x+=_.x,d.y+=_.y,d.z+=_.z,d.normalize(),l.push(d.x,d.y,d.z),_.copy(p)}for(let y=0;y<=t;y++){const x=i+y*u*r,v=Math.sin(x),E=Math.cos(x);for(let T=0;T<=e.length-1;T++){f.x=e[T].x*v,f.y=e[T].y,f.z=e[T].x*E,o.push(f.x,f.y,f.z),h.x=y/t,h.y=T/(e.length-1),a.push(h.x,h.y);const M=l[3*T+0]*v,P=l[3*T+1],b=l[3*T+0]*E;c.push(M,P,b)}}for(let y=0;y0&&x(!0),t>0&&x(!1)),this.setIndex(u),this.setAttribute("position",new Ne(f,3)),this.setAttribute("normal",new Ne(h,3)),this.setAttribute("uv",new Ne(d,2));function y(){const v=new F,E=new F;let T=0;const M=(t-e)/i;for(let P=0;P<=s;P++){const b=[],S=P/s,D=S*(t-e)+e;for(let B=0;B<=r;B++){const H=B/r,$=H*l+a,ee=Math.sin($),Z=Math.cos($);E.x=D*ee,E.y=-S*i+g,E.z=D*Z,f.push(E.x,E.y,E.z),v.set(ee,M,Z).normalize(),h.push(v.x,v.y,v.z),d.push(H,1-S),b.push(p++)}_.push(b)}for(let P=0;P0||b!==0)&&(u.push(S,D,H),T+=3),(t>0||b!==s-1)&&(u.push(D,B,H),T+=3)}c.addGroup(m,T,0),m+=T}function x(v){const E=p,T=new fe,M=new F;let P=0;const b=v===!0?e:t,S=v===!0?1:-1;for(let B=1;B<=r;B++)f.push(0,g*S,0),h.push(0,S,0),d.push(.5,.5),p++;const D=p;for(let B=0;B<=r;B++){const $=B/r*l+a,ee=Math.cos($),Z=Math.sin($);M.x=b*Z,M.y=g*S,M.z=b*ee,f.push(M.x,M.y,M.z),h.push(0,S,0),T.x=ee*.5+.5,T.y=Z*.5*S+.5,d.push(T.x,T.y),p++}for(let B=0;B.9&&M<.1&&(x<.2&&(o[y+0]+=1),v<.2&&(o[y+2]+=1),E<.2&&(o[y+4]+=1))}}function h(y){s.push(y.x,y.y,y.z)}function d(y,x){const v=y*3;x.x=e[v+0],x.y=e[v+1],x.z=e[v+2]}function p(){const y=new F,x=new F,v=new F,E=new F,T=new fe,M=new fe,P=new fe;for(let b=0,S=0;b80*i){l=u=e[0],c=f=e[1];for(let _=i;_u&&(u=h),d>f&&(f=d);p=Math.max(u-l,f-c),p=p!==0?32767/p:0}return Bl(o,a,i,l,c,p,0),a}}function oM(n,e,t,i,r){let s,o;if(r===cP(n,e,t,i)>0)for(s=e;s=e;s-=i)o=e0(s,n[s],n[s+1],o);return o&&Nh(o,o.next)&&(Vl(o),o=o.next),o}function uo(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Nh(t,t.next)||Ot(t.prev,t,t.next)===0)){if(Vl(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Bl(n,e,t,i,r,s,o){if(!n)return;!o&&s&&iP(n,i,r,s);let a=n,l,c;for(;n.prev!==n.next;){if(l=n.prev,c=n.next,s?jR(n,i,r,s):YR(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(c.i/t|0),Vl(n),n=c.next,a=c.next;continue}if(n=c,n===a){o?o===1?(n=KR(uo(n),e,t),Bl(n,e,t,i,r,s,2)):o===2&&ZR(n,e,t,i,r,s):Bl(uo(n),e,t,i,r,s,1);break}}}function YR(n){const e=n.prev,t=n,i=n.next;if(Ot(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,c=i.y,u=rs?r>o?r:o:s>o?s:o,d=a>l?a>c?a:c:l>c?l:c;let p=i.next;for(;p!==e;){if(p.x>=u&&p.x<=h&&p.y>=f&&p.y<=d&&qo(r,a,s,l,o,c,p.x,p.y)&&Ot(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function jR(n,e,t,i){const r=n.prev,s=n,o=n.next;if(Ot(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,u=r.y,f=s.y,h=o.y,d=al?a>c?a:c:l>c?l:c,g=u>f?u>h?u:h:f>h?f:h,m=$p(d,p,e,t,i),y=$p(_,g,e,t,i);let x=n.prevZ,v=n.nextZ;for(;x&&x.z>=m&&v&&v.z<=y;){if(x.x>=d&&x.x<=_&&x.y>=p&&x.y<=g&&x!==r&&x!==o&&qo(a,u,l,f,c,h,x.x,x.y)&&Ot(x.prev,x,x.next)>=0||(x=x.prevZ,v.x>=d&&v.x<=_&&v.y>=p&&v.y<=g&&v!==r&&v!==o&&qo(a,u,l,f,c,h,v.x,v.y)&&Ot(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;x&&x.z>=m;){if(x.x>=d&&x.x<=_&&x.y>=p&&x.y<=g&&x!==r&&x!==o&&qo(a,u,l,f,c,h,x.x,x.y)&&Ot(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;v&&v.z<=y;){if(v.x>=d&&v.x<=_&&v.y>=p&&v.y<=g&&v!==r&&v!==o&&qo(a,u,l,f,c,h,v.x,v.y)&&Ot(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function KR(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Nh(r,s)&&aM(r,i,i.next,s)&&kl(r,s)&&kl(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Vl(i),Vl(i.next),i=n=s),i=i.next}while(i!==n);return uo(i)}function ZR(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&oP(o,a)){let l=lM(o,a);o=uo(o,o.next),l=uo(l,l.next),Bl(o,e,t,i,r,s,0),Bl(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function JR(n,e,t,i){const r=[];let s,o,a,l,c;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const h=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(h<=s&&h>i&&(i=h,r=t.x=t.x&&t.x>=l&&s!==t.x&&qo(or.x||t.x===r.x&&nP(r,t)))&&(r=t,u=f)),t=t.next;while(t!==a);return r}function nP(n,e){return Ot(n.prev,n,e.prev)<0&&Ot(e.next,n,n.next)<0}function iP(n,e,t,i){let r=n;do r.z===0&&(r.z=$p(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,rP(r)}function rP(n){let e,t,i,r,s,o,a,l,c=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,c*=2}while(o>1);return n}function $p(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|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 sP(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function oP(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!aP(n,e)&&(kl(n,e)&&kl(e,n)&&lP(n,e)&&(Ot(n.prev,n,e.prev)||Ot(n,e.prev,e))||Nh(n,e)&&Ot(n.prev,n,n.next)>0&&Ot(e.prev,e,e.next)>0)}function Ot(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Nh(n,e){return n.x===e.x&&n.y===e.y}function aM(n,e,t,i){const r=au(Ot(n,e,t)),s=au(Ot(n,e,i)),o=au(Ot(t,i,n)),a=au(Ot(t,i,e));return!!(r!==s&&o!==a||r===0&&ou(n,t,e)||s===0&&ou(n,i,e)||o===0&&ou(t,n,i)||a===0&&ou(t,e,i))}function ou(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 au(n){return n>0?1:n<0?-1:0}function aP(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&&aM(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function kl(n,e){return Ot(n.prev,n,n.next)<0?Ot(n,e,n.next)>=0&&Ot(n,n.prev,e)>=0:Ot(n,e,n.prev)<0||Ot(n,n.next,e)<0}function lP(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function lM(n,e){const t=new qp(n.i,n.x,n.y),i=new qp(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function e0(n,e,t,i){const r=new qp(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Vl(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 qp(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function cP(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function n0(n,e){for(let t=0;tNumber.EPSILON){const U=Math.sqrt(C),z=Math.sqrt(V*V+A*A),Y=L.x-N/U,he=L.y+R/U,ce=w.x-A/z,ye=w.y+V/z,Ue=((ce-Y)*A-(ye-he)*V)/(R*A-N*V);j=Y+R*Ue-I.x,G=he+N*Ue-I.y;const me=j*j+G*G;if(me<=2)return new fe(j,G);q=Math.sqrt(me/2)}else{let U=!1;R>Number.EPSILON?V>Number.EPSILON&&(U=!0):R<-Number.EPSILON?V<-Number.EPSILON&&(U=!0):Math.sign(N)===Math.sign(A)&&(U=!0),U?(j=-N,G=R,q=Math.sqrt(C)):(j=R,G=N,q=Math.sqrt(C/2))}return new fe(j/q,G/q)}const pe=[];for(let I=0,L=$.length,w=L-1,j=I+1;I=0;I--){const L=I/g,w=d*Math.cos(L*Math.PI/2),j=p*Math.sin(L*Math.PI/2)+_;for(let G=0,q=$.length;G=0;){const j=w;let G=w-1;G<0&&(G=I.length-1);for(let q=0,R=u+g*2;q0)&&d.push(x,v,T),(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 dM extends vn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Te(16777215),this.specular=new Te(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 ti,this.combine=rc,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 pM extends vn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Te(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 mM extends vn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 gM extends vn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Te(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Te(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 ti,this.combine=rc,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 Og extends vn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=AS,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 Ng extends vn{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 _M extends vn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Te(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=us,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 vM extends Un{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 Ys(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function yM(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function xM(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function Yp(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function Ug(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push(...o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function dP(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){f.push(c.times[d]);for(let _=0;_s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[p]){const m=p*f+u,y=m+f-u;_=a.values.slice(m,y)}else{const m=a.createInterpolant(),y=u,x=f-u;m.evaluate(s),_=m.resultBuffer.slice(y,x)}l==="quaternion"&&new qn().fromArray(_).normalize().conjugate().toArray(_);const g=c.times.length;for(let m=0;m=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*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,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;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(r!==void 0&&yM(r))for(let a=0,l=r.length;a!==l;++a){const c=r[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(),r=this.getInterpolation()===Nu,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*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,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Li.prototype.TimeBufferType=Float32Array;Li.prototype.ValueBufferType=Float32Array;Li.prototype.DefaultInterpolation=kf;class po extends Li{constructor(e,t,i){super(e,t,i)}}po.prototype.ValueTypeName="bool";po.prototype.ValueBufferType=Array;po.prototype.DefaultInterpolation=Il;po.prototype.InterpolantFactoryMethodLinear=void 0;po.prototype.InterpolantFactoryMethodSmooth=void 0;class Bg extends Li{}Bg.prototype.ValueTypeName="color";class zl extends Li{}zl.prototype.ValueTypeName="number";class MM extends dc{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let c=e*a;for(let u=c+a;c!==u;c+=4)qn.slerpFlat(s,0,o,c-a,o,c,l);return s}}class pc extends Li{InterpolantFactoryMethodLinear(e){return new MM(this.times,this.values,this.getValueSize(),e)}}pc.prototype.ValueTypeName="quaternion";pc.prototype.InterpolantFactoryMethodSmooth=void 0;class mo extends Li{constructor(e,t,i){super(e,t,i)}}mo.prototype.ValueTypeName="string";mo.prototype.ValueBufferType=Array;mo.prototype.DefaultInterpolation=Il;mo.prototype.InterpolantFactoryMethodLinear=void 0;mo.prototype.InterpolantFactoryMethodSmooth=void 0;class Hl extends Li{}Hl.prototype.ValueTypeName="vector";class Gl{constructor(e="",t=-1,i=[],r=xh){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Qn(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(_P(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Li.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const f=u[1];let h=r[f];h||(r[f]=h=[]),h.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!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=[];Ug(d,g,m,p),g.length!==0&&_.push(new f(h,g,m))}},r=[],s=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(s),this.manager.itemEnd(e)},0),s;if(sr[e]!==void 0){sr[e].push({onLoad:t,onProgress:i,onError:r});return}sr[e]=[],sr[e].push({onLoad:t,onProgress:i,onError:r});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=sr[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){y();function y(){f.read().then(({done:x,value:v})=>{if(x)m.close();else{_+=v.byteLength;const E=new ProgressEvent("progress",{lengthComputable:p,loaded:_,total:d});for(let T=0,M=u.length;T{m.error(x)})}}});return new Response(g)}else throw new vP(`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===void 0)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=>{mr.add(e,c);const u=sr[e];delete sr[e];for(let f=0,h=u.length;f{const u=sr[e];if(u===void 0)throw this.manager.itemError(e),c;delete sr[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 yP extends Yn{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Tr(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Te().setHex(o.value);break;case"v2":r.uniforms[s].value=new fe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new F().fromArray(o.value);break;case"v4":r.uniforms[s].value=new ht().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Qe().fromArray(o.value);break;case"m4":r.uniforms[s].value=new We().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new fe().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapRotation!==void 0&&r.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new fe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return Xh.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:uM,SpriteMaterial:Mg,RawShaderMaterial:fM,ShaderMaterial:Ci,PointsMaterial:Tg,MeshPhysicalMaterial:hM,MeshStandardMaterial:Dg,MeshPhongMaterial:dM,MeshToonMaterial:pM,MeshNormalMaterial:mM,MeshLambertMaterial:gM,MeshDepthMaterial:Og,MeshDistanceMaterial:Ng,MeshBasicMaterial:Ar,MeshMatcapMaterial:_M,LineDashedMaterial:vM,LineBasicMaterial:Un,Material:vn};return new t[e]}}class jp{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const l=new kg(t);s=new Wl(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){r=new Wl(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const g=new Dn;g.min.fromArray(_.boxMin),g.max.fromArray(_.boxMax);const m=new gn;return m.radius=_.sphereRadius,m.center.fromArray(_.sphereCenter),{boxInitialized:_.boxInitialized,box:g,sphereInitialized:_.sphereInitialized,sphere:m}}),o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":o=new qS;break;case"Line":o=new is(a(e.geometry),l(e.material));break;case"LineLoop":o=new ZS(a(e.geometry),l(e.material));break;case"LineSegments":o=new Ki(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new JS(a(e.geometry),l(e.material));break;case"Sprite":o=new $S(l(e.material));break;case"Group":o=new $o;break;case"Bone":o=new Eg;break;default:o=new ct}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,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=mr.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{t&&t(c),s.manager.itemEnd(e)}).catch(c=>{r&&r(c)});return}return setTimeout(function(){t&&t(o),s.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(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return mr.add(e,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){r&&r(c),mr.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});mr.add(e,l),s.manager.itemStart(e)}}let lu;class zg{static getContext(){return lu===void 0&&(lu=new(window.AudioContext||window.webkitAudioContext)),lu}static setContext(e){lu=e}}class PP extends Yn{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Tr(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);zg.getContext().decodeAudioData(c,function(f){t(f)}).catch(a)}catch(c){a(c)}},i,r);function a(l){r?r(l):console.error(l),s.manager.itemError(e)}}}const u0=new We,f0=new We,Cs=new We;class IP{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Xt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Xt,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,Cs.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(eo*t.fov*.5)/t.zoom;let a,l;f0.elements[12]=-r,u0.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,Cs.elements[0]=2*t.near/(l-a),Cs.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Cs),a=-o*t.aspect-s,l=o*t.aspect-s,Cs.elements[0]=2*t.near/(l-a),Cs.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Cs)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(f0),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(u0)}}class NM extends Xt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e,this.index=0}}class $h{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=h0(),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=h0();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function h0(){return performance.now()}const Rs=new F,d0=new qn,LP=new F,Ps=new F;class DP extends ct{constructor(){super(),this.type="AudioListener",this.context=zg.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new $h}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,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Rs,d0,LP),Ps.set(0,0,-1).applyQuaternion(d0),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Rs.x,r),t.positionY.linearRampToValueAtTime(Rs.y,r),t.positionZ.linearRampToValueAtTime(Rs.z,r),t.forwardX.linearRampToValueAtTime(Ps.x,r),t.forwardY.linearRampToValueAtTime(Ps.y,r),t.forwardZ.linearRampToValueAtTime(Ps.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Rs.x,Rs.y,Rs.z),t.setOrientation(Ps.x,Ps.y,Ps.z,i.x,i.y,i.z)}}class UM extends ct{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,r,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(i[l]!==i[l+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%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!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){qn.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;qn.multiplyQuaternionsFlat(e,o,e,t,e,i),qn.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const Hg="\\[\\]\\.:\\/",FP=new RegExp("["+Hg+"]","g"),Gg="[^"+Hg+"]",BP="[^"+Hg.replace("\\.","")+"]",kP=/((?:WC+[\/:])*)/.source.replace("WC",Gg),VP=/(WCOD+)?/.source.replace("WCOD",BP),zP=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Gg),HP=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Gg),GP=new RegExp("^"+kP+VP+zP+HP+"$"),WP=["material","materials","bones","map"];class XP{constructor(e,t,i){const r=i||ft.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].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 ft{constructor(e,t,i){this.path=t,this.parsedPath=i||ft.parseTrackName(t),this.node=ft.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 ft.Composite(e,t,i):new ft(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(FP,"")}static parseTrackName(e){const t=GP.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]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);WP.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}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(s){for(let o=0;o=s){const f=s++,h=e[f];t[h.uuid]=u,e[u]=h,t[c]=f,e[f]=l;for(let d=0,p=r;d!==p;++d){const _=i[d],g=_[f],m=_[u];_[u]=g,_[f]=m}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=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,_=r;p!==_;++p){const g=i[p];g[f]=g[h],g.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(f);for(let h=u,d=l.length;h!==d;++h){const p=l[h];f[h]=new ft(p,e,t)}return f}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class BM{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:$s,endingEnd:$s};for(let c=0;c!==o;++c){const u=s[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=TS,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){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){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 r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+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,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*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 _g:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case xh:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===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 r=i.evaluate(e)[0];t*=r,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 r=this.time+e,s=this._loopCount;const o=i===wS;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===ES){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,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=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=qs,r.endingEnd=qs):(e?r.endingStart=this.zeroSlopeAtStart?qs:$s:r.endingStart=Ll,t?r.endingEnd=this.zeroSlopeAtEnd?qs:$s:r.endingEnd=Ll)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const qP=new Float32Array(1);class YP extends ji{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,r=e._clip.tracks,s=r.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!==s;++f){const h=r[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 FM(ft.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,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}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,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)t[c]._update(r,e,s,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,_0).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 v0=new F,cu=new F;class rI{constructor(e=new F,t=new F){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){v0.subVectors(e,this.start),cu.subVectors(this.end,this.start);const i=cu.dot(cu);let s=cu.dot(v0)/i;return t&&(s=Ze(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).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 y0=new F;class sI extends ct{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new rt,r=[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{E0.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(E0,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 vI extends Ki{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],r=new rt;r.setAttribute("position",new Ne(t,3)),r.setAttribute("color",new Ne(i,3));const s=new Un({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Te,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class yI{constructor(){this.type="ShapePath",this.color=new Te,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Fl,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,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const y=[];for(let x=0,v=m.length;xNumber.EPSILON){if(S<0&&(M=y[T],b=-b,P=y[E],S=-S),m.yP.y)continue;if(m.y===M.y){if(m.x===M.x)return!0}else{const D=S*(m.x-M.x)-b*(m.y-M.y);if(D===0)return!0;if(D<0)continue;v=!v}}else{if(m.y!==M.y)continue;if(P.x<=m.x&&m.x<=M.x||M.x<=m.x&&m.x<=P.x)return!0}}return v}const r=Xi.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new to,l.curves=a.curves,c.push(l),c;let u=!r(s[0].getPoints());u=e?!u:u;const f=[],h=[];let d=[],p=0,_;h[p]=void 0,d[p]=[];for(let m=0,y=s.length;m1){let m=!1,y=0;for(let x=0,v=h.length;x0&&m===!1&&(d=f)}let g;for(let m=0,y=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 SI(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 MI(n){return n.repeat.x=1,n.repeat.y=1,n.offset.x=0,n.offset.y=0,n}function Zp(n,e,t,i){const r=EI(i);switch(t){case fg:return n*e;case dg:return n*e;case pg:return n*e*2;case _h:return n*e/r.components*r.byteLength;case sc:return n*e/r.components*r.byteLength;case mg:return n*e*2/r.components*r.byteLength;case vh:return n*e*2/r.components*r.byteLength;case hg:return n*e*3/r.components*r.byteLength;case Pn:return n*e*4/r.components*r.byteLength;case yh:return n*e*4/r.components*r.byteLength;case Ja:case Qa:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case el:case tl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case pf:case gf:return Math.max(n,16)*Math.max(e,8)/4;case df:case mf:return Math.max(n,8)*Math.max(e,8)/2;case _f:case vf:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case yf:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case xf:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case bf:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case Sf:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case Mf:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case Ef:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case Tf:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case wf:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case Af:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case Cf:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case Rf:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case Pf:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case If:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case Lf:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case Df:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case nl:case Of:case Nf:return Math.ceil(n/4)*Math.ceil(e/4)*16;case gg:case Uf:return Math.ceil(n/4)*Math.ceil(e/4)*8;case Ff:case Bf:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function EI(n){switch(n){case qi:case lg:return{byteLength:1,components:1};case sa:case cg:case _a:return{byteLength:2,components:1};case mh:case gh:return{byteLength:2,components:4};case Er:case ph:case Wn:return{byteLength:4,components:1};case ug:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}class TI{static contain(e,t){return bI(e,t)}static cover(e,t){return SI(e,t)}static fill(e){return MI(e)}static getByteLength(e,t,i,r){return Zp(e,t,i,r)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:ic}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=ic);/** * @license * Copyright 2010-2025 Three.js Authors * SPDX-License-Identifier: MIT - */function HM(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function AI(n){const e=new WeakMap;function t(a,l){const c=a.array,u=a.usage,f=c.byteLength,h=n.createBuffer();n.bindBuffer(l,h),n.bufferData(l,c,u),a.onUploadCallback();let d;if(c instanceof Float32Array)d=n.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?d=n.HALF_FLOAT:d=n.UNSIGNED_SHORT;else if(c instanceof Int16Array)d=n.SHORT;else if(c instanceof Uint32Array)d=n.UNSIGNED_INT;else if(c instanceof Int32Array)d=n.INT;else if(c instanceof Int8Array)d=n.BYTE;else if(c instanceof Uint8Array)d=n.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)d=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:h,type:d,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:f}}function i(a,l,c){const u=l.array,f=l.updateRanges;if(n.bindBuffer(c,a),f.length===0)n.bufferSubData(c,0,u);else{f.sort((d,p)=>d.start-p.start);let h=0;for(let d=1;dd.start-p.start);let h=0;for(let d=1;d 0 +#endif`,HI=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; @@ -314,26 +314,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve if ( clipped ) discard; #endif #endif -#endif`,WI=`#if NUM_CLIPPING_PLANES > 0 +#endif`,GI=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,XI=`#if NUM_CLIPPING_PLANES > 0 +#endif`,WI=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,$I=`#if NUM_CLIPPING_PLANES > 0 +#endif`,XI=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,qI=`#if defined( USE_COLOR_ALPHA ) +#endif`,$I=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,YI=`#if defined( USE_COLOR_ALPHA ) +#endif`,qI=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,jI=`#if defined( USE_COLOR_ALPHA ) +#endif`,YI=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) varying vec3 vColor; -#endif`,KI=`#if defined( USE_COLOR_ALPHA ) +#endif`,jI=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) vColor = vec3( 1.0 ); @@ -347,7 +347,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #ifdef USE_BATCHING_COLOR vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); vColor.xyz *= batchingColor.xyz; -#endif`,ZI=`#define PI 3.141592653589793 +#endif`,KI=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -421,7 +421,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,JI=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,ZI=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -514,7 +514,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,QI=`vec3 transformedNormal = objectNormal; +#endif`,JI=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -543,21 +543,21 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,eL=`#ifdef USE_DISPLACEMENTMAP +#endif`,QI=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,tL=`#ifdef USE_DISPLACEMENTMAP +#endif`,eL=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,nL=`#ifdef USE_EMISSIVEMAP +#endif`,tL=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE emissiveColor = sRGBTransferEOTF( emissiveColor ); #endif totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,iL=`#ifdef USE_EMISSIVEMAP +#endif`,nL=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,rL="gl_FragColor = linearToOutputTexel( gl_FragColor );",sL=`vec4 LinearTransferOETF( in vec4 value ) { +#endif`,iL="gl_FragColor = linearToOutputTexel( gl_FragColor );",rL=`vec4 LinearTransferOETF( in vec4 value ) { return value; } vec4 sRGBTransferEOTF( in vec4 value ) { @@ -565,7 +565,7 @@ vec4 sRGBTransferEOTF( in vec4 value ) { } vec4 sRGBTransferOETF( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}`,oL=`#ifdef USE_ENVMAP +}`,sL=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -594,7 +594,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,aL=`#ifdef USE_ENVMAP +#endif`,oL=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; @@ -604,7 +604,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,lL=`#ifdef USE_ENVMAP +#endif`,aL=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -615,7 +615,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,cL=`#ifdef USE_ENVMAP +#endif`,lL=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -626,7 +626,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,uL=`#ifdef USE_ENVMAP +#endif`,cL=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -643,18 +643,18 @@ vec4 sRGBTransferOETF( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,fL=`#ifdef USE_FOG +#endif`,uL=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,hL=`#ifdef USE_FOG +#endif`,fL=`#ifdef USE_FOG varying float vFogDepth; -#endif`,dL=`#ifdef USE_FOG +#endif`,hL=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,pL=`#ifdef USE_FOG +#endif`,dL=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -663,7 +663,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,mL=`#ifdef USE_GRADIENTMAP +#endif`,pL=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -675,12 +675,12 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,gL=`#ifdef USE_LIGHTMAP +}`,mL=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,_L=`LambertMaterial material; +#endif`,gL=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,vL=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,_L=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -694,7 +694,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,yL=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,vL=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -810,7 +810,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,xL=`#ifdef USE_ENVMAP +#endif`,yL=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -843,8 +843,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,bL=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,SL=`varying vec3 vViewPosition; +#endif`,xL=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,bL=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -856,11 +856,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,ML=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,SL=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,EL=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,ML=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -877,7 +877,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,TL=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,EL=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -963,7 +963,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,wL=`struct PhysicalMaterial { +#endif`,TL=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1264,7 +1264,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,AL=` +}`,wL=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1379,7 +1379,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,CL=`#if defined( RE_IndirectDiffuse ) +#endif`,AL=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1398,32 +1398,32 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,RL=`#if defined( RE_IndirectDiffuse ) +#endif`,CL=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,PL=`#if defined( USE_LOGDEPTHBUF ) +#endif`,RL=`#if defined( USE_LOGDEPTHBUF ) gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,IL=`#if defined( USE_LOGDEPTHBUF ) +#endif`,PL=`#if defined( USE_LOGDEPTHBUF ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,LL=`#ifdef USE_LOGDEPTHBUF +#endif`,IL=`#ifdef USE_LOGDEPTHBUF varying float vFragDepth; varying float vIsPerspective; -#endif`,DL=`#ifdef USE_LOGDEPTHBUF +#endif`,LL=`#ifdef USE_LOGDEPTHBUF vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,OL=`#ifdef USE_MAP +#endif`,DL=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,NL=`#ifdef USE_MAP +#endif`,OL=`#ifdef USE_MAP uniform sampler2D map; -#endif`,UL=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,NL=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1435,7 +1435,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,FL=`#if defined( USE_POINTS_UV ) +#endif`,UL=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1447,13 +1447,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,BL=`float metalnessFactor = metalness; +#endif`,FL=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,kL=`#ifdef USE_METALNESSMAP +#endif`,BL=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,zL=`#ifdef USE_INSTANCING_MORPH +#endif`,kL=`#ifdef USE_INSTANCING_MORPH float morphTargetInfluences[ MORPHTARGETS_COUNT ]; float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1468,12 +1468,12 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,HL=`#ifdef USE_MORPHNORMALS +#endif`,zL=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; } -#endif`,GL=`#ifdef USE_MORPHTARGETS +#endif`,HL=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1487,12 +1487,12 @@ IncidentLight directLight; ivec3 morphUV = ivec3( x, y, morphTargetIndex ); return texelFetch( morphTargetsTexture, morphUV, 0 ); } -#endif`,WL=`#ifdef USE_MORPHTARGETS +#endif`,GL=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; } -#endif`,XL=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,WL=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1533,7 +1533,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,$L=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,XL=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1548,25 +1548,25 @@ vec3 nonPerturbedNormal = normal;`,$L=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,qL=`#ifndef FLAT_SHADED +#endif`,$L=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,YL=`#ifndef FLAT_SHADED +#endif`,qL=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,jL=`#ifndef FLAT_SHADED +#endif`,YL=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,KL=`#ifdef USE_NORMALMAP +#endif`,jL=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1588,13 +1588,13 @@ vec3 nonPerturbedNormal = normal;`,$L=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,ZL=`#ifdef USE_CLEARCOAT +#endif`,KL=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,JL=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,ZL=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,QL=`#ifdef USE_CLEARCOATMAP +#endif`,JL=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1603,18 +1603,18 @@ vec3 nonPerturbedNormal = normal;`,$L=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,eD=`#ifdef USE_IRIDESCENCEMAP +#endif`,QL=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,tD=`#ifdef OPAQUE +#endif`,eD=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,nD=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,tD=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1683,9 +1683,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,iD=`#ifdef PREMULTIPLIED_ALPHA +}`,nD=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,rD=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,iD=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1693,22 +1693,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,sD=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,rD=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,oD=`#ifdef DITHERING +#endif`,sD=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,aD=`float roughnessFactor = roughness; +#endif`,oD=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,lD=`#ifdef USE_ROUGHNESSMAP +#endif`,aD=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,cD=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,lD=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -1894,7 +1894,7 @@ gl_Position = projectionMatrix * mvPosition;`,sD=`#ifdef DITHERING } return mix( 1.0, shadow, shadowIntensity ); } -#endif`,uD=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,cD=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -1935,7 +1935,7 @@ gl_Position = projectionMatrix * mvPosition;`,sD=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,fD=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,uD=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -1967,7 +1967,7 @@ gl_Position = projectionMatrix * mvPosition;`,sD=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,hD=`float getShadowMask() { +#endif`,fD=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -1999,12 +1999,12 @@ gl_Position = projectionMatrix * mvPosition;`,sD=`#ifdef DITHERING #endif #endif return shadow; -}`,dD=`#ifdef USE_SKINNING +}`,hD=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,pD=`#ifdef USE_SKINNING +#endif`,dD=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2019,7 +2019,7 @@ gl_Position = projectionMatrix * mvPosition;`,sD=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,mD=`#ifdef USE_SKINNING +#endif`,pD=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2027,7 +2027,7 @@ gl_Position = projectionMatrix * mvPosition;`,sD=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,gD=`#ifdef USE_SKINNING +#endif`,mD=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2038,17 +2038,17 @@ gl_Position = projectionMatrix * mvPosition;`,sD=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,_D=`float specularStrength; +#endif`,gD=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,vD=`#ifdef USE_SPECULARMAP +#endif`,_D=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,yD=`#if defined( TONE_MAPPING ) +#endif`,vD=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,xD=`#ifndef saturate +#endif`,yD=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2145,7 +2145,7 @@ vec3 NeutralToneMapping( vec3 color ) { float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); return mix( color, vec3( newPeak ), g ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,bD=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,xD=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2166,7 +2166,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bD=`#ifdef USE_TRANSMISS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,SD=`#ifdef USE_TRANSMISSION +#endif`,bD=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2292,7 +2292,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bD=`#ifdef USE_TRANSMISS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,MD=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,SD=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2362,7 +2362,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bD=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,ED=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,MD=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2456,7 +2456,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bD=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,TD=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,ED=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2527,7 +2527,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bD=`#ifdef USE_TRANSMISS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,wD=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,TD=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2536,12 +2536,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,bD=`#ifdef USE_TRANSMISS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const AD=`varying vec2 vUv; +#endif`;const wD=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,CD=`uniform sampler2D t2D; +}`,AD=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2553,14 +2553,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,RD=`varying vec3 vWorldDirection; +}`,CD=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,PD=`#ifdef ENVMAP_TYPE_CUBE +}`,RD=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2583,14 +2583,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,ID=`varying vec3 vWorldDirection; +}`,PD=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,LD=`uniform samplerCube tCube; +}`,ID=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2600,7 +2600,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,DD=`#include +}`,LD=`#include #include #include #include @@ -2627,7 +2627,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,OD=`#if DEPTH_PACKING == 3200 +}`,DD=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2661,7 +2661,7 @@ void main() { #elif DEPTH_PACKING == 3203 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); #endif -}`,ND=`#define DISTANCE +}`,OD=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2688,7 +2688,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,UD=`#define DISTANCE +}`,ND=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2712,13 +2712,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,FD=`varying vec3 vWorldDirection; +}`,UD=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,BD=`uniform sampler2D tEquirect; +}`,FD=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2727,7 +2727,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,kD=`uniform float scale; +}`,BD=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2749,7 +2749,7 @@ void main() { #include #include #include -}`,zD=`uniform vec3 diffuse; +}`,kD=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2809,7 +2809,7 @@ void main() { #include #include #include -}`,HD=`uniform vec3 diffuse; +}`,zD=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2857,7 +2857,7 @@ void main() { #include #include #include -}`,GD=`#define LAMBERT +}`,HD=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2896,7 +2896,7 @@ void main() { #include #include #include -}`,WD=`#define LAMBERT +}`,GD=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2953,7 +2953,7 @@ void main() { #include #include #include -}`,XD=`#define MATCAP +}`,WD=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -2987,7 +2987,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,$D=`#define MATCAP +}`,XD=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3033,7 +3033,7 @@ void main() { #include #include #include -}`,qD=`#define NORMAL +}`,$D=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3066,7 +3066,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,YD=`#define NORMAL +}`,qD=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3088,7 +3088,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,jD=`#define PHONG +}`,YD=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3127,7 +3127,7 @@ void main() { #include #include #include -}`,KD=`#define PHONG +}`,jD=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3186,7 +3186,7 @@ void main() { #include #include #include -}`,ZD=`#define STANDARD +}`,KD=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3229,7 +3229,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,JD=`#define STANDARD +}`,ZD=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3354,7 +3354,7 @@ void main() { #include #include #include -}`,QD=`#define TOON +}`,JD=`#define TOON varying vec3 vViewPosition; #include #include @@ -3391,7 +3391,7 @@ void main() { #include #include #include -}`,eO=`#define TOON +}`,QD=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3444,7 +3444,7 @@ void main() { #include #include #include -}`,tO=`uniform float size; +}`,eO=`uniform float size; uniform float scale; #include #include @@ -3475,7 +3475,7 @@ void main() { #include #include #include -}`,nO=`uniform vec3 diffuse; +}`,tO=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3500,7 +3500,7 @@ void main() { #include #include #include -}`,iO=`#include +}`,nO=`#include #include #include #include @@ -3523,7 +3523,7 @@ void main() { #include #include #include -}`,rO=`uniform vec3 color; +}`,iO=`uniform vec3 color; uniform float opacity; #include #include @@ -3539,7 +3539,7 @@ void main() { #include #include #include -}`,sO=`uniform float rotation; +}`,rO=`uniform float rotation; uniform vec2 center; #include #include @@ -3563,7 +3563,7 @@ void main() { #include #include #include -}`,oO=`uniform vec3 diffuse; +}`,sO=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3588,7 +3588,7 @@ void main() { #include #include #include -}`,it={alphahash_fragment:CI,alphahash_pars_fragment:RI,alphamap_fragment:PI,alphamap_pars_fragment:II,alphatest_fragment:LI,alphatest_pars_fragment:DI,aomap_fragment:OI,aomap_pars_fragment:NI,batching_pars_vertex:UI,batching_vertex:FI,begin_vertex:BI,beginnormal_vertex:kI,bsdfs:zI,iridescence_fragment:VI,bumpmap_pars_fragment:HI,clipping_planes_fragment:GI,clipping_planes_pars_fragment:WI,clipping_planes_pars_vertex:XI,clipping_planes_vertex:$I,color_fragment:qI,color_pars_fragment:YI,color_pars_vertex:jI,color_vertex:KI,common:ZI,cube_uv_reflection_fragment:JI,defaultnormal_vertex:QI,displacementmap_pars_vertex:eL,displacementmap_vertex:tL,emissivemap_fragment:nL,emissivemap_pars_fragment:iL,colorspace_fragment:rL,colorspace_pars_fragment:sL,envmap_fragment:oL,envmap_common_pars_fragment:aL,envmap_pars_fragment:lL,envmap_pars_vertex:cL,envmap_physical_pars_fragment:xL,envmap_vertex:uL,fog_vertex:fL,fog_pars_vertex:hL,fog_fragment:dL,fog_pars_fragment:pL,gradientmap_pars_fragment:mL,lightmap_pars_fragment:gL,lights_lambert_fragment:_L,lights_lambert_pars_fragment:vL,lights_pars_begin:yL,lights_toon_fragment:bL,lights_toon_pars_fragment:SL,lights_phong_fragment:ML,lights_phong_pars_fragment:EL,lights_physical_fragment:TL,lights_physical_pars_fragment:wL,lights_fragment_begin:AL,lights_fragment_maps:CL,lights_fragment_end:RL,logdepthbuf_fragment:PL,logdepthbuf_pars_fragment:IL,logdepthbuf_pars_vertex:LL,logdepthbuf_vertex:DL,map_fragment:OL,map_pars_fragment:NL,map_particle_fragment:UL,map_particle_pars_fragment:FL,metalnessmap_fragment:BL,metalnessmap_pars_fragment:kL,morphinstance_vertex:zL,morphcolor_vertex:VL,morphnormal_vertex:HL,morphtarget_pars_vertex:GL,morphtarget_vertex:WL,normal_fragment_begin:XL,normal_fragment_maps:$L,normal_pars_fragment:qL,normal_pars_vertex:YL,normal_vertex:jL,normalmap_pars_fragment:KL,clearcoat_normal_fragment_begin:ZL,clearcoat_normal_fragment_maps:JL,clearcoat_pars_fragment:QL,iridescence_pars_fragment:eD,opaque_fragment:tD,packing:nD,premultiplied_alpha_fragment:iD,project_vertex:rD,dithering_fragment:sD,dithering_pars_fragment:oD,roughnessmap_fragment:aD,roughnessmap_pars_fragment:lD,shadowmap_pars_fragment:cD,shadowmap_pars_vertex:uD,shadowmap_vertex:fD,shadowmask_pars_fragment:hD,skinbase_vertex:dD,skinning_pars_vertex:pD,skinning_vertex:mD,skinnormal_vertex:gD,specularmap_fragment:_D,specularmap_pars_fragment:vD,tonemapping_fragment:yD,tonemapping_pars_fragment:xD,transmission_fragment:bD,transmission_pars_fragment:SD,uv_pars_fragment:MD,uv_pars_vertex:ED,uv_vertex:TD,worldpos_vertex:wD,background_vert:AD,background_frag:CD,backgroundCube_vert:RD,backgroundCube_frag:PD,cube_vert:ID,cube_frag:LD,depth_vert:DD,depth_frag:OD,distanceRGBA_vert:ND,distanceRGBA_frag:UD,equirect_vert:FD,equirect_frag:BD,linedashed_vert:kD,linedashed_frag:zD,meshbasic_vert:VD,meshbasic_frag:HD,meshlambert_vert:GD,meshlambert_frag:WD,meshmatcap_vert:XD,meshmatcap_frag:$D,meshnormal_vert:qD,meshnormal_frag:YD,meshphong_vert:jD,meshphong_frag:KD,meshphysical_vert:ZD,meshphysical_frag:JD,meshtoon_vert:QD,meshtoon_frag:eO,points_vert:tO,points_frag:nO,shadow_vert:iO,shadow_frag:rO,sprite_vert:sO,sprite_frag:oO},Me={common:{diffuse:{value:new Te(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Qe},alphaMap:{value:null},alphaMapTransform:{value:new Qe},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Qe}},envmap:{envMap:{value:null},envMapRotation:{value:new Qe},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Qe}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Qe}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Qe},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Qe},normalScale:{value:new fe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Qe},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Qe}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Qe}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Qe}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Te(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 Te(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Qe},alphaTest:{value:0},uvTransform:{value:new Qe}},sprite:{diffuse:{value:new Te(16777215)},opacity:{value:1},center:{value:new fe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Qe},alphaMap:{value:null},alphaMapTransform:{value:new Qe},alphaTest:{value:0}}},Si={basic:{uniforms:Sn([Me.common,Me.specularmap,Me.envmap,Me.aomap,Me.lightmap,Me.fog]),vertexShader:it.meshbasic_vert,fragmentShader:it.meshbasic_frag},lambert:{uniforms:Sn([Me.common,Me.specularmap,Me.envmap,Me.aomap,Me.lightmap,Me.emissivemap,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.fog,Me.lights,{emissive:{value:new Te(0)}}]),vertexShader:it.meshlambert_vert,fragmentShader:it.meshlambert_frag},phong:{uniforms:Sn([Me.common,Me.specularmap,Me.envmap,Me.aomap,Me.lightmap,Me.emissivemap,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.fog,Me.lights,{emissive:{value:new Te(0)},specular:{value:new Te(1118481)},shininess:{value:30}}]),vertexShader:it.meshphong_vert,fragmentShader:it.meshphong_frag},standard:{uniforms:Sn([Me.common,Me.envmap,Me.aomap,Me.lightmap,Me.emissivemap,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.roughnessmap,Me.metalnessmap,Me.fog,Me.lights,{emissive:{value:new Te(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:it.meshphysical_vert,fragmentShader:it.meshphysical_frag},toon:{uniforms:Sn([Me.common,Me.aomap,Me.lightmap,Me.emissivemap,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.gradientmap,Me.fog,Me.lights,{emissive:{value:new Te(0)}}]),vertexShader:it.meshtoon_vert,fragmentShader:it.meshtoon_frag},matcap:{uniforms:Sn([Me.common,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.fog,{matcap:{value:null}}]),vertexShader:it.meshmatcap_vert,fragmentShader:it.meshmatcap_frag},points:{uniforms:Sn([Me.points,Me.fog]),vertexShader:it.points_vert,fragmentShader:it.points_frag},dashed:{uniforms:Sn([Me.common,Me.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:it.linedashed_vert,fragmentShader:it.linedashed_frag},depth:{uniforms:Sn([Me.common,Me.displacementmap]),vertexShader:it.depth_vert,fragmentShader:it.depth_frag},normal:{uniforms:Sn([Me.common,Me.bumpmap,Me.normalmap,Me.displacementmap,{opacity:{value:1}}]),vertexShader:it.meshnormal_vert,fragmentShader:it.meshnormal_frag},sprite:{uniforms:Sn([Me.sprite,Me.fog]),vertexShader:it.sprite_vert,fragmentShader:it.sprite_frag},background:{uniforms:{uvTransform:{value:new Qe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:it.background_vert,fragmentShader:it.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Qe}},vertexShader:it.backgroundCube_vert,fragmentShader:it.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:it.cube_vert,fragmentShader:it.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:it.equirect_vert,fragmentShader:it.equirect_frag},distanceRGBA:{uniforms:Sn([Me.common,Me.displacementmap,{referencePosition:{value:new F},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:it.distanceRGBA_vert,fragmentShader:it.distanceRGBA_frag},shadow:{uniforms:Sn([Me.lights,Me.fog,{color:{value:new Te(0)},opacity:{value:1}}]),vertexShader:it.shadow_vert,fragmentShader:it.shadow_frag}};Si.physical={uniforms:Sn([Si.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Qe},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Qe},clearcoatNormalScale:{value:new fe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Qe},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Qe},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Qe},sheen:{value:0},sheenColor:{value:new Te(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Qe},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Qe},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Qe},transmissionSamplerSize:{value:new fe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Qe},attenuationDistance:{value:0},attenuationColor:{value:new Te(0)},specularColor:{value:new Te(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Qe},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Qe},anisotropyVector:{value:new fe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Qe}}]),vertexShader:it.meshphysical_vert,fragmentShader:it.meshphysical_frag};const mu={r:0,b:0,g:0},Ds=new ni,aO=new We;function lO(n,e,t,i,r,s,o){const a=new Te(0);let l=s===!0?0:1,c,u,f=null,h=0,d=null;function p(x){let v=x.isScene===!0?x.background:null;return v&&v.isTexture&&(v=(x.backgroundBlurriness>0?t:e).get(v)),v}function _(x){let v=!1;const E=p(x);E===null?m(a,l):E&&E.isColor&&(m(E,1),v=!0);const T=n.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||v)&&(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(x,v){const E=p(v);E&&(E.isCubeTexture||E.mapping===ga)?(u===void 0&&(u=new zt(new ho(1,1,1),new Ri({name:"BackgroundCubeMaterial",uniforms:aa(Si.backgroundCube.uniforms),vertexShader:Si.backgroundCube.vertexShader,fragmentShader:Si.backgroundCube.fragmentShader,side:Ln,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(T,M,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),Ds.copy(v.backgroundRotation),Ds.x*=-1,Ds.y*=-1,Ds.z*=-1,E.isCubeTexture&&E.isRenderTargetTexture===!1&&(Ds.y*=-1,Ds.z*=-1),u.material.uniforms.envMap.value=E,u.material.uniforms.flipEnvMap.value=E.isCubeTexture&&E.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(aO.makeRotationFromEuler(Ds)),u.material.toneMapped=at.getTransfer(E.colorSpace)!==bt,(f!==E||h!==E.version||d!==n.toneMapping)&&(u.material.needsUpdate=!0,f=E,h=E.version,d=n.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null)):E&&E.isTexture&&(c===void 0&&(c=new zt(new xa(2,2),new Ri({name:"BackgroundMaterial",uniforms:aa(Si.background.uniforms),vertexShader:Si.background.vertexShader,fragmentShader:Si.background.fragmentShader,side:Mr,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=E,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.toneMapped=at.getTransfer(E.colorSpace)!==bt,E.matrixAutoUpdate===!0&&E.updateMatrix(),c.material.uniforms.uvTransform.value.copy(E.matrix),(f!==E||h!==E.version||d!==n.toneMapping)&&(c.material.needsUpdate=!0,f=E,h=E.version,d=n.toneMapping),c.layers.enableAll(),x.unshift(c,c.geometry,c.material,0,0,null))}function m(x,v){x.getRGB(mu,HS(n)),i.buffers.color.setClear(mu.r,mu.g,mu.b,v,o)}function y(){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(x,v=1){a.set(x),l=v,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,m(a,l)},render:_,addToRenderList:g,dispose:y}}function cO(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},r=h(null);let s=r,o=!1;function a(S,D,B,H,$){let ee=!1;const Z=f(H,B,D);s!==Z&&(s=Z,c(s.object)),ee=d(S,H,B,$),ee&&p(S,H,B,$),$!==null&&e.update($,n.ELEMENT_ARRAY_BUFFER),(ee||o)&&(o=!1,v(S,D,B,H),$!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get($).buffer))}function l(){return n.createVertexArray()}function c(S){return n.bindVertexArray(S)}function u(S){return n.deleteVertexArray(S)}function f(S,D,B){const H=B.wireframe===!0;let $=i[S.id];$===void 0&&($={},i[S.id]=$);let ee=$[D.id];ee===void 0&&(ee={},$[D.id]=ee);let Z=ee[H];return Z===void 0&&(Z=h(l()),ee[H]=Z),Z}function h(S){const D=[],B=[],H=[];for(let $=0;$=0){const ve=$[Q];let re=ee[Q];if(re===void 0&&(Q==="instanceMatrix"&&S.instanceMatrix&&(re=S.instanceMatrix),Q==="instanceColor"&&S.instanceColor&&(re=S.instanceColor)),ve===void 0||ve.attribute!==re||re&&ve.data!==re.data)return!0;Z++}return s.attributesNum!==Z||s.index!==H}function p(S,D,B,H){const $={},ee=D.attributes;let Z=0;const te=B.getAttributes();for(const Q in te)if(te[Q].location>=0){let ve=ee[Q];ve===void 0&&(Q==="instanceMatrix"&&S.instanceMatrix&&(ve=S.instanceMatrix),Q==="instanceColor"&&S.instanceColor&&(ve=S.instanceColor));const re={};re.attribute=ve,ve&&ve.data&&(re.data=ve.data),$[Q]=re,Z++}s.attributes=$,s.attributesNum=Z,s.index=H}function _(){const S=s.newAttributes;for(let D=0,B=S.length;D=0){let pe=$[te];if(pe===void 0&&(te==="instanceMatrix"&&S.instanceMatrix&&(pe=S.instanceMatrix),te==="instanceColor"&&S.instanceColor&&(pe=S.instanceColor)),pe!==void 0){const ve=pe.normalized,re=pe.itemSize,xe=e.get(pe);if(xe===void 0)continue;const Ve=xe.buffer,se=xe.type,ge=xe.bytesPerElement,be=se===n.INT||se===n.UNSIGNED_INT||pe.gpuType===ph;if(pe.isInterleavedBufferAttribute){const W=pe.data,ae=W.stride,ue=pe.offset;if(W.isInstancedInterleavedBuffer){for(let le=0;le0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="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),y=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),x=n.getParameter(n.MAX_VARYING_VECTORS),v=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),E=p>0,T=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:_,maxCubemapSize:g,maxAttributes:m,maxVertexUniforms:y,maxVaryings:x,maxFragmentUniforms:v,vertexTextures:E,maxSamples:T}}function hO(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Xr,a=new Qe,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||r;return r=h,i=f.length,d},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!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(!r||p===null||p.length===0||s&&!g)s?u(null):c();else{const y=s?0:i,x=y*4;let v=m.clippingState||null;l.value=v,v=u(p,h,x,d);for(let E=0;E!==x;++E)v[E]=t[E];m.clippingState=v,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=y}};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,y=h.matrixWorldInverse;a.getNormalMatrix(y),(g===null||g.length0){const c=new XS(l.height);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",r),t(c.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}const Yo=4,w0=[.125,.215,.35,.446,.526,.582],Gs=20,Qd=new Wh,A0=new Te;let ep=null,tp=0,np=0,ip=!1;const zs=(1+Math.sqrt(5))/2,Bo=1/zs,C0=[new F(-zs,Bo,0),new F(zs,Bo,0),new F(-Bo,0,zs),new F(Bo,0,zs),new F(0,zs,-Bo),new F(0,zs,Bo),new F(-1,1,-1),new F(1,1,-1),new F(-1,1,1),new F(1,1,1)],pO=new F;class Jp{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,r=100,s={}){const{size:o=256,position:a=pO}=s;ep=this._renderer.getRenderTarget(),tp=this._renderer.getActiveCubeFace(),np=this._renderer.getActiveMipmapLevel(),ip=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,i,r,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=I0(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=P0(),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?v:0,v,v),f.setRenderTarget(r),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,r=e.mapping===Er||e.mapping===ns;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=I0()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=P0());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new zt(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;gu(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,Qd)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;sGs&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${Gs}`);const m=[];let y=0;for(let M=0;Mx-Yo?r-x+Yo:0),T=4*(this._cubeSize-v);gu(t,E,T,3*v,2*v),l.setRenderTarget(t),l.render(f,Qd)}}function mO(n){const e=[],t=[],i=[];let r=n;const s=n-Yo+1+w0.length;for(let o=0;on-Yo?l=w0[o-n+Yo-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,y=new Float32Array(_*p*d),x=new Float32Array(g*p*d),v=new Float32Array(m*p*d);for(let T=0;T2?0:-1,b=[M,P,0,M+2/3,P,0,M+2/3,P+1,0,M,P,0,M+2/3,P+1,0,M,P+1,0];y.set(b,_*p*T),x.set(h,g*p*T);const S=[T,T,T,T,T,T];v.set(S,m*p*T)}const E=new rt;E.setAttribute("position",new Et(y,_)),E.setAttribute("uv",new Et(x,g)),E.setAttribute("faceIndex",new Et(v,m)),e.push(E),r>Yo&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function R0(n,e,t){const i=new ji(n,e,t);return i.texture.mapping=ga,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function gu(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function gO(n,e,t){const i=new Float32Array(Gs),r=new F(0,1,0);return new Ri({name:"SphericalGaussianBlur",defines:{n:Gs,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:r}},vertexShader:qg(),fragmentShader:` +}`,it={alphahash_fragment:AI,alphahash_pars_fragment:CI,alphamap_fragment:RI,alphamap_pars_fragment:PI,alphatest_fragment:II,alphatest_pars_fragment:LI,aomap_fragment:DI,aomap_pars_fragment:OI,batching_pars_vertex:NI,batching_vertex:UI,begin_vertex:FI,beginnormal_vertex:BI,bsdfs:kI,iridescence_fragment:VI,bumpmap_pars_fragment:zI,clipping_planes_fragment:HI,clipping_planes_pars_fragment:GI,clipping_planes_pars_vertex:WI,clipping_planes_vertex:XI,color_fragment:$I,color_pars_fragment:qI,color_pars_vertex:YI,color_vertex:jI,common:KI,cube_uv_reflection_fragment:ZI,defaultnormal_vertex:JI,displacementmap_pars_vertex:QI,displacementmap_vertex:eL,emissivemap_fragment:tL,emissivemap_pars_fragment:nL,colorspace_fragment:iL,colorspace_pars_fragment:rL,envmap_fragment:sL,envmap_common_pars_fragment:oL,envmap_pars_fragment:aL,envmap_pars_vertex:lL,envmap_physical_pars_fragment:yL,envmap_vertex:cL,fog_vertex:uL,fog_pars_vertex:fL,fog_fragment:hL,fog_pars_fragment:dL,gradientmap_pars_fragment:pL,lightmap_pars_fragment:mL,lights_lambert_fragment:gL,lights_lambert_pars_fragment:_L,lights_pars_begin:vL,lights_toon_fragment:xL,lights_toon_pars_fragment:bL,lights_phong_fragment:SL,lights_phong_pars_fragment:ML,lights_physical_fragment:EL,lights_physical_pars_fragment:TL,lights_fragment_begin:wL,lights_fragment_maps:AL,lights_fragment_end:CL,logdepthbuf_fragment:RL,logdepthbuf_pars_fragment:PL,logdepthbuf_pars_vertex:IL,logdepthbuf_vertex:LL,map_fragment:DL,map_pars_fragment:OL,map_particle_fragment:NL,map_particle_pars_fragment:UL,metalnessmap_fragment:FL,metalnessmap_pars_fragment:BL,morphinstance_vertex:kL,morphcolor_vertex:VL,morphnormal_vertex:zL,morphtarget_pars_vertex:HL,morphtarget_vertex:GL,normal_fragment_begin:WL,normal_fragment_maps:XL,normal_pars_fragment:$L,normal_pars_vertex:qL,normal_vertex:YL,normalmap_pars_fragment:jL,clearcoat_normal_fragment_begin:KL,clearcoat_normal_fragment_maps:ZL,clearcoat_pars_fragment:JL,iridescence_pars_fragment:QL,opaque_fragment:eD,packing:tD,premultiplied_alpha_fragment:nD,project_vertex:iD,dithering_fragment:rD,dithering_pars_fragment:sD,roughnessmap_fragment:oD,roughnessmap_pars_fragment:aD,shadowmap_pars_fragment:lD,shadowmap_pars_vertex:cD,shadowmap_vertex:uD,shadowmask_pars_fragment:fD,skinbase_vertex:hD,skinning_pars_vertex:dD,skinning_vertex:pD,skinnormal_vertex:mD,specularmap_fragment:gD,specularmap_pars_fragment:_D,tonemapping_fragment:vD,tonemapping_pars_fragment:yD,transmission_fragment:xD,transmission_pars_fragment:bD,uv_pars_fragment:SD,uv_pars_vertex:MD,uv_vertex:ED,worldpos_vertex:TD,background_vert:wD,background_frag:AD,backgroundCube_vert:CD,backgroundCube_frag:RD,cube_vert:PD,cube_frag:ID,depth_vert:LD,depth_frag:DD,distanceRGBA_vert:OD,distanceRGBA_frag:ND,equirect_vert:UD,equirect_frag:FD,linedashed_vert:BD,linedashed_frag:kD,meshbasic_vert:VD,meshbasic_frag:zD,meshlambert_vert:HD,meshlambert_frag:GD,meshmatcap_vert:WD,meshmatcap_frag:XD,meshnormal_vert:$D,meshnormal_frag:qD,meshphong_vert:YD,meshphong_frag:jD,meshphysical_vert:KD,meshphysical_frag:ZD,meshtoon_vert:JD,meshtoon_frag:QD,points_vert:eO,points_frag:tO,shadow_vert:nO,shadow_frag:iO,sprite_vert:rO,sprite_frag:sO},Me={common:{diffuse:{value:new Te(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Qe},alphaMap:{value:null},alphaMapTransform:{value:new Qe},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Qe}},envmap:{envMap:{value:null},envMapRotation:{value:new Qe},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Qe}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Qe}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Qe},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Qe},normalScale:{value:new fe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Qe},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Qe}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Qe}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Qe}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Te(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 Te(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Qe},alphaTest:{value:0},uvTransform:{value:new Qe}},sprite:{diffuse:{value:new Te(16777215)},opacity:{value:1},center:{value:new fe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Qe},alphaMap:{value:null},alphaMapTransform:{value:new Qe},alphaTest:{value:0}}},bi={basic:{uniforms:Sn([Me.common,Me.specularmap,Me.envmap,Me.aomap,Me.lightmap,Me.fog]),vertexShader:it.meshbasic_vert,fragmentShader:it.meshbasic_frag},lambert:{uniforms:Sn([Me.common,Me.specularmap,Me.envmap,Me.aomap,Me.lightmap,Me.emissivemap,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.fog,Me.lights,{emissive:{value:new Te(0)}}]),vertexShader:it.meshlambert_vert,fragmentShader:it.meshlambert_frag},phong:{uniforms:Sn([Me.common,Me.specularmap,Me.envmap,Me.aomap,Me.lightmap,Me.emissivemap,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.fog,Me.lights,{emissive:{value:new Te(0)},specular:{value:new Te(1118481)},shininess:{value:30}}]),vertexShader:it.meshphong_vert,fragmentShader:it.meshphong_frag},standard:{uniforms:Sn([Me.common,Me.envmap,Me.aomap,Me.lightmap,Me.emissivemap,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.roughnessmap,Me.metalnessmap,Me.fog,Me.lights,{emissive:{value:new Te(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:it.meshphysical_vert,fragmentShader:it.meshphysical_frag},toon:{uniforms:Sn([Me.common,Me.aomap,Me.lightmap,Me.emissivemap,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.gradientmap,Me.fog,Me.lights,{emissive:{value:new Te(0)}}]),vertexShader:it.meshtoon_vert,fragmentShader:it.meshtoon_frag},matcap:{uniforms:Sn([Me.common,Me.bumpmap,Me.normalmap,Me.displacementmap,Me.fog,{matcap:{value:null}}]),vertexShader:it.meshmatcap_vert,fragmentShader:it.meshmatcap_frag},points:{uniforms:Sn([Me.points,Me.fog]),vertexShader:it.points_vert,fragmentShader:it.points_frag},dashed:{uniforms:Sn([Me.common,Me.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:it.linedashed_vert,fragmentShader:it.linedashed_frag},depth:{uniforms:Sn([Me.common,Me.displacementmap]),vertexShader:it.depth_vert,fragmentShader:it.depth_frag},normal:{uniforms:Sn([Me.common,Me.bumpmap,Me.normalmap,Me.displacementmap,{opacity:{value:1}}]),vertexShader:it.meshnormal_vert,fragmentShader:it.meshnormal_frag},sprite:{uniforms:Sn([Me.sprite,Me.fog]),vertexShader:it.sprite_vert,fragmentShader:it.sprite_frag},background:{uniforms:{uvTransform:{value:new Qe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:it.background_vert,fragmentShader:it.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Qe}},vertexShader:it.backgroundCube_vert,fragmentShader:it.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:it.cube_vert,fragmentShader:it.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:it.equirect_vert,fragmentShader:it.equirect_frag},distanceRGBA:{uniforms:Sn([Me.common,Me.displacementmap,{referencePosition:{value:new F},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:it.distanceRGBA_vert,fragmentShader:it.distanceRGBA_frag},shadow:{uniforms:Sn([Me.lights,Me.fog,{color:{value:new Te(0)},opacity:{value:1}}]),vertexShader:it.shadow_vert,fragmentShader:it.shadow_frag}};bi.physical={uniforms:Sn([bi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Qe},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Qe},clearcoatNormalScale:{value:new fe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Qe},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Qe},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Qe},sheen:{value:0},sheenColor:{value:new Te(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Qe},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Qe},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Qe},transmissionSamplerSize:{value:new fe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Qe},attenuationDistance:{value:0},attenuationColor:{value:new Te(0)},specularColor:{value:new Te(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Qe},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Qe},anisotropyVector:{value:new fe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Qe}}]),vertexShader:it.meshphysical_vert,fragmentShader:it.meshphysical_frag};const mu={r:0,b:0,g:0},Ds=new ti,oO=new We;function aO(n,e,t,i,r,s,o){const a=new Te(0);let l=s===!0?0:1,c,u,f=null,h=0,d=null;function p(x){let v=x.isScene===!0?x.background:null;return v&&v.isTexture&&(v=(x.backgroundBlurriness>0?t:e).get(v)),v}function _(x){let v=!1;const E=p(x);E===null?m(a,l):E&&E.isColor&&(m(E,1),v=!0);const T=n.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||v)&&(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(x,v){const E=p(v);E&&(E.isCubeTexture||E.mapping===ga)?(u===void 0&&(u=new zt(new ho(1,1,1),new Ci({name:"BackgroundCubeMaterial",uniforms:aa(bi.backgroundCube.uniforms),vertexShader:bi.backgroundCube.vertexShader,fragmentShader:bi.backgroundCube.fragmentShader,side:Ln,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(T,M,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),Ds.copy(v.backgroundRotation),Ds.x*=-1,Ds.y*=-1,Ds.z*=-1,E.isCubeTexture&&E.isRenderTargetTexture===!1&&(Ds.y*=-1,Ds.z*=-1),u.material.uniforms.envMap.value=E,u.material.uniforms.flipEnvMap.value=E.isCubeTexture&&E.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(oO.makeRotationFromEuler(Ds)),u.material.toneMapped=at.getTransfer(E.colorSpace)!==bt,(f!==E||h!==E.version||d!==n.toneMapping)&&(u.material.needsUpdate=!0,f=E,h=E.version,d=n.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null)):E&&E.isTexture&&(c===void 0&&(c=new zt(new xa(2,2),new Ci({name:"BackgroundMaterial",uniforms:aa(bi.background.uniforms),vertexShader:bi.background.vertexShader,fragmentShader:bi.background.fragmentShader,side:Sr,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=E,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.toneMapped=at.getTransfer(E.colorSpace)!==bt,E.matrixAutoUpdate===!0&&E.updateMatrix(),c.material.uniforms.uvTransform.value.copy(E.matrix),(f!==E||h!==E.version||d!==n.toneMapping)&&(c.material.needsUpdate=!0,f=E,h=E.version,d=n.toneMapping),c.layers.enableAll(),x.unshift(c,c.geometry,c.material,0,0,null))}function m(x,v){x.getRGB(mu,zS(n)),i.buffers.color.setClear(mu.r,mu.g,mu.b,v,o)}function y(){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(x,v=1){a.set(x),l=v,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,m(a,l)},render:_,addToRenderList:g,dispose:y}}function lO(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},r=h(null);let s=r,o=!1;function a(S,D,B,H,$){let ee=!1;const Z=f(H,B,D);s!==Z&&(s=Z,c(s.object)),ee=d(S,H,B,$),ee&&p(S,H,B,$),$!==null&&e.update($,n.ELEMENT_ARRAY_BUFFER),(ee||o)&&(o=!1,v(S,D,B,H),$!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get($).buffer))}function l(){return n.createVertexArray()}function c(S){return n.bindVertexArray(S)}function u(S){return n.deleteVertexArray(S)}function f(S,D,B){const H=B.wireframe===!0;let $=i[S.id];$===void 0&&($={},i[S.id]=$);let ee=$[D.id];ee===void 0&&(ee={},$[D.id]=ee);let Z=ee[H];return Z===void 0&&(Z=h(l()),ee[H]=Z),Z}function h(S){const D=[],B=[],H=[];for(let $=0;$=0){const ve=$[Q];let re=ee[Q];if(re===void 0&&(Q==="instanceMatrix"&&S.instanceMatrix&&(re=S.instanceMatrix),Q==="instanceColor"&&S.instanceColor&&(re=S.instanceColor)),ve===void 0||ve.attribute!==re||re&&ve.data!==re.data)return!0;Z++}return s.attributesNum!==Z||s.index!==H}function p(S,D,B,H){const $={},ee=D.attributes;let Z=0;const te=B.getAttributes();for(const Q in te)if(te[Q].location>=0){let ve=ee[Q];ve===void 0&&(Q==="instanceMatrix"&&S.instanceMatrix&&(ve=S.instanceMatrix),Q==="instanceColor"&&S.instanceColor&&(ve=S.instanceColor));const re={};re.attribute=ve,ve&&ve.data&&(re.data=ve.data),$[Q]=re,Z++}s.attributes=$,s.attributesNum=Z,s.index=H}function _(){const S=s.newAttributes;for(let D=0,B=S.length;D=0){let pe=$[te];if(pe===void 0&&(te==="instanceMatrix"&&S.instanceMatrix&&(pe=S.instanceMatrix),te==="instanceColor"&&S.instanceColor&&(pe=S.instanceColor)),pe!==void 0){const ve=pe.normalized,re=pe.itemSize,xe=e.get(pe);if(xe===void 0)continue;const ze=xe.buffer,se=xe.type,ge=xe.bytesPerElement,be=se===n.INT||se===n.UNSIGNED_INT||pe.gpuType===ph;if(pe.isInterleavedBufferAttribute){const W=pe.data,ae=W.stride,ue=pe.offset;if(W.isInstancedInterleavedBuffer){for(let le=0;le0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="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),y=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),x=n.getParameter(n.MAX_VARYING_VECTORS),v=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),E=p>0,T=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:_,maxCubemapSize:g,maxAttributes:m,maxVertexUniforms:y,maxVaryings:x,maxFragmentUniforms:v,vertexTextures:E,maxSamples:T}}function fO(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Xr,a=new Qe,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||r;return r=h,i=f.length,d},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!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(!r||p===null||p.length===0||s&&!g)s?u(null):c();else{const y=s?0:i,x=y*4;let v=m.clippingState||null;l.value=v,v=u(p,h,x,d);for(let E=0;E!==x;++E)v[E]=t[E];m.clippingState=v,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=y}};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,y=h.matrixWorldInverse;a.getNormalMatrix(y),(g===null||g.length0){const c=new WS(l.height);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",r),t(c.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}const Yo=4,T0=[.125,.215,.35,.446,.526,.582],Gs=20,Qd=new Wh,w0=new Te;let ep=null,tp=0,np=0,ip=!1;const Vs=(1+Math.sqrt(5))/2,Bo=1/Vs,A0=[new F(-Vs,Bo,0),new F(Vs,Bo,0),new F(-Bo,0,Vs),new F(Bo,0,Vs),new F(0,Vs,-Bo),new F(0,Vs,Bo),new F(-1,1,-1),new F(1,1,-1),new F(-1,1,1),new F(1,1,1)],dO=new F;class Jp{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,r=100,s={}){const{size:o=256,position:a=dO}=s;ep=this._renderer.getRenderTarget(),tp=this._renderer.getActiveCubeFace(),np=this._renderer.getActiveMipmapLevel(),ip=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,i,r,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=P0(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=R0(),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?v:0,v,v),f.setRenderTarget(r),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,r=e.mapping===Mr||e.mapping===ns;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=P0()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=R0());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new zt(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;gu(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,Qd)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;sGs&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${Gs}`);const m=[];let y=0;for(let M=0;Mx-Yo?r-x+Yo:0),T=4*(this._cubeSize-v);gu(t,E,T,3*v,2*v),l.setRenderTarget(t),l.render(f,Qd)}}function pO(n){const e=[],t=[],i=[];let r=n;const s=n-Yo+1+T0.length;for(let o=0;on-Yo?l=T0[o-n+Yo-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,y=new Float32Array(_*p*d),x=new Float32Array(g*p*d),v=new Float32Array(m*p*d);for(let T=0;T2?0:-1,b=[M,P,0,M+2/3,P,0,M+2/3,P+1,0,M,P,0,M+2/3,P+1,0,M,P+1,0];y.set(b,_*p*T),x.set(h,g*p*T);const S=[T,T,T,T,T,T];v.set(S,m*p*T)}const E=new rt;E.setAttribute("position",new Et(y,_)),E.setAttribute("uv",new Et(x,g)),E.setAttribute("faceIndex",new Et(v,m)),e.push(E),r>Yo&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function C0(n,e,t){const i=new Yi(n,e,t);return i.texture.mapping=ga,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function gu(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function mO(n,e,t){const i=new Float32Array(Gs),r=new F(0,1,0);return new Ci({name:"SphericalGaussianBlur",defines:{n:Gs,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:r}},vertexShader:$g(),fragmentShader:` precision mediump float; precision mediump int; @@ -3648,7 +3648,7 @@ void main() { } } - `,blending:xr,depthTest:!1,depthWrite:!1})}function P0(){return new Ri({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:qg(),fragmentShader:` + `,blending:yr,depthTest:!1,depthWrite:!1})}function R0(){return new Ci({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:$g(),fragmentShader:` precision mediump float; precision mediump int; @@ -3667,7 +3667,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:xr,depthTest:!1,depthWrite:!1})}function I0(){return new Ri({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:qg(),fragmentShader:` + `,blending:yr,depthTest:!1,depthWrite:!1})}function P0(){return new Ci({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:$g(),fragmentShader:` precision mediump float; precision mediump int; @@ -3683,7 +3683,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:xr,depthTest:!1,depthWrite:!1})}function qg(){return` + `,blending:yr,depthTest:!1,depthWrite:!1})}function $g(){return` precision mediump float; precision mediump int; @@ -3738,17 +3738,17 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function _O(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===Al||l===Cl,u=l===Er||l===ns;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 Jp(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&&r(d)?(t===null&&(t=new Jp(n)),f=c?t.fromEquirectangular(a):t.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",s),f.texture):null}}}return a}function r(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(E=Math.ceil(v/e.maxTextureSize),v=e.maxTextureSize);const T=new Float32Array(v*E*4*f),M=new oc(T,v,E,f);M.type=Xn,M.needsUpdate=!0;const P=x*4;for(let S=0;S0)return n;const r=e*t;let s=D0[r];if(s===void 0&&(s=new Float32Array(r),D0[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Zt(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t0||u&&d&&r(d)?(t===null&&(t=new Jp(n)),f=c?t.fromEquirectangular(a):t.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",s),f.texture):null}}}return a}function r(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(E=Math.ceil(v/e.maxTextureSize),v=e.maxTextureSize);const T=new Float32Array(v*E*4*f),M=new oc(T,v,E,f);M.type=Wn,M.needsUpdate=!0;const P=x*4;for(let S=0;S0)return n;const r=e*t;let s=L0[r];if(s===void 0&&(s=new Float32Array(r),L0[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Zt(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` -`)}const z0=new Qe;function _2(n){at._getMatrix(z0,at.workingColorSpace,n);const e=`mat3( ${z0.elements.map(t=>t.toFixed(4))} )`;switch(at.getTransfer(n)){case Dl:return[e,"LinearTransferOETF"];case bt:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",n),[e,"LinearTransferOETF"]}}function V0(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` +`)}const k0=new Qe;function g2(n){at._getMatrix(k0,at.workingColorSpace,n);const e=`mat3( ${k0.elements.map(t=>t.toFixed(4))} )`;switch(at.getTransfer(n)){case Dl:return[e,"LinearTransferOETF"];case bt:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",n),[e,"LinearTransferOETF"]}}function V0(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` `+r+` -`+g2(n.getShaderSource(e),o)}else return r}function v2(n,e){const t=_2(e);return[`vec4 ${n}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(` -`)}function y2(n,e){let t;switch(e){case vS:t="Linear";break;case yS:t="Reinhard";break;case xS:t="Cineon";break;case hh:t="ACESFilmic";break;case SS:t="AgX";break;case MS:t="Neutral";break;case bS:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const _u=new F;function x2(){at.getLuminanceCoefficients(_u);const n=_u.x.toFixed(4),e=_u.y.toFixed(4),t=_u.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${n}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` -`)}function b2(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Wa).join(` -`)}function S2(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` -`)}function M2(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r/gm;function Qp(n){return n.replace(E2,w2)}const T2=new Map;function w2(n,e){let t=it[e];if(t===void 0){const i=T2.get(e);if(i!==void 0)t=it[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 Qp(t)}const A2=/#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 W0(n){return n.replace(A2,C2)}function C2(n,e,t,i){let r="";for(let s=parseInt(e);s/gm;function Qp(n){return n.replace(M2,T2)}const E2=new Map;function T2(n,e){let t=it[e];if(t===void 0){const i=E2.get(e);if(i!==void 0)t=it[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 Qp(t)}const w2=/#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 G0(n){return n.replace(w2,A2)}function A2(n,e,t,i){let r="";for(let s=parseInt(e);s0&&(g+=` `),m=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p].filter(Wa).join(` `),m.length>0&&(m+=` -`)):(g=[X0(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=[W0(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(Wa).join(` -`),m=[X0(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!==Wi?"#define TONE_MAPPING":"",t.toneMapping!==Wi?it.tonemapping_pars_fragment:"",t.toneMapping!==Wi?y2("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",it.colorspace_pars_fragment,v2("linearToOutputTexel",t.outputColorSpace),x2(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`),m=[W0(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!==Gi?"#define TONE_MAPPING":"",t.toneMapping!==Gi?it.tonemapping_pars_fragment:"",t.toneMapping!==Gi?v2("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",it.colorspace_pars_fragment,_2("linearToOutputTexel",t.outputColorSpace),y2(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` `].filter(Wa).join(` -`)),o=Qp(o),o=H0(o,t),o=G0(o,t),a=Qp(a),a=H0(a,t),a=G0(a,t),o=W0(o),a=W0(a),t.isRawShaderMaterial!==!0&&(y=`#version 300 es +`)),o=Qp(o),o=z0(o,t),o=H0(o,t),a=Qp(a),a=z0(a,t),a=H0(a,t),o=G0(o),a=G0(a),t.isRawShaderMaterial!==!0&&(y=`#version 300 es `,g=[d,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` `+g,m=["#define varying in",t.glslVersion===Wp?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Wp?"":"#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 x=y+g+o,v=y+m+a,E=k0(r,r.VERTEX_SHADER,x),T=k0(r,r.FRAGMENT_SHADER,v);r.attachShader(_,E),r.attachShader(_,T),t.index0AttributeName!==void 0?r.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_);function M(D){if(n.debug.checkShaderErrors){const B=r.getProgramInfoLog(_).trim(),H=r.getShaderInfoLog(E).trim(),$=r.getShaderInfoLog(T).trim();let ee=!0,Z=!0;if(r.getProgramParameter(_,r.LINK_STATUS)===!1)if(ee=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,_,E,T);else{const te=V0(r,E,"vertex"),Q=V0(r,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+` +`+m);const x=y+g+o,v=y+m+a,E=B0(r,r.VERTEX_SHADER,x),T=B0(r,r.FRAGMENT_SHADER,v);r.attachShader(_,E),r.attachShader(_,T),t.index0AttributeName!==void 0?r.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_);function M(D){if(n.debug.checkShaderErrors){const B=r.getProgramInfoLog(_).trim(),H=r.getShaderInfoLog(E).trim(),$=r.getShaderInfoLog(T).trim();let ee=!0,Z=!0;if(r.getProgramParameter(_,r.LINK_STATUS)===!1)if(ee=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,_,E,T);else{const te=V0(r,E,"vertex"),Q=V0(r,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+` Material Name: `+D.name+` Material Type: `+D.type+` Program Info Log: `+B+` `+te+` -`+Q)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(H===""||$==="")&&(Z=!1);Z&&(D.diagnostics={runnable:ee,programLog:B,vertexShader:{log:H,prefix:g},fragmentShader:{log:$,prefix:m}})}r.deleteShader(E),r.deleteShader(T),P=new Fu(r,_),b=M2(r,_)}let P;this.getUniforms=function(){return P===void 0&&M(this),P};let b;this.getAttributes=function(){return b===void 0&&M(this),b};let S=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=r.getProgramParameter(_,p2)),S},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=m2++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=E,this.fragmentShader=T,this}let N2=0;class U2{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.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 F2(e),t.set(e,i)),i}}class F2{constructor(e){this.id=N2++,this.code=e,this.usedTimes=0}}function B2(n,e,t,i,r,s,o){const a=new Mh,l=new U2,c=new Set,u=[],f=r.logarithmicDepthBuffer,h=r.vertexTextures;let d=r.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 _(b){return c.add(b),b===0?"uv":`uv${b}`}function g(b,S,D,B,H){const $=B.fog,ee=H.geometry,Z=b.isMeshStandardMaterial?B.environment:null,te=(b.isMeshStandardMaterial?t:e).get(b.envMap||Z),Q=te&&te.mapping===ga?te.image.height:null,pe=p[b.type];b.precision!==null&&(d=r.getMaxPrecision(b.precision),d!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",d,"instead."));const ve=ee.morphAttributes.position||ee.morphAttributes.normal||ee.morphAttributes.color,re=ve!==void 0?ve.length:0;let xe=0;ee.morphAttributes.position!==void 0&&(xe=1),ee.morphAttributes.normal!==void 0&&(xe=2),ee.morphAttributes.color!==void 0&&(xe=3);let Ve,se,ge,be;if(pe){const xt=Si[pe];Ve=xt.vertexShader,se=xt.fragmentShader}else Ve=b.vertexShader,se=b.fragmentShader,l.update(b),ge=l.getVertexShaderID(b),be=l.getFragmentShaderID(b);const W=n.getRenderTarget(),ae=n.state.buffers.depth.getReversed(),ue=H.isInstancedMesh===!0,le=H.isBatchedMesh===!0,De=!!b.map,I=!!b.matcap,L=!!te,w=!!b.aoMap,j=!!b.lightMap,G=!!b.bumpMap,q=!!b.normalMap,R=!!b.displacementMap,N=!!b.emissiveMap,z=!!b.metalnessMap,A=!!b.roughnessMap,C=b.anisotropy>0,k=b.clearcoat>0,U=b.dispersion>0,V=b.iridescence>0,Y=b.sheen>0,he=b.transmission>0,ce=C&&!!b.anisotropyMap,ye=k&&!!b.clearcoatMap,Ue=k&&!!b.clearcoatNormalMap,me=k&&!!b.clearcoatRoughnessMap,Ee=V&&!!b.iridescenceMap,Be=V&&!!b.iridescenceThicknessMap,Ge=Y&&!!b.sheenColorMap,Se=Y&&!!b.sheenRoughnessMap,Ye=!!b.specularMap,Je=!!b.specularColorMap,At=!!b.specularIntensityMap,X=he&&!!b.transmissionMap,we=he&&!!b.thicknessMap,oe=!!b.gradientMap,de=!!b.alphaMap,Pe=b.alphaTest>0,Re=!!b.alphaHash,tt=!!b.extensions;let Nt=Wi;b.toneMapped&&(W===null||W.isXRRenderTarget===!0)&&(Nt=n.toneMapping);const un={shaderID:pe,shaderType:b.type,shaderName:b.name,vertexShader:Ve,fragmentShader:se,defines:b.defines,customVertexShaderID:ge,customFragmentShaderID:be,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:d,batching:le,batchingColor:le&&H._colorsTexture!==null,instancing:ue,instancingColor:ue&&H.instanceColor!==null,instancingMorph:ue&&H.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:W===null?n.outputColorSpace:W.isXRRenderTarget===!0?W.texture.colorSpace:lo,alphaToCoverage:!!b.alphaToCoverage,map:De,matcap:I,envMap:L,envMapMode:L&&te.mapping,envMapCubeUVHeight:Q,aoMap:w,lightMap:j,bumpMap:G,normalMap:q,displacementMap:h&&R,emissiveMap:N,normalMapObjectSpace:q&&b.normalMapType===PS,normalMapTangentSpace:q&&b.normalMapType===us,metalnessMap:z,roughnessMap:A,anisotropy:C,anisotropyMap:ce,clearcoat:k,clearcoatMap:ye,clearcoatNormalMap:Ue,clearcoatRoughnessMap:me,dispersion:U,iridescence:V,iridescenceMap:Ee,iridescenceThicknessMap:Be,sheen:Y,sheenColorMap:Ge,sheenRoughnessMap:Se,specularMap:Ye,specularColorMap:Je,specularIntensityMap:At,transmission:he,transmissionMap:X,thicknessMap:we,gradientMap:oe,opaque:b.transparent===!1&&b.blending===Js&&b.alphaToCoverage===!1,alphaMap:de,alphaTest:Pe,alphaHash:Re,combine:b.combine,mapUv:De&&_(b.map.channel),aoMapUv:w&&_(b.aoMap.channel),lightMapUv:j&&_(b.lightMap.channel),bumpMapUv:G&&_(b.bumpMap.channel),normalMapUv:q&&_(b.normalMap.channel),displacementMapUv:R&&_(b.displacementMap.channel),emissiveMapUv:N&&_(b.emissiveMap.channel),metalnessMapUv:z&&_(b.metalnessMap.channel),roughnessMapUv:A&&_(b.roughnessMap.channel),anisotropyMapUv:ce&&_(b.anisotropyMap.channel),clearcoatMapUv:ye&&_(b.clearcoatMap.channel),clearcoatNormalMapUv:Ue&&_(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:me&&_(b.clearcoatRoughnessMap.channel),iridescenceMapUv:Ee&&_(b.iridescenceMap.channel),iridescenceThicknessMapUv:Be&&_(b.iridescenceThicknessMap.channel),sheenColorMapUv:Ge&&_(b.sheenColorMap.channel),sheenRoughnessMapUv:Se&&_(b.sheenRoughnessMap.channel),specularMapUv:Ye&&_(b.specularMap.channel),specularColorMapUv:Je&&_(b.specularColorMap.channel),specularIntensityMapUv:At&&_(b.specularIntensityMap.channel),transmissionMapUv:X&&_(b.transmissionMap.channel),thicknessMapUv:we&&_(b.thicknessMap.channel),alphaMapUv:de&&_(b.alphaMap.channel),vertexTangents:!!ee.attributes.tangent&&(q||C),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!ee.attributes.color&&ee.attributes.color.itemSize===4,pointsUvs:H.isPoints===!0&&!!ee.attributes.uv&&(De||de),fog:!!$,useFog:b.fog===!0,fogExp2:!!$&&$.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:ae,skinning:H.isSkinnedMesh===!0,morphTargets:ee.morphAttributes.position!==void 0,morphNormals:ee.morphAttributes.normal!==void 0,morphColors:ee.morphAttributes.color!==void 0,morphTargetsCount:re,morphTextureStride:xe,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:n.shadowMap.enabled&&D.length>0,shadowMapType:n.shadowMap.type,toneMapping:Nt,decodeVideoTexture:De&&b.map.isVideoTexture===!0&&at.getTransfer(b.map.colorSpace)===bt,decodeVideoTextureEmissive:N&&b.emissiveMap.isVideoTexture===!0&&at.getTransfer(b.emissiveMap.colorSpace)===bt,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===Mi,flipSided:b.side===Ln,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionClipCullDistance:tt&&b.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(tt&&b.extensions.multiDraw===!0||le)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return un.vertexUv1s=c.has(1),un.vertexUv2s=c.has(2),un.vertexUv3s=c.has(3),c.clear(),un}function m(b){const S=[];if(b.shaderID?S.push(b.shaderID):(S.push(b.customVertexShaderID),S.push(b.customFragmentShaderID)),b.defines!==void 0)for(const D in b.defines)S.push(D),S.push(b.defines[D]);return b.isRawShaderMaterial===!1&&(y(S,b),x(S,b),S.push(n.outputColorSpace)),S.push(b.customProgramCacheKey),S.join()}function y(b,S){b.push(S.precision),b.push(S.outputColorSpace),b.push(S.envMapMode),b.push(S.envMapCubeUVHeight),b.push(S.mapUv),b.push(S.alphaMapUv),b.push(S.lightMapUv),b.push(S.aoMapUv),b.push(S.bumpMapUv),b.push(S.normalMapUv),b.push(S.displacementMapUv),b.push(S.emissiveMapUv),b.push(S.metalnessMapUv),b.push(S.roughnessMapUv),b.push(S.anisotropyMapUv),b.push(S.clearcoatMapUv),b.push(S.clearcoatNormalMapUv),b.push(S.clearcoatRoughnessMapUv),b.push(S.iridescenceMapUv),b.push(S.iridescenceThicknessMapUv),b.push(S.sheenColorMapUv),b.push(S.sheenRoughnessMapUv),b.push(S.specularMapUv),b.push(S.specularColorMapUv),b.push(S.specularIntensityMapUv),b.push(S.transmissionMapUv),b.push(S.thicknessMapUv),b.push(S.combine),b.push(S.fogExp2),b.push(S.sizeAttenuation),b.push(S.morphTargetsCount),b.push(S.morphAttributeCount),b.push(S.numDirLights),b.push(S.numPointLights),b.push(S.numSpotLights),b.push(S.numSpotLightMaps),b.push(S.numHemiLights),b.push(S.numRectAreaLights),b.push(S.numDirLightShadows),b.push(S.numPointLightShadows),b.push(S.numSpotLightShadows),b.push(S.numSpotLightShadowsWithMaps),b.push(S.numLightProbes),b.push(S.shadowMapType),b.push(S.toneMapping),b.push(S.numClippingPlanes),b.push(S.numClipIntersection),b.push(S.depthPacking)}function x(b,S){a.disableAll(),S.supportsVertexTextures&&a.enable(0),S.instancing&&a.enable(1),S.instancingColor&&a.enable(2),S.instancingMorph&&a.enable(3),S.matcap&&a.enable(4),S.envMap&&a.enable(5),S.normalMapObjectSpace&&a.enable(6),S.normalMapTangentSpace&&a.enable(7),S.clearcoat&&a.enable(8),S.iridescence&&a.enable(9),S.alphaTest&&a.enable(10),S.vertexColors&&a.enable(11),S.vertexAlphas&&a.enable(12),S.vertexUv1s&&a.enable(13),S.vertexUv2s&&a.enable(14),S.vertexUv3s&&a.enable(15),S.vertexTangents&&a.enable(16),S.anisotropy&&a.enable(17),S.alphaHash&&a.enable(18),S.batching&&a.enable(19),S.dispersion&&a.enable(20),S.batchingColor&&a.enable(21),b.push(a.mask),a.disableAll(),S.fog&&a.enable(0),S.useFog&&a.enable(1),S.flatShading&&a.enable(2),S.logarithmicDepthBuffer&&a.enable(3),S.reverseDepthBuffer&&a.enable(4),S.skinning&&a.enable(5),S.morphTargets&&a.enable(6),S.morphNormals&&a.enable(7),S.morphColors&&a.enable(8),S.premultipliedAlpha&&a.enable(9),S.shadowMapEnabled&&a.enable(10),S.doubleSided&&a.enable(11),S.flipSided&&a.enable(12),S.useDepthPacking&&a.enable(13),S.dithering&&a.enable(14),S.transmission&&a.enable(15),S.sheen&&a.enable(16),S.opaque&&a.enable(17),S.pointsUvs&&a.enable(18),S.decodeVideoTexture&&a.enable(19),S.decodeVideoTextureEmissive&&a.enable(20),S.alphaToCoverage&&a.enable(21),b.push(a.mask)}function v(b){const S=p[b.type];let D;if(S){const B=Si[S];D=GS.clone(B.uniforms)}else D=b.uniforms;return D}function E(b,S){let D;for(let B=0,H=u.length;B0?i.push(m):d.transparent===!0?r.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?r.unshift(m):t.unshift(m)}function c(f,h){t.length>1&&t.sort(f||z2),i.length>1&&i.sort(h||$0),r.length>1&&r.sort(h||$0)}function u(){for(let f=e,h=n.length;f=s.length?(o=new q0,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function H2(){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 F,color:new Te};break;case"SpotLight":t={position:new F,direction:new F,color:new Te,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new F,color:new Te,distance:0,decay:0};break;case"HemisphereLight":t={direction:new F,skyColor:new Te,groundColor:new Te};break;case"RectAreaLight":t={color:new Te,position:new F,halfWidth:new F,halfHeight:new F};break}return n[e.id]=t,t}}}function G2(){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 W2=0;function X2(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function $2(n){const e=new H2,t=G2(),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 F);const r=new F,s=new We,o=new We;function a(c){let u=0,f=0,h=0;for(let b=0;b<9;b++)i.probe[b].set(0,0,0);let d=0,p=0,_=0,g=0,m=0,y=0,x=0,v=0,E=0,T=0,M=0;c.sort(X2);for(let b=0,S=c.length;b0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Me.LTC_FLOAT_1,i.rectAreaLTC2=Me.LTC_FLOAT_2):(i.rectAreaLTC1=Me.LTC_HALF_1,i.rectAreaLTC2=Me.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!==y||P.numPointShadows!==x||P.numSpotShadows!==v||P.numSpotMaps!==E||P.numLightProbes!==M)&&(i.directional.length=d,i.spot.length=_,i.rectArea.length=g,i.point.length=p,i.hemi.length=m,i.directionalShadow.length=y,i.directionalShadowMap.length=y,i.pointShadow.length=x,i.pointShadowMap.length=x,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=y,i.pointShadowMatrix.length=x,i.spotLightMatrix.length=v+E-T,i.spotLightMap.length=E,i.numSpotLightShadowsWithMaps=T,i.numLightProbes=M,P.directionalLength=d,P.pointLength=p,P.spotLength=_,P.rectAreaLength=g,P.hemiLength=m,P.numDirectionalShadows=y,P.numPointShadows=x,P.numSpotShadows=v,P.numSpotMaps=E,P.numLightProbes=M,i.version=W2++)}function l(c,u){let f=0,h=0,d=0,p=0,_=0;const g=u.matrixWorldInverse;for(let m=0,y=c.length;m=o.length?(a=new Y0(n),o.push(a)):a=o[s],a}function i(){e=new WeakMap}return{get:t,dispose:i}}const Y2=`void main() { +`+Q)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(H===""||$==="")&&(Z=!1);Z&&(D.diagnostics={runnable:ee,programLog:B,vertexShader:{log:H,prefix:g},fragmentShader:{log:$,prefix:m}})}r.deleteShader(E),r.deleteShader(T),P=new Fu(r,_),b=S2(r,_)}let P;this.getUniforms=function(){return P===void 0&&M(this),P};let b;this.getAttributes=function(){return b===void 0&&M(this),b};let S=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=r.getProgramParameter(_,d2)),S},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=p2++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=E,this.fragmentShader=T,this}let O2=0;class N2{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.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 U2(e),t.set(e,i)),i}}class U2{constructor(e){this.id=O2++,this.code=e,this.usedTimes=0}}function F2(n,e,t,i,r,s,o){const a=new Mh,l=new N2,c=new Set,u=[],f=r.logarithmicDepthBuffer,h=r.vertexTextures;let d=r.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 _(b){return c.add(b),b===0?"uv":`uv${b}`}function g(b,S,D,B,H){const $=B.fog,ee=H.geometry,Z=b.isMeshStandardMaterial?B.environment:null,te=(b.isMeshStandardMaterial?t:e).get(b.envMap||Z),Q=te&&te.mapping===ga?te.image.height:null,pe=p[b.type];b.precision!==null&&(d=r.getMaxPrecision(b.precision),d!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",d,"instead."));const ve=ee.morphAttributes.position||ee.morphAttributes.normal||ee.morphAttributes.color,re=ve!==void 0?ve.length:0;let xe=0;ee.morphAttributes.position!==void 0&&(xe=1),ee.morphAttributes.normal!==void 0&&(xe=2),ee.morphAttributes.color!==void 0&&(xe=3);let ze,se,ge,be;if(pe){const xt=bi[pe];ze=xt.vertexShader,se=xt.fragmentShader}else ze=b.vertexShader,se=b.fragmentShader,l.update(b),ge=l.getVertexShaderID(b),be=l.getFragmentShaderID(b);const W=n.getRenderTarget(),ae=n.state.buffers.depth.getReversed(),ue=H.isInstancedMesh===!0,le=H.isBatchedMesh===!0,De=!!b.map,I=!!b.matcap,L=!!te,w=!!b.aoMap,j=!!b.lightMap,G=!!b.bumpMap,q=!!b.normalMap,R=!!b.displacementMap,N=!!b.emissiveMap,V=!!b.metalnessMap,A=!!b.roughnessMap,C=b.anisotropy>0,k=b.clearcoat>0,U=b.dispersion>0,z=b.iridescence>0,Y=b.sheen>0,he=b.transmission>0,ce=C&&!!b.anisotropyMap,ye=k&&!!b.clearcoatMap,Ue=k&&!!b.clearcoatNormalMap,me=k&&!!b.clearcoatRoughnessMap,Ee=z&&!!b.iridescenceMap,Be=z&&!!b.iridescenceThicknessMap,Ge=Y&&!!b.sheenColorMap,Se=Y&&!!b.sheenRoughnessMap,Ye=!!b.specularMap,Je=!!b.specularColorMap,At=!!b.specularIntensityMap,X=he&&!!b.transmissionMap,we=he&&!!b.thicknessMap,oe=!!b.gradientMap,de=!!b.alphaMap,Pe=b.alphaTest>0,Re=!!b.alphaHash,tt=!!b.extensions;let Nt=Gi;b.toneMapped&&(W===null||W.isXRRenderTarget===!0)&&(Nt=n.toneMapping);const un={shaderID:pe,shaderType:b.type,shaderName:b.name,vertexShader:ze,fragmentShader:se,defines:b.defines,customVertexShaderID:ge,customFragmentShaderID:be,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:d,batching:le,batchingColor:le&&H._colorsTexture!==null,instancing:ue,instancingColor:ue&&H.instanceColor!==null,instancingMorph:ue&&H.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:W===null?n.outputColorSpace:W.isXRRenderTarget===!0?W.texture.colorSpace:lo,alphaToCoverage:!!b.alphaToCoverage,map:De,matcap:I,envMap:L,envMapMode:L&&te.mapping,envMapCubeUVHeight:Q,aoMap:w,lightMap:j,bumpMap:G,normalMap:q,displacementMap:h&&R,emissiveMap:N,normalMapObjectSpace:q&&b.normalMapType===RS,normalMapTangentSpace:q&&b.normalMapType===us,metalnessMap:V,roughnessMap:A,anisotropy:C,anisotropyMap:ce,clearcoat:k,clearcoatMap:ye,clearcoatNormalMap:Ue,clearcoatRoughnessMap:me,dispersion:U,iridescence:z,iridescenceMap:Ee,iridescenceThicknessMap:Be,sheen:Y,sheenColorMap:Ge,sheenRoughnessMap:Se,specularMap:Ye,specularColorMap:Je,specularIntensityMap:At,transmission:he,transmissionMap:X,thicknessMap:we,gradientMap:oe,opaque:b.transparent===!1&&b.blending===Js&&b.alphaToCoverage===!1,alphaMap:de,alphaTest:Pe,alphaHash:Re,combine:b.combine,mapUv:De&&_(b.map.channel),aoMapUv:w&&_(b.aoMap.channel),lightMapUv:j&&_(b.lightMap.channel),bumpMapUv:G&&_(b.bumpMap.channel),normalMapUv:q&&_(b.normalMap.channel),displacementMapUv:R&&_(b.displacementMap.channel),emissiveMapUv:N&&_(b.emissiveMap.channel),metalnessMapUv:V&&_(b.metalnessMap.channel),roughnessMapUv:A&&_(b.roughnessMap.channel),anisotropyMapUv:ce&&_(b.anisotropyMap.channel),clearcoatMapUv:ye&&_(b.clearcoatMap.channel),clearcoatNormalMapUv:Ue&&_(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:me&&_(b.clearcoatRoughnessMap.channel),iridescenceMapUv:Ee&&_(b.iridescenceMap.channel),iridescenceThicknessMapUv:Be&&_(b.iridescenceThicknessMap.channel),sheenColorMapUv:Ge&&_(b.sheenColorMap.channel),sheenRoughnessMapUv:Se&&_(b.sheenRoughnessMap.channel),specularMapUv:Ye&&_(b.specularMap.channel),specularColorMapUv:Je&&_(b.specularColorMap.channel),specularIntensityMapUv:At&&_(b.specularIntensityMap.channel),transmissionMapUv:X&&_(b.transmissionMap.channel),thicknessMapUv:we&&_(b.thicknessMap.channel),alphaMapUv:de&&_(b.alphaMap.channel),vertexTangents:!!ee.attributes.tangent&&(q||C),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!ee.attributes.color&&ee.attributes.color.itemSize===4,pointsUvs:H.isPoints===!0&&!!ee.attributes.uv&&(De||de),fog:!!$,useFog:b.fog===!0,fogExp2:!!$&&$.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:ae,skinning:H.isSkinnedMesh===!0,morphTargets:ee.morphAttributes.position!==void 0,morphNormals:ee.morphAttributes.normal!==void 0,morphColors:ee.morphAttributes.color!==void 0,morphTargetsCount:re,morphTextureStride:xe,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:n.shadowMap.enabled&&D.length>0,shadowMapType:n.shadowMap.type,toneMapping:Nt,decodeVideoTexture:De&&b.map.isVideoTexture===!0&&at.getTransfer(b.map.colorSpace)===bt,decodeVideoTextureEmissive:N&&b.emissiveMap.isVideoTexture===!0&&at.getTransfer(b.emissiveMap.colorSpace)===bt,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===Si,flipSided:b.side===Ln,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionClipCullDistance:tt&&b.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(tt&&b.extensions.multiDraw===!0||le)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return un.vertexUv1s=c.has(1),un.vertexUv2s=c.has(2),un.vertexUv3s=c.has(3),c.clear(),un}function m(b){const S=[];if(b.shaderID?S.push(b.shaderID):(S.push(b.customVertexShaderID),S.push(b.customFragmentShaderID)),b.defines!==void 0)for(const D in b.defines)S.push(D),S.push(b.defines[D]);return b.isRawShaderMaterial===!1&&(y(S,b),x(S,b),S.push(n.outputColorSpace)),S.push(b.customProgramCacheKey),S.join()}function y(b,S){b.push(S.precision),b.push(S.outputColorSpace),b.push(S.envMapMode),b.push(S.envMapCubeUVHeight),b.push(S.mapUv),b.push(S.alphaMapUv),b.push(S.lightMapUv),b.push(S.aoMapUv),b.push(S.bumpMapUv),b.push(S.normalMapUv),b.push(S.displacementMapUv),b.push(S.emissiveMapUv),b.push(S.metalnessMapUv),b.push(S.roughnessMapUv),b.push(S.anisotropyMapUv),b.push(S.clearcoatMapUv),b.push(S.clearcoatNormalMapUv),b.push(S.clearcoatRoughnessMapUv),b.push(S.iridescenceMapUv),b.push(S.iridescenceThicknessMapUv),b.push(S.sheenColorMapUv),b.push(S.sheenRoughnessMapUv),b.push(S.specularMapUv),b.push(S.specularColorMapUv),b.push(S.specularIntensityMapUv),b.push(S.transmissionMapUv),b.push(S.thicknessMapUv),b.push(S.combine),b.push(S.fogExp2),b.push(S.sizeAttenuation),b.push(S.morphTargetsCount),b.push(S.morphAttributeCount),b.push(S.numDirLights),b.push(S.numPointLights),b.push(S.numSpotLights),b.push(S.numSpotLightMaps),b.push(S.numHemiLights),b.push(S.numRectAreaLights),b.push(S.numDirLightShadows),b.push(S.numPointLightShadows),b.push(S.numSpotLightShadows),b.push(S.numSpotLightShadowsWithMaps),b.push(S.numLightProbes),b.push(S.shadowMapType),b.push(S.toneMapping),b.push(S.numClippingPlanes),b.push(S.numClipIntersection),b.push(S.depthPacking)}function x(b,S){a.disableAll(),S.supportsVertexTextures&&a.enable(0),S.instancing&&a.enable(1),S.instancingColor&&a.enable(2),S.instancingMorph&&a.enable(3),S.matcap&&a.enable(4),S.envMap&&a.enable(5),S.normalMapObjectSpace&&a.enable(6),S.normalMapTangentSpace&&a.enable(7),S.clearcoat&&a.enable(8),S.iridescence&&a.enable(9),S.alphaTest&&a.enable(10),S.vertexColors&&a.enable(11),S.vertexAlphas&&a.enable(12),S.vertexUv1s&&a.enable(13),S.vertexUv2s&&a.enable(14),S.vertexUv3s&&a.enable(15),S.vertexTangents&&a.enable(16),S.anisotropy&&a.enable(17),S.alphaHash&&a.enable(18),S.batching&&a.enable(19),S.dispersion&&a.enable(20),S.batchingColor&&a.enable(21),b.push(a.mask),a.disableAll(),S.fog&&a.enable(0),S.useFog&&a.enable(1),S.flatShading&&a.enable(2),S.logarithmicDepthBuffer&&a.enable(3),S.reverseDepthBuffer&&a.enable(4),S.skinning&&a.enable(5),S.morphTargets&&a.enable(6),S.morphNormals&&a.enable(7),S.morphColors&&a.enable(8),S.premultipliedAlpha&&a.enable(9),S.shadowMapEnabled&&a.enable(10),S.doubleSided&&a.enable(11),S.flipSided&&a.enable(12),S.useDepthPacking&&a.enable(13),S.dithering&&a.enable(14),S.transmission&&a.enable(15),S.sheen&&a.enable(16),S.opaque&&a.enable(17),S.pointsUvs&&a.enable(18),S.decodeVideoTexture&&a.enable(19),S.decodeVideoTextureEmissive&&a.enable(20),S.alphaToCoverage&&a.enable(21),b.push(a.mask)}function v(b){const S=p[b.type];let D;if(S){const B=bi[S];D=HS.clone(B.uniforms)}else D=b.uniforms;return D}function E(b,S){let D;for(let B=0,H=u.length;B0?i.push(m):d.transparent===!0?r.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?r.unshift(m):t.unshift(m)}function c(f,h){t.length>1&&t.sort(f||k2),i.length>1&&i.sort(h||X0),r.length>1&&r.sort(h||X0)}function u(){for(let f=e,h=n.length;f=s.length?(o=new $0,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function z2(){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 F,color:new Te};break;case"SpotLight":t={position:new F,direction:new F,color:new Te,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new F,color:new Te,distance:0,decay:0};break;case"HemisphereLight":t={direction:new F,skyColor:new Te,groundColor:new Te};break;case"RectAreaLight":t={color:new Te,position:new F,halfWidth:new F,halfHeight:new F};break}return n[e.id]=t,t}}}function H2(){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 G2=0;function W2(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function X2(n){const e=new z2,t=H2(),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 F);const r=new F,s=new We,o=new We;function a(c){let u=0,f=0,h=0;for(let b=0;b<9;b++)i.probe[b].set(0,0,0);let d=0,p=0,_=0,g=0,m=0,y=0,x=0,v=0,E=0,T=0,M=0;c.sort(W2);for(let b=0,S=c.length;b0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Me.LTC_FLOAT_1,i.rectAreaLTC2=Me.LTC_FLOAT_2):(i.rectAreaLTC1=Me.LTC_HALF_1,i.rectAreaLTC2=Me.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!==y||P.numPointShadows!==x||P.numSpotShadows!==v||P.numSpotMaps!==E||P.numLightProbes!==M)&&(i.directional.length=d,i.spot.length=_,i.rectArea.length=g,i.point.length=p,i.hemi.length=m,i.directionalShadow.length=y,i.directionalShadowMap.length=y,i.pointShadow.length=x,i.pointShadowMap.length=x,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=y,i.pointShadowMatrix.length=x,i.spotLightMatrix.length=v+E-T,i.spotLightMap.length=E,i.numSpotLightShadowsWithMaps=T,i.numLightProbes=M,P.directionalLength=d,P.pointLength=p,P.spotLength=_,P.rectAreaLength=g,P.hemiLength=m,P.numDirectionalShadows=y,P.numPointShadows=x,P.numSpotShadows=v,P.numSpotMaps=E,P.numLightProbes=M,i.version=G2++)}function l(c,u){let f=0,h=0,d=0,p=0,_=0;const g=u.matrixWorldInverse;for(let m=0,y=c.length;m=o.length?(a=new q0(n),o.push(a)):a=o[s],a}function i(){e=new WeakMap}return{get:t,dispose:i}}const q2=`void main() { gl_Position = vec4( position, 1.0 ); -}`,j2=`uniform sampler2D shadow_pass; +}`,Y2=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3817,12 +3817,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function K2(n,e,t){let i=new cc;const r=new fe,s=new fe,o=new ht,a=new Ng({depthPacking:RS}),l=new Ug,c={},u=t.maxTextureSize,f={[Mr]:Ln,[Ln]:Mr,[Mi]:Mi},h=new Ri({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new fe},radius:{value:4}},vertexShader:Y2,fragmentShader:j2}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const p=new rt;p.setAttribute("position",new Et(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new zt(p,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=og;let m=this.type;this.render=function(T,M,P){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||T.length===0)return;const b=n.getRenderTarget(),S=n.getActiveCubeFace(),D=n.getActiveMipmapLevel(),B=n.state;B.setBlending(xr),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const H=m!==zi&&this.type===zi,$=m===zi&&this.type!==zi;for(let ee=0,Z=T.length;eeu||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/pe.x),r.x=s.x*pe.x,Q.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/pe.y),r.y=s.y*pe.y,Q.mapSize.y=s.y)),Q.map===null||H===!0||$===!0){const re=this.type!==zi?{minFilter:cn,magFilter:cn}:{};Q.map!==null&&Q.map.dispose(),Q.map=new ji(r.x,r.y,re),Q.map.texture.name=te.name+".shadowMap",Q.camera.updateProjectionMatrix()}n.setRenderTarget(Q.map),n.clear();const ve=Q.getViewportCount();for(let re=0;re0||M.map&&M.alphaTest>0){const B=S.uuid,H=M.uuid;let $=c[B];$===void 0&&($={},c[B]=$);let ee=$[H];ee===void 0&&(ee=S.clone(),$[H]=ee,M.addEventListener("dispose",E)),S=ee}if(S.visible=M.visible,S.wireframe=M.wireframe,b===zi?S.side=M.shadowSide!==null?M.shadowSide:M.side:S.side=M.shadowSide!==null?M.shadowSide:f[M.side],S.alphaMap=M.alphaMap,S.alphaTest=M.alphaTest,S.map=M.map,S.clipShadows=M.clipShadows,S.clippingPlanes=M.clippingPlanes,S.clipIntersection=M.clipIntersection,S.displacementMap=M.displacementMap,S.displacementScale=M.displacementScale,S.displacementBias=M.displacementBias,S.wireframeLinewidth=M.wireframeLinewidth,S.linewidth=M.linewidth,P.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const B=n.properties.get(S);B.light=P}return S}function v(T,M,P,b,S){if(T.visible===!1)return;if(T.layers.test(M.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&S===zi)&&(!T.frustumCulled||i.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,T.matrixWorld);const H=e.update(T),$=T.material;if(Array.isArray($)){const ee=H.groups;for(let Z=0,te=ee.length;Z=1):Q.indexOf("OpenGL ES")!==-1&&(te=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),Z=te>=2);let pe=null,ve={};const re=n.getParameter(n.SCISSOR_BOX),xe=n.getParameter(n.VIEWPORT),Ve=new ht().fromArray(re),se=new ht().fromArray(xe);function ge(X,we,oe,de){const Pe=new Uint8Array(4),Re=n.createTexture();n.bindTexture(X,Re),n.texParameteri(X,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(X,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let tt=0;tt"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(A,C){return d?new OffscreenCanvas(A,C):Ul("canvas")}function _(A,C,k){let U=1;const V=z(A);if((V.width>k||V.height>k)&&(U=k/Math.max(V.width,V.height)),U<1)if(typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&A instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&A instanceof ImageBitmap||typeof VideoFrame<"u"&&A instanceof VideoFrame){const Y=Math.floor(U*V.width),he=Math.floor(U*V.height);f===void 0&&(f=p(Y,he));const ce=C?p(Y,he):f;return ce.width=Y,ce.height=he,ce.getContext("2d").drawImage(A,0,0,Y,he),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+V.width+"x"+V.height+") to ("+Y+"x"+he+")."),ce}else return"data"in A&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+V.width+"x"+V.height+")."),A;return A}function g(A){return A.generateMipmaps}function m(A){n.generateMipmap(A)}function y(A){return A.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:A.isWebGL3DRenderTarget?n.TEXTURE_3D:A.isWebGLArrayRenderTarget||A.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function x(A,C,k,U,V=!1){if(A!==null){if(n[A]!==void 0)return n[A];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+A+"'")}let Y=C;if(C===n.RED&&(k===n.FLOAT&&(Y=n.R32F),k===n.HALF_FLOAT&&(Y=n.R16F),k===n.UNSIGNED_BYTE&&(Y=n.R8)),C===n.RED_INTEGER&&(k===n.UNSIGNED_BYTE&&(Y=n.R8UI),k===n.UNSIGNED_SHORT&&(Y=n.R16UI),k===n.UNSIGNED_INT&&(Y=n.R32UI),k===n.BYTE&&(Y=n.R8I),k===n.SHORT&&(Y=n.R16I),k===n.INT&&(Y=n.R32I)),C===n.RG&&(k===n.FLOAT&&(Y=n.RG32F),k===n.HALF_FLOAT&&(Y=n.RG16F),k===n.UNSIGNED_BYTE&&(Y=n.RG8)),C===n.RG_INTEGER&&(k===n.UNSIGNED_BYTE&&(Y=n.RG8UI),k===n.UNSIGNED_SHORT&&(Y=n.RG16UI),k===n.UNSIGNED_INT&&(Y=n.RG32UI),k===n.BYTE&&(Y=n.RG8I),k===n.SHORT&&(Y=n.RG16I),k===n.INT&&(Y=n.RG32I)),C===n.RGB_INTEGER&&(k===n.UNSIGNED_BYTE&&(Y=n.RGB8UI),k===n.UNSIGNED_SHORT&&(Y=n.RGB16UI),k===n.UNSIGNED_INT&&(Y=n.RGB32UI),k===n.BYTE&&(Y=n.RGB8I),k===n.SHORT&&(Y=n.RGB16I),k===n.INT&&(Y=n.RGB32I)),C===n.RGBA_INTEGER&&(k===n.UNSIGNED_BYTE&&(Y=n.RGBA8UI),k===n.UNSIGNED_SHORT&&(Y=n.RGBA16UI),k===n.UNSIGNED_INT&&(Y=n.RGBA32UI),k===n.BYTE&&(Y=n.RGBA8I),k===n.SHORT&&(Y=n.RGBA16I),k===n.INT&&(Y=n.RGBA32I)),C===n.RGB&&k===n.UNSIGNED_INT_5_9_9_9_REV&&(Y=n.RGB9_E5),C===n.RGBA){const he=V?Dl:at.getTransfer(U);k===n.FLOAT&&(Y=n.RGBA32F),k===n.HALF_FLOAT&&(Y=n.RGBA16F),k===n.UNSIGNED_BYTE&&(Y=he===bt?n.SRGB8_ALPHA8:n.RGBA8),k===n.UNSIGNED_SHORT_4_4_4_4&&(Y=n.RGBA4),k===n.UNSIGNED_SHORT_5_5_5_1&&(Y=n.RGB5_A1)}return(Y===n.R16F||Y===n.R32F||Y===n.RG16F||Y===n.RG32F||Y===n.RGBA16F||Y===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Y}function v(A,C){let k;return A?C===null||C===Tr||C===oo?k=n.DEPTH24_STENCIL8:C===Xn?k=n.DEPTH32F_STENCIL8:C===sa&&(k=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):C===null||C===Tr||C===oo?k=n.DEPTH_COMPONENT24:C===Xn?k=n.DEPTH_COMPONENT32F:C===sa&&(k=n.DEPTH_COMPONENT16),k}function E(A,C){return g(A)===!0||A.isFramebufferTexture&&A.minFilter!==cn&&A.minFilter!==Yt?Math.log2(Math.max(C.width,C.height))+1:A.mipmaps!==void 0&&A.mipmaps.length>0?A.mipmaps.length:A.isCompressedTexture&&Array.isArray(A.image)?C.mipmaps.length:1}function T(A){const C=A.target;C.removeEventListener("dispose",T),P(C),C.isVideoTexture&&u.delete(C)}function M(A){const C=A.target;C.removeEventListener("dispose",M),S(C)}function P(A){const C=i.get(A);if(C.__webglInit===void 0)return;const k=A.source,U=h.get(k);if(U){const V=U[C.__cacheKey];V.usedTimes--,V.usedTimes===0&&b(A),Object.keys(U).length===0&&h.delete(k)}i.remove(A)}function b(A){const C=i.get(A);n.deleteTexture(C.__webglTexture);const k=A.source,U=h.get(k);delete U[C.__cacheKey],o.memory.textures--}function S(A){const C=i.get(A);if(A.depthTexture&&(A.depthTexture.dispose(),i.remove(A.depthTexture)),A.isWebGLCubeRenderTarget)for(let U=0;U<6;U++){if(Array.isArray(C.__webglFramebuffer[U]))for(let V=0;V=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+A+" texture units while this GPU supports only "+r.maxTextures),D+=1,A}function $(A){const C=[];return C.push(A.wrapS),C.push(A.wrapT),C.push(A.wrapR||0),C.push(A.magFilter),C.push(A.minFilter),C.push(A.anisotropy),C.push(A.internalFormat),C.push(A.format),C.push(A.type),C.push(A.generateMipmaps),C.push(A.premultiplyAlpha),C.push(A.flipY),C.push(A.unpackAlignment),C.push(A.colorSpace),C.join()}function ee(A,C){const k=i.get(A);if(A.isVideoTexture&&R(A),A.isRenderTargetTexture===!1&&A.version>0&&k.__version!==A.version){const U=A.image;if(U===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(U.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{se(k,A,C);return}}t.bindTexture(n.TEXTURE_2D,k.__webglTexture,n.TEXTURE0+C)}function Z(A,C){const k=i.get(A);if(A.version>0&&k.__version!==A.version){se(k,A,C);return}t.bindTexture(n.TEXTURE_2D_ARRAY,k.__webglTexture,n.TEXTURE0+C)}function te(A,C){const k=i.get(A);if(A.version>0&&k.__version!==A.version){se(k,A,C);return}t.bindTexture(n.TEXTURE_3D,k.__webglTexture,n.TEXTURE0+C)}function Q(A,C){const k=i.get(A);if(A.version>0&&k.__version!==A.version){ge(k,A,C);return}t.bindTexture(n.TEXTURE_CUBE_MAP,k.__webglTexture,n.TEXTURE0+C)}const pe={[Rl]:n.REPEAT,[li]:n.CLAMP_TO_EDGE,[Pl]:n.MIRRORED_REPEAT},ve={[cn]:n.NEAREST,[lg]:n.NEAREST_MIPMAP_NEAREST,[Wo]:n.NEAREST_MIPMAP_LINEAR,[Yt]:n.LINEAR,[Za]:n.LINEAR_MIPMAP_NEAREST,[Hi]:n.LINEAR_MIPMAP_LINEAR},re={[IS]:n.NEVER,[FS]:n.ALWAYS,[LS]:n.LESS,[yg]:n.LEQUAL,[DS]:n.EQUAL,[US]:n.GEQUAL,[OS]:n.GREATER,[NS]:n.NOTEQUAL};function xe(A,C){if(C.type===Xn&&e.has("OES_texture_float_linear")===!1&&(C.magFilter===Yt||C.magFilter===Za||C.magFilter===Wo||C.magFilter===Hi||C.minFilter===Yt||C.minFilter===Za||C.minFilter===Wo||C.minFilter===Hi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(A,n.TEXTURE_WRAP_S,pe[C.wrapS]),n.texParameteri(A,n.TEXTURE_WRAP_T,pe[C.wrapT]),(A===n.TEXTURE_3D||A===n.TEXTURE_2D_ARRAY)&&n.texParameteri(A,n.TEXTURE_WRAP_R,pe[C.wrapR]),n.texParameteri(A,n.TEXTURE_MAG_FILTER,ve[C.magFilter]),n.texParameteri(A,n.TEXTURE_MIN_FILTER,ve[C.minFilter]),C.compareFunction&&(n.texParameteri(A,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(A,n.TEXTURE_COMPARE_FUNC,re[C.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(C.magFilter===cn||C.minFilter!==Wo&&C.minFilter!==Hi||C.type===Xn&&e.has("OES_texture_float_linear")===!1)return;if(C.anisotropy>1||i.get(C).__currentAnisotropy){const k=e.get("EXT_texture_filter_anisotropic");n.texParameterf(A,k.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(C.anisotropy,r.getMaxAnisotropy())),i.get(C).__currentAnisotropy=C.anisotropy}}}function Ve(A,C){let k=!1;A.__webglInit===void 0&&(A.__webglInit=!0,C.addEventListener("dispose",T));const U=C.source;let V=h.get(U);V===void 0&&(V={},h.set(U,V));const Y=$(C);if(Y!==A.__cacheKey){V[Y]===void 0&&(V[Y]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,k=!0),V[Y].usedTimes++;const he=V[A.__cacheKey];he!==void 0&&(V[A.__cacheKey].usedTimes--,he.usedTimes===0&&b(C)),A.__cacheKey=Y,A.__webglTexture=V[Y].texture}return k}function se(A,C,k){let U=n.TEXTURE_2D;(C.isDataArrayTexture||C.isCompressedArrayTexture)&&(U=n.TEXTURE_2D_ARRAY),C.isData3DTexture&&(U=n.TEXTURE_3D);const V=Ve(A,C),Y=C.source;t.bindTexture(U,A.__webglTexture,n.TEXTURE0+k);const he=i.get(Y);if(Y.version!==he.__version||V===!0){t.activeTexture(n.TEXTURE0+k);const ce=at.getPrimaries(at.workingColorSpace),ye=C.colorSpace===dr?null:at.getPrimaries(C.colorSpace),Ue=C.colorSpace===dr||ce===ye?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,C.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,C.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,C.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ue);let me=_(C.image,!1,r.maxTextureSize);me=N(C,me);const Ee=s.convert(C.format,C.colorSpace),Be=s.convert(C.type);let Ge=x(C.internalFormat,Ee,Be,C.colorSpace,C.isVideoTexture);xe(U,C);let Se;const Ye=C.mipmaps,Je=C.isVideoTexture!==!0,At=he.__version===void 0||V===!0,X=Y.dataReady,we=E(C,me);if(C.isDepthTexture)Ge=v(C.format===ao,C.type),At&&(Je?t.texStorage2D(n.TEXTURE_2D,1,Ge,me.width,me.height):t.texImage2D(n.TEXTURE_2D,0,Ge,me.width,me.height,0,Ee,Be,null));else if(C.isDataTexture)if(Ye.length>0){Je&&At&&t.texStorage2D(n.TEXTURE_2D,we,Ge,Ye[0].width,Ye[0].height);for(let oe=0,de=Ye.length;oe0){const Pe=Zp(Se.width,Se.height,C.format,C.type);for(const Re of C.layerUpdates){const tt=Se.data.subarray(Re*Pe/Se.data.BYTES_PER_ELEMENT,(Re+1)*Pe/Se.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,oe,0,0,Re,Se.width,Se.height,1,Ee,tt)}C.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,oe,0,0,0,Se.width,Se.height,me.depth,Ee,Se.data)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,oe,Ge,Se.width,Se.height,me.depth,0,Se.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Je?X&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,oe,0,0,0,Se.width,Se.height,me.depth,Ee,Be,Se.data):t.texImage3D(n.TEXTURE_2D_ARRAY,oe,Ge,Se.width,Se.height,me.depth,0,Ee,Be,Se.data)}else{Je&&At&&t.texStorage2D(n.TEXTURE_2D,we,Ge,Ye[0].width,Ye[0].height);for(let oe=0,de=Ye.length;oe0){const oe=Zp(me.width,me.height,C.format,C.type);for(const de of C.layerUpdates){const Pe=me.data.subarray(de*oe/me.data.BYTES_PER_ELEMENT,(de+1)*oe/me.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,de,me.width,me.height,1,Ee,Be,Pe)}C.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,me.width,me.height,me.depth,Ee,Be,me.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,Ge,me.width,me.height,me.depth,0,Ee,Be,me.data);else if(C.isData3DTexture)Je?(At&&t.texStorage3D(n.TEXTURE_3D,we,Ge,me.width,me.height,me.depth),X&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,me.width,me.height,me.depth,Ee,Be,me.data)):t.texImage3D(n.TEXTURE_3D,0,Ge,me.width,me.height,me.depth,0,Ee,Be,me.data);else if(C.isFramebufferTexture){if(At)if(Je)t.texStorage2D(n.TEXTURE_2D,we,Ge,me.width,me.height);else{let oe=me.width,de=me.height;for(let Pe=0;Pe>=1,de>>=1}}else if(Ye.length>0){if(Je&&At){const oe=z(Ye[0]);t.texStorage2D(n.TEXTURE_2D,we,Ge,oe.width,oe.height)}for(let oe=0,de=Ye.length;oe0&&we++;const de=z(Ee[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,we,Ye,de.width,de.height)}for(let de=0;de<6;de++)if(me){Je?X&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+de,0,0,0,Ee[de].width,Ee[de].height,Ge,Se,Ee[de].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+de,0,Ye,Ee[de].width,Ee[de].height,0,Ge,Se,Ee[de].data);for(let Pe=0;Pe>Y),Be=Math.max(1,C.height>>Y);V===n.TEXTURE_3D||V===n.TEXTURE_2D_ARRAY?t.texImage3D(V,Y,ye,Ee,Be,C.depth,0,he,ce,null):t.texImage2D(V,Y,ye,Ee,Be,0,he,ce,null)}t.bindFramebuffer(n.FRAMEBUFFER,A),q(C)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,U,V,me.__webglTexture,0,G(C)):(V===n.TEXTURE_2D||V>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&V<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,U,V,me.__webglTexture,Y),t.bindFramebuffer(n.FRAMEBUFFER,null)}function W(A,C,k){if(n.bindRenderbuffer(n.RENDERBUFFER,A),C.depthBuffer){const U=C.depthTexture,V=U&&U.isDepthTexture?U.type:null,Y=v(C.stencilBuffer,V),he=C.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ce=G(C);q(C)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,ce,Y,C.width,C.height):k?n.renderbufferStorageMultisample(n.RENDERBUFFER,ce,Y,C.width,C.height):n.renderbufferStorage(n.RENDERBUFFER,Y,C.width,C.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,he,n.RENDERBUFFER,A)}else{const U=C.textures;for(let V=0;V{delete C.__boundDepthTexture,delete C.__depthDisposeCallback,U.removeEventListener("dispose",V)};U.addEventListener("dispose",V),C.__depthDisposeCallback=V}C.__boundDepthTexture=U}if(A.depthTexture&&!C.__autoAllocateDepthBuffer){if(k)throw new Error("target.depthTexture not supported in Cube render targets");ae(C.__webglFramebuffer,A)}else if(k){C.__webglDepthbuffer=[];for(let U=0;U<6;U++)if(t.bindFramebuffer(n.FRAMEBUFFER,C.__webglFramebuffer[U]),C.__webglDepthbuffer[U]===void 0)C.__webglDepthbuffer[U]=n.createRenderbuffer(),W(C.__webglDepthbuffer[U],A,!1);else{const V=A.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Y=C.__webglDepthbuffer[U];n.bindRenderbuffer(n.RENDERBUFFER,Y),n.framebufferRenderbuffer(n.FRAMEBUFFER,V,n.RENDERBUFFER,Y)}}else if(t.bindFramebuffer(n.FRAMEBUFFER,C.__webglFramebuffer),C.__webglDepthbuffer===void 0)C.__webglDepthbuffer=n.createRenderbuffer(),W(C.__webglDepthbuffer,A,!1);else{const U=A.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,V=C.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,V),n.framebufferRenderbuffer(n.FRAMEBUFFER,U,n.RENDERBUFFER,V)}t.bindFramebuffer(n.FRAMEBUFFER,null)}function le(A,C,k){const U=i.get(A);C!==void 0&&be(U.__webglFramebuffer,A,A.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),k!==void 0&&ue(A)}function De(A){const C=A.texture,k=i.get(A),U=i.get(C);A.addEventListener("dispose",M);const V=A.textures,Y=A.isWebGLCubeRenderTarget===!0,he=V.length>1;if(he||(U.__webglTexture===void 0&&(U.__webglTexture=n.createTexture()),U.__version=C.version,o.memory.textures++),Y){k.__webglFramebuffer=[];for(let ce=0;ce<6;ce++)if(C.mipmaps&&C.mipmaps.length>0){k.__webglFramebuffer[ce]=[];for(let ye=0;ye0){k.__webglFramebuffer=[];for(let ce=0;ce0&&q(A)===!1){k.__webglMultisampledFramebuffer=n.createFramebuffer(),k.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,k.__webglMultisampledFramebuffer);for(let ce=0;ce0)for(let ye=0;ye0)for(let ye=0;ye0){if(q(A)===!1){const C=A.textures,k=A.width,U=A.height;let V=n.COLOR_BUFFER_BIT;const Y=A.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,he=i.get(A),ce=C.length>1;if(ce)for(let ye=0;ye0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&C.__useRenderToTexture!==!1}function R(A){const C=o.render.frame;u.get(A)!==C&&(u.set(A,C),A.update())}function N(A,C){const k=A.colorSpace,U=A.format,V=A.type;return A.isCompressedTexture===!0||A.isVideoTexture===!0||k!==lo&&k!==dr&&(at.getTransfer(k)===bt?(U!==Pn||V!==Yi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",k)),C}function z(A){return typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement?(c.width=A.naturalWidth||A.width,c.height=A.naturalHeight||A.height):typeof VideoFrame<"u"&&A instanceof VideoFrame?(c.width=A.displayWidth,c.height=A.displayHeight):(c.width=A.width,c.height=A.height),c}this.allocateTextureUnit=H,this.resetTextureUnits=B,this.setTexture2D=ee,this.setTexture2DArray=Z,this.setTexture3D=te,this.setTextureCube=Q,this.rebindTextures=le,this.setupRenderTarget=De,this.updateRenderTargetMipmap=I,this.updateMultisampleRenderTarget=j,this.setupDepthRenderbuffer=ue,this.setupFrameBufferTexture=be,this.useMultisampledRTT=q}function qM(n,e){function t(i,r=dr){let s;const o=at.getTransfer(r);if(i===Yi)return n.UNSIGNED_BYTE;if(i===mh)return n.UNSIGNED_SHORT_4_4_4_4;if(i===gh)return n.UNSIGNED_SHORT_5_5_5_1;if(i===fg)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===cg)return n.BYTE;if(i===ug)return n.SHORT;if(i===sa)return n.UNSIGNED_SHORT;if(i===ph)return n.INT;if(i===Tr)return n.UNSIGNED_INT;if(i===Xn)return n.FLOAT;if(i===_a)return n.HALF_FLOAT;if(i===hg)return n.ALPHA;if(i===dg)return n.RGB;if(i===Pn)return n.RGBA;if(i===pg)return n.LUMINANCE;if(i===mg)return n.LUMINANCE_ALPHA;if(i===Qs)return n.DEPTH_COMPONENT;if(i===ao)return n.DEPTH_STENCIL;if(i===_h)return n.RED;if(i===sc)return n.RED_INTEGER;if(i===gg)return n.RG;if(i===vh)return n.RG_INTEGER;if(i===yh)return n.RGBA_INTEGER;if(i===Ja||i===Qa||i===el||i===tl)if(o===bt)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===Ja)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Qa)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===el)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===tl)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===Ja)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Qa)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===el)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===tl)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===df||i===pf||i===mf||i===gf)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===df)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===pf)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===mf)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===gf)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===_f||i===vf||i===yf)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===_f||i===vf)return o===bt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===yf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===xf||i===bf||i===Sf||i===Mf||i===Ef||i===Tf||i===wf||i===Af||i===Cf||i===Rf||i===Pf||i===If||i===Lf||i===Df)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===xf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===bf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===Sf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===Mf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===Ef)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===Tf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===wf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===Af)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===Cf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===Rf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===Pf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===If)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===Lf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===Df)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===nl||i===Of||i===Nf)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===nl)return o===bt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===Of)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===Nf)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===_g||i===Uf||i===Ff||i===Bf)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===nl)return s.COMPRESSED_RED_RGTC1_EXT;if(i===Uf)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===Ff)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===Bf)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===oo?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}const eN=` +}`;function j2(n,e,t){let i=new cc;const r=new fe,s=new fe,o=new ht,a=new Og({depthPacking:CS}),l=new Ng,c={},u=t.maxTextureSize,f={[Sr]:Ln,[Ln]:Sr,[Si]:Si},h=new Ci({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new fe},radius:{value:4}},vertexShader:q2,fragmentShader:Y2}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const p=new rt;p.setAttribute("position",new Et(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new zt(p,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=sg;let m=this.type;this.render=function(T,M,P){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||T.length===0)return;const b=n.getRenderTarget(),S=n.getActiveCubeFace(),D=n.getActiveMipmapLevel(),B=n.state;B.setBlending(yr),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const H=m!==ki&&this.type===ki,$=m===ki&&this.type!==ki;for(let ee=0,Z=T.length;eeu||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/pe.x),r.x=s.x*pe.x,Q.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/pe.y),r.y=s.y*pe.y,Q.mapSize.y=s.y)),Q.map===null||H===!0||$===!0){const re=this.type!==ki?{minFilter:cn,magFilter:cn}:{};Q.map!==null&&Q.map.dispose(),Q.map=new Yi(r.x,r.y,re),Q.map.texture.name=te.name+".shadowMap",Q.camera.updateProjectionMatrix()}n.setRenderTarget(Q.map),n.clear();const ve=Q.getViewportCount();for(let re=0;re0||M.map&&M.alphaTest>0){const B=S.uuid,H=M.uuid;let $=c[B];$===void 0&&($={},c[B]=$);let ee=$[H];ee===void 0&&(ee=S.clone(),$[H]=ee,M.addEventListener("dispose",E)),S=ee}if(S.visible=M.visible,S.wireframe=M.wireframe,b===ki?S.side=M.shadowSide!==null?M.shadowSide:M.side:S.side=M.shadowSide!==null?M.shadowSide:f[M.side],S.alphaMap=M.alphaMap,S.alphaTest=M.alphaTest,S.map=M.map,S.clipShadows=M.clipShadows,S.clippingPlanes=M.clippingPlanes,S.clipIntersection=M.clipIntersection,S.displacementMap=M.displacementMap,S.displacementScale=M.displacementScale,S.displacementBias=M.displacementBias,S.wireframeLinewidth=M.wireframeLinewidth,S.linewidth=M.linewidth,P.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const B=n.properties.get(S);B.light=P}return S}function v(T,M,P,b,S){if(T.visible===!1)return;if(T.layers.test(M.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&S===ki)&&(!T.frustumCulled||i.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,T.matrixWorld);const H=e.update(T),$=T.material;if(Array.isArray($)){const ee=H.groups;for(let Z=0,te=ee.length;Z=1):Q.indexOf("OpenGL ES")!==-1&&(te=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),Z=te>=2);let pe=null,ve={};const re=n.getParameter(n.SCISSOR_BOX),xe=n.getParameter(n.VIEWPORT),ze=new ht().fromArray(re),se=new ht().fromArray(xe);function ge(X,we,oe,de){const Pe=new Uint8Array(4),Re=n.createTexture();n.bindTexture(X,Re),n.texParameteri(X,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(X,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let tt=0;tt"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(A,C){return d?new OffscreenCanvas(A,C):Ul("canvas")}function _(A,C,k){let U=1;const z=V(A);if((z.width>k||z.height>k)&&(U=k/Math.max(z.width,z.height)),U<1)if(typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&A instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&A instanceof ImageBitmap||typeof VideoFrame<"u"&&A instanceof VideoFrame){const Y=Math.floor(U*z.width),he=Math.floor(U*z.height);f===void 0&&(f=p(Y,he));const ce=C?p(Y,he):f;return ce.width=Y,ce.height=he,ce.getContext("2d").drawImage(A,0,0,Y,he),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+z.width+"x"+z.height+") to ("+Y+"x"+he+")."),ce}else return"data"in A&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+z.width+"x"+z.height+")."),A;return A}function g(A){return A.generateMipmaps}function m(A){n.generateMipmap(A)}function y(A){return A.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:A.isWebGL3DRenderTarget?n.TEXTURE_3D:A.isWebGLArrayRenderTarget||A.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function x(A,C,k,U,z=!1){if(A!==null){if(n[A]!==void 0)return n[A];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+A+"'")}let Y=C;if(C===n.RED&&(k===n.FLOAT&&(Y=n.R32F),k===n.HALF_FLOAT&&(Y=n.R16F),k===n.UNSIGNED_BYTE&&(Y=n.R8)),C===n.RED_INTEGER&&(k===n.UNSIGNED_BYTE&&(Y=n.R8UI),k===n.UNSIGNED_SHORT&&(Y=n.R16UI),k===n.UNSIGNED_INT&&(Y=n.R32UI),k===n.BYTE&&(Y=n.R8I),k===n.SHORT&&(Y=n.R16I),k===n.INT&&(Y=n.R32I)),C===n.RG&&(k===n.FLOAT&&(Y=n.RG32F),k===n.HALF_FLOAT&&(Y=n.RG16F),k===n.UNSIGNED_BYTE&&(Y=n.RG8)),C===n.RG_INTEGER&&(k===n.UNSIGNED_BYTE&&(Y=n.RG8UI),k===n.UNSIGNED_SHORT&&(Y=n.RG16UI),k===n.UNSIGNED_INT&&(Y=n.RG32UI),k===n.BYTE&&(Y=n.RG8I),k===n.SHORT&&(Y=n.RG16I),k===n.INT&&(Y=n.RG32I)),C===n.RGB_INTEGER&&(k===n.UNSIGNED_BYTE&&(Y=n.RGB8UI),k===n.UNSIGNED_SHORT&&(Y=n.RGB16UI),k===n.UNSIGNED_INT&&(Y=n.RGB32UI),k===n.BYTE&&(Y=n.RGB8I),k===n.SHORT&&(Y=n.RGB16I),k===n.INT&&(Y=n.RGB32I)),C===n.RGBA_INTEGER&&(k===n.UNSIGNED_BYTE&&(Y=n.RGBA8UI),k===n.UNSIGNED_SHORT&&(Y=n.RGBA16UI),k===n.UNSIGNED_INT&&(Y=n.RGBA32UI),k===n.BYTE&&(Y=n.RGBA8I),k===n.SHORT&&(Y=n.RGBA16I),k===n.INT&&(Y=n.RGBA32I)),C===n.RGB&&k===n.UNSIGNED_INT_5_9_9_9_REV&&(Y=n.RGB9_E5),C===n.RGBA){const he=z?Dl:at.getTransfer(U);k===n.FLOAT&&(Y=n.RGBA32F),k===n.HALF_FLOAT&&(Y=n.RGBA16F),k===n.UNSIGNED_BYTE&&(Y=he===bt?n.SRGB8_ALPHA8:n.RGBA8),k===n.UNSIGNED_SHORT_4_4_4_4&&(Y=n.RGBA4),k===n.UNSIGNED_SHORT_5_5_5_1&&(Y=n.RGB5_A1)}return(Y===n.R16F||Y===n.R32F||Y===n.RG16F||Y===n.RG32F||Y===n.RGBA16F||Y===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Y}function v(A,C){let k;return A?C===null||C===Er||C===oo?k=n.DEPTH24_STENCIL8:C===Wn?k=n.DEPTH32F_STENCIL8:C===sa&&(k=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):C===null||C===Er||C===oo?k=n.DEPTH_COMPONENT24:C===Wn?k=n.DEPTH_COMPONENT32F:C===sa&&(k=n.DEPTH_COMPONENT16),k}function E(A,C){return g(A)===!0||A.isFramebufferTexture&&A.minFilter!==cn&&A.minFilter!==Yt?Math.log2(Math.max(C.width,C.height))+1:A.mipmaps!==void 0&&A.mipmaps.length>0?A.mipmaps.length:A.isCompressedTexture&&Array.isArray(A.image)?C.mipmaps.length:1}function T(A){const C=A.target;C.removeEventListener("dispose",T),P(C),C.isVideoTexture&&u.delete(C)}function M(A){const C=A.target;C.removeEventListener("dispose",M),S(C)}function P(A){const C=i.get(A);if(C.__webglInit===void 0)return;const k=A.source,U=h.get(k);if(U){const z=U[C.__cacheKey];z.usedTimes--,z.usedTimes===0&&b(A),Object.keys(U).length===0&&h.delete(k)}i.remove(A)}function b(A){const C=i.get(A);n.deleteTexture(C.__webglTexture);const k=A.source,U=h.get(k);delete U[C.__cacheKey],o.memory.textures--}function S(A){const C=i.get(A);if(A.depthTexture&&(A.depthTexture.dispose(),i.remove(A.depthTexture)),A.isWebGLCubeRenderTarget)for(let U=0;U<6;U++){if(Array.isArray(C.__webglFramebuffer[U]))for(let z=0;z=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+A+" texture units while this GPU supports only "+r.maxTextures),D+=1,A}function $(A){const C=[];return C.push(A.wrapS),C.push(A.wrapT),C.push(A.wrapR||0),C.push(A.magFilter),C.push(A.minFilter),C.push(A.anisotropy),C.push(A.internalFormat),C.push(A.format),C.push(A.type),C.push(A.generateMipmaps),C.push(A.premultiplyAlpha),C.push(A.flipY),C.push(A.unpackAlignment),C.push(A.colorSpace),C.join()}function ee(A,C){const k=i.get(A);if(A.isVideoTexture&&R(A),A.isRenderTargetTexture===!1&&A.version>0&&k.__version!==A.version){const U=A.image;if(U===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(U.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{se(k,A,C);return}}t.bindTexture(n.TEXTURE_2D,k.__webglTexture,n.TEXTURE0+C)}function Z(A,C){const k=i.get(A);if(A.version>0&&k.__version!==A.version){se(k,A,C);return}t.bindTexture(n.TEXTURE_2D_ARRAY,k.__webglTexture,n.TEXTURE0+C)}function te(A,C){const k=i.get(A);if(A.version>0&&k.__version!==A.version){se(k,A,C);return}t.bindTexture(n.TEXTURE_3D,k.__webglTexture,n.TEXTURE0+C)}function Q(A,C){const k=i.get(A);if(A.version>0&&k.__version!==A.version){ge(k,A,C);return}t.bindTexture(n.TEXTURE_CUBE_MAP,k.__webglTexture,n.TEXTURE0+C)}const pe={[Rl]:n.REPEAT,[ai]:n.CLAMP_TO_EDGE,[Pl]:n.MIRRORED_REPEAT},ve={[cn]:n.NEAREST,[ag]:n.NEAREST_MIPMAP_NEAREST,[Wo]:n.NEAREST_MIPMAP_LINEAR,[Yt]:n.LINEAR,[Za]:n.LINEAR_MIPMAP_NEAREST,[zi]:n.LINEAR_MIPMAP_LINEAR},re={[PS]:n.NEVER,[US]:n.ALWAYS,[IS]:n.LESS,[vg]:n.LEQUAL,[LS]:n.EQUAL,[NS]:n.GEQUAL,[DS]:n.GREATER,[OS]:n.NOTEQUAL};function xe(A,C){if(C.type===Wn&&e.has("OES_texture_float_linear")===!1&&(C.magFilter===Yt||C.magFilter===Za||C.magFilter===Wo||C.magFilter===zi||C.minFilter===Yt||C.minFilter===Za||C.minFilter===Wo||C.minFilter===zi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(A,n.TEXTURE_WRAP_S,pe[C.wrapS]),n.texParameteri(A,n.TEXTURE_WRAP_T,pe[C.wrapT]),(A===n.TEXTURE_3D||A===n.TEXTURE_2D_ARRAY)&&n.texParameteri(A,n.TEXTURE_WRAP_R,pe[C.wrapR]),n.texParameteri(A,n.TEXTURE_MAG_FILTER,ve[C.magFilter]),n.texParameteri(A,n.TEXTURE_MIN_FILTER,ve[C.minFilter]),C.compareFunction&&(n.texParameteri(A,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(A,n.TEXTURE_COMPARE_FUNC,re[C.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(C.magFilter===cn||C.minFilter!==Wo&&C.minFilter!==zi||C.type===Wn&&e.has("OES_texture_float_linear")===!1)return;if(C.anisotropy>1||i.get(C).__currentAnisotropy){const k=e.get("EXT_texture_filter_anisotropic");n.texParameterf(A,k.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(C.anisotropy,r.getMaxAnisotropy())),i.get(C).__currentAnisotropy=C.anisotropy}}}function ze(A,C){let k=!1;A.__webglInit===void 0&&(A.__webglInit=!0,C.addEventListener("dispose",T));const U=C.source;let z=h.get(U);z===void 0&&(z={},h.set(U,z));const Y=$(C);if(Y!==A.__cacheKey){z[Y]===void 0&&(z[Y]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,k=!0),z[Y].usedTimes++;const he=z[A.__cacheKey];he!==void 0&&(z[A.__cacheKey].usedTimes--,he.usedTimes===0&&b(C)),A.__cacheKey=Y,A.__webglTexture=z[Y].texture}return k}function se(A,C,k){let U=n.TEXTURE_2D;(C.isDataArrayTexture||C.isCompressedArrayTexture)&&(U=n.TEXTURE_2D_ARRAY),C.isData3DTexture&&(U=n.TEXTURE_3D);const z=ze(A,C),Y=C.source;t.bindTexture(U,A.__webglTexture,n.TEXTURE0+k);const he=i.get(Y);if(Y.version!==he.__version||z===!0){t.activeTexture(n.TEXTURE0+k);const ce=at.getPrimaries(at.workingColorSpace),ye=C.colorSpace===hr?null:at.getPrimaries(C.colorSpace),Ue=C.colorSpace===hr||ce===ye?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,C.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,C.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,C.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ue);let me=_(C.image,!1,r.maxTextureSize);me=N(C,me);const Ee=s.convert(C.format,C.colorSpace),Be=s.convert(C.type);let Ge=x(C.internalFormat,Ee,Be,C.colorSpace,C.isVideoTexture);xe(U,C);let Se;const Ye=C.mipmaps,Je=C.isVideoTexture!==!0,At=he.__version===void 0||z===!0,X=Y.dataReady,we=E(C,me);if(C.isDepthTexture)Ge=v(C.format===ao,C.type),At&&(Je?t.texStorage2D(n.TEXTURE_2D,1,Ge,me.width,me.height):t.texImage2D(n.TEXTURE_2D,0,Ge,me.width,me.height,0,Ee,Be,null));else if(C.isDataTexture)if(Ye.length>0){Je&&At&&t.texStorage2D(n.TEXTURE_2D,we,Ge,Ye[0].width,Ye[0].height);for(let oe=0,de=Ye.length;oe0){const Pe=Zp(Se.width,Se.height,C.format,C.type);for(const Re of C.layerUpdates){const tt=Se.data.subarray(Re*Pe/Se.data.BYTES_PER_ELEMENT,(Re+1)*Pe/Se.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,oe,0,0,Re,Se.width,Se.height,1,Ee,tt)}C.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,oe,0,0,0,Se.width,Se.height,me.depth,Ee,Se.data)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,oe,Ge,Se.width,Se.height,me.depth,0,Se.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Je?X&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,oe,0,0,0,Se.width,Se.height,me.depth,Ee,Be,Se.data):t.texImage3D(n.TEXTURE_2D_ARRAY,oe,Ge,Se.width,Se.height,me.depth,0,Ee,Be,Se.data)}else{Je&&At&&t.texStorage2D(n.TEXTURE_2D,we,Ge,Ye[0].width,Ye[0].height);for(let oe=0,de=Ye.length;oe0){const oe=Zp(me.width,me.height,C.format,C.type);for(const de of C.layerUpdates){const Pe=me.data.subarray(de*oe/me.data.BYTES_PER_ELEMENT,(de+1)*oe/me.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,de,me.width,me.height,1,Ee,Be,Pe)}C.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,me.width,me.height,me.depth,Ee,Be,me.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,Ge,me.width,me.height,me.depth,0,Ee,Be,me.data);else if(C.isData3DTexture)Je?(At&&t.texStorage3D(n.TEXTURE_3D,we,Ge,me.width,me.height,me.depth),X&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,me.width,me.height,me.depth,Ee,Be,me.data)):t.texImage3D(n.TEXTURE_3D,0,Ge,me.width,me.height,me.depth,0,Ee,Be,me.data);else if(C.isFramebufferTexture){if(At)if(Je)t.texStorage2D(n.TEXTURE_2D,we,Ge,me.width,me.height);else{let oe=me.width,de=me.height;for(let Pe=0;Pe>=1,de>>=1}}else if(Ye.length>0){if(Je&&At){const oe=V(Ye[0]);t.texStorage2D(n.TEXTURE_2D,we,Ge,oe.width,oe.height)}for(let oe=0,de=Ye.length;oe0&&we++;const de=V(Ee[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,we,Ye,de.width,de.height)}for(let de=0;de<6;de++)if(me){Je?X&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+de,0,0,0,Ee[de].width,Ee[de].height,Ge,Se,Ee[de].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+de,0,Ye,Ee[de].width,Ee[de].height,0,Ge,Se,Ee[de].data);for(let Pe=0;Pe>Y),Be=Math.max(1,C.height>>Y);z===n.TEXTURE_3D||z===n.TEXTURE_2D_ARRAY?t.texImage3D(z,Y,ye,Ee,Be,C.depth,0,he,ce,null):t.texImage2D(z,Y,ye,Ee,Be,0,he,ce,null)}t.bindFramebuffer(n.FRAMEBUFFER,A),q(C)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,U,z,me.__webglTexture,0,G(C)):(z===n.TEXTURE_2D||z>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&z<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,U,z,me.__webglTexture,Y),t.bindFramebuffer(n.FRAMEBUFFER,null)}function W(A,C,k){if(n.bindRenderbuffer(n.RENDERBUFFER,A),C.depthBuffer){const U=C.depthTexture,z=U&&U.isDepthTexture?U.type:null,Y=v(C.stencilBuffer,z),he=C.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ce=G(C);q(C)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,ce,Y,C.width,C.height):k?n.renderbufferStorageMultisample(n.RENDERBUFFER,ce,Y,C.width,C.height):n.renderbufferStorage(n.RENDERBUFFER,Y,C.width,C.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,he,n.RENDERBUFFER,A)}else{const U=C.textures;for(let z=0;z{delete C.__boundDepthTexture,delete C.__depthDisposeCallback,U.removeEventListener("dispose",z)};U.addEventListener("dispose",z),C.__depthDisposeCallback=z}C.__boundDepthTexture=U}if(A.depthTexture&&!C.__autoAllocateDepthBuffer){if(k)throw new Error("target.depthTexture not supported in Cube render targets");ae(C.__webglFramebuffer,A)}else if(k){C.__webglDepthbuffer=[];for(let U=0;U<6;U++)if(t.bindFramebuffer(n.FRAMEBUFFER,C.__webglFramebuffer[U]),C.__webglDepthbuffer[U]===void 0)C.__webglDepthbuffer[U]=n.createRenderbuffer(),W(C.__webglDepthbuffer[U],A,!1);else{const z=A.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Y=C.__webglDepthbuffer[U];n.bindRenderbuffer(n.RENDERBUFFER,Y),n.framebufferRenderbuffer(n.FRAMEBUFFER,z,n.RENDERBUFFER,Y)}}else if(t.bindFramebuffer(n.FRAMEBUFFER,C.__webglFramebuffer),C.__webglDepthbuffer===void 0)C.__webglDepthbuffer=n.createRenderbuffer(),W(C.__webglDepthbuffer,A,!1);else{const U=A.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,z=C.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,z),n.framebufferRenderbuffer(n.FRAMEBUFFER,U,n.RENDERBUFFER,z)}t.bindFramebuffer(n.FRAMEBUFFER,null)}function le(A,C,k){const U=i.get(A);C!==void 0&&be(U.__webglFramebuffer,A,A.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),k!==void 0&&ue(A)}function De(A){const C=A.texture,k=i.get(A),U=i.get(C);A.addEventListener("dispose",M);const z=A.textures,Y=A.isWebGLCubeRenderTarget===!0,he=z.length>1;if(he||(U.__webglTexture===void 0&&(U.__webglTexture=n.createTexture()),U.__version=C.version,o.memory.textures++),Y){k.__webglFramebuffer=[];for(let ce=0;ce<6;ce++)if(C.mipmaps&&C.mipmaps.length>0){k.__webglFramebuffer[ce]=[];for(let ye=0;ye0){k.__webglFramebuffer=[];for(let ce=0;ce0&&q(A)===!1){k.__webglMultisampledFramebuffer=n.createFramebuffer(),k.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,k.__webglMultisampledFramebuffer);for(let ce=0;ce0)for(let ye=0;ye0)for(let ye=0;ye0){if(q(A)===!1){const C=A.textures,k=A.width,U=A.height;let z=n.COLOR_BUFFER_BIT;const Y=A.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,he=i.get(A),ce=C.length>1;if(ce)for(let ye=0;ye0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&C.__useRenderToTexture!==!1}function R(A){const C=o.render.frame;u.get(A)!==C&&(u.set(A,C),A.update())}function N(A,C){const k=A.colorSpace,U=A.format,z=A.type;return A.isCompressedTexture===!0||A.isVideoTexture===!0||k!==lo&&k!==hr&&(at.getTransfer(k)===bt?(U!==Pn||z!==qi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",k)),C}function V(A){return typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement?(c.width=A.naturalWidth||A.width,c.height=A.naturalHeight||A.height):typeof VideoFrame<"u"&&A instanceof VideoFrame?(c.width=A.displayWidth,c.height=A.displayHeight):(c.width=A.width,c.height=A.height),c}this.allocateTextureUnit=H,this.resetTextureUnits=B,this.setTexture2D=ee,this.setTexture2DArray=Z,this.setTexture3D=te,this.setTextureCube=Q,this.rebindTextures=le,this.setupRenderTarget=De,this.updateRenderTargetMipmap=I,this.updateMultisampleRenderTarget=j,this.setupDepthRenderbuffer=ue,this.setupFrameBufferTexture=be,this.useMultisampledRTT=q}function $M(n,e){function t(i,r=hr){let s;const o=at.getTransfer(r);if(i===qi)return n.UNSIGNED_BYTE;if(i===mh)return n.UNSIGNED_SHORT_4_4_4_4;if(i===gh)return n.UNSIGNED_SHORT_5_5_5_1;if(i===ug)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===lg)return n.BYTE;if(i===cg)return n.SHORT;if(i===sa)return n.UNSIGNED_SHORT;if(i===ph)return n.INT;if(i===Er)return n.UNSIGNED_INT;if(i===Wn)return n.FLOAT;if(i===_a)return n.HALF_FLOAT;if(i===fg)return n.ALPHA;if(i===hg)return n.RGB;if(i===Pn)return n.RGBA;if(i===dg)return n.LUMINANCE;if(i===pg)return n.LUMINANCE_ALPHA;if(i===Qs)return n.DEPTH_COMPONENT;if(i===ao)return n.DEPTH_STENCIL;if(i===_h)return n.RED;if(i===sc)return n.RED_INTEGER;if(i===mg)return n.RG;if(i===vh)return n.RG_INTEGER;if(i===yh)return n.RGBA_INTEGER;if(i===Ja||i===Qa||i===el||i===tl)if(o===bt)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===Ja)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Qa)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===el)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===tl)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===Ja)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Qa)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===el)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===tl)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===df||i===pf||i===mf||i===gf)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===df)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===pf)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===mf)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===gf)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===_f||i===vf||i===yf)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===_f||i===vf)return o===bt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===yf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===xf||i===bf||i===Sf||i===Mf||i===Ef||i===Tf||i===wf||i===Af||i===Cf||i===Rf||i===Pf||i===If||i===Lf||i===Df)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===xf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===bf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===Sf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===Mf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===Ef)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===Tf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===wf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===Af)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===Cf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===Rf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===Pf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===If)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===Lf)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===Df)return o===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===nl||i===Of||i===Nf)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===nl)return o===bt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===Of)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===Nf)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===gg||i===Uf||i===Ff||i===Bf)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===nl)return s.COMPRESSED_RED_RGTC1_EXT;if(i===Uf)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===Ff)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===Bf)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===oo?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}const Q2=` void main() { gl_Position = vec4( position, 1.0 ); -}`,tN=` +}`,eN=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -3841,34 +3841,34 @@ void main() { } -}`;class nN{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const r=new Bt,s=e.properties.get(r);s.__webglTexture=t.texture,(t.depthNear!==i.depthNear||t.depthFar!==i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new Ri({vertexShader:eN,fragmentShader:tN,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new zt(new xa(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class iN extends Ki{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,d=null,p=null;const _=new nN,g=t.getContextAttributes();let m=null,y=null;const x=[],v=[],E=new fe;let T=null;const M=new Xt;M.viewport=new ht;const P=new Xt;P.viewport=new ht;const b=[M,P],S=new UM;let D=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(se){let ge=x[se];return ge===void 0&&(ge=new Uu,x[se]=ge),ge.getTargetRaySpace()},this.getControllerGrip=function(se){let ge=x[se];return ge===void 0&&(ge=new Uu,x[se]=ge),ge.getGripSpace()},this.getHand=function(se){let ge=x[se];return ge===void 0&&(ge=new Uu,x[se]=ge),ge.getHandSpace()};function H(se){const ge=v.indexOf(se.inputSource);if(ge===-1)return;const be=x[ge];be!==void 0&&(be.update(se.inputSource,se.frame,c||o),be.dispatchEvent({type:se.type,data:se.inputSource}))}function $(){r.removeEventListener("select",H),r.removeEventListener("selectstart",H),r.removeEventListener("selectend",H),r.removeEventListener("squeeze",H),r.removeEventListener("squeezestart",H),r.removeEventListener("squeezeend",H),r.removeEventListener("end",$),r.removeEventListener("inputsourceschange",ee);for(let se=0;se=0&&(v[W]=null,x[W].disconnect(be))}for(let ge=0;ge=v.length){v.push(be),W=ue;break}else if(v[ue]===null){v[ue]=be,W=ue;break}if(W===-1)break}const ae=x[W];ae&&ae.connect(be)}}const Z=new F,te=new F;function Q(se,ge,be){Z.setFromMatrixPosition(ge.matrixWorld),te.setFromMatrixPosition(be.matrixWorld);const W=Z.distanceTo(te),ae=ge.projectionMatrix.elements,ue=be.projectionMatrix.elements,le=ae[14]/(ae[10]-1),De=ae[14]/(ae[10]+1),I=(ae[9]+1)/ae[5],L=(ae[9]-1)/ae[5],w=(ae[8]-1)/ae[0],j=(ue[8]+1)/ue[0],G=le*w,q=le*j,R=W/(-w+j),N=R*-w;if(ge.matrixWorld.decompose(se.position,se.quaternion,se.scale),se.translateX(N),se.translateZ(R),se.matrixWorld.compose(se.position,se.quaternion,se.scale),se.matrixWorldInverse.copy(se.matrixWorld).invert(),ae[10]===-1)se.projectionMatrix.copy(ge.projectionMatrix),se.projectionMatrixInverse.copy(ge.projectionMatrixInverse);else{const z=le+R,A=De+R,C=G-N,k=q+(W-N),U=I*De/A*z,V=L*De/A*z;se.projectionMatrix.makePerspective(C,k,U,V,z,A),se.projectionMatrixInverse.copy(se.projectionMatrix).invert()}}function pe(se,ge){ge===null?se.matrixWorld.copy(se.matrix):se.matrixWorld.multiplyMatrices(ge.matrixWorld,se.matrix),se.matrixWorldInverse.copy(se.matrixWorld).invert()}this.updateCamera=function(se){if(r===null)return;let ge=se.near,be=se.far;_.texture!==null&&(_.depthNear>0&&(ge=_.depthNear),_.depthFar>0&&(be=_.depthFar)),S.near=P.near=M.near=ge,S.far=P.far=M.far=be,(D!==S.near||B!==S.far)&&(r.updateRenderState({depthNear:S.near,depthFar:S.far}),D=S.near,B=S.far),M.layers.mask=se.layers.mask|2,P.layers.mask=se.layers.mask|4,S.layers.mask=M.layers.mask|P.layers.mask;const W=se.parent,ae=S.cameras;pe(S,W);for(let ue=0;ue0&&(g.alphaTest.value=m.alphaTest);const y=e.get(m),x=y.envMap,v=y.envMapRotation;x&&(g.envMap.value=x,Os.copy(v),Os.x*=-1,Os.y*=-1,Os.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(Os.y*=-1,Os.z*=-1),g.envMapRotation.value.setFromMatrix4(rN.makeRotationFromEuler(Os)),g.flipEnvMap.value=x.isCubeTexture&&x.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,y,x){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.size.value=m.size*y,g.scale.value=x*.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,y){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===Ln&&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=y.texture,g.transmissionSamplerSize.value.set(y.width,y.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 y=e.get(m).light;g.referencePosition.value.setFromMatrixPosition(y.matrixWorld),g.nearDistance.value=y.shadow.camera.near,g.farDistance.value=y.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function oN(n,e,t,i){let r={},s={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(y,x){const v=x.program;i.uniformBlockBinding(y,v)}function c(y,x){let v=r[y.id];v===void 0&&(p(y),v=u(y),r[y.id]=v,y.addEventListener("dispose",g));const E=x.program;i.updateUBOMapping(y,E);const T=e.render.frame;s[y.id]!==T&&(h(y),s[y.id]=T)}function u(y){const x=f();y.__bindingPointIndex=x;const v=n.createBuffer(),E=y.__size,T=y.usage;return n.bindBuffer(n.UNIFORM_BUFFER,v),n.bufferData(n.UNIFORM_BUFFER,E,T),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,x,v),v}function f(){for(let y=0;y0&&(v+=E-T),y.__size=v,y.__cache={},this}function _(y){const x={boundary:0,storage:0};return typeof y=="number"||typeof y=="boolean"?(x.boundary=4,x.storage=4):y.isVector2?(x.boundary=8,x.storage=8):y.isVector3||y.isColor?(x.boundary=16,x.storage=12):y.isVector4?(x.boundary=16,x.storage=16):y.isMatrix3?(x.boundary=48,x.storage=48):y.isMatrix4?(x.boundary=64,x.storage=64):y.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",y),x}function g(y){const x=y.target;x.removeEventListener("dispose",g);const v=o.indexOf(x.__bindingPointIndex);o.splice(v,1),n.deleteBuffer(r[x.id]),delete r[x.id],delete s[x.id]}function m(){for(const y in r)n.deleteBuffer(r[y]);o=[],r={},s={}}return{bind:l,update:c,dispose:m}}class Bu{constructor(e={}){const{canvas:t=kS(),context:i=null,depth:r=!0,stencil:s=!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 y=[],x=[];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._outputColorSpace=wn,this.toneMapping=Wi,this.toneMappingExposure=1;const v=this;let E=!1,T=0,M=0,P=null,b=-1,S=null;const D=new ht,B=new ht;let H=null;const $=new Te(0);let ee=0,Z=t.width,te=t.height,Q=1,pe=null,ve=null;const re=new ht(0,0,Z,te),xe=new ht(0,0,Z,te);let Ve=!1;const se=new cc;let ge=!1,be=!1;this.transmissionResolutionScale=1;const W=new We,ae=new We,ue=new F,le=new ht,De={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let I=!1;function L(){return P===null?Q:1}let w=i;function j(O,K){return t.getContext(O,K)}try{const O={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${ic}`),t.addEventListener("webglcontextlost",de,!1),t.addEventListener("webglcontextrestored",Pe,!1),t.addEventListener("webglcontextcreationerror",Re,!1),w===null){const K="webgl2";if(w=j(K,O),w===null)throw j(K)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(O){throw console.error("THREE.WebGLRenderer: "+O.message),O}let G,q,R,N,z,A,C,k,U,V,Y,he,ce,ye,Ue,me,Ee,Be,Ge,Se,Ye,Je,At,X;function we(){G=new vO(w),G.init(),Je=new qM(w,G),q=new fO(w,G,e,Je),R=new J2(w,G),q.reverseDepthBuffer&&h&&R.buffers.depth.setReversed(!0),N=new bO(w),z=new k2,A=new Q2(w,G,R,z,q,Je,N),C=new dO(v),k=new _O(v),U=new AI(w),At=new cO(w,U),V=new yO(w,U,N,At),Y=new MO(w,V,U,N),Ge=new SO(w,q,A),me=new hO(z),he=new B2(v,C,k,G,q,At,me),ce=new sN(v,z),ye=new V2,Ue=new q2(G),Be=new lO(v,C,k,R,Y,d,l),Ee=new K2(v,Y,q),X=new oN(w,N,q,R),Se=new uO(w,G,N),Ye=new xO(w,G,N),N.programs=he.programs,v.capabilities=q,v.extensions=G,v.properties=z,v.renderLists=ye,v.shadowMap=Ee,v.state=R,v.info=N}we();const oe=new iN(v,w);this.xr=oe,this.getContext=function(){return w},this.getContextAttributes=function(){return w.getContextAttributes()},this.forceContextLoss=function(){const O=G.get("WEBGL_lose_context");O&&O.loseContext()},this.forceContextRestore=function(){const O=G.get("WEBGL_lose_context");O&&O.restoreContext()},this.getPixelRatio=function(){return Q},this.setPixelRatio=function(O){O!==void 0&&(Q=O,this.setSize(Z,te,!1))},this.getSize=function(O){return O.set(Z,te)},this.setSize=function(O,K,ne=!0){if(oe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}Z=O,te=K,t.width=Math.floor(O*Q),t.height=Math.floor(K*Q),ne===!0&&(t.style.width=O+"px",t.style.height=K+"px"),this.setViewport(0,0,O,K)},this.getDrawingBufferSize=function(O){return O.set(Z*Q,te*Q).floor()},this.setDrawingBufferSize=function(O,K,ne){Z=O,te=K,Q=ne,t.width=Math.floor(O*ne),t.height=Math.floor(K*ne),this.setViewport(0,0,O,K)},this.getCurrentViewport=function(O){return O.copy(D)},this.getViewport=function(O){return O.copy(re)},this.setViewport=function(O,K,ne,ie){O.isVector4?re.set(O.x,O.y,O.z,O.w):re.set(O,K,ne,ie),R.viewport(D.copy(re).multiplyScalar(Q).round())},this.getScissor=function(O){return O.copy(xe)},this.setScissor=function(O,K,ne,ie){O.isVector4?xe.set(O.x,O.y,O.z,O.w):xe.set(O,K,ne,ie),R.scissor(B.copy(xe).multiplyScalar(Q).round())},this.getScissorTest=function(){return Ve},this.setScissorTest=function(O){R.setScissorTest(Ve=O)},this.setOpaqueSort=function(O){pe=O},this.setTransparentSort=function(O){ve=O},this.getClearColor=function(O){return O.copy(Be.getClearColor())},this.setClearColor=function(){Be.setClearColor(...arguments)},this.getClearAlpha=function(){return Be.getClearAlpha()},this.setClearAlpha=function(){Be.setClearAlpha(...arguments)},this.clear=function(O=!0,K=!0,ne=!0){let ie=0;if(O){let J=!1;if(P!==null){const _e=P.texture.format;J=_e===yh||_e===vh||_e===sc}if(J){const _e=P.texture.type,Ae=_e===Yi||_e===Tr||_e===sa||_e===oo||_e===mh||_e===gh,Ie=Be.getClearColor(),Oe=Be.getClearAlpha(),je=Ie.r,Ke=Ie.g,ke=Ie.b;Ae?(p[0]=je,p[1]=Ke,p[2]=ke,p[3]=Oe,w.clearBufferuiv(w.COLOR,0,p)):(_[0]=je,_[1]=Ke,_[2]=ke,_[3]=Oe,w.clearBufferiv(w.COLOR,0,_))}else ie|=w.COLOR_BUFFER_BIT}K&&(ie|=w.DEPTH_BUFFER_BIT),ne&&(ie|=w.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),w.clear(ie)},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",de,!1),t.removeEventListener("webglcontextrestored",Pe,!1),t.removeEventListener("webglcontextcreationerror",Re,!1),Be.dispose(),ye.dispose(),Ue.dispose(),z.dispose(),C.dispose(),k.dispose(),Y.dispose(),At.dispose(),X.dispose(),he.dispose(),oe.dispose(),oe.removeEventListener("sessionstart",x_),oe.removeEventListener("sessionend",b_),gs.stop()};function de(O){O.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),E=!0}function Pe(){console.log("THREE.WebGLRenderer: Context Restored."),E=!1;const O=N.autoReset,K=Ee.enabled,ne=Ee.autoUpdate,ie=Ee.needsUpdate,J=Ee.type;we(),N.autoReset=O,Ee.enabled=K,Ee.autoUpdate=ne,Ee.needsUpdate=ie,Ee.type=J}function Re(O){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",O.statusMessage)}function tt(O){const K=O.target;K.removeEventListener("dispose",tt),Nt(K)}function Nt(O){un(O),z.remove(O)}function un(O){const K=z.get(O).programs;K!==void 0&&(K.forEach(function(ne){he.releaseProgram(ne)}),O.isShaderMaterial&&he.releaseShaderCache(O))}this.renderBufferDirect=function(O,K,ne,ie,J,_e){K===null&&(K=De);const Ae=J.isMesh&&J.matrixWorld.determinant()<0,Ie=YT(O,K,ne,ie,J);R.setMaterial(ie,Ae);let Oe=ne.index,je=1;if(ie.wireframe===!0){if(Oe=V.getWireframeAttribute(ne),Oe===void 0)return;je=2}const Ke=ne.drawRange,ke=ne.attributes.position;let ut=Ke.start*je,gt=(Ke.start+Ke.count)*je;_e!==null&&(ut=Math.max(ut,_e.start*je),gt=Math.min(gt,(_e.start+_e.count)*je)),Oe!==null?(ut=Math.max(ut,0),gt=Math.min(gt,Oe.count)):ke!=null&&(ut=Math.max(ut,0),gt=Math.min(gt,ke.count));const Vt=gt-ut;if(Vt<0||Vt===1/0)return;At.setup(J,ie,Ie,ne,Oe);let Ut,dt=Se;if(Oe!==null&&(Ut=U.get(Oe),dt=Ye,dt.setIndex(Ut)),J.isMesh)ie.wireframe===!0?(R.setLineWidth(ie.wireframeLinewidth*L()),dt.setMode(w.LINES)):dt.setMode(w.TRIANGLES);else if(J.isLine){let He=ie.linewidth;He===void 0&&(He=1),R.setLineWidth(He*L()),J.isLineSegments?dt.setMode(w.LINES):J.isLineLoop?dt.setMode(w.LINE_LOOP):dt.setMode(w.LINE_STRIP)}else J.isPoints?dt.setMode(w.POINTS):J.isSprite&&dt.setMode(w.TRIANGLES);if(J.isBatchedMesh)if(J._multiDrawInstances!==null)ks("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),dt.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances);else if(G.get("WEBGL_multi_draw"))dt.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else{const He=J._multiDrawStarts,sn=J._multiDrawCounts,_t=J._multiDrawCount,vi=Oe?U.get(Oe).bytesPerElement:1,yo=z.get(ie).currentProgram.getUniforms();for(let Kn=0;Kn<_t;Kn++)yo.setValue(w,"_gl_DrawID",Kn),dt.render(He[Kn]/vi,sn[Kn])}else if(J.isInstancedMesh)dt.renderInstances(ut,Vt,J.count);else if(ne.isInstancedBufferGeometry){const He=ne._maxInstanceCount!==void 0?ne._maxInstanceCount:1/0,sn=Math.min(ne.instanceCount,He);dt.renderInstances(ut,Vt,sn)}else dt.render(ut,Vt)};function xt(O,K,ne){O.transparent===!0&&O.side===Mi&&O.forceSinglePass===!1?(O.side=Ln,O.needsUpdate=!0,bc(O,K,ne),O.side=Mr,O.needsUpdate=!0,bc(O,K,ne),O.side=Mi):bc(O,K,ne)}this.compile=function(O,K,ne=null){ne===null&&(ne=O),m=Ue.get(ne),m.init(K),x.push(m),ne.traverseVisible(function(J){J.isLight&&J.layers.test(K.layers)&&(m.pushLight(J),J.castShadow&&m.pushShadow(J))}),O!==ne&&O.traverseVisible(function(J){J.isLight&&J.layers.test(K.layers)&&(m.pushLight(J),J.castShadow&&m.pushShadow(J))}),m.setupLights();const ie=new Set;return O.traverse(function(J){if(!(J.isMesh||J.isPoints||J.isLine||J.isSprite))return;const _e=J.material;if(_e)if(Array.isArray(_e))for(let Ae=0;Ae<_e.length;Ae++){const Ie=_e[Ae];xt(Ie,ne,J),ie.add(Ie)}else xt(_e,ne,J),ie.add(_e)}),m=x.pop(),ie},this.compileAsync=function(O,K,ne=null){const ie=this.compile(O,K,ne);return new Promise(J=>{function _e(){if(ie.forEach(function(Ae){z.get(Ae).currentProgram.isReady()&&ie.delete(Ae)}),ie.size===0){J(O);return}setTimeout(_e,10)}G.get("KHR_parallel_shader_compile")!==null?_e():setTimeout(_e,10)})};let _i=null;function Ji(O){_i&&_i(O)}function x_(){gs.stop()}function b_(){gs.start()}const gs=new HM;gs.setAnimationLoop(Ji),typeof self<"u"&&gs.setContext(self),this.setAnimationLoop=function(O){_i=O,oe.setAnimationLoop(O),O===null?gs.stop():gs.start()},oe.addEventListener("sessionstart",x_),oe.addEventListener("sessionend",b_),this.render=function(O,K){if(K!==void 0&&K.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(E===!0)return;if(O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),K.parent===null&&K.matrixWorldAutoUpdate===!0&&K.updateMatrixWorld(),oe.enabled===!0&&oe.isPresenting===!0&&(oe.cameraAutoUpdate===!0&&oe.updateCamera(K),K=oe.getCamera()),O.isScene===!0&&O.onBeforeRender(v,O,K,P),m=Ue.get(O,x.length),m.init(K),x.push(m),ae.multiplyMatrices(K.projectionMatrix,K.matrixWorldInverse),se.setFromProjectionMatrix(ae),be=this.localClippingEnabled,ge=me.init(this.clippingPlanes,be),g=ye.get(O,y.length),g.init(),y.push(g),oe.enabled===!0&&oe.isPresenting===!0){const _e=v.xr.getDepthSensingMesh();_e!==null&&rd(_e,K,-1/0,v.sortObjects)}rd(O,K,0,v.sortObjects),g.finish(),v.sortObjects===!0&&g.sort(pe,ve),I=oe.enabled===!1||oe.isPresenting===!1||oe.hasDepthSensing()===!1,I&&Be.addToRenderList(g,O),this.info.render.frame++,ge===!0&&me.beginShadows();const ne=m.state.shadowsArray;Ee.render(ne,O,K),ge===!0&&me.endShadows(),this.info.autoReset===!0&&this.info.reset();const ie=g.opaque,J=g.transmissive;if(m.setupLights(),K.isArrayCamera){const _e=K.cameras;if(J.length>0)for(let Ae=0,Ie=_e.length;Ae0&&M_(ie,J,O,K),I&&Be.render(O),S_(g,O,K);P!==null&&M===0&&(A.updateMultisampleRenderTarget(P),A.updateRenderTargetMipmap(P)),O.isScene===!0&&O.onAfterRender(v,O,K),At.resetDefaultState(),b=-1,S=null,x.pop(),x.length>0?(m=x[x.length-1],ge===!0&&me.setGlobalState(v.clippingPlanes,m.state.camera)):m=null,y.pop(),y.length>0?g=y[y.length-1]:g=null};function rd(O,K,ne,ie){if(O.visible===!1)return;if(O.layers.test(K.layers)){if(O.isGroup)ne=O.renderOrder;else if(O.isLOD)O.autoUpdate===!0&&O.update(K);else if(O.isLight)m.pushLight(O),O.castShadow&&m.pushShadow(O);else if(O.isSprite){if(!O.frustumCulled||se.intersectsSprite(O)){ie&&le.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ae);const Ae=Y.update(O),Ie=O.material;Ie.visible&&g.push(O,Ae,Ie,ne,le.z,null)}}else if((O.isMesh||O.isLine||O.isPoints)&&(!O.frustumCulled||se.intersectsObject(O))){const Ae=Y.update(O),Ie=O.material;if(ie&&(O.boundingSphere!==void 0?(O.boundingSphere===null&&O.computeBoundingSphere(),le.copy(O.boundingSphere.center)):(Ae.boundingSphere===null&&Ae.computeBoundingSphere(),le.copy(Ae.boundingSphere.center)),le.applyMatrix4(O.matrixWorld).applyMatrix4(ae)),Array.isArray(Ie)){const Oe=Ae.groups;for(let je=0,Ke=Oe.length;je0&&xc(J,K,ne),_e.length>0&&xc(_e,K,ne),Ae.length>0&&xc(Ae,K,ne),R.buffers.depth.setTest(!0),R.buffers.depth.setMask(!0),R.buffers.color.setMask(!0),R.setPolygonOffset(!1)}function M_(O,K,ne,ie){if((ne.isScene===!0?ne.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[ie.id]===void 0&&(m.state.transmissionRenderTarget[ie.id]=new ji(1,1,{generateMipmaps:!0,type:G.has("EXT_color_buffer_half_float")||G.has("EXT_color_buffer_float")?_a:Yi,minFilter:Hi,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:at.workingColorSpace}));const _e=m.state.transmissionRenderTarget[ie.id],Ae=ie.viewport||D;_e.setSize(Ae.z*v.transmissionResolutionScale,Ae.w*v.transmissionResolutionScale);const Ie=v.getRenderTarget();v.setRenderTarget(_e),v.getClearColor($),ee=v.getClearAlpha(),ee<1&&v.setClearColor(16777215,.5),v.clear(),I&&Be.render(ne);const Oe=v.toneMapping;v.toneMapping=Wi;const je=ie.viewport;if(ie.viewport!==void 0&&(ie.viewport=void 0),m.setupLightsView(ie),ge===!0&&me.setGlobalState(v.clippingPlanes,ie),xc(O,ne,ie),A.updateMultisampleRenderTarget(_e),A.updateRenderTargetMipmap(_e),G.has("WEBGL_multisampled_render_to_texture")===!1){let Ke=!1;for(let ke=0,ut=K.length;ke0),ke=!!ne.morphAttributes.position,ut=!!ne.morphAttributes.normal,gt=!!ne.morphAttributes.color;let Vt=Wi;ie.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(Vt=v.toneMapping);const Ut=ne.morphAttributes.position||ne.morphAttributes.normal||ne.morphAttributes.color,dt=Ut!==void 0?Ut.length:0,He=z.get(ie),sn=m.state.lights;if(ge===!0&&(be===!0||O!==S)){const yn=O===S&&ie.id===b;me.setState(ie,O,yn)}let _t=!1;ie.version===He.__version?(He.needsLights&&He.lightsStateVersion!==sn.state.version||He.outputColorSpace!==Ie||J.isBatchedMesh&&He.batching===!1||!J.isBatchedMesh&&He.batching===!0||J.isBatchedMesh&&He.batchingColor===!0&&J.colorTexture===null||J.isBatchedMesh&&He.batchingColor===!1&&J.colorTexture!==null||J.isInstancedMesh&&He.instancing===!1||!J.isInstancedMesh&&He.instancing===!0||J.isSkinnedMesh&&He.skinning===!1||!J.isSkinnedMesh&&He.skinning===!0||J.isInstancedMesh&&He.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&He.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&He.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&He.instancingMorph===!1&&J.morphTexture!==null||He.envMap!==Oe||ie.fog===!0&&He.fog!==_e||He.numClippingPlanes!==void 0&&(He.numClippingPlanes!==me.numPlanes||He.numIntersection!==me.numIntersection)||He.vertexAlphas!==je||He.vertexTangents!==Ke||He.morphTargets!==ke||He.morphNormals!==ut||He.morphColors!==gt||He.toneMapping!==Vt||He.morphTargetsCount!==dt)&&(_t=!0):(_t=!0,He.__version=ie.version);let vi=He.currentProgram;_t===!0&&(vi=bc(ie,K,J));let yo=!1,Kn=!1,Sa=!1;const Pt=vi.getUniforms(),ii=He.uniforms;if(R.useProgram(vi.program)&&(yo=!0,Kn=!0,Sa=!0),ie.id!==b&&(b=ie.id,Kn=!0),yo||S!==O){R.buffers.depth.getReversed()?(W.copy(O.projectionMatrix),jC(W),KC(W),Pt.setValue(w,"projectionMatrix",W)):Pt.setValue(w,"projectionMatrix",O.projectionMatrix),Pt.setValue(w,"viewMatrix",O.matrixWorldInverse);const Fn=Pt.map.cameraPosition;Fn!==void 0&&Fn.setValue(w,ue.setFromMatrixPosition(O.matrixWorld)),q.logarithmicDepthBuffer&&Pt.setValue(w,"logDepthBufFC",2/(Math.log(O.far+1)/Math.LN2)),(ie.isMeshPhongMaterial||ie.isMeshToonMaterial||ie.isMeshLambertMaterial||ie.isMeshBasicMaterial||ie.isMeshStandardMaterial||ie.isShaderMaterial)&&Pt.setValue(w,"isOrthographic",O.isOrthographicCamera===!0),S!==O&&(S=O,Kn=!0,Sa=!0)}if(J.isSkinnedMesh){Pt.setOptional(w,J,"bindMatrix"),Pt.setOptional(w,J,"bindMatrixInverse");const yn=J.skeleton;yn&&(yn.boneTexture===null&&yn.computeBoneTexture(),Pt.setValue(w,"boneTexture",yn.boneTexture,A))}J.isBatchedMesh&&(Pt.setOptional(w,J,"batchingTexture"),Pt.setValue(w,"batchingTexture",J._matricesTexture,A),Pt.setOptional(w,J,"batchingIdTexture"),Pt.setValue(w,"batchingIdTexture",J._indirectTexture,A),Pt.setOptional(w,J,"batchingColorTexture"),J._colorsTexture!==null&&Pt.setValue(w,"batchingColorTexture",J._colorsTexture,A));const ri=ne.morphAttributes;if((ri.position!==void 0||ri.normal!==void 0||ri.color!==void 0)&&Ge.update(J,ne,vi),(Kn||He.receiveShadow!==J.receiveShadow)&&(He.receiveShadow=J.receiveShadow,Pt.setValue(w,"receiveShadow",J.receiveShadow)),ie.isMeshGouraudMaterial&&ie.envMap!==null&&(ii.envMap.value=Oe,ii.flipEnvMap.value=Oe.isCubeTexture&&Oe.isRenderTargetTexture===!1?-1:1),ie.isMeshStandardMaterial&&ie.envMap===null&&K.environment!==null&&(ii.envMapIntensity.value=K.environmentIntensity),Kn&&(Pt.setValue(w,"toneMappingExposure",v.toneMappingExposure),He.needsLights&&jT(ii,Sa),_e&&ie.fog===!0&&ce.refreshFogUniforms(ii,_e),ce.refreshMaterialUniforms(ii,ie,Q,te,m.state.transmissionRenderTarget[O.id]),Fu.upload(w,T_(He),ii,A)),ie.isShaderMaterial&&ie.uniformsNeedUpdate===!0&&(Fu.upload(w,T_(He),ii,A),ie.uniformsNeedUpdate=!1),ie.isSpriteMaterial&&Pt.setValue(w,"center",J.center),Pt.setValue(w,"modelViewMatrix",J.modelViewMatrix),Pt.setValue(w,"normalMatrix",J.normalMatrix),Pt.setValue(w,"modelMatrix",J.matrixWorld),ie.isShaderMaterial||ie.isRawShaderMaterial){const yn=ie.uniformsGroups;for(let Fn=0,sd=yn.length;Fn0&&A.useMultisampledRTT(O)===!1?J=z.get(O).__webglMultisampledFramebuffer:Array.isArray(Ke)?J=Ke[ne]:J=Ke,D.copy(O.viewport),B.copy(O.scissor),H=O.scissorTest}else D.copy(re).multiplyScalar(Q).floor(),B.copy(xe).multiplyScalar(Q).floor(),H=Ve;if(ne!==0&&(J=ZT),R.bindFramebuffer(w.FRAMEBUFFER,J)&&ie&&R.drawBuffers(O,J),R.viewport(D),R.scissor(B),R.setScissorTest(H),_e){const Oe=z.get(O.texture);w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_CUBE_MAP_POSITIVE_X+K,Oe.__webglTexture,ne)}else if(Ae){const Oe=z.get(O.texture),je=K;w.framebufferTextureLayer(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,Oe.__webglTexture,ne,je)}else if(O!==null&&ne!==0){const Oe=z.get(O.texture);w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,Oe.__webglTexture,ne)}b=-1},this.readRenderTargetPixels=function(O,K,ne,ie,J,_e,Ae){if(!(O&&O.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ie=z.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&Ae!==void 0&&(Ie=Ie[Ae]),Ie){R.bindFramebuffer(w.FRAMEBUFFER,Ie);try{const Oe=O.texture,je=Oe.format,Ke=Oe.type;if(!q.textureFormatReadable(je)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!q.textureTypeReadable(Ke)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}K>=0&&K<=O.width-ie&&ne>=0&&ne<=O.height-J&&w.readPixels(K,ne,ie,J,Je.convert(je),Je.convert(Ke),_e)}finally{const Oe=P!==null?z.get(P).__webglFramebuffer:null;R.bindFramebuffer(w.FRAMEBUFFER,Oe)}}},this.readRenderTargetPixelsAsync=async function(O,K,ne,ie,J,_e,Ae){if(!(O&&O.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ie=z.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&Ae!==void 0&&(Ie=Ie[Ae]),Ie){const Oe=O.texture,je=Oe.format,Ke=Oe.type;if(!q.textureFormatReadable(je))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!q.textureTypeReadable(Ke))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(K>=0&&K<=O.width-ie&&ne>=0&&ne<=O.height-J){R.bindFramebuffer(w.FRAMEBUFFER,Ie);const ke=w.createBuffer();w.bindBuffer(w.PIXEL_PACK_BUFFER,ke),w.bufferData(w.PIXEL_PACK_BUFFER,_e.byteLength,w.STREAM_READ),w.readPixels(K,ne,ie,J,Je.convert(je),Je.convert(Ke),0);const ut=P!==null?z.get(P).__webglFramebuffer:null;R.bindFramebuffer(w.FRAMEBUFFER,ut);const gt=w.fenceSync(w.SYNC_GPU_COMMANDS_COMPLETE,0);return w.flush(),await YC(w,gt,4),w.bindBuffer(w.PIXEL_PACK_BUFFER,ke),w.getBufferSubData(w.PIXEL_PACK_BUFFER,0,_e),w.deleteBuffer(ke),w.deleteSync(gt),_e}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(O,K=null,ne=0){O.isTexture!==!0&&(ks("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,O=arguments[1]);const ie=Math.pow(2,-ne),J=Math.floor(O.image.width*ie),_e=Math.floor(O.image.height*ie),Ae=K!==null?K.x:0,Ie=K!==null?K.y:0;A.setTexture2D(O,0),w.copyTexSubImage2D(w.TEXTURE_2D,ne,0,0,Ae,Ie,J,_e),R.unbindTexture()};const JT=w.createFramebuffer(),QT=w.createFramebuffer();this.copyTextureToTexture=function(O,K,ne=null,ie=null,J=0,_e=null){O.isTexture!==!0&&(ks("WebGLRenderer: copyTextureToTexture function signature has changed."),ie=arguments[0]||null,O=arguments[1],K=arguments[2],_e=arguments[3]||0,ne=null),_e===null&&(J!==0?(ks("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),_e=J,J=0):_e=0);let Ae,Ie,Oe,je,Ke,ke,ut,gt,Vt;const Ut=O.isCompressedTexture?O.mipmaps[_e]:O.image;if(ne!==null)Ae=ne.max.x-ne.min.x,Ie=ne.max.y-ne.min.y,Oe=ne.isBox3?ne.max.z-ne.min.z:1,je=ne.min.x,Ke=ne.min.y,ke=ne.isBox3?ne.min.z:0;else{const ri=Math.pow(2,-J);Ae=Math.floor(Ut.width*ri),Ie=Math.floor(Ut.height*ri),O.isDataArrayTexture?Oe=Ut.depth:O.isData3DTexture?Oe=Math.floor(Ut.depth*ri):Oe=1,je=0,Ke=0,ke=0}ie!==null?(ut=ie.x,gt=ie.y,Vt=ie.z):(ut=0,gt=0,Vt=0);const dt=Je.convert(K.format),He=Je.convert(K.type);let sn;K.isData3DTexture?(A.setTexture3D(K,0),sn=w.TEXTURE_3D):K.isDataArrayTexture||K.isCompressedArrayTexture?(A.setTexture2DArray(K,0),sn=w.TEXTURE_2D_ARRAY):(A.setTexture2D(K,0),sn=w.TEXTURE_2D),w.pixelStorei(w.UNPACK_FLIP_Y_WEBGL,K.flipY),w.pixelStorei(w.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),w.pixelStorei(w.UNPACK_ALIGNMENT,K.unpackAlignment);const _t=w.getParameter(w.UNPACK_ROW_LENGTH),vi=w.getParameter(w.UNPACK_IMAGE_HEIGHT),yo=w.getParameter(w.UNPACK_SKIP_PIXELS),Kn=w.getParameter(w.UNPACK_SKIP_ROWS),Sa=w.getParameter(w.UNPACK_SKIP_IMAGES);w.pixelStorei(w.UNPACK_ROW_LENGTH,Ut.width),w.pixelStorei(w.UNPACK_IMAGE_HEIGHT,Ut.height),w.pixelStorei(w.UNPACK_SKIP_PIXELS,je),w.pixelStorei(w.UNPACK_SKIP_ROWS,Ke),w.pixelStorei(w.UNPACK_SKIP_IMAGES,ke);const Pt=O.isDataArrayTexture||O.isData3DTexture,ii=K.isDataArrayTexture||K.isData3DTexture;if(O.isDepthTexture){const ri=z.get(O),yn=z.get(K),Fn=z.get(ri.__renderTarget),sd=z.get(yn.__renderTarget);R.bindFramebuffer(w.READ_FRAMEBUFFER,Fn.__webglFramebuffer),R.bindFramebuffer(w.DRAW_FRAMEBUFFER,sd.__webglFramebuffer);for(let _s=0;_s{n.delete(s)};return{on:s=>{n.add(s);const o=()=>e(s);return pi(o),{off:o}},off:e,trigger:(...s)=>Promise.all(Array.from(n).map(o=>o(...s))),clear:()=>{n.clear()}}}function A4(n){let e=!1,t;const i=Ql(!0);return(...r)=>(e||(t=i.run(()=>n(...r)),e=!0),t)}const sp=new WeakMap,lN=(...n)=>{var e;const t=n[0],i=(e=On())==null?void 0:e.proxy;if(i==null&&!Jm())throw new Error("injectLocal must be called in setup");return i&&sp.has(i)&&t in sp.get(i)?sp.get(i)[t]:In(...n)};function C4(n){let e=0,t,i;const r=()=>{e-=1,i&&e<=0&&(i.stop(),t=void 0,i=void 0)};return(...s)=>(e+=1,i||(i=Ql(!0),t=i.run(()=>n(...s))),pi(r),t)}const rs=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const cN=n=>typeof n<"u",uN=n=>n!=null,fN=Object.prototype.toString,hN=n=>fN.call(n)==="[object Object]",ss=()=>{},dN=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),R4=pN();function pN(){var n,e;return rs&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Yg(n,e){function t(...i){return new Promise((r,s)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(r).catch(s)})}return t}const YM=n=>n();function jM(n,e={}){let t,i,r=ss;const s=l=>{clearTimeout(l),r(),r=ss};let o;return l=>{const c=ot(n),u=ot(e.maxWait);return t&&s(t),c<=0||u!==void 0&&u<=0?(i&&(s(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{r=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&s(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&s(i),i=null,f(l())},c)})}}function mN(...n){let e=0,t,i=!0,r=ss,s,o,a,l,c;!Mt(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,r(),r=ss)};return h=>{const d=ot(o),p=Date.now()-e,_=()=>s=h();return u(),d<=0?(e=Date.now(),_()):(p>d&&(l||!i)?(e=Date.now(),_()):a&&(s=new Promise((g,m)=>{r=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,s)}}function gN(n=YM,e={}){const{initialState:t="active"}=e,i=ZM(t==="active");function r(){i.value=!1}function s(){i.value=!0}const o=(...a)=>{i.value&&n(...a)};return{isActive:di(i),pause:r,resume:s,eventFilter:o}}function _N(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 vN(n,e){var t;if(typeof n=="number")return n+e;const i=((t=n.match(/^-?\d+\.?\d*/))==null?void 0:t[0])||"",r=n.slice(i.length),s=Number.parseFloat(i)+e;return Number.isNaN(s)?n:s+r}function ol(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function yN(n,e,t=!1){return e.reduce((i,r)=>(r in n&&(!t||n[r]!==void 0)&&(i[r]=n[r]),i),{})}function KM(n){return On()}function al(n){return Array.isArray(n)?n:[n]}function ZM(...n){if(n.length!==1)return jx(...n);const e=n[0];return typeof e=="function"?di($m(()=>({get:e,set:ss}))):Xe(e)}function jg(n,e=200,t={}){return Yg(jM(e,t),n)}function j0(n,e=200,t={}){const i=Xe(n.value),r=jg(()=>{i.value=n.value},e,t);return qe(n,()=>r()),i}function xN(n,e=200,t=!1,i=!0,r=!1){return Yg(mN(e,t,i,r),n)}function JM(n,e,t={}){const{eventFilter:i=YM,...r}=t;return qe(n,Yg(i,e),r)}function bN(n,e,t={}){const{eventFilter:i,initialState:r="active",...s}=t,{eventFilter:o,pause:a,resume:l,isActive:c}=gN(i,{initialState:r});return{stop:JM(n,e,{...s,eventFilter:o}),pause:a,resume:l,isActive:c}}function SN(n,e={}){if(!Mt(n))return Yx(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const i in n.value)t[i]=$m(()=>({get(){return n.value[i]},set(r){var s;if((s=ot(e.replaceRef))!=null?s:!0)if(Array.isArray(n.value)){const a=[...n.value];a[i]=r,n.value=a}else{const a={...n.value,[i]:r};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[i]=r}}));return t}const on=ot;function P4(n,e){KM()&&Ym(n,e)}function go(n,e=!0,t){KM()?Nn(n,t):e?n():cs(n)}function MN(n,e=1e3,t={}){const{immediate:i=!0,immediateCallback:r=!1}=t;let s=null;const o=ze(!1);function a(){s&&(clearInterval(s),s=null)}function l(){o.value=!1,a()}function c(){const u=ot(e);u<=0||(o.value=!0,r&&n(),a(),o.value&&(s=setInterval(n,u)))}if(i&&rs&&c(),Mt(e)||typeof e=="function"){const u=qe(e,()=>{o.value&&rs&&c()});pi(u)}return pi(l),{isActive:o,pause:l,resume:c}}function EN(n,e,t={}){const{immediate:i=!0,immediateCallback:r=!1}=t,s=ze(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function l(){s.value=!1,a()}function c(...u){r&&n(),a(),s.value=!0,o=setTimeout(()=>{s.value=!1,o=null,n(...u)},ot(e))}return i&&(s.value=!0,rs&&c()),pi(l),{isPending:di(s),start:c,stop:l}}function I4(n=!1,e={}){const{truthyValue:t=!0,falsyValue:i=!1}=e,r=Mt(n),s=ze(n);function o(a){if(arguments.length)return s.value=a,s.value;{const l=ot(t);return s.value=s.value===l?ot(i):l,s.value}}return r?o:[s,o]}function L4(n,e,t={}){const{debounce:i=0,maxWait:r=void 0,...s}=t;return JM(n,e,{...s,eventFilter:jM(i,{maxWait:r})})}function QM(n,e,t){return qe(n,e,{...t,immediate:!0})}const rn=rs?window:void 0,TN=rs?window.document:void 0,Kg=rs?window.navigator:void 0;function $n(n){var e;const t=ot(n);return(e=t==null?void 0:t.$el)!=null?e:t}function _n(...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)),r=Ce(()=>{const a=al(ot(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),s=QM(()=>{var a,l;return[(l=(a=r.value)==null?void 0:a.map(c=>$n(c)))!=null?l:[rn].filter(c=>c!=null),al(ot(r.value?n[1]:n[0])),al(Rt(r.value?n[2]:n[1])),ot(r.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=hN(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{s(),t()};return pi(t),o}function wN(){const n=ze(!1),e=On();return e&&Nn(()=>{n.value=!0},e),n}function _o(n){const e=wN();return Ce(()=>(e.value,!!n()))}function eE(n,e,t={}){const{window:i=rn,...r}=t;let s;const o=_o(()=>i&&"MutationObserver"in i),a=()=>{s&&(s.disconnect(),s=void 0)},l=Ce(()=>{const h=ot(n),d=al(h).map($n).filter(uN);return new Set(d)}),c=qe(()=>l.value,h=>{a(),o.value&&h.size&&(s=new MutationObserver(e),h.forEach(d=>s.observe(d,r)))},{immediate:!0,flush:"post"}),u=()=>s==null?void 0:s.takeRecords(),f=()=>{c(),a()};return pi(f),{isSupported:o,stop:f,takeRecords:u}}function AN(n){return typeof n=="function"?n:typeof n=="string"?e=>e.key===n:Array.isArray(n)?e=>n.includes(e.key):()=>!0}function D4(...n){let e,t,i={};n.length===3?(e=n[0],t=n[1],i=n[2]):n.length===2?typeof n[1]=="object"?(e=!0,t=n[0],i=n[1]):(e=n[0],t=n[1]):(e=!0,t=n[0]);const{target:r=rn,eventName:s="keydown",passive:o=!1,dedupe:a=!1}=i,l=AN(e);return _n(r,s,u=>{u.repeat&&ot(a)||l(u)&&t(u)},o)}function Zg(n,e={}){const{immediate:t=!0,fpsLimit:i=void 0,window:r=rn,once:s=!1}=e,o=ze(!1),a=Ce(()=>i?1e3/ot(i):null);let l=0,c=null;function u(d){if(!o.value||!r)return;l||(l=d);const p=d-l;if(a.value&&pt&&"matchMedia"in t&&typeof t.matchMedia=="function"),s=ze(typeof i=="number"),o=ze(),a=ze(!1),l=c=>{a.value=c.matches};return ah(()=>{if(s.value){s.value=!r.value;const c=ot(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>=ol(h[1])),d&&p&&(p=i<=ol(d[1])),f?!p:p});return}r.value&&(o.value=t.matchMedia(ot(n)),a.value=o.value.matches)}),_n(o,"change",l,{passive:!0}),Ce(()=>a.value)}const O4={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function N4(n,e={}){function t(d,p){let _=ot(n[ot(d)]);return p!=null&&(_=vN(_,p)),typeof _=="number"&&(_=`${_}px`),_}const{window:i=rn,strategy:r="min-width",ssrWidth:s=tE()}=e,o=typeof s=="number",a=o?ze(!1):{value:!0};o&&go(()=>a.value=!!i);function l(d,p){return!a.value&&o?d==="min"?s>=ol(p):s<=ol(p):i?i.matchMedia(`(${d}-width: ${p})`).matches:!1}const c=d=>Yr(()=>`(min-width: ${t(d)})`,e),u=d=>Yr(()=>`(max-width: ${t(d)})`,e),f=Object.keys(n).reduce((d,p)=>(Object.defineProperty(d,p,{get:()=>r==="min-width"?c(p):u(p),enumerable:!0,configurable:!0}),d),{});function h(){const d=Object.keys(n).map(p=>[p,f[p],ol(t(p))]).sort((p,_)=>p[2]-_[2]);return Ce(()=>d.filter(([,p])=>p.value).map(([p])=>p))}return Object.assign(f,{greaterOrEqual:c,smallerOrEqual:u,greater(d){return Yr(()=>`(min-width: ${t(d,.1)})`,e)},smaller(d){return Yr(()=>`(max-width: ${t(d,-.1)})`,e)},between(d,p){return Yr(()=>`(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 Ce(()=>d.value.length===0?"":d.value.at(r==="min-width"?-1:0))}})}function em(n,e={}){const{controls:t=!1,navigator:i=Kg}=e,r=_o(()=>i&&"permissions"in i),s=ze(),o=typeof n=="string"?{name:n}:n,a=ze(),l=()=>{var u,f;a.value=(f=(u=s.value)==null?void 0:u.state)!=null?f:"prompt"};_n(s,"change",l,{passive:!0});const c=_N(async()=>{if(r.value){if(!s.value)try{s.value=await i.permissions.query(o)}catch{s.value=void 0}finally{l()}if(t)return st(s.value)}});return c(),t?{state:a,isSupported:r,query:c}:a}function U4(n={}){const{navigator:e=Kg,read:t=!1,source:i,copiedDuring:r=1500,legacy:s=!1}=n,o=_o(()=>e&&"clipboard"in e),a=em("clipboard-read"),l=em("clipboard-write"),c=Ce(()=>o.value||s),u=ze(""),f=ze(!1),h=EN(()=>f.value=!1,r,{immediate:!1});async function d(){let y=!(o.value&&m(a.value));if(!y)try{u.value=await e.clipboard.readText()}catch{y=!0}y&&(u.value=g())}c.value&&t&&_n(["copy","cut"],d,{passive:!0});async function p(y=ot(i)){if(c.value&&y!=null){let x=!(o.value&&m(l.value));if(!x)try{await e.clipboard.writeText(y)}catch{x=!0}x&&_(y),u.value=y,f.value=!0,h.start()}}function _(y){const x=document.createElement("textarea");x.value=y??"",x.style.position="absolute",x.style.opacity="0",document.body.appendChild(x),x.select(),document.execCommand("copy"),x.remove()}function g(){var y,x,v;return(v=(x=(y=document==null?void 0:document.getSelection)==null?void 0:y.call(document))==null?void 0:x.toString())!=null?v:""}function m(y){return y==="granted"||y==="prompt"}return{isSupported:c,text:u,copied:f,copy:p}}function RN(n){return JSON.parse(JSON.stringify(n))}const vu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yu="__vueuse_ssr_handlers__",PN=IN();function IN(){return yu in vu||(vu[yu]=vu[yu]||{}),vu[yu]}function nE(n,e){return PN[n]||e}function LN(n){return Yr("(prefers-color-scheme: dark)",n)}function DN(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 ON={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()}},K0="vueuse-storage";function iE(n,e,t,i={}){var r;const{flush:s="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:f=rn,eventFilter:h,onError:d=D=>{console.error(D)},initOnMounted:p}=i,_=(u?ze:Xe)(typeof e=="function"?e():e),g=Ce(()=>ot(n));if(!t)try{t=nE("getDefaultStorage",()=>{var D;return(D=rn)==null?void 0:D.localStorage})()}catch(D){d(D)}if(!t)return _;const m=ot(e),y=DN(m),x=(r=i.serializer)!=null?r:ON[y],{pause:v,resume:E}=bN(_,()=>M(_.value),{flush:s,deep:o,eventFilter:h});qe(g,()=>b(),{flush:s}),f&&a&&go(()=>{t instanceof Storage?_n(f,"storage",b,{passive:!0}):_n(f,K0,S),p&&b()}),p||b();function T(D,B){if(f){const H={key:g.value,oldValue:D,newValue:B,storageArea:t};f.dispatchEvent(t instanceof Storage?new StorageEvent("storage",H):new CustomEvent(K0,{detail:H}))}}function M(D){try{const B=t.getItem(g.value);if(D==null)T(B,null),t.removeItem(g.value);else{const H=x.write(D);B!==H&&(t.setItem(g.value,H),T(B,H))}}catch(B){d(B)}}function P(D){const B=D?D.newValue:t.getItem(g.value);if(B==null)return l&&m!=null&&t.setItem(g.value,x.write(m)),m;if(!D&&c){const H=x.read(B);return typeof c=="function"?c(H,m):y==="object"&&!Array.isArray(H)?{...m,...H}:H}else return typeof B!="string"?B:x.read(B)}function b(D){if(!(D&&D.storageArea!==t)){if(D&&D.key==null){_.value=m;return}if(!(D&&D.key!==g.value)){v();try{(D==null?void 0:D.newValue)!==x.write(_.value)&&(_.value=P(D))}catch(B){d(B)}finally{D?cs(E):E()}}}}function S(D){b(D.detail)}return _}const NN="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function UN(n={}){const{selector:e="html",attribute:t="class",initialValue:i="auto",window:r=rn,storage:s,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=LN({window:r}),d=Ce(()=>h.value?"dark":"light"),p=l||(o==null?ZM(i):iE(o,i,s,{window:r,listenToStorageChanges:a})),_=Ce(()=>p.value==="auto"?d.value:p.value),g=nE("updateHTMLAttrs",(v,E,T)=>{const M=typeof v=="string"?r==null?void 0:r.document.querySelector(v):$n(v);if(!M)return;const P=new Set,b=new Set;let S=null;if(E==="class"){const B=T.split(/\s/g);Object.values(f).flatMap(H=>(H||"").split(/\s/g)).filter(Boolean).forEach(H=>{B.includes(H)?P.add(H):b.add(H)})}else S={key:E,value:T};if(P.size===0&&b.size===0&&S===null)return;let D;u&&(D=r.document.createElement("style"),D.appendChild(document.createTextNode(NN)),r.document.head.appendChild(D));for(const B of P)M.classList.add(B);for(const B of b)M.classList.remove(B);S&&M.setAttribute(S.key,S.value),u&&(r.getComputedStyle(D).opacity,document.head.removeChild(D))});function m(v){var E;g(e,t,(E=f[v])!=null?E:v)}function y(v){n.onChanged?n.onChanged(v,m):m(v)}qe(_,y,{flush:"post",immediate:!0}),go(()=>y(_.value));const x=Ce({get(){return c?p.value:_.value},set(v){p.value=v}});return Object.assign(x,{store:p,system:d,state:_})}function xu(n,e,t={}){const{window:i=rn,initialValue:r,observe:s=!1}=t,o=ze(r),a=Ce(()=>{var c;return $n(e)||((c=i==null?void 0:i.document)==null?void 0:c.documentElement)});function l(){var c;const u=ot(n),f=ot(a);if(f&&i&&u){const h=(c=i.getComputedStyle(f).getPropertyValue(u))==null?void 0:c.trim();o.value=h||o.value||r}}return s&&eE(a,l,{attributeFilter:["style","class"],window:i}),qe([a,()=>ot(n)],(c,u)=>{u[0]&&u[1]&&u[0].style.removeProperty(u[1]),l()},{immediate:!0}),qe([o,a],([c,u])=>{const f=ot(n);u!=null&&u.style&&f&&(c==null?u.style.removeProperty(f):u.style.setProperty(f,c))},{immediate:!0}),o}function FN(n={}){const{valueDark:e="dark",valueLight:t=""}=n,i=UN({...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}}),r=Ce(()=>i.system.value);return Ce({get(){return i.value==="dark"},set(o){const a=o?"dark":"light";r.value===a?i.value="auto":i.value=a}})}function BN(n={}){const{window:e=rn}=n,t=ze(1),i=Yr(()=>`(resolution: ${t.value}dppx)`,n);let r=ss;return e&&(r=QM(i,()=>t.value=e.devicePixelRatio)),{pixelRatio:di(t),stop:r}}function kN(n={}){const{navigator:e=Kg,requestPermissions:t=!1,constraints:i={audio:!0,video:!0},onUpdated:r}=n,s=Xe([]),o=Ce(()=>s.value.filter(p=>p.kind==="videoinput")),a=Ce(()=>s.value.filter(p=>p.kind==="audioinput")),l=Ce(()=>s.value.filter(p=>p.kind==="audiooutput")),c=_o(()=>e&&e.mediaDevices&&e.mediaDevices.enumerateDevices),u=ze(!1);let f;async function h(){c.value&&(s.value=await e.mediaDevices.enumerateDevices(),r==null||r(s.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}=em(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(),_n(e.mediaDevices,"devicechange",h,{passive:!0}),h()),{devices:s,ensurePermissions:d,permissionGranted:u,videoInputs:o,audioInputs:a,audioOutputs:l,isSupported:c}}function rE(n,e,t={}){const{window:i=rn,...r}=t;let s;const o=_o(()=>i&&"ResizeObserver"in i),a=()=>{s&&(s.disconnect(),s=void 0)},l=Ce(()=>{const f=ot(n);return Array.isArray(f)?f.map(h=>$n(h)):[$n(f)]}),c=qe(l,f=>{if(a(),o.value&&i){s=new ResizeObserver(e);for(const h of f)h&&s.observe(h,r)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return pi(u),{isSupported:o,stop:u}}function zN(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:r=!0,immediate:s=!0,updateTiming:o="sync"}=e,a=ze(0),l=ze(0),c=ze(0),u=ze(0),f=ze(0),h=ze(0),d=ze(0),p=ze(0);function _(){const m=$n(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 y=m.getBoundingClientRect();a.value=y.height,l.value=y.bottom,c.value=y.left,u.value=y.right,f.value=y.top,h.value=y.width,d.value=y.x,p.value=y.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return rE(n,g),qe(()=>$n(n),m=>!m&&g()),eE(n,g,{attributeFilter:["style","class"]}),r&&_n("scroll",g,{capture:!0,passive:!0}),i&&_n("resize",g,{passive:!0}),go(()=>{s&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function VN(n,e={width:0,height:0},t={}){const{window:i=rn,box:r="content-box"}=t,s=Ce(()=>{var f,h;return(h=(f=$n(n))==null?void 0:f.namespaceURI)==null?void 0:h.includes("svg")}),o=ze(e.width),a=ze(e.height),{stop:l}=rE(n,([f])=>{const h=r==="border-box"?f.borderBoxSize:r==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&s.value){const d=$n(n);if(d){const p=d.getBoundingClientRect();o.value=p.width,a.value=p.height}}else if(h){const d=al(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);go(()=>{const f=$n(n);f&&(o.value="offsetWidth"in f?f.offsetWidth:e.width,a.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=qe(()=>$n(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}}const HN={multiple:!0,accept:"*",reset:!1,directory:!1};function GN(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 F4(n={}){const{document:e=TN}=n,t=Xe(GN(n.initialFiles)),{on:i,trigger:r}=Hn(),{on:s,trigger:o}=Hn();let a;e&&(a=e.createElement("input"),a.type="file",a.onchange=u=>{const f=u.target;t.value=f.files,r(t.value)},a.oncancel=()=>{o()});const l=()=>{t.value=null,a&&a.value&&(a.value="",r(null))},c=u=>{if(!a)return;const f={...HN,...n,...u};a.multiple=f.multiple,a.accept=f.accept,a.webkitdirectory=f.directory,dN(f,"capture")&&(a.capture=f.capture),f.reset&&l(),a.click()};return{files:di(t),open:c,reset:l,onCancel:s,onChange:i}}function WN(n){var e;const t=ze(0);if(typeof performance>"u")return t;const i=(e=n==null?void 0:n.every)!=null?e:10;let r=performance.now(),s=0;return Zg(()=>{if(s+=1,s>=i){const o=performance.now(),a=o-r;t.value=Math.round(1e3/(a/s)),r=o,s=0}}),t}const Z0=1;function B4(n,e={}){const{throttle:t=0,idle:i=200,onStop:r=ss,onScroll:s=ss,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:a={capture:!1,passive:!0},behavior:l="auto",window:c=rn,onError:u=M=>{console.error(M)}}=e,f=ze(0),h=ze(0),d=Ce({get(){return f.value},set(M){_(M,void 0)}}),p=Ce({get(){return h.value},set(M){_(void 0,M)}});function _(M,P){var b,S,D,B;if(!c)return;const H=ot(n);if(!H)return;(D=H instanceof Document?c.document.body:H)==null||D.scrollTo({top:(b=ot(P))!=null?b:p.value,left:(S=ot(M))!=null?S:d.value,behavior:ot(l)});const $=((B=H==null?void 0:H.document)==null?void 0:B.documentElement)||(H==null?void 0:H.documentElement)||H;d!=null&&(f.value=$.scrollLeft),p!=null&&(h.value=$.scrollTop)}const g=ze(!1),m=hi({left:!0,right:!1,top:!0,bottom:!1}),y=hi({left:!1,right:!1,top:!1,bottom:!1}),x=M=>{g.value&&(g.value=!1,y.left=!1,y.right=!1,y.top=!1,y.bottom=!1,r(M))},v=jg(x,t+i),E=M=>{var P;if(!c)return;const b=((P=M==null?void 0:M.document)==null?void 0:P.documentElement)||(M==null?void 0:M.documentElement)||$n(M),{display:S,flexDirection:D,direction:B}=getComputedStyle(b),H=B==="rtl"?-1:1,$=b.scrollLeft;y.left=$f.value;const ee=Math.abs($*H)<=(o.left||0),Z=Math.abs($*H)+b.clientWidth>=b.scrollWidth-(o.right||0)-Z0;S==="flex"&&D==="row-reverse"?(m.left=Z,m.right=ee):(m.left=ee,m.right=Z),f.value=$;let te=b.scrollTop;M===c.document&&!te&&(te=c.document.body.scrollTop),y.top=teh.value;const Q=Math.abs(te)<=(o.top||0),pe=Math.abs(te)+b.clientHeight>=b.scrollHeight-(o.bottom||0)-Z0;S==="flex"&&D==="column-reverse"?(m.top=pe,m.bottom=Q):(m.top=Q,m.bottom=pe),h.value=te},T=M=>{var P;if(!c)return;const b=(P=M.target.documentElement)!=null?P:M.target;E(b),g.value=!0,v(M),s(M)};return _n(n,"scroll",t?xN(T,t,!0,!1):T,a),go(()=>{try{const M=ot(n);if(!M)return;E(M)}catch(M){u(M)}}),_n(n,"scrollend",x,a),{x:d,y:p,isScrolling:g,arrivedState:m,directions:y,measure(){const M=ot(n);c&&M&&E(M)}}}function kn(n,e,t={}){const{window:i=rn}=t;return iE(n,e,i==null?void 0:i.localStorage,t)}function XN(n={}){const e=Xe(),t=_o(()=>typeof performance<"u"&&"memory"in performance);if(t.value){const{interval:i=1e3}=n;MN(()=>{e.value=performance.memory},i,{immediate:n.immediate,immediateCallback:n.immediateCallback})}return{isSupported:t,memory:e}}function k4(n){const e=ze(),t=()=>{e.value&&URL.revokeObjectURL(e.value),e.value=void 0};return qe(()=>ot(n),i=>{t(),i&&(e.value=URL.createObjectURL(i))},{immediate:!0}),pi(t),di(e)}const sE={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},$N=Object.keys(sE);function qN(n={}){const{target:e=rn}=n,t=ze(!1),i=Xe(n.initialValue||{});Object.assign(i.value,sE,i.value);const r=s=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(s.pointerType))&&(i.value=yN(s,$N,!1))};if(e){const s={passive:!0};_n(e,["pointerdown","pointermove","pointerup"],r,s),_n(e,"pointerleave",()=>t.value=!1,s)}return{...SN(i),isInside:t}}const J0="--vueuse-safe-area-top",Q0="--vueuse-safe-area-right",ey="--vueuse-safe-area-bottom",ty="--vueuse-safe-area-left";function z4(){const n=ze(""),e=ze(""),t=ze(""),i=ze("");if(rs){const s=xu(J0),o=xu(Q0),a=xu(ey),l=xu(ty);s.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)",r(),_n("resize",jg(r),{passive:!0})}function r(){n.value=bu(J0),e.value=bu(Q0),t.value=bu(ey),i.value=bu(ty)}return{top:n,right:e,bottom:t,left:i,update:r}}function bu(n){return getComputedStyle(document.documentElement).getPropertyValue(n)}function V4(n,e,t,i={}){var r,s,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=i,d=On(),p=t||(d==null?void 0:d.emit)||((r=d==null?void 0:d.$emit)==null?void 0:r.bind(d))||((o=(s=d==null?void 0:d.proxy)==null?void 0:s.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let _=c;_=_||`update:${e.toString()}`;const g=x=>a?typeof a=="function"?a(x):RN(x):x,m=()=>cN(n[e])?g(n[e]):f,y=x=>{h?h(x)&&p(_,x):p(_,x)};if(l){const x=m(),v=Xe(x);let E=!1;return qe(()=>n[e],T=>{E||(E=!0,v.value=g(T),cs(()=>E=!1))}),qe(v,T=>{!E&&(T!==n[e]||u)&&y(T)},{deep:u}),v}else return Ce({get(){return m()},set(x){y(x)}})}function H4(n,e,t){const{window:i=rn}={},r=Xe(null),s=ze(),o=(...l)=>{s.value&&s.value.postMessage(...l)},a=function(){s.value&&s.value.terminate()};return i&&(s.value=new Worker(n,e),s.value.onmessage=l=>{r.value=l.data},pi(()=>{s.value&&s.value.terminate()})),{data:r,post:o,terminate:a,worker:s}}function YN(n={}){const{window:e=rn,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:s=!0,type:o="inner"}=n,a=ze(t),l=ze(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 s?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),go(c);const u={passive:!0};if(_n("resize",c,u),e&&o==="visual"&&e.visualViewport&&_n(e.visualViewport,"resize",c,u),r){const f=Yr("(orientation: portrait)");qe(f,()=>c())}return{width:a,height:l}}var jN=Object.defineProperty,KN=(n,e,t)=>e in n?jN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ny=(n,e,t)=>KN(n,typeof e!="symbol"?e+"":e,t);const ZN="@tresjs/core",JN="module",QN="4.3.3",e3="pnpm@9.15.5",t3="Declarative ThreeJS using Vue Components",n3="Alvaro Saburido (https://github.com/alvarosabu/)",i3="MIT",r3={type:"git",url:"git+https://github.com/Tresjs/tres.git"},s3=["vue","3d","threejs","three","threejs-vue"],o3=!1,a3={".":{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"},"./*":"./*"},l3="./dist/tres.js",c3="./dist/tres.js",u3="./dist/index.d.ts",f3=["*.d.ts","dist"],h3={access:"public"},d3={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"},p3={three:">=0.133",vue:">=3.4"},m3={"@alvarosabu/utils":"^3.2.0","@vue/devtools-api":"^6.6.3","@vueuse/core":"^12.5.0"},g3={"@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"},_3={name:ZN,type:JN,version:QN,packageManager:e3,description:t3,author:n3,license:i3,repository:r3,keywords:s3,sideEffects:o3,exports:a3,main:l3,module:c3,types:u3,files:f3,publishConfig:h3,scripts:d3,peerDependencies:p3,dependencies:m3,devDependencies:g3};class v3 extends zt{constructor(...e){super(...e),ny(this,"type","HightlightMesh"),ny(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 tm(n){return typeof n>"u"}function Gf(n){return Array.isArray(n)}function y3(n){return typeof n=="number"}function oE(n){return typeof n=="string"}function Ws(n){return typeof n=="function"}function Rr(n){return n===Object(n)&&!Gf(n)&&!Ws(n)}function Kr(n){return Rr(n)&&"isObject3D"in n&&!!n.isObject3D}function iy(n){return Rr(n)&&"isCamera"in n&&!!n.isCamera}function x3(n){return Rr(n)&&"isBufferGeometry"in n&&!!n.isBufferGeometry}function b3(n){return Rr(n)&&"isMaterial"in n&&!!n.isMaterial}function S3(n){return Rr(n)&&"isLight"in n&&!!n.isLight}function M3(n){return Rr(n)&&"isFog"in n&&!!n.isFog}function E3(n){return Rr(n)&&"isScene"in n&&!!n.isScene}function Su(n){return Kr(n)||x3(n)||b3(n)||M3(n)}function T3(n){return Rr(n)&&!!n.isPrimitive}const aE=(n,e)=>{for(const t of Object.keys(e))e[t]instanceof Object&&Object.assign(e[t],aE(n[t],e[t]));return Object.assign(n||{},e),n},w3="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",A3=P3(w3);function ry(n){return n&&n.nodeType===1}function Mu(n){return n.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const C3=/\B([A-Z])/g;function R3(n){return n.replace(C3,"-$1").toLowerCase()}function P3(n,e){const t=Object.create(null),i=n.split(",");for(let r=0;r!!t[r.toLowerCase()]:r=>!!t[r]}const sy=(n,e)=>{if(!e)return;const t=Array.isArray(e)?e:e.match(/([^[.\]])+/g);return t==null?void 0:t.reduce((i,r)=>i&&i[r],n)},I3=(n,e,t)=>{const i=Array.isArray(e)?e:e.match(/([^[.\]])+/g);i&&i.reduce((r,s,o)=>(r[s]===void 0&&(r[s]={}),o===i.length-1&&(r[s]=t),r[s]),n)};function lE(n,e){if(ry(n)&&ry(e)){const r=n.attributes,s=e.attributes;return r.length!==s.length?!1:Array.from(r).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 r of t)if(!i.includes(r)||!lE(n[r],e[r]))return!1;return!0}function L3(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=r(c);if(u)return u}},s=r(n);if(!s){console.warn("Object with UUID not found in the scene.");return}let o=s;for(let l=0;lcE(i)),!(n instanceof wh)){const i=n;n&&((t=n.dispose)==null||t.call(n)),i.geometry&&i.geometry.dispose(),Array.isArray(i.material)?i.material.forEach(r=>oy(r)):i.material&&oy(i.material)}}function U3(n,e){let t=0;for(let i=0;it===0?e:e.charAt(0).toUpperCase()+e.slice(1)).join("")}const ly=/-\d+$/;function F3(n,e,t){if(oE(t)){if(ly.test(t)){const s=t.replace(ly,""),{target:o,key:a}=nm(n,s);if(!Array.isArray(o[a])){const l=o[a],c=[];c.__tresDetach=()=>{c.every(u=>tm(u))&&(o[a]=l)},o[a]=c}}const{target:i,key:r}=nm(n,t);e.__tres.previousAttach=i[r],i[r]=ca(e)}else e.__tres.previousAttach=t(n,e)}function B3(n,e,t){var i,r,s;if(oE(t)){const{target:o,key:a}=nm(n,t),l=e.__tres.previousAttach;l===void 0?delete o[a]:o[a]=l,"__tresDetach"in o&&o.__tresDetach()}else(r=(i=e.__tres)==null?void 0:i.previousAttach)==null||r.call(i,n,e);(s=e.__tres)==null||delete s.previousAttach}function Vs(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 uE(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 k3(n,e,t){var i;if(!Ws(n.setPixelRatio))return;let r=0;if(t&&Gf(t)){const s=t;if(s.length>=2){const[o,a]=s;r=bg.clamp(e,o,a)}}else y3(t)?r=t:r=e;r!==((i=n.getPixelRatio)==null?void 0:i.call(n))&&n.setPixelRatio(r)}function z3(n,e,t,i,r){const s=[...e.__tres.objects],o=ca(e);if(n=ca(n),o===n)return!0;const a=Vs(n,e.__tres??{},r),l=e.parent??e.__tres.parent??null,c={...e.__tres.memoizedProps};delete c.object;for(const u of s)fE(u,r),hE(u,r);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 s)i.insert(u,e);return!0}function ca(n){return T3(n)?(n.object.__tres=n.__tres,n.object):n}function fE(n,e){var t,i,r,s;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&&U3(o.__tres.objects,a=>a!==n),(i=n.__tres)!=null&&i.attach?B3(o,n,n.__tres.attach):((s=(r=n.parent)==null?void 0:r.remove)==null||s.call(r,ca(n)),n.parent=null)}function hE(n,e){var t;(t=n.traverse)==null||t.call(n,i=>{var r;e.deregisterCamera(i),(r=e.eventManager)==null||r.deregisterPointerMissedObject(i)}),e.deregisterCamera(n),uE(n)}const V3=({sizes:n})=>{const e=Xe([]),t=Ce(()=>e.value[0]),i=o=>{const a=o instanceof ac?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]},r=(o,a=!1)=>{if(iy(o)){const l=o;if(e.value.some(({uuid:c})=>c===l.uuid))return;a?i(l):e.value.push(l)}},s=o=>{if(iy(o)){const a=o;e.value=e.value.filter(({uuid:l})=>l!==a.uuid)}};return ah(()=>{n.aspectRatio.value&&e.value.forEach(o=>{!o.manual&&(o instanceof Xt||H3(o))&&(o instanceof Xt?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())})}),qi(()=>{e.value=[]}),{camera:t,cameras:e,registerCamera:r,deregisterCamera:s,setCameraActive:i}};function H3(n){return n.hasOwnProperty("isOrthographicCamera")&&n.isOrthographicCamera}const Wf="[TresJS ▲ ■ ●] ";function G3(...n){typeof n[0]=="string"?n[0]=Wf+n[0]:n.unshift(Wf),console.error(...n)}function W3(...n){typeof n[0]=="string"?n[0]=Wf+n[0]:n.unshift(Wf),console.warn(...n)}function X3(n,e){}function dE(){return{logError:G3,logWarning:W3,logMessage:X3}}const im=Xe({}),rm=n=>Object.assign(im.value,n);function op(){const n=new Map,e=new Set;let t=0,i=!1;const r=()=>{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]))},s=o=>{n.delete(o),e.delete(o)};return{on:(o,a=0)=>{n.set(o,{priority:a,addI:t++});const l=()=>s(o);return pi(l),i=!0,{off:l}},off:s,trigger:(...o)=>{i&&(r(),i=!1),e.forEach(a=>a(...o))},dispose:()=>{n.clear(),e.clear()},get count(){return n.size}}}function $3(){let n=!0,e=!0,t=!1;const i=new $h(!1),r=Xe(i.running),s=Xe(!1);let o;const a=bg.generateUUID();let l=null;const c=op(),u=op(),f=op();T();let h={};function d(M){h=M}function p(M,P,b=0){switch(P){case"before":return c.on(M,b);case"render":return l||(l=M),u.dispose(),u.on(M);case"after":return f.on(M,b)}}function _(){e&&(e=!1,T(),E())}function g(){e=!0,T(),cancelAnimationFrame(o)}function m(){t=!1,T()}function y(){t=!0,T()}function x(){s.value=!0}function v(){s.value=!1}function E(){if(!n){o=requestAnimationFrame(E);return}const M=i.getDelta(),P=i.getElapsedTime(),b={camera:Rt(h.camera),scene:Rt(h.scene),renderer:Rt(h.renderer),raycaster:Rt(h.raycaster),controls:Rt(h.controls),invalidate:h.invalidate,advance:h.advance},S={delta:M,elapsed:P,clock:i,...b};r.value&&c.trigger(S),s.value||(u.count?u.trigger(S):l&&l(S)),r.value&&f.trigger(S),o=requestAnimationFrame(E)}function T(){const M=!e&&!t;i.running!==M&&(i.running?i.stop():i.start()),r.value=i.running}return{loopId:a,register:(M,P,b)=>p(M,P,b),start:_,stop:g,pause:y,resume:m,pauseRender:x,resumeRender:v,isRenderPaused:s,isActive:r,setContext:d,setReady:M=>n=M}}function Jg(n){let e=0;return n.traverse(t=>{if(t.isMesh&&t.geometry&&t.type!=="HightlightMesh"){const i=t.geometry,r=i.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,s=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=r+s+o+a;e+=l}}),e}function q3(n){return(n/1024).toFixed(2)}const Y3=Number.parseInt(ic.replace("dev",""));function j3(n){return n instanceof Te?n:Array.isArray(n)?new Te(...n):new Te(n)}const Eu={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:wn,toneMapping:hh,toneMappingExposure:3,shadowMap:{enabled:!0,type:ag}},flat:{toneMapping:Wi,toneMappingExposure:1}};function K3({canvas:n,options:e,contextParts:{sizes:t,render:i,invalidate:r,advance:s}}){const o=Ce(()=>({alpha:on(e.alpha)??!0,depth:on(e.depth),canvas:$n(n),context:on(e.context),stencil:on(e.stencil),antialias:on(e.antialias)??!0,precision:on(e.precision),powerPreference:on(e.powerPreference),premultipliedAlpha:on(e.premultipliedAlpha),preserveDrawingBuffer:on(e.preserveDrawingBuffer),logarithmicDepthBuffer:on(e.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:on(e.failIfMajorPerformanceCaveat)})),a=ze(new Bu(o.value));function l(){e.renderMode==="on-demand"&&r()}qe(o,()=>{a.value.dispose(),a.value=new Bu(o.value),l()}),qe([t.width,t.height],()=>{a.value.setSize(t.width.value,t.height.value),l()},{immediate:!0}),qe(()=>e.clearColor,l);const{pixelRatio:c}=BN(),{logError:u}=dE(),f=(()=>{const d=new Bu,p={shadowMap:{enabled:d.shadowMap.enabled,type:d.shadowMap.type},toneMapping:d.toneMapping,toneMappingExposure:d.toneMappingExposure,outputColorSpace:d.outputColorSpace};return d.dispose(),p})(),h=on(e.renderMode);return h==="on-demand"&&r(),h==="manual"&&setTimeout(()=>{s()},100),ah(()=>{const d=on(e.preset);d&&(d in Eu||u(`Renderer Preset must be one of these: ${Object.keys(Eu).join(", ")}`),aE(a.value,Eu[d])),k3(a.value,c.value,on(e.dpr)),h==="always"&&(i.frames.value=Math.max(1,i.frames.value));const p=(m,y)=>{const x=on(m),v=()=>{if(d)return sy(Eu[d],y)};if(x!==void 0)return x;const E=v();return E!==void 0?E:sy(f,y)},_=(m,y)=>I3(a.value,y,p(m,y));_(e.shadows,"shadowMap.enabled"),_(e.toneMapping??hh,"toneMapping"),_(e.shadowMapType,"shadowMap.type"),Y3<150&&_(!e.useLegacyLights,"physicallyCorrectLights"),_(e.outputColorSpace,"outputColorSpace"),_(e.toneMappingExposure,"toneMappingExposure");const g=p(e.clearColor,"clearColor");g&&a.value.setClearColor(g?j3(g):new Te(0))}),qi(()=>{a.value.dispose(),a.value.forceContextLoss()}),{renderer:a}}function Z3(n,e,t=10){const i=on(n)?YN():VN(Ce(()=>on(e).parentElement)),r=di(j0(i.width,t)),s=di(j0(i.height,t)),o=Ce(()=>r.value/s.value);return{height:s,width:r,aspectRatio:o}}const J3=(n,e)=>{const t=Ce(()=>e.renderer.value.domElement),i=ze([]),{x:r,y:s}=qN({target:t});let o=0;const{width:a,height:l,top:c,left:u}=zN(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)??r.value,y:(re==null?void 0:re.clientY)??s.value});return xe?h(xe)||[]:[]},p=Hn(),_=Hn(),g=Hn(),m=Hn(),y=Hn(),x=Hn(),v=Hn(),E=Hn();function T(re){const xe={};for(const Ve in re)typeof Ve!="function"&&(xe[Ve]=re[Ve]);return xe}const M=(re,xe)=>{var Ve,se,ge;const be=T(xe),W=new F(xe==null?void 0:xe.clientX,xe==null?void 0:xe.clientY,0).unproject((Ve=e.camera)==null?void 0:Ve.value);re.trigger({...be,intersections:i.value,unprojectedPoint:W,ray:(se=e.raycaster)==null?void 0:se.value.ray,camera:(ge=e.camera)==null?void 0:ge.value,sourceEvent:xe,delta:o,stopPropagating:!1})};let P;const b=re=>{d(re),M(g,re),P=re},S=()=>{P&&b(P)};let D,B,H;const $=re=>{var xe;D=(xe=i.value[0])==null?void 0:xe.object,o=0,B=new fe((re==null?void 0:re.clientX)??r.value,(re==null?void 0:re.clientY)??s.value),M(y,re)};let ee,Z=!1;const te=re=>{var xe,Ve,se;re instanceof PointerEvent&&(i.value.length===0&&M(x,re),D===((xe=i.value[0])==null?void 0:xe.object)&&(H=new fe((re==null?void 0:re.clientX)??r.value,(re==null?void 0:re.clientY)??s.value),o=B==null?void 0:B.distanceTo(H),re.button===0?(M(p,re),ee===((Ve=i.value[0])==null?void 0:Ve.object)?Z=!0:(ee=(se=i.value[0])==null?void 0:se.object,Z=!1)):re.button===2&&M(v,re)),M(m,re))},Q=re=>{Z&&(M(_,re),ee=void 0,Z=!1)},pe=re=>M(g,re),ve=re=>M(E,re);return t.value.addEventListener("pointerup",te),t.value.addEventListener("pointerdown",$),t.value.addEventListener("pointermove",b),t.value.addEventListener("pointerleave",pe),t.value.addEventListener("dblclick",Q),t.value.addEventListener("wheel",ve),qi(()=>{t!=null&&t.value&&(t.value.removeEventListener("pointerup",te),t.value.removeEventListener("pointerdown",$),t.value.removeEventListener("pointermove",b),t.value.removeEventListener("pointerleave",pe),t.value.removeEventListener("dblclick",Q),t.value.removeEventListener("wheel",ve))}),{intersects:i,onClick:re=>p.on(re).off,onDblClick:re=>_.on(re).off,onContextMenu:re=>v.on(re).off,onPointerMove:re=>g.on(re).off,onPointerUp:re=>m.on(re).off,onPointerDown:re=>y.on(re).off,onPointerMissed:re=>x.on(re).off,onWheel:re=>E.on(re).off,forceUpdate:S}};function ap(n,e){if(Array.isArray(n))for(const t of n)t(e);typeof n=="function"&&n(e)}function Q3(n,e,t){var i;const r=ze(),s=ze();n&&(r.value=n),e&&(s.value=e);const o=b=>{var S;return((S=b.__tres)==null?void 0:S.eventCount)>0},a=b=>{var S;return((S=b.children)==null?void 0:S.some(D=>a(D)))||o(b)},l=ze(((i=r.value)==null?void 0:i.children).filter(a)||[]);function c(b,S){const D=[],B=()=>S.stopPropagating=!0;S.stopPropagation=B;for(const H of S==null?void 0:S.intersections){if(S.stopPropagating)return;S={...S,...H};const{object:$}=H;S.eventObject=$,ap($[b],S),D.push($);let ee=$.parent;for(;ee!==null&&!S.stopPropagating&&!D.includes(ee);)S.eventObject=ee,ap(ee[b],S),D.push(ee),ee=ee.parent;const Z=R3(b.slice(2));t(Z,{intersection:H,event:S})}}const{onClick:u,onDblClick:f,onContextMenu:h,onPointerMove:d,onPointerDown:p,onPointerUp:_,onPointerMissed:g,onWheel:m,forceUpdate:y}=J3(l,e);_(b=>c("onPointerUp",b)),p(b=>c("onPointerDown",b)),u(b=>c("onClick",b)),f(b=>c("onDoubleClick",b)),h(b=>c("onContextMenu",b)),m(b=>c("onWheel",b));let x=[];d(b=>{const S=b.intersections.map(({object:B})=>B),D=b.intersections;x.forEach(({object:B})=>{S.includes(B)||(b.intersections=x,c("onPointerLeave",b),c("onPointerOut",b))}),b.intersections=D,b.intersections.forEach(({object:B})=>{x.includes(B)||(c("onPointerEnter",b),c("onPointerOver",b))}),c("onPointerMove",b),x=b.intersections});const v=[];g(b=>{const S=()=>b.stopPropagating=!0;b.stopPropagation=S,v.forEach(D=>{b.stopPropagating||(b.eventObject=D,ap(D.onPointerMissed,b))}),t("pointer-missed",{event:b})});function E(b){Su(b)&&Kr(b)&&l.value.push(b)}function T(b){if(Su(b)&&Kr(b)){const S=l.value.indexOf(b);S>-1&&l.value.splice(S,1)}}function M(b){Su(b)&&Kr(b)&&b.onPointerMissed&&v.push(b)}function P(b){if(Su(b)&&Kr(b)){const S=v.indexOf(b);S>-1&&v.splice(S,1)}}return e.eventManager={forceUpdate:y,registerObject:E,deregisterObject:T,registerPointerMissedObject:M,deregisterPointerMissedObject:P},{forceUpdate:y,registerObject:E,deregisterObject:T,registerPointerMissedObject:M,deregisterPointerMissedObject:P}}function eU(n,e,t=100){t=t<=0?100:t;const i=Hn(),r=new Set;let s=!1,o=!1,a=null;function l(){a&&clearTimeout(a),!o&&!s&&n()?(i.trigger(e),r.forEach(f=>f()),r.clear(),s=!0):!o&&!s&&(a=setTimeout(l,t))}function c(){o=!0,a&&clearTimeout(a)}l();const u=(f,...h)=>{f(...h)};return{on:f=>{if(s)return u(f,e),{off:()=>{}};{const h=i.on(f);return r.add(h.off),i.on(f)}},off:i.off,trigger:i.trigger,clear:i.clear,cancel:c}}const lp=new WeakMap;function tU(n){if(n=n||pE(),lp.has(n))return lp.get(n);const e=100,t=Date.now(),i=eU(()=>{if(Date.now()-t>=e)return!0;{const r=n.renderer.value,s=(r==null?void 0:r.domElement)||{width:0,height:0};return!!(r&&s.width>0&&s.height>0)}},n);return lp.set(n,i),i}function nU({scene:n,canvas:e,windowSize:t,rendererOptions:i,emit:r}){const s=ze(n),o=Z3(t,e),{camera:a,cameras:l,registerCamera:c,deregisterCamera:u,setCameraActive:f}=V3({sizes:o}),h={mode:Xe(i.renderMode||"always"),priority:Xe(0),frames:Xe(0),maxFrames:60,canBeInvalidated:Ce(()=>h.mode.value==="on-demand"&&h.frames.value===0)};function d(H=1){i.renderMode==="on-demand"&&(h.frames.value=Math.min(h.maxFrames,h.frames.value+H))}function p(){i.renderMode==="manual"&&(h.frames.value=1)}const{renderer:_}=K3({canvas:e,options:i,contextParts:{sizes:o,render:h,invalidate:d,advance:p}}),g={sizes:o,scene:s,camera:a,cameras:di(l),renderer:_,raycaster:ze(new zM),controls:Xe(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:h,advance:p,extend:rm,invalidate:d,registerCamera:c,setCameraActive:f,deregisterCamera:u,loop:$3()};Jr("useTres",g),g.scene.value.__tres={root:g},g.loop.register(()=>{a.value&&h.frames.value>0&&(_.value.render(n,a.value),r("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:y}=tU(g);g.loop.setReady(!1),g.loop.start(),m(()=>{r("ready",g),g.loop.setReady(!0),Q3(n,g,r)}),qi(()=>{y(),g.loop.stop()});const x=100,v=WN({every:x}),{isSupported:E,memory:T}=XN({interval:x}),M=160;let P=performance.now();const b=({timestamp:H})=>{g.scene.value&&(g.perf.memory.allocatedMem=Jg(g.scene.value)),H-P>=x&&(P=H,g.perf.fps.accumulator.push(v.value),g.perf.fps.accumulator.length>M&&g.perf.fps.accumulator.shift(),g.perf.fps.value=v.value,E.value&&T.value&&(g.perf.memory.accumulator.push(T.value.usedJSHeapSize/1024/1024),g.perf.memory.accumulator.length>M&&g.perf.memory.accumulator.shift(),g.perf.memory.currentMem=g.perf.memory.accumulator.reduce(($,ee)=>$+ee,0)/g.perf.memory.accumulator.length))};let S=0;const D=1,{pause:B}=Zg(({delta:H})=>{window.__TRES__DEVTOOLS__&&(b({timestamp:performance.now()}),S+=H,S>=D&&(window.__TRES__DEVTOOLS__.cb(g),S=0))},{immediate:!0});return qi(()=>{B()}),g}function pE(){const n=In("useTres");if(!n)throw new Error("useTresContext must be used together with useTresContextProvider");return n}function G4(){const{camera:n,scene:e,renderer:t,loop:i,raycaster:r,controls:s,invalidate:o,advance:a}=pE();i.setContext({camera:n,scene:e,renderer:t,raycaster:r,controls:s,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 iU=Hn(),rU=Hn(),mE=Hn(),ll=new $h;let ku=0,zu=0;Zg(()=>{iU.trigger({delta:ku,elapsed:zu,clock:ll}),rU.trigger({delta:ku,elapsed:zu,clock:ll}),mE.trigger({delta:ku,elapsed:zu,clock:ll})},{immediate:!1});mE.on(()=>{ku=ll.getDelta(),zu=ll.getElapsedTime()});function sU(n,e={},t={}){let i=n;const r=a=>{i=a};let s=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){const u=t[l];return u&&typeof u=="function"?u(c,i,s,r):i[l]=c,!0}};return s=new Proxy({},o),s}const{logError:cy}=dE(),uy=["onClick","onContextMenu","onPointerMove","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onDoubleClick","onPointerDown","onPointerUp","onPointerCancel","onPointerMissed","onLostPointerCapture","onWheel"],oU=n=>{const e=n.scene.value;function t(c,u,f,h){if(h||(h={}),h.args||(h.args=[]),c==="template"||A3(c))return null;let d=c.replace("Tres",""),p;if(c==="primitive"){(!Rr(h.object)||Mt(h.object))&&cy("Tres primitives need an 'object' prop, whose value is an object or shallowRef"),d=h.object.type;const _={};p=sU(h.object,{object:g=>g,isPrimitive:()=>!0,__tres:()=>_},{object:(g,m,y,x)=>{z3(g,y,x,{patchProp:s,remove:r,insert:i},n)},__tres:g=>{Object.assign(_,g)}})}else{const _=im.value[d];_||cy(`${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=Vs(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:Vs(c,{},n),_=u.__tres?u:Vs(u,{},n);c=ca(p),u=ca(_),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?F3(_,p,p.__tres.attach):Kr(c)&&Kr(_)&&(_.add(c),c.dispatchEvent({type:"added"})),p.__tres.parent=_,_.__tres.objects&&!_.__tres.objects.includes(p)&&_.__tres.objects.push(p)}function r(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=tm(u)?"default":u;const _=(d=c.__tres)==null?void 0:d.dispose;tm(_)||(_===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(y=>r(y,u)),m&&c.children&&[...c.children].forEach(y=>r(y,u)),fE(c,n),hE(c,n),m&&!E3(c)){if(Ws(u))u(c);else if(Ws(c.dispose))try{c.dispose()}catch{}}"__tres"in c&&delete c.__tres}function s(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 v=((d=c.__tres)==null?void 0:d.parent)||c.parent;r(c),Vs(c,{attach:h},n),v&&i(c,v);return}if(u==="dispose"){c.__tres||(c=Vs(c,{},n)),c.__tres.dispose=h;return}if(Kr(c)&&g==="blocks-pointer-events"){h||h===""?c[g]=h:delete c[g];return}uy.includes(u)&&c.__tres&&(c.__tres.eventCount+=1);let m=Mu(g),y=_==null?void 0:_[m];if(g==="args"){const v=c,E=f??[],T=h??[],M=((p=c.__tres)==null?void 0:p.type)||c.type;M&&E.length&&!L3(E,T)&&(_=Object.assign(v,new im.value[M](...h)));return}if(_.type==="BufferGeometry"){if(g==="args")return;_.setAttribute(Mu(g),new Et(...h));return}if(g.includes("-")&&y===void 0){const v=g.split("-");y=v.reduce((E,T)=>E[Mu(T)],_),g=v.pop(),m=g,y!=null&&y.set||(_=v.reduce((E,T)=>E[Mu(T)],_))}let x=h;if(x===""&&(x=!0),Ws(y)){uy.includes(u)||(Gf(x)?c[m](...x):c[m](x)),m.startsWith("on")&&Ws(x)&&(_[m]=x);return}!(y!=null&&y.set)&&!Ws(y)?_[m]=x:y.constructor===x.constructor&&y!=null&&y.copy?y==null||y.copy(x):Gf(x)?y.set(...x):!y.isColor&&y.setScalar?y.setScalar(x):y.set(x),uE(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=Vs(new ct,{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:r,createElement:t,patchProp:s,parentNode:o,createText:()=>{},createComment:a,setText:()=>{},setElementText:()=>{},nextSibling:l,querySelector:()=>{},setScopeId:()=>{},cloneNode:()=>{},insertStaticContent:()=>{}}};function aU(){return gE().__VUE_DEVTOOLS_GLOBAL_HOOK__}function gE(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const lU=typeof Proxy=="function",cU="devtools-plugin:setup",uU="plugin:settings:set";let Fa,sm;function fU(){var n;return Fa!==void 0||(typeof window<"u"&&window.performance?(Fa=!0,sm=window.performance):typeof globalThis<"u"&&!((n=globalThis.perf_hooks)===null||n===void 0)&&n.performance?(Fa=!0,sm=globalThis.perf_hooks.performance):Fa=!1),Fa}function hU(){return fU()?sm.now():Date.now()}class dU{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 r=`__vue-devtools-plugin-settings__${e.id}`;let s=Object.assign({},i);try{const o=localStorage.getItem(r),a=JSON.parse(o);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(o){try{localStorage.setItem(r,JSON.stringify(o))}catch{}s=o},now(){return hU()}},t&&t.on(uU,(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 pU(n,e){const t=n,i=gE(),r=aU(),s=lU&&t.enableEarlyProxy;if(r&&(i.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))r.emit(cU,n,e);else{const o=s?new dU(t,r):null;(i.__VUE_DEVTOOLS_PLUGINS__=i.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}function mU(n,e){const t=`▲ ■ ●${n}`;typeof fy=="function"?fy(t,e):console.log(t)}function fy(n,e){throw new Error(n+e)}const _E=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=Jg(n);return t>0&&e.tags.push({label:`${q3(t)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:"Memory usage"}),n.type.includes("Light")&&(S3(n)&&e.tags.push({label:`${n.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:"Intensity"}),e.tags.push({label:`#${new Te(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 vE(n,e,t=""){n.children.forEach(i=>{if(i.type==="HightlightMesh"||t&&!i.type.includes(t)&&!i.name.includes(t))return;const r=_E(i);e.children.push(r),vE(i,r,t)})}const gU=[],Ba="tres:inspector",_U=hi({sceneGraph:null});function vU(n,e){pU({id:"dev.esm.tres",label:"TresJS 🪐",logo:"https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg",packageName:"tresjs",homepage:"https://tresjs.org",componentStateTypes:gU,app:n},t=>{typeof t.now!="function"&&mU("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:Ba,label:"TresJS 🪐",icon:"account_tree",treeFilterPlaceholder:"Search instances"}),setInterval(()=>{t.sendInspectorTree(Ba)},1e3),setInterval(()=>{t.notifyComponentUpdate()},5e3),t.on.getInspectorTree(s=>{if(s.inspectorId===Ba){const o=_E(e.scene.value);vE(e.scene.value,o,s.filter),_U.sceneGraph=o,s.rootNodes=[o]}});let i=null,r=null;t.on.getInspectorState(s=>{var o;if(s.inspectorId===Ba){const[a]=e.scene.value.getObjectsByProperty("uuid",s.nodeId);if(!a)return;if(r&&i&&i.parent&&r.remove(i),a.isMesh){const l=O3(a);a.add(l),i=l,r=a}s.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&&(s.state={...s.state,state:[{key:"Scene Info",value:{objects:a.children.length,memory:Jg(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(s=>{s.inspectorId===Ba&&D3(e.scene.value,s.nodeId,s.path,s.state.value)})})}const yU=["data-scene","data-tres"],xU=nn({__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,r=t,s=Zm(),o=Xe(),a=ze(new wh),l=On();rm(aN);const c=(p,_=!1)=>nn({setup(){var g;const m=(g=On())==null?void 0:g.appContext;m&&(m.app=l==null?void 0:l.appContext.app);const y={};function x(v){v&&(v.parent&&x(v.parent),v.provides&&Object.assign(y,v.provides))}return l!=null&&l.parent&&i.enableProvideBridge&&(x(l.parent),Reflect.ownKeys(y).forEach(v=>{Jr(v,y[v])})),Jr("useTres",p),Jr("extend",rm),typeof window<"u"&&vU(m==null?void 0:m.app,p),()=>Sr(Wt,null,_?[]:s.default())}}),u=(p,_=!1)=>{const g=c(p,_),{render:m}=Pb(oU(p));m(Sr(g),a.value)},f=(p,_=!1)=>{cE(p.scene.value),_&&(p.renderer.value.dispose(),p.renderer.value.renderLists.dispose(),p.renderer.value.forceContextLoss()),a.value.__tres={root:p}},h=ze(null);e({context:h,dispose:()=>f(h.value,!0)});const d=()=>{f(h.value),u(h.value,!0)};return Nn(()=>{const p=o;h.value=nU({scene:a.value,canvas:p,windowSize:i.windowSize??!1,rendererOptions:i,emit:r});const{registerCamera:_,camera:g,cameras:m,deregisterCamera:y}=h.value;u(h.value);const x=()=>{const v=new Xt(45,window.innerWidth/window.innerHeight,.1,1e3);v.position.set(3,3,3),v.lookAt(0,0,0),_(v);const E=ah(()=>{m.value.length>=2&&(v.removeFromParent(),y(v),E==null||E())})};qe(()=>i.camera,(v,E)=>{v&&_(v),E&&(E.removeFromParent(),y(E))},{immediate:!0}),g.value||x()}),qi(d),(p,_)=>(ln(),ui("canvas",{ref_key:"canvas",ref:o,"data-scene":a.value.uuid,class:ma(p.$attrs.class),"data-tres":`tresjs ${Rt(_3).version}`,style:gi({display:"block",width:"100%",height:"100%",position:p.windowSize?"fixed":"relative",top:0,left:0,pointerEvents:"auto",touchAction:"none",...p.$attrs.style})},null,14,yU))}}),bU={install(n){n.component("TresCanvas",xU)}};function cp(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 om(n,e,t=".",i){if(!cp(e))return om(n,{},t,i);const r=Object.assign({},e);for(const s in n){if(s==="__proto__"||s==="constructor")continue;const o=n[s];o!=null&&(i&&i(r,s,o,t)||(Array.isArray(o)&&Array.isArray(r[s])?r[s]=[...o,...r[s]]:cp(o)&&cp(r[s])?r[s]=om(o,r[s],(t?`${t}.`:"")+s.toString(),i):r[s]=o))}return r}function SU(n){return(...e)=>e.reduce((t,i)=>om(t,i,"",n),{})}const yE=SU();function xE(n){return th()?(Bm(n),!0):!1}function Qg(n){return typeof n=="function"?n():Rt(n)}const MU=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const EU=n=>n!=null,TU=Object.prototype.toString,Xf=n=>TU.call(n)==="[object Object]",Vu=()=>{};function wU(n){return On()}function AU(n,e){wU()&&qi(n,e)}function cl(n){var e;const t=Qg(n);return(e=t==null?void 0:t.$el)!=null?e:t}const bE=MU?window:void 0;function Ni(...n){let e,t,i,r;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,r]=n,e=bE):[e,t,i,r]=n,!e)return Vu;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const s=[],o=()=>{s.forEach(u=>u()),s.length=0},a=(u,f,h,d)=>(u.addEventListener(f,h,d),()=>u.removeEventListener(f,h,d)),l=qe(()=>[cl(e),Qg(r)],([u,f])=>{if(o(),!u)return;const h=Xf(f)?{...f}:f;s.push(...t.flatMap(d=>i.map(p=>a(u,d,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return xE(c),c}function CU(){const n=Xe(!1),e=On();return e&&Nn(()=>{n.value=!0},e),n}function RU(n){const e=CU();return Ce(()=>(e.value,!!n()))}function PU(n,e,t={}){const{root:i,rootMargin:r="0px",threshold:s=.1,window:o=bE,immediate:a=!0}=t,l=RU(()=>o&&"IntersectionObserver"in o),c=Ce(()=>{const p=Qg(n);return(Array.isArray(p)?p:[p]).map(cl).filter(EU)});let u=Vu;const f=Xe(a),h=l.value?qe(()=>[c.value,cl(i),f.value],([p,_])=>{if(u(),!f.value||!p.length)return;const g=new IntersectionObserver(e,{root:cl(_),rootMargin:r,threshold:s});p.forEach(m=>m&&g.observe(m)),u=()=>{g.disconnect(),u=Vu}},{immediate:a,flush:"post"}):Vu,d=()=>{u(),h(),f.value=!1};return xE(d),{isSupported:l,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:d}}const SE=1/60*1e3,IU=typeof performance<"u"?()=>performance.now():()=>Date.now(),ME=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(IU()),SE);function LU(n){let e=[],t=[],i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&r,h=f?e:t;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),f&&r&&(i=e.length)),l},cancel:l=>{const c=t.indexOf(l);c!==-1&&t.splice(c,1),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let c=0;c(n[e]=LU(()=>Xl=!0),n),{}),cm=mc.reduce((n,e)=>{const t=Yh[e];return n[e]=(i,r=!1,s=!1)=>(Xl||UU(),t.schedule(i,r,s)),n},{}),OU=mc.reduce((n,e)=>(n[e]=Yh[e].cancel,n),{});mc.reduce((n,e)=>(n[e]=()=>Yh[e].process(ea),n),{});const NU=n=>Yh[n].process(ea),EE=n=>{Xl=!1,ea.delta=am?SE:Math.max(Math.min(n-ea.timestamp,DU),1),ea.timestamp=n,lm=!0,mc.forEach(NU),lm=!1,Xl&&(am=!1,ME(EE))},UU=()=>{Xl=!0,am=!0,lm||ME(EE)},TE=()=>ea;function wE(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 r=0,i=Object.getOwnPropertySymbols(n);rMath.min(Math.max(t,n),e),dy=.001,FU=.01,BU=10,kU=.05,zU=1;function VU({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s,o=1-e;o=um(kU,zU,o),n=um(FU,BU,n/1e3),o<1?(r=c=>{const u=c*o,f=u*n,h=u-t,d=fm(c,o),p=Math.exp(-f);return dy-h/d*p},s=c=>{const f=c*o*n,h=f*t+t,d=Math.pow(o,2)*Math.pow(c,2)*n,p=Math.exp(-f),_=fm(Math.pow(c,2),o);return(-r(c)+dy>0?-1:1)*((h-d)*p)/_}):(r=c=>{const u=Math.exp(-c*n),f=(c-t)*n+1;return-.001+u*f},s=c=>{const u=Math.exp(-c*n),f=(t-c)*(n*n);return u*f});const a=5/n,l=GU(r,s,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 HU=12;function GU(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function $U(n){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},n);if(!py(n,XU)&&py(n,WU)){const t=VU(n);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function e_(n){var{from:e=0,to:t=1,restSpeed:i=2,restDelta:r}=n,s=wE(n,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:a,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:h}=$U(s),d=my,p=my;function _(){const g=u?-(u/1e3):0,m=t-e,y=l/(2*Math.sqrt(a*c)),x=Math.sqrt(a/c)/1e3;if(r===void 0&&(r=Math.min(Math.abs(t-e)/100,.4)),y<1){const v=fm(x,y);d=E=>{const T=Math.exp(-y*x*E);return t-T*((g+y*x*m)/v*Math.sin(v*E)+m*Math.cos(v*E))},p=E=>{const T=Math.exp(-y*x*E);return y*x*T*(Math.sin(v*E)*(g+y*x*m)/v+m*Math.cos(v*E))-T*(Math.cos(v*E)*(g+y*x*m)-v*m*Math.sin(v*E))}}else if(y===1)d=v=>t-Math.exp(-x*v)*(m+(g+x*m)*v);else{const v=x*Math.sqrt(y*y-1);d=E=>{const T=Math.exp(-y*x*E),M=Math.min(v*E,300);return t-T*((g+y*x*m)*Math.sinh(M)+v*m*Math.cosh(M))/v}}}return _(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const y=p(g)*1e3,x=Math.abs(y)<=i,v=Math.abs(t-m)<=r;o.done=x&&v}return o.value=o.done?t:m,o},flipTarget:()=>{u=-u,[e,t]=[t,e],_()}}}e_.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const my=n=>0,AE=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},t_=(n,e,t)=>-t*n+t*e+n,CE=(n,e)=>t=>Math.max(Math.min(t,e),n),ul=n=>n%1?Number(n.toFixed(5)):n,$l=/(-)?([\d]*\.?[\d])+/g,hm=/(#[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,qU=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function gc(n){return typeof n=="string"}const _c={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},fl=Object.assign(Object.assign({},_c),{transform:CE(0,1)}),Tu=Object.assign(Object.assign({},_c),{default:1}),n_=n=>({test:e=>gc(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),Ns=n_("deg"),hl=n_("%"),nt=n_("px"),gy=Object.assign(Object.assign({},hl),{parse:n=>hl.parse(n)/100,transform:n=>hl.transform(n*100)}),i_=(n,e)=>t=>!!(gc(t)&&qU.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),RE=(n,e,t)=>i=>{if(!gc(i))return i;const[r,s,o,a]=i.match($l);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},js={test:i_("hsl","hue"),parse:RE("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+hl.transform(ul(e))+", "+hl.transform(ul(t))+", "+ul(fl.transform(i))+")"},YU=CE(0,255),up=Object.assign(Object.assign({},_c),{transform:n=>Math.round(YU(n))}),Zr={test:i_("rgb","red"),parse:RE("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+up.transform(n)+", "+up.transform(e)+", "+up.transform(t)+", "+ul(fl.transform(i))+")"};function jU(n){let e="",t="",i="",r="";return n.length>5?(e=n.substr(1,2),t=n.substr(3,2),i=n.substr(5,2),r=n.substr(7,2)):(e=n.substr(1,1),t=n.substr(2,1),i=n.substr(3,1),r=n.substr(4,1),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const dm={test:i_("#"),parse:jU,transform:Zr.transform},Vn={test:n=>Zr.test(n)||dm.test(n)||js.test(n),parse:n=>Zr.test(n)?Zr.parse(n):js.test(n)?js.parse(n):dm.parse(n),transform:n=>gc(n)?n:n.hasOwnProperty("red")?Zr.transform(n):js.transform(n)},PE="${c}",IE="${n}";function KU(n){var e,t,i,r;return isNaN(n)&&gc(n)&&((t=(e=n.match($l))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((r=(i=n.match(hm))===null||i===void 0?void 0:i.length)!==null&&r!==void 0?r:0)>0}function LE(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0;const i=n.match(hm);i&&(t=i.length,n=n.replace(hm,PE),e.push(...i.map(Vn.parse)));const r=n.match($l);return r&&(n=n.replace($l,IE),e.push(...r.map(_c.parse))),{values:e,numColors:t,tokenised:n}}function DE(n){return LE(n).values}function OE(n){const{values:e,numColors:t,tokenised:i}=LE(n),r=e.length;return s=>{let o=i;for(let a=0;atypeof n=="number"?0:n;function JU(n){const e=DE(n);return OE(n)(e.map(ZU))}const vc={test:KU,parse:DE,createTransformer:OE,getAnimatableNone:JU},QU=new Set(["brightness","contrast","saturate","opacity"]);function eF(n){let[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match($l)||[];if(!i)return n;const r=t.replace(i,"");let s=QU.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const tF=/([a-z-]*)\(.*?\)/g,pm=Object.assign(Object.assign({},vc),{getAnimatableNone:n=>{const e=n.match(tF);return e?e.map(eF).join(" "):n}});function fp(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 _y({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=fp(l,a,n+1/3),s=fp(l,a,n),o=fp(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const nF=(n,e,t)=>{const i=n*n,r=e*e;return Math.sqrt(Math.max(0,t*(r-i)+i))},iF=[dm,Zr,js],vy=n=>iF.find(e=>e.test(n)),NE=(n,e)=>{let t=vy(n),i=vy(e),r=t.parse(n),s=i.parse(e);t===js&&(r=_y(r),t=Zr),i===js&&(s=_y(s),i=Zr);const o=Object.assign({},r);return a=>{for(const l in o)l!=="alpha"&&(o[l]=nF(r[l],s[l],a));return o.alpha=t_(r.alpha,s.alpha,a),t.transform(o)}},rF=n=>typeof n=="number",sF=(n,e)=>t=>e(n(t)),UE=(...n)=>n.reduce(sF);function FE(n,e){return rF(n)?t=>t_(n,e,t):Vn.test(n)?NE(n,e):kE(n,e)}const BE=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>FE(s,e[o]));return s=>{for(let o=0;o{const t=Object.assign(Object.assign({},n),e),i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=FE(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}};function yy(n){const e=vc.parse(n),t=e.length;let i=0,r=0,s=0;for(let o=0;o{const t=vc.createTransformer(e),i=yy(n),r=yy(e);return i.numHSL===r.numHSL&&i.numRGB===r.numRGB&&i.numNumbers>=r.numNumbers?UE(BE(i.parsed,r.parsed),t):o=>`${o>0?e:n}`},aF=(n,e)=>t=>t_(n,e,t);function lF(n){if(typeof n=="number")return aF;if(typeof n=="string")return Vn.test(n)?NE:kE;if(Array.isArray(n))return BE;if(typeof n=="object")return oF}function cF(n,e,t){const i=[],r=t||lF(n[0]),s=n.length-1;for(let o=0;ot(AE(n,e,i))}function fF(n,e){const t=n.length,i=t-1;return r=>{let s=0,o=!1;if(r<=n[0]?o=!0:r>=n[i]&&(s=i-1,o=!0),!o){let l=1;for(;lr||l===i);l++);s=l-1}const a=AE(n[s],n[s+1],r);return e[s](a)}}function zE(n,e,{clamp:t=!0,ease:i,mixer:r}={}){const s=n.length;hy(s===e.length),hy(!i||!Array.isArray(i)||i.length===s-1),n[0]>n[s-1]&&(n=[].concat(n),e=[].concat(e),n.reverse(),e.reverse());const o=cF(e,i,r),a=s===2?uF(n,o):fF(n,o);return t?l=>a(um(n[0],n[s-1],l)):a}const jh=n=>e=>1-n(1-e),r_=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,hF=n=>e=>Math.pow(e,n),VE=n=>e=>e*e*((n+1)*e-n),dF=n=>{const e=VE(n);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},HE=1.525,pF=4/11,mF=8/11,gF=9/10,GE=n=>n,s_=hF(2),_F=jh(s_),WE=r_(s_),XE=n=>1-Math.sin(Math.acos(n)),$E=jh(XE),vF=r_($E),o_=VE(HE),yF=jh(o_),xF=r_(o_),bF=dF(HE),SF=4356/361,MF=35442/1805,EF=16061/1805,$f=n=>{if(n===1||n===0)return n;const e=n*n;return nn<.5?.5*(1-$f(1-n*2)):.5*$f(n*2-1)+.5;function AF(n,e){return n.map(()=>e||WE).splice(0,n.length-1)}function CF(n){const e=n.length;return n.map((t,i)=>i!==0?i/(e-1):0)}function RF(n,e){return n.map(t=>t*e)}function Hu({from:n=0,to:e=1,ease:t,offset:i,duration:r=300}){const s={done:!1,value:n},o=Array.isArray(e)?e:[n,e],a=RF(i&&i.length===o.length?i:CF(o),r);function l(){return zE(a,o,{ease:Array.isArray(t)?t:AF(o,t)})}let c=l();return{next:u=>(s.value=c(u),s.done=u>=r,s),flipTarget:()=>{o.reverse(),c=l()}}}function PF({velocity:n=0,from:e=0,power:t=.8,timeConstant:i=350,restDelta:r=.5,modifyTarget:s}){const o={done:!1,value:e};let a=t*n;const l=e+a,c=s===void 0?l:s(l);return c!==l&&(a=c-e),{next:u=>{const f=-a*Math.exp(-u/i);return o.done=!(f>r||f<-r),o.value=o.done?c:c+f,o},flipTarget:()=>{}}}const xy={keyframes:Hu,spring:e_,decay:PF};function IF(n){if(Array.isArray(n.to))return Hu;if(xy[n.type])return xy[n.type];const e=new Set(Object.keys(n));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Hu:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?e_:Hu}function qE(n,e,t=0){return n-e-t}function LF(n,e,t=0,i=!0){return i?qE(e+-n,e,t):e-(n-e)+t}function DF(n,e,t,i){return i?n>=e+t:n<=-t}const OF=n=>{const e=({delta:t})=>n(t);return{start:()=>cm.update(e,!0),stop:()=>OU.update(e)}};function YE(n){var e,t,{from:i,autoplay:r=!0,driver:s=OF,elapsed:o=0,repeat:a=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=n,_=wE(n,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=_,m,y=0,x=_.duration,v,E=!1,T=!0,M;const P=IF(_);!((t=(e=P).needsInterpolation)===null||t===void 0)&&t.call(e,i,g)&&(M=zE([0,100],[i,g],{clamp:!1}),i=0,g=100);const b=P(Object.assign(Object.assign({},_),{from:i,to:g}));function S(){y++,l==="reverse"?(T=y%2===0,o=LF(o,x,c,T)):(o=qE(o,x,c),l==="mirror"&&b.flipTarget()),E=!1,d&&d()}function D(){m.stop(),h&&h()}function B($){if(T||($=-$),o+=$,!E){const ee=b.next(Math.max(0,o));v=ee.value,M&&(v=M(v)),E=T?ee.done:o<=0}p==null||p(v),E&&(y===0&&(x??(x=o)),y{f==null||f(),m.stop()}}}function jE(n,e){return e?n*(1e3/e):0}function NF({from:n=0,velocity:e=0,min:t,max:i,power:r=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:f,onComplete:h,onStop:d}){let p;function _(x){return t!==void 0&&xi}function g(x){return t===void 0?i:i===void 0||Math.abs(t-x){var E;f==null||f(v),(E=x.onUpdate)===null||E===void 0||E.call(x,v)},onComplete:h,onStop:d}))}function y(x){m(Object.assign({type:"spring",stiffness:o,damping:a,restDelta:l},x))}if(_(n))y({from:n,velocity:e,to:g(n)});else{let x=r*e+n;typeof c<"u"&&(x=c(x));const v=g(x),E=v===t?-1:1;let T,M;const P=b=>{T=M,M=b,e=jE(b-T,TE().delta),(E===1&&b>v||E===-1&&bp==null?void 0:p.stop()}}const KE=(n,e)=>1-3*e+3*n,ZE=(n,e)=>3*e-6*n,JE=n=>3*n,qf=(n,e,t)=>((KE(e,t)*n+ZE(e,t))*n+JE(e))*n,QE=(n,e,t)=>3*KE(e,t)*n*n+2*ZE(e,t)*n+JE(e),UF=1e-7,FF=10;function BF(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=qf(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>UF&&++a=zF?VF(o,f,n,t):h===0?f:BF(o,a,a+wu,n,t)}return o=>o===0||o===1?o:qf(s(o),e,i)}const hp={};var GF=Object.defineProperty,WF=(n,e,t)=>e in n?GF(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,XF=(n,e,t)=>(WF(n,e+"",t),t);class $F{constructor(){XF(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 r of this.subscriptions)r(e,t,i)}clear(){this.subscriptions.clear()}}var qF=Object.defineProperty,YF=(n,e,t)=>e in n?qF(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ui=(n,e,t)=>(YF(n,typeof e!="symbol"?e+"":e,t),t);function by(n){return!Number.isNaN(Number.parseFloat(n))}class jF{constructor(e){Ui(this,"current"),Ui(this,"prev"),Ui(this,"timeDelta",0),Ui(this,"lastUpdated",0),Ui(this,"updateSubscribers",new $F),Ui(this,"stopAnimation"),Ui(this,"canTrackVelocity",!1),Ui(this,"updateAndNotify",t=>{this.prev=this.current,this.current=t;const{delta:i,timestamp:r}=TE();this.lastUpdated!==r&&(this.timeDelta=i,this.lastUpdated=r),cm.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)}),Ui(this,"scheduleVelocityCheck",()=>cm.postRender(this.velocityCheck)),Ui(this,"velocityCheck",({timestamp:t})=>{this.canTrackVelocity||(this.canTrackVelocity=by(this.current)),t!==this.lastUpdated&&(this.prev=this.current)}),this.prev=this.current=e,this.canTrackVelocity=by(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?jE(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 KF(n){return new jF(n)}const{isArray:ZF}=Array;function JF(){const n=Xe({}),e=i=>{const r=s=>{n.value[s]&&(n.value[s].stop(),n.value[s].destroy(),delete n.value[s])};i?ZF(i)?i.forEach(r):r(i):Object.keys(n.value).forEach(r)},t=(i,r,s)=>{if(n.value[i])return n.value[i];const o=KF(r);return o.onChange(a=>s[i]=a),n.value[i]=o,o};return AU(e),{motionValues:n,get:t,stop:e}}function QF(n){return Array.isArray(n)}function Us(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function dp(n){return{type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function eB(n){return{type:"spring",stiffness:550,damping:n===0?100:30,restDelta:.01,restSpeed:10}}function pp(){return{type:"keyframes",ease:"linear",duration:300}}function tB(n){return{type:"keyframes",duration:800,values:n}}const Sy={default:eB,x:Us,y:Us,z:Us,rotate:Us,rotateX:Us,rotateY:Us,rotateZ:Us,scaleX:dp,scaleY:dp,scale:dp,backgroundColor:pp,color:pp,opacity:pp};function eT(n,e){let t;return QF(e)?t=tB:t=Sy[n]||Sy.default,{to:e,...t(e)}}const My={..._c,transform:Math.round},tT={color:Vn,backgroundColor:Vn,outlineColor:Vn,fill:Vn,stroke:Vn,borderColor:Vn,borderTopColor:Vn,borderRightColor:Vn,borderBottomColor:Vn,borderLeftColor:Vn,borderWidth:nt,borderTopWidth:nt,borderRightWidth:nt,borderBottomWidth:nt,borderLeftWidth:nt,borderRadius:nt,radius:nt,borderTopLeftRadius:nt,borderTopRightRadius:nt,borderBottomRightRadius:nt,borderBottomLeftRadius:nt,width:nt,maxWidth:nt,height:nt,maxHeight:nt,size:nt,top:nt,right:nt,bottom:nt,left:nt,padding:nt,paddingTop:nt,paddingRight:nt,paddingBottom:nt,paddingLeft:nt,margin:nt,marginTop:nt,marginRight:nt,marginBottom:nt,marginLeft:nt,rotate:Ns,rotateX:Ns,rotateY:Ns,rotateZ:Ns,scale:Tu,scaleX:Tu,scaleY:Tu,scaleZ:Tu,skew:Ns,skewX:Ns,skewY:Ns,distance:nt,translateX:nt,translateY:nt,translateZ:nt,x:nt,y:nt,z:nt,perspective:nt,transformPerspective:nt,opacity:fl,originX:gy,originY:gy,originZ:nt,zIndex:My,filter:pm,WebkitFilter:pm,fillOpacity:fl,strokeOpacity:fl,numOctaves:My},a_=n=>tT[n];function mm(n,e){return e&&typeof n=="number"&&e.transform?e.transform(n):n}function nB(n,e){let t=a_(n);return t!==pm&&(t=vc),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const iB={linear:GE,easeIn:s_,easeInOut:WE,easeOut:_F,circIn:XE,circInOut:vF,circOut:$E,backIn:o_,backInOut:xF,backOut:yF,anticipate:bF,bounceIn:TF,bounceInOut:wF,bounceOut:$f};function Ey(n){if(Array.isArray(n)){const[e,t,i,r]=n;return HF(e,t,i,r)}else if(typeof n=="string")return iB[n];return n}function rB(n){return Array.isArray(n)&&typeof n[0]!="number"}function Ty(n,e){return n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&vc.test(e)&&!e.startsWith("url("))}function sB(n){return Array.isArray(n.to)&&n.to[0]===null&&(n.to=[...n.to],n.to[0]=n.from),n}function oB({ease:n,times:e,delay:t,...i}){const r={...i};return e&&(r.offset=e),n&&(r.ease=rB(n)?n.map(Ey):Ey(n)),t&&(r.elapsed=-t),r}function aB(n,e,t){return Array.isArray(e.to)&&(n.duration||(n.duration=800)),sB(e),lB(n)||(n={...n,...eT(t,e.to)}),{...e,...oB(n)}}function lB({delay:n,repeat:e,repeatType:t,repeatDelay:i,from:r,...s}){return!!Object.keys(s).length}function cB(n,e){return n[e]||n.default||n}function uB(n,e,t,i,r){const s=cB(i,n);let o=s.from===null||s.from===void 0?e.get():s.from;const a=Ty(n,t);o==="none"&&a&&typeof t=="string"&&(o=nB(n,t));const l=Ty(n,o);function c(f){const h={from:o,to:t,velocity:i.velocity?i.velocity:e.getVelocity(),onUpdate:d=>e.set(d)};return s.type==="inertia"||s.type==="decay"?NF({...h,...s}):YE({...aB(s,h,n),onUpdate:d=>{h.onUpdate(d),s.onUpdate&&s.onUpdate(d)},onComplete:()=>{r&&r(),f&&f()}})}function u(f){return e.set(t),r&&r(),f&&f(),{stop:()=>{}}}return!l||!a||s.type===!1?u:c}function fB(){const{motionValues:n,stop:e,get:t}=JF();return{motionValues:n,stop:e,push:(r,s,o,a={},l)=>{const c=o[r],u=t(r,c,o);if(a&&a.immediate){u.set(s);return}const f=uB(r,u,s,a,l);u.start(f)}}}function hB(n,e={},{motionValues:t,push:i,stop:r}=fB()){const s=Rt(e),o=Xe(!1);qe(t,f=>{o.value=Object.values(f).filter(h=>h.isAnimating()).length>0},{immediate:!0,deep:!0});const a=f=>{if(!s||!s[f])throw new Error(`The variant ${f} does not exist.`);return s[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||eT(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=Xf(f)?f:a(f);Object.entries(h).forEach(([d,p])=>{d!=="transition"&&i(d,p,n,{immediate:!0})})},leave:async f=>{let h;if(s&&(s.leave&&(h=s.leave),!s.leave&&s.initial&&(h=s.initial)),!h){f();return}await l(h),f()},stop:r}}const l_=typeof window<"u",dB=()=>l_&&(window.onpointerdown===null||void 0),pB=()=>l_&&(window.ontouchstart===null||void 0),mB=()=>l_&&(window.onmousedown===null||void 0);function gB({target:n,state:e,variants:t,apply:i}){const r=Rt(t),s=Xe(!1),o=Xe(!1),a=Xe(!1),l=Ce(()=>{let u=[...Object.keys(e.value||{})];return r&&(r.hovered&&(u=[...u,...Object.keys(r.hovered)]),r.tapped&&(u=[...u,...Object.keys(r.tapped)]),r.focused&&(u=[...u,...Object.keys(r.focused)])),u}),c=Ce(()=>{const u={};Object.assign(u,e.value),s.value&&r.hovered&&Object.assign(u,r.hovered),o.value&&r.tapped&&Object.assign(u,r.tapped),a.value&&r.focused&&Object.assign(u,r.focused);for(const f in u)l.value.includes(f)||delete u[f];return u});r.hovered&&(Ni(n,"mouseenter",()=>s.value=!0),Ni(n,"mouseleave",()=>{s.value=!1,o.value=!1})),r.tapped&&(mB()&&(Ni(n,"mousedown",()=>o.value=!0),Ni(n,"mouseup",()=>o.value=!1)),dB()&&(Ni(n,"pointerdown",()=>o.value=!0),Ni(n,"pointerup",()=>o.value=!1)),pB()&&(Ni(n,"touchstart",()=>o.value=!0),Ni(n,"touchend",()=>o.value=!1))),r.focused&&(Ni(n,"focus",()=>a.value=!0),Ni(n,"blur",()=>a.value=!1)),qe([s,o,a],()=>{i(c.value)})}function _B({set:n,target:e,variants:t,variant:i}){const r=Rt(t);qe(()=>e,()=>{r&&(r.initial&&(n("initial"),i.value="initial"),r.enter&&(i.value="enter"))},{immediate:!0,flush:"pre"})}function vB({state:n,apply:e}){qe(n,t=>{t&&e(t)},{immediate:!0})}function nT({target:n,variants:e,variant:t}){const i=Rt(e);i&&(i.visible||i.visibleOnce)&&PU(n,([{isIntersecting:r}])=>{i.visible?r?t.value="visible":t.value="initial":i.visibleOnce&&(r&&t.value!=="visibleOnce"?t.value="visibleOnce":t.value||(t.value="initial"))})}function yB(n,e={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){e.lifeCycleHooks&&_B(n),e.syncVariants&&vB(n),e.visibilityHooks&&nT(n),e.eventListeners&&gB(n)}function iT(n={}){const e=hi({...n}),t=Xe({});return qe(e,()=>{const i={};for(const[r,s]of Object.entries(e)){const o=a_(r),a=mm(s,o);i[r]=a}t.value=i},{immediate:!0,deep:!0}),{state:e,style:t}}function c_(n,e){qe(()=>cl(n),t=>{t&&e(t)},{immediate:!0})}const xB={x:"translateX",y:"translateY",z:"translateZ"};function rT(n={},e=!0){const t=hi({...n}),i=Xe("");return qe(t,r=>{let s="",o=!1;if(e&&(r.x||r.y||r.z)){const a=[r.x||0,r.y||0,r.z||0].map(l=>mm(l,nt)).join(",");s+=`translate3d(${a}) `,o=!0}for(const[a,l]of Object.entries(r)){if(e&&(a==="x"||a==="y"||a==="z"))continue;const c=a_(a),u=mm(l,c);s+=`${xB[a]||a}(${u}) `}e&&!o&&(s+="translateZ(0px) "),i.value=s.trim()},{immediate:!0,deep:!0}),{state:t,transform:i}}const bB=["","X","Y","Z"],SB=["perspective","translate","scale","rotate","skew"],sT=["transformPerspective","x","y","z"];SB.forEach(n=>{bB.forEach(e=>{const t=n+e;sT.push(t)})});const MB=new Set(sT);function u_(n){return MB.has(n)}const EB=new Set(["originX","originY","originZ"]);function oT(n){return EB.has(n)}function TB(n){const e={},t={};return Object.entries(n).forEach(([i,r])=>{u_(i)||oT(i)?e[i]=r:t[i]=r}),{transform:e,style:t}}function Kh(n){const{transform:e,style:t}=TB(n),{transform:i}=rT(e),{style:r}=iT(t);return i.value&&(r.value.transform=i.value),r.value}function wB(n,e){let t,i;const{state:r,style:s}=iT();return c_(n,o=>{i=o;for(const a of Object.keys(tT))o.style[a]===null||o.style[a]===""||u_(a)||oT(a)||(r[a]=o.style[a]);t&&Object.entries(t).forEach(([a,l])=>o.style[a]=l),e&&e(r)}),qe(s,o=>{if(!i){t=o;return}for(const a in o)i.style[a]=o[a]},{immediate:!0}),{style:r}}function AB(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,r)=>{if(!r)return i;const[s,o]=r.split("("),l=o.split(",").map(u=>t(u.endsWith(")")?u.replace(")",""):u.trim())),c=l.length===1?l[0]:l;return{...i,[s]:c}},{})}function CB(n,e){Object.entries(AB(e)).forEach(([t,i])=>{const r=["x","y","z"];if(t==="translate3d"){if(i===0){r.forEach(s=>n[s]=0);return}i.forEach((s,o)=>n[r[o]]=s);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 RB(n,e){let t,i;const{state:r,transform:s}=rT();return c_(n,o=>{i=o,o.style.transform&&CB(r,o.style.transform),t&&(o.style.transform=t),e&&e(r)}),qe(s,o=>{if(!i){t=o;return}i.style.transform=o},{immediate:!0}),{transform:r}}function PB(n){return Object.entries(n)}function IB(n,e){const t=hi({}),i=o=>Object.entries(o).forEach(([a,l])=>t[a]=l),{style:r}=wB(n,i),{transform:s}=RB(n,i);return qe(t,o=>{PB(o).forEach(([a,l])=>{const c=u_(a)?s:r;c[a]&&c[a]===l||(c[a]=l)})},{immediate:!0,deep:!0}),c_(n,()=>e),{motionProperties:t,style:r,transform:s}}function LB(n={}){const e=Rt(n),t=Xe();return{state:Ce(()=>{if(t.value)return e[t.value]}),variant:t}}function aT(n,e={},t){const{motionProperties:i}=IB(n),{variant:r,state:s}=LB(e),o=hB(i,e),a={target:n,variant:r,variants:e,state:s,motionProperties:i,...o};return yB(a,t),a}const lT=["delay","duration"],DB=["initial","enter","leave","visible","visible-once","visibleOnce","hovered","tapped","focused",...lT];function OB(n){return lT.includes(n)}function NB(n,e){const t=n.props?n.props:n.data&&n.data.attrs?n.data.attrs:{};if(t){t.variants&&Xf(t.variants)&&(e.value={...e.value,...t.variants});for(let i of DB)if(!(!t||!t[i])){if(OB(i)&&typeof t[i]=="number"){for(const r of["enter","visible","visibleOnce"]){const s=e.value[r];s!=null&&(s.transition??(s.transition={}),s.transition[i]=t[i])}continue}if(Xf(t[i])){const r=t[i];i==="visible-once"&&(i="visibleOnce"),e.value[i]=r}}}}function mp(n,e=!1){return{created:(r,s,o)=>{const a=s.value&&typeof s.value=="string"?s.value:o.key;a&&hp[a]&&hp[a].stop();const l=e?structuredClone(st(n)||{}):n||{},c=Xe(l);typeof s.value=="object"&&(c.value=s.value),NB(o,c);const f=aT(r,c,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});r.motionInstance=f,a&&(hp[a]=f)},mounted:(r,s,o)=>{r.motionInstance&&nT(r.motionInstance)},getSSRProps(r,s){let{initial:o}=r.value||s&&(s==null?void 0:s.props)||{};o=Rt(o);const a=yE({},(n==null?void 0:n.initial)||{},o||{});return!a||Object.keys(a).length===0?void 0:{style:Kh(a)}}}}const UB={initial:{opacity:0},enter:{opacity:1}},FB={initial:{opacity:0},visible:{opacity:1}},BB={initial:{opacity:0},visibleOnce:{opacity:1}},kB={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},zB={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},VB={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},HB={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},GB={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},WB={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},XB={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},$B={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},qB={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},YB={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},jB={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},KB={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},ZB={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},JB={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},QB={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},ek={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},tk={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},nk={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},ik={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},rk={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},sk={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},ok={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},ak={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},lk={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},ck={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},uk={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},fk={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Xs={__proto__:null,fade:UB,fadeVisible:FB,fadeVisibleOnce:BB,pop:kB,popVisible:zB,popVisibleOnce:VB,rollBottom:ZB,rollLeft:HB,rollRight:XB,rollTop:YB,rollVisibleBottom:JB,rollVisibleLeft:GB,rollVisibleOnceBottom:QB,rollVisibleOnceLeft:WB,rollVisibleOnceRight:qB,rollVisibleOnceTop:KB,rollVisibleRight:$B,rollVisibleTop:jB,slideBottom:ck,slideLeft:ek,slideRight:ik,slideTop:ok,slideVisibleBottom:uk,slideVisibleLeft:tk,slideVisibleOnceBottom:fk,slideVisibleOnceLeft:nk,slideVisibleOnceRight:sk,slideVisibleOnceTop:lk,slideVisibleRight:rk,slideVisibleTop:ak};function hk(n){const e="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;",t="aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------",i=new RegExp(e.split("").join("|"),"g");return n.toString().replace(/[A-Z]/g,r=>`-${r}`).toLowerCase().replace(/\s+/g,"-").replace(i,r=>t.charAt(e.indexOf(r))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/-+$/,"")}const cT=Symbol(import.meta.dev?"motionCustomPresets":""),uT={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 dk(n){return Object.prototype.toString.call(n)==="[object Object]"}function gm(n){if(Array.isArray(n))return n.map(gm);if(dk(n)){const e={};for(const t in n)e[t]=gm(n[t]);return e}return n}function fT(n){const e=hi({}),t=In(cT,{}),i=Ce(()=>n.preset==null?{}:t!=null&&n.preset in t?structuredClone(st(t)[n.preset]):n.preset in Xs?structuredClone(Xs[n.preset]):{}),r=Ce(()=>({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 s(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=Ce(()=>{const l=yE({},r.value,i.value,n.variants||{});return s({...l},n)});if(import.meta.dev){n.preset!=null&&(Xs==null?void 0:Xs[n.preset])==null&&(t==null?void 0:t[n.preset])==null&&console.warn(`[@vueuse/motion]: Preset \`${n.preset}\` not found.`);const l=c=>{var u;(u=c.variants)!=null&&u.initial&&c.set("initial"),cs(()=>{var f,h,d;(f=c.variants)!=null&&f.enter&&c.apply("enter"),(h=c.variants)!=null&&h.visible&&c.apply("visible"),(d=c.variants)!=null&&d.visibleOnce&&c.apply("visibleOnce")})};pb(()=>{for(const c in e)l(e[c])})}function a(l,c,u){var f;l.props??(l.props={}),(f=l.props).style??(f.style={}),l.props.style={...l.props.style,...u};const h=s(gm(o.value),l.props);return l.props.onVnodeMounted=({el:d})=>{e[c]=aT(d,h)},l.props.onVnodeUpdated=({el:d})=>{const p=Kh(e[c].state);for(const[_,g]of Object.entries(p))d.style[_]=g},l}return{motionConfig:o,setNodeInstance:a}}const pk=nn({name:"Motion",props:{...uT,is:{type:[String,Object],default:"div"}},setup(n){const e=Zm(),{motionConfig:t,setNodeInstance:i}=fT(n);return()=>{const r=Kh(t.value.initial||{}),s=Sr(n.is,void 0,e);return i(s,0,r),s}}}),mk=nn({name:"MotionGroup",props:{...uT,is:{type:[String,Object],required:!1}},setup(n){const e=Zm(),{motionConfig:t,setNodeInstance:i}=fT(n);return()=>{var o;const r=Kh(t.value.initial||{}),s=((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=r(p,i.minimum,1),t.status=p===1?null:p;var g=t.render(!_),m=g.querySelector(i.barSelector),y=i.speed,x=i.easing;return g.offsetWidth,a(function(v){i.positionUsing===""&&(i.positionUsing=t.getPositioningCSS()),l(m,o(p,y,x)),p===1?(l(g,{transition:"none",opacity:1}),g.offsetWidth,setTimeout(function(){l(g,{transition:"all "+y+"ms linear",opacity:0}),setTimeout(function(){t.remove(),v()},y)},y)):setTimeout(v,y)}),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-_)*r(Math.random()*_,.1,.95)),_=r(_+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":s(t.status||0),y=document.querySelector(i.parent),x;return l(g,{transition:"all 0 linear",transform:"translate3d("+m+"%,0,0)"}),i.showSpinner||(x=_.querySelector(i.spinnerSelector),x&&d(x)),y!=document.body&&u(y,"nprogress-custom-parent"),y.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 r(p,_,g){return p<_?_:p>g?g:p}function s(p){return(-1+p)*100}function o(p,_,g){var m;return i.positionUsing==="translate3d"?m={transform:"translate3d("+s(p)+"%,0,0)"}:i.positionUsing==="translate"?m={transform:"translate("+s(p)+"%,0)"}:m={"margin-left":s(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(v){return v.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(E,T){return T.toUpperCase()})}function m(v){var E=document.body.style;if(v in E)return v;for(var T=p.length,M=v.charAt(0).toUpperCase()+v.slice(1),P;T--;)if(P=p[T]+M,P in E)return P;return v}function y(v){return v=g(v),_[v]||(_[v]=m(v))}function x(v,E,T){E=y(E),v.style[E]=T}return function(v,E){var T=arguments,M,P;if(T.length==2)for(M in E)P=E[M],P!==void 0&&E.hasOwnProperty(M)&&x(v,M,P);else x(v,T[1],T[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})}(Wu)),Wu.exports}var xk=yk();const hT=_k(xk);/*! +}`;class tN{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const r=new kt,s=e.properties.get(r);s.__webglTexture=t.texture,(t.depthNear!==i.depthNear||t.depthFar!==i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new Ci({vertexShader:Q2,fragmentShader:eN,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new zt(new xa(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class nN extends ji{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,d=null,p=null;const _=new tN,g=t.getContextAttributes();let m=null,y=null;const x=[],v=[],E=new fe;let T=null;const M=new Xt;M.viewport=new ht;const P=new Xt;P.viewport=new ht;const b=[M,P],S=new NM;let D=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(se){let ge=x[se];return ge===void 0&&(ge=new Uu,x[se]=ge),ge.getTargetRaySpace()},this.getControllerGrip=function(se){let ge=x[se];return ge===void 0&&(ge=new Uu,x[se]=ge),ge.getGripSpace()},this.getHand=function(se){let ge=x[se];return ge===void 0&&(ge=new Uu,x[se]=ge),ge.getHandSpace()};function H(se){const ge=v.indexOf(se.inputSource);if(ge===-1)return;const be=x[ge];be!==void 0&&(be.update(se.inputSource,se.frame,c||o),be.dispatchEvent({type:se.type,data:se.inputSource}))}function $(){r.removeEventListener("select",H),r.removeEventListener("selectstart",H),r.removeEventListener("selectend",H),r.removeEventListener("squeeze",H),r.removeEventListener("squeezestart",H),r.removeEventListener("squeezeend",H),r.removeEventListener("end",$),r.removeEventListener("inputsourceschange",ee);for(let se=0;se=0&&(v[W]=null,x[W].disconnect(be))}for(let ge=0;ge=v.length){v.push(be),W=ue;break}else if(v[ue]===null){v[ue]=be,W=ue;break}if(W===-1)break}const ae=x[W];ae&&ae.connect(be)}}const Z=new F,te=new F;function Q(se,ge,be){Z.setFromMatrixPosition(ge.matrixWorld),te.setFromMatrixPosition(be.matrixWorld);const W=Z.distanceTo(te),ae=ge.projectionMatrix.elements,ue=be.projectionMatrix.elements,le=ae[14]/(ae[10]-1),De=ae[14]/(ae[10]+1),I=(ae[9]+1)/ae[5],L=(ae[9]-1)/ae[5],w=(ae[8]-1)/ae[0],j=(ue[8]+1)/ue[0],G=le*w,q=le*j,R=W/(-w+j),N=R*-w;if(ge.matrixWorld.decompose(se.position,se.quaternion,se.scale),se.translateX(N),se.translateZ(R),se.matrixWorld.compose(se.position,se.quaternion,se.scale),se.matrixWorldInverse.copy(se.matrixWorld).invert(),ae[10]===-1)se.projectionMatrix.copy(ge.projectionMatrix),se.projectionMatrixInverse.copy(ge.projectionMatrixInverse);else{const V=le+R,A=De+R,C=G-N,k=q+(W-N),U=I*De/A*V,z=L*De/A*V;se.projectionMatrix.makePerspective(C,k,U,z,V,A),se.projectionMatrixInverse.copy(se.projectionMatrix).invert()}}function pe(se,ge){ge===null?se.matrixWorld.copy(se.matrix):se.matrixWorld.multiplyMatrices(ge.matrixWorld,se.matrix),se.matrixWorldInverse.copy(se.matrixWorld).invert()}this.updateCamera=function(se){if(r===null)return;let ge=se.near,be=se.far;_.texture!==null&&(_.depthNear>0&&(ge=_.depthNear),_.depthFar>0&&(be=_.depthFar)),S.near=P.near=M.near=ge,S.far=P.far=M.far=be,(D!==S.near||B!==S.far)&&(r.updateRenderState({depthNear:S.near,depthFar:S.far}),D=S.near,B=S.far),M.layers.mask=se.layers.mask|2,P.layers.mask=se.layers.mask|4,S.layers.mask=M.layers.mask|P.layers.mask;const W=se.parent,ae=S.cameras;pe(S,W);for(let ue=0;ue0&&(g.alphaTest.value=m.alphaTest);const y=e.get(m),x=y.envMap,v=y.envMapRotation;x&&(g.envMap.value=x,Os.copy(v),Os.x*=-1,Os.y*=-1,Os.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(Os.y*=-1,Os.z*=-1),g.envMapRotation.value.setFromMatrix4(iN.makeRotationFromEuler(Os)),g.flipEnvMap.value=x.isCubeTexture&&x.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,y,x){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.size.value=m.size*y,g.scale.value=x*.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,y){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===Ln&&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=y.texture,g.transmissionSamplerSize.value.set(y.width,y.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 y=e.get(m).light;g.referencePosition.value.setFromMatrixPosition(y.matrixWorld),g.nearDistance.value=y.shadow.camera.near,g.farDistance.value=y.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function sN(n,e,t,i){let r={},s={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(y,x){const v=x.program;i.uniformBlockBinding(y,v)}function c(y,x){let v=r[y.id];v===void 0&&(p(y),v=u(y),r[y.id]=v,y.addEventListener("dispose",g));const E=x.program;i.updateUBOMapping(y,E);const T=e.render.frame;s[y.id]!==T&&(h(y),s[y.id]=T)}function u(y){const x=f();y.__bindingPointIndex=x;const v=n.createBuffer(),E=y.__size,T=y.usage;return n.bindBuffer(n.UNIFORM_BUFFER,v),n.bufferData(n.UNIFORM_BUFFER,E,T),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,x,v),v}function f(){for(let y=0;y0&&(v+=E-T),y.__size=v,y.__cache={},this}function _(y){const x={boundary:0,storage:0};return typeof y=="number"||typeof y=="boolean"?(x.boundary=4,x.storage=4):y.isVector2?(x.boundary=8,x.storage=8):y.isVector3||y.isColor?(x.boundary=16,x.storage=12):y.isVector4?(x.boundary=16,x.storage=16):y.isMatrix3?(x.boundary=48,x.storage=48):y.isMatrix4?(x.boundary=64,x.storage=64):y.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",y),x}function g(y){const x=y.target;x.removeEventListener("dispose",g);const v=o.indexOf(x.__bindingPointIndex);o.splice(v,1),n.deleteBuffer(r[x.id]),delete r[x.id],delete s[x.id]}function m(){for(const y in r)n.deleteBuffer(r[y]);o=[],r={},s={}}return{bind:l,update:c,dispose:m}}class Bu{constructor(e={}){const{canvas:t=BS(),context:i=null,depth:r=!0,stencil:s=!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 y=[],x=[];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._outputColorSpace=wn,this.toneMapping=Gi,this.toneMappingExposure=1;const v=this;let E=!1,T=0,M=0,P=null,b=-1,S=null;const D=new ht,B=new ht;let H=null;const $=new Te(0);let ee=0,Z=t.width,te=t.height,Q=1,pe=null,ve=null;const re=new ht(0,0,Z,te),xe=new ht(0,0,Z,te);let ze=!1;const se=new cc;let ge=!1,be=!1;this.transmissionResolutionScale=1;const W=new We,ae=new We,ue=new F,le=new ht,De={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let I=!1;function L(){return P===null?Q:1}let w=i;function j(O,K){return t.getContext(O,K)}try{const O={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${ic}`),t.addEventListener("webglcontextlost",de,!1),t.addEventListener("webglcontextrestored",Pe,!1),t.addEventListener("webglcontextcreationerror",Re,!1),w===null){const K="webgl2";if(w=j(K,O),w===null)throw j(K)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(O){throw console.error("THREE.WebGLRenderer: "+O.message),O}let G,q,R,N,V,A,C,k,U,z,Y,he,ce,ye,Ue,me,Ee,Be,Ge,Se,Ye,Je,At,X;function we(){G=new _O(w),G.init(),Je=new $M(w,G),q=new uO(w,G,e,Je),R=new Z2(w,G),q.reverseDepthBuffer&&h&&R.buffers.depth.setReversed(!0),N=new xO(w),V=new B2,A=new J2(w,G,R,V,q,Je,N),C=new hO(v),k=new gO(v),U=new wI(w),At=new lO(w,U),z=new vO(w,U,N,At),Y=new SO(w,z,U,N),Ge=new bO(w,q,A),me=new fO(V),he=new F2(v,C,k,G,q,At,me),ce=new rN(v,V),ye=new V2,Ue=new $2(G),Be=new aO(v,C,k,R,Y,d,l),Ee=new j2(v,Y,q),X=new sN(w,N,q,R),Se=new cO(w,G,N),Ye=new yO(w,G,N),N.programs=he.programs,v.capabilities=q,v.extensions=G,v.properties=V,v.renderLists=ye,v.shadowMap=Ee,v.state=R,v.info=N}we();const oe=new nN(v,w);this.xr=oe,this.getContext=function(){return w},this.getContextAttributes=function(){return w.getContextAttributes()},this.forceContextLoss=function(){const O=G.get("WEBGL_lose_context");O&&O.loseContext()},this.forceContextRestore=function(){const O=G.get("WEBGL_lose_context");O&&O.restoreContext()},this.getPixelRatio=function(){return Q},this.setPixelRatio=function(O){O!==void 0&&(Q=O,this.setSize(Z,te,!1))},this.getSize=function(O){return O.set(Z,te)},this.setSize=function(O,K,ne=!0){if(oe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}Z=O,te=K,t.width=Math.floor(O*Q),t.height=Math.floor(K*Q),ne===!0&&(t.style.width=O+"px",t.style.height=K+"px"),this.setViewport(0,0,O,K)},this.getDrawingBufferSize=function(O){return O.set(Z*Q,te*Q).floor()},this.setDrawingBufferSize=function(O,K,ne){Z=O,te=K,Q=ne,t.width=Math.floor(O*ne),t.height=Math.floor(K*ne),this.setViewport(0,0,O,K)},this.getCurrentViewport=function(O){return O.copy(D)},this.getViewport=function(O){return O.copy(re)},this.setViewport=function(O,K,ne,ie){O.isVector4?re.set(O.x,O.y,O.z,O.w):re.set(O,K,ne,ie),R.viewport(D.copy(re).multiplyScalar(Q).round())},this.getScissor=function(O){return O.copy(xe)},this.setScissor=function(O,K,ne,ie){O.isVector4?xe.set(O.x,O.y,O.z,O.w):xe.set(O,K,ne,ie),R.scissor(B.copy(xe).multiplyScalar(Q).round())},this.getScissorTest=function(){return ze},this.setScissorTest=function(O){R.setScissorTest(ze=O)},this.setOpaqueSort=function(O){pe=O},this.setTransparentSort=function(O){ve=O},this.getClearColor=function(O){return O.copy(Be.getClearColor())},this.setClearColor=function(){Be.setClearColor(...arguments)},this.getClearAlpha=function(){return Be.getClearAlpha()},this.setClearAlpha=function(){Be.setClearAlpha(...arguments)},this.clear=function(O=!0,K=!0,ne=!0){let ie=0;if(O){let J=!1;if(P!==null){const _e=P.texture.format;J=_e===yh||_e===vh||_e===sc}if(J){const _e=P.texture.type,Ae=_e===qi||_e===Er||_e===sa||_e===oo||_e===mh||_e===gh,Ie=Be.getClearColor(),Oe=Be.getClearAlpha(),je=Ie.r,Ke=Ie.g,ke=Ie.b;Ae?(p[0]=je,p[1]=Ke,p[2]=ke,p[3]=Oe,w.clearBufferuiv(w.COLOR,0,p)):(_[0]=je,_[1]=Ke,_[2]=ke,_[3]=Oe,w.clearBufferiv(w.COLOR,0,_))}else ie|=w.COLOR_BUFFER_BIT}K&&(ie|=w.DEPTH_BUFFER_BIT),ne&&(ie|=w.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),w.clear(ie)},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",de,!1),t.removeEventListener("webglcontextrestored",Pe,!1),t.removeEventListener("webglcontextcreationerror",Re,!1),Be.dispose(),ye.dispose(),Ue.dispose(),V.dispose(),C.dispose(),k.dispose(),Y.dispose(),At.dispose(),X.dispose(),he.dispose(),oe.dispose(),oe.removeEventListener("sessionstart",y_),oe.removeEventListener("sessionend",x_),gs.stop()};function de(O){O.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),E=!0}function Pe(){console.log("THREE.WebGLRenderer: Context Restored."),E=!1;const O=N.autoReset,K=Ee.enabled,ne=Ee.autoUpdate,ie=Ee.needsUpdate,J=Ee.type;we(),N.autoReset=O,Ee.enabled=K,Ee.autoUpdate=ne,Ee.needsUpdate=ie,Ee.type=J}function Re(O){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",O.statusMessage)}function tt(O){const K=O.target;K.removeEventListener("dispose",tt),Nt(K)}function Nt(O){un(O),V.remove(O)}function un(O){const K=V.get(O).programs;K!==void 0&&(K.forEach(function(ne){he.releaseProgram(ne)}),O.isShaderMaterial&&he.releaseShaderCache(O))}this.renderBufferDirect=function(O,K,ne,ie,J,_e){K===null&&(K=De);const Ae=J.isMesh&&J.matrixWorld.determinant()<0,Ie=qT(O,K,ne,ie,J);R.setMaterial(ie,Ae);let Oe=ne.index,je=1;if(ie.wireframe===!0){if(Oe=z.getWireframeAttribute(ne),Oe===void 0)return;je=2}const Ke=ne.drawRange,ke=ne.attributes.position;let ut=Ke.start*je,gt=(Ke.start+Ke.count)*je;_e!==null&&(ut=Math.max(ut,_e.start*je),gt=Math.min(gt,(_e.start+_e.count)*je)),Oe!==null?(ut=Math.max(ut,0),gt=Math.min(gt,Oe.count)):ke!=null&&(ut=Math.max(ut,0),gt=Math.min(gt,ke.count));const Ht=gt-ut;if(Ht<0||Ht===1/0)return;At.setup(J,ie,Ie,ne,Oe);let Ut,dt=Se;if(Oe!==null&&(Ut=U.get(Oe),dt=Ye,dt.setIndex(Ut)),J.isMesh)ie.wireframe===!0?(R.setLineWidth(ie.wireframeLinewidth*L()),dt.setMode(w.LINES)):dt.setMode(w.TRIANGLES);else if(J.isLine){let He=ie.linewidth;He===void 0&&(He=1),R.setLineWidth(He*L()),J.isLineSegments?dt.setMode(w.LINES):J.isLineLoop?dt.setMode(w.LINE_LOOP):dt.setMode(w.LINE_STRIP)}else J.isPoints?dt.setMode(w.POINTS):J.isSprite&&dt.setMode(w.TRIANGLES);if(J.isBatchedMesh)if(J._multiDrawInstances!==null)ks("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),dt.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances);else if(G.get("WEBGL_multi_draw"))dt.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else{const He=J._multiDrawStarts,sn=J._multiDrawCounts,_t=J._multiDrawCount,_i=Oe?U.get(Oe).bytesPerElement:1,yo=V.get(ie).currentProgram.getUniforms();for(let jn=0;jn<_t;jn++)yo.setValue(w,"_gl_DrawID",jn),dt.render(He[jn]/_i,sn[jn])}else if(J.isInstancedMesh)dt.renderInstances(ut,Ht,J.count);else if(ne.isInstancedBufferGeometry){const He=ne._maxInstanceCount!==void 0?ne._maxInstanceCount:1/0,sn=Math.min(ne.instanceCount,He);dt.renderInstances(ut,Ht,sn)}else dt.render(ut,Ht)};function xt(O,K,ne){O.transparent===!0&&O.side===Si&&O.forceSinglePass===!1?(O.side=Ln,O.needsUpdate=!0,bc(O,K,ne),O.side=Sr,O.needsUpdate=!0,bc(O,K,ne),O.side=Si):bc(O,K,ne)}this.compile=function(O,K,ne=null){ne===null&&(ne=O),m=Ue.get(ne),m.init(K),x.push(m),ne.traverseVisible(function(J){J.isLight&&J.layers.test(K.layers)&&(m.pushLight(J),J.castShadow&&m.pushShadow(J))}),O!==ne&&O.traverseVisible(function(J){J.isLight&&J.layers.test(K.layers)&&(m.pushLight(J),J.castShadow&&m.pushShadow(J))}),m.setupLights();const ie=new Set;return O.traverse(function(J){if(!(J.isMesh||J.isPoints||J.isLine||J.isSprite))return;const _e=J.material;if(_e)if(Array.isArray(_e))for(let Ae=0;Ae<_e.length;Ae++){const Ie=_e[Ae];xt(Ie,ne,J),ie.add(Ie)}else xt(_e,ne,J),ie.add(_e)}),m=x.pop(),ie},this.compileAsync=function(O,K,ne=null){const ie=this.compile(O,K,ne);return new Promise(J=>{function _e(){if(ie.forEach(function(Ae){V.get(Ae).currentProgram.isReady()&&ie.delete(Ae)}),ie.size===0){J(O);return}setTimeout(_e,10)}G.get("KHR_parallel_shader_compile")!==null?_e():setTimeout(_e,10)})};let gi=null;function Zi(O){gi&&gi(O)}function y_(){gs.stop()}function x_(){gs.start()}const gs=new zM;gs.setAnimationLoop(Zi),typeof self<"u"&&gs.setContext(self),this.setAnimationLoop=function(O){gi=O,oe.setAnimationLoop(O),O===null?gs.stop():gs.start()},oe.addEventListener("sessionstart",y_),oe.addEventListener("sessionend",x_),this.render=function(O,K){if(K!==void 0&&K.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(E===!0)return;if(O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),K.parent===null&&K.matrixWorldAutoUpdate===!0&&K.updateMatrixWorld(),oe.enabled===!0&&oe.isPresenting===!0&&(oe.cameraAutoUpdate===!0&&oe.updateCamera(K),K=oe.getCamera()),O.isScene===!0&&O.onBeforeRender(v,O,K,P),m=Ue.get(O,x.length),m.init(K),x.push(m),ae.multiplyMatrices(K.projectionMatrix,K.matrixWorldInverse),se.setFromProjectionMatrix(ae),be=this.localClippingEnabled,ge=me.init(this.clippingPlanes,be),g=ye.get(O,y.length),g.init(),y.push(g),oe.enabled===!0&&oe.isPresenting===!0){const _e=v.xr.getDepthSensingMesh();_e!==null&&rd(_e,K,-1/0,v.sortObjects)}rd(O,K,0,v.sortObjects),g.finish(),v.sortObjects===!0&&g.sort(pe,ve),I=oe.enabled===!1||oe.isPresenting===!1||oe.hasDepthSensing()===!1,I&&Be.addToRenderList(g,O),this.info.render.frame++,ge===!0&&me.beginShadows();const ne=m.state.shadowsArray;Ee.render(ne,O,K),ge===!0&&me.endShadows(),this.info.autoReset===!0&&this.info.reset();const ie=g.opaque,J=g.transmissive;if(m.setupLights(),K.isArrayCamera){const _e=K.cameras;if(J.length>0)for(let Ae=0,Ie=_e.length;Ae0&&S_(ie,J,O,K),I&&Be.render(O),b_(g,O,K);P!==null&&M===0&&(A.updateMultisampleRenderTarget(P),A.updateRenderTargetMipmap(P)),O.isScene===!0&&O.onAfterRender(v,O,K),At.resetDefaultState(),b=-1,S=null,x.pop(),x.length>0?(m=x[x.length-1],ge===!0&&me.setGlobalState(v.clippingPlanes,m.state.camera)):m=null,y.pop(),y.length>0?g=y[y.length-1]:g=null};function rd(O,K,ne,ie){if(O.visible===!1)return;if(O.layers.test(K.layers)){if(O.isGroup)ne=O.renderOrder;else if(O.isLOD)O.autoUpdate===!0&&O.update(K);else if(O.isLight)m.pushLight(O),O.castShadow&&m.pushShadow(O);else if(O.isSprite){if(!O.frustumCulled||se.intersectsSprite(O)){ie&&le.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ae);const Ae=Y.update(O),Ie=O.material;Ie.visible&&g.push(O,Ae,Ie,ne,le.z,null)}}else if((O.isMesh||O.isLine||O.isPoints)&&(!O.frustumCulled||se.intersectsObject(O))){const Ae=Y.update(O),Ie=O.material;if(ie&&(O.boundingSphere!==void 0?(O.boundingSphere===null&&O.computeBoundingSphere(),le.copy(O.boundingSphere.center)):(Ae.boundingSphere===null&&Ae.computeBoundingSphere(),le.copy(Ae.boundingSphere.center)),le.applyMatrix4(O.matrixWorld).applyMatrix4(ae)),Array.isArray(Ie)){const Oe=Ae.groups;for(let je=0,Ke=Oe.length;je0&&xc(J,K,ne),_e.length>0&&xc(_e,K,ne),Ae.length>0&&xc(Ae,K,ne),R.buffers.depth.setTest(!0),R.buffers.depth.setMask(!0),R.buffers.color.setMask(!0),R.setPolygonOffset(!1)}function S_(O,K,ne,ie){if((ne.isScene===!0?ne.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[ie.id]===void 0&&(m.state.transmissionRenderTarget[ie.id]=new Yi(1,1,{generateMipmaps:!0,type:G.has("EXT_color_buffer_half_float")||G.has("EXT_color_buffer_float")?_a:qi,minFilter:zi,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:at.workingColorSpace}));const _e=m.state.transmissionRenderTarget[ie.id],Ae=ie.viewport||D;_e.setSize(Ae.z*v.transmissionResolutionScale,Ae.w*v.transmissionResolutionScale);const Ie=v.getRenderTarget();v.setRenderTarget(_e),v.getClearColor($),ee=v.getClearAlpha(),ee<1&&v.setClearColor(16777215,.5),v.clear(),I&&Be.render(ne);const Oe=v.toneMapping;v.toneMapping=Gi;const je=ie.viewport;if(ie.viewport!==void 0&&(ie.viewport=void 0),m.setupLightsView(ie),ge===!0&&me.setGlobalState(v.clippingPlanes,ie),xc(O,ne,ie),A.updateMultisampleRenderTarget(_e),A.updateRenderTargetMipmap(_e),G.has("WEBGL_multisampled_render_to_texture")===!1){let Ke=!1;for(let ke=0,ut=K.length;ke0),ke=!!ne.morphAttributes.position,ut=!!ne.morphAttributes.normal,gt=!!ne.morphAttributes.color;let Ht=Gi;ie.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(Ht=v.toneMapping);const Ut=ne.morphAttributes.position||ne.morphAttributes.normal||ne.morphAttributes.color,dt=Ut!==void 0?Ut.length:0,He=V.get(ie),sn=m.state.lights;if(ge===!0&&(be===!0||O!==S)){const yn=O===S&&ie.id===b;me.setState(ie,O,yn)}let _t=!1;ie.version===He.__version?(He.needsLights&&He.lightsStateVersion!==sn.state.version||He.outputColorSpace!==Ie||J.isBatchedMesh&&He.batching===!1||!J.isBatchedMesh&&He.batching===!0||J.isBatchedMesh&&He.batchingColor===!0&&J.colorTexture===null||J.isBatchedMesh&&He.batchingColor===!1&&J.colorTexture!==null||J.isInstancedMesh&&He.instancing===!1||!J.isInstancedMesh&&He.instancing===!0||J.isSkinnedMesh&&He.skinning===!1||!J.isSkinnedMesh&&He.skinning===!0||J.isInstancedMesh&&He.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&He.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&He.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&He.instancingMorph===!1&&J.morphTexture!==null||He.envMap!==Oe||ie.fog===!0&&He.fog!==_e||He.numClippingPlanes!==void 0&&(He.numClippingPlanes!==me.numPlanes||He.numIntersection!==me.numIntersection)||He.vertexAlphas!==je||He.vertexTangents!==Ke||He.morphTargets!==ke||He.morphNormals!==ut||He.morphColors!==gt||He.toneMapping!==Ht||He.morphTargetsCount!==dt)&&(_t=!0):(_t=!0,He.__version=ie.version);let _i=He.currentProgram;_t===!0&&(_i=bc(ie,K,J));let yo=!1,jn=!1,Sa=!1;const Pt=_i.getUniforms(),ni=He.uniforms;if(R.useProgram(_i.program)&&(yo=!0,jn=!0,Sa=!0),ie.id!==b&&(b=ie.id,jn=!0),yo||S!==O){R.buffers.depth.getReversed()?(W.copy(O.projectionMatrix),YC(W),jC(W),Pt.setValue(w,"projectionMatrix",W)):Pt.setValue(w,"projectionMatrix",O.projectionMatrix),Pt.setValue(w,"viewMatrix",O.matrixWorldInverse);const Fn=Pt.map.cameraPosition;Fn!==void 0&&Fn.setValue(w,ue.setFromMatrixPosition(O.matrixWorld)),q.logarithmicDepthBuffer&&Pt.setValue(w,"logDepthBufFC",2/(Math.log(O.far+1)/Math.LN2)),(ie.isMeshPhongMaterial||ie.isMeshToonMaterial||ie.isMeshLambertMaterial||ie.isMeshBasicMaterial||ie.isMeshStandardMaterial||ie.isShaderMaterial)&&Pt.setValue(w,"isOrthographic",O.isOrthographicCamera===!0),S!==O&&(S=O,jn=!0,Sa=!0)}if(J.isSkinnedMesh){Pt.setOptional(w,J,"bindMatrix"),Pt.setOptional(w,J,"bindMatrixInverse");const yn=J.skeleton;yn&&(yn.boneTexture===null&&yn.computeBoneTexture(),Pt.setValue(w,"boneTexture",yn.boneTexture,A))}J.isBatchedMesh&&(Pt.setOptional(w,J,"batchingTexture"),Pt.setValue(w,"batchingTexture",J._matricesTexture,A),Pt.setOptional(w,J,"batchingIdTexture"),Pt.setValue(w,"batchingIdTexture",J._indirectTexture,A),Pt.setOptional(w,J,"batchingColorTexture"),J._colorsTexture!==null&&Pt.setValue(w,"batchingColorTexture",J._colorsTexture,A));const ii=ne.morphAttributes;if((ii.position!==void 0||ii.normal!==void 0||ii.color!==void 0)&&Ge.update(J,ne,_i),(jn||He.receiveShadow!==J.receiveShadow)&&(He.receiveShadow=J.receiveShadow,Pt.setValue(w,"receiveShadow",J.receiveShadow)),ie.isMeshGouraudMaterial&&ie.envMap!==null&&(ni.envMap.value=Oe,ni.flipEnvMap.value=Oe.isCubeTexture&&Oe.isRenderTargetTexture===!1?-1:1),ie.isMeshStandardMaterial&&ie.envMap===null&&K.environment!==null&&(ni.envMapIntensity.value=K.environmentIntensity),jn&&(Pt.setValue(w,"toneMappingExposure",v.toneMappingExposure),He.needsLights&&YT(ni,Sa),_e&&ie.fog===!0&&ce.refreshFogUniforms(ni,_e),ce.refreshMaterialUniforms(ni,ie,Q,te,m.state.transmissionRenderTarget[O.id]),Fu.upload(w,E_(He),ni,A)),ie.isShaderMaterial&&ie.uniformsNeedUpdate===!0&&(Fu.upload(w,E_(He),ni,A),ie.uniformsNeedUpdate=!1),ie.isSpriteMaterial&&Pt.setValue(w,"center",J.center),Pt.setValue(w,"modelViewMatrix",J.modelViewMatrix),Pt.setValue(w,"normalMatrix",J.normalMatrix),Pt.setValue(w,"modelMatrix",J.matrixWorld),ie.isShaderMaterial||ie.isRawShaderMaterial){const yn=ie.uniformsGroups;for(let Fn=0,sd=yn.length;Fn0&&A.useMultisampledRTT(O)===!1?J=V.get(O).__webglMultisampledFramebuffer:Array.isArray(Ke)?J=Ke[ne]:J=Ke,D.copy(O.viewport),B.copy(O.scissor),H=O.scissorTest}else D.copy(re).multiplyScalar(Q).floor(),B.copy(xe).multiplyScalar(Q).floor(),H=ze;if(ne!==0&&(J=KT),R.bindFramebuffer(w.FRAMEBUFFER,J)&&ie&&R.drawBuffers(O,J),R.viewport(D),R.scissor(B),R.setScissorTest(H),_e){const Oe=V.get(O.texture);w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_CUBE_MAP_POSITIVE_X+K,Oe.__webglTexture,ne)}else if(Ae){const Oe=V.get(O.texture),je=K;w.framebufferTextureLayer(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,Oe.__webglTexture,ne,je)}else if(O!==null&&ne!==0){const Oe=V.get(O.texture);w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,Oe.__webglTexture,ne)}b=-1},this.readRenderTargetPixels=function(O,K,ne,ie,J,_e,Ae){if(!(O&&O.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ie=V.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&Ae!==void 0&&(Ie=Ie[Ae]),Ie){R.bindFramebuffer(w.FRAMEBUFFER,Ie);try{const Oe=O.texture,je=Oe.format,Ke=Oe.type;if(!q.textureFormatReadable(je)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!q.textureTypeReadable(Ke)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}K>=0&&K<=O.width-ie&&ne>=0&&ne<=O.height-J&&w.readPixels(K,ne,ie,J,Je.convert(je),Je.convert(Ke),_e)}finally{const Oe=P!==null?V.get(P).__webglFramebuffer:null;R.bindFramebuffer(w.FRAMEBUFFER,Oe)}}},this.readRenderTargetPixelsAsync=async function(O,K,ne,ie,J,_e,Ae){if(!(O&&O.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ie=V.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&Ae!==void 0&&(Ie=Ie[Ae]),Ie){const Oe=O.texture,je=Oe.format,Ke=Oe.type;if(!q.textureFormatReadable(je))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!q.textureTypeReadable(Ke))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(K>=0&&K<=O.width-ie&&ne>=0&&ne<=O.height-J){R.bindFramebuffer(w.FRAMEBUFFER,Ie);const ke=w.createBuffer();w.bindBuffer(w.PIXEL_PACK_BUFFER,ke),w.bufferData(w.PIXEL_PACK_BUFFER,_e.byteLength,w.STREAM_READ),w.readPixels(K,ne,ie,J,Je.convert(je),Je.convert(Ke),0);const ut=P!==null?V.get(P).__webglFramebuffer:null;R.bindFramebuffer(w.FRAMEBUFFER,ut);const gt=w.fenceSync(w.SYNC_GPU_COMMANDS_COMPLETE,0);return w.flush(),await qC(w,gt,4),w.bindBuffer(w.PIXEL_PACK_BUFFER,ke),w.getBufferSubData(w.PIXEL_PACK_BUFFER,0,_e),w.deleteBuffer(ke),w.deleteSync(gt),_e}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(O,K=null,ne=0){O.isTexture!==!0&&(ks("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,O=arguments[1]);const ie=Math.pow(2,-ne),J=Math.floor(O.image.width*ie),_e=Math.floor(O.image.height*ie),Ae=K!==null?K.x:0,Ie=K!==null?K.y:0;A.setTexture2D(O,0),w.copyTexSubImage2D(w.TEXTURE_2D,ne,0,0,Ae,Ie,J,_e),R.unbindTexture()};const ZT=w.createFramebuffer(),JT=w.createFramebuffer();this.copyTextureToTexture=function(O,K,ne=null,ie=null,J=0,_e=null){O.isTexture!==!0&&(ks("WebGLRenderer: copyTextureToTexture function signature has changed."),ie=arguments[0]||null,O=arguments[1],K=arguments[2],_e=arguments[3]||0,ne=null),_e===null&&(J!==0?(ks("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),_e=J,J=0):_e=0);let Ae,Ie,Oe,je,Ke,ke,ut,gt,Ht;const Ut=O.isCompressedTexture?O.mipmaps[_e]:O.image;if(ne!==null)Ae=ne.max.x-ne.min.x,Ie=ne.max.y-ne.min.y,Oe=ne.isBox3?ne.max.z-ne.min.z:1,je=ne.min.x,Ke=ne.min.y,ke=ne.isBox3?ne.min.z:0;else{const ii=Math.pow(2,-J);Ae=Math.floor(Ut.width*ii),Ie=Math.floor(Ut.height*ii),O.isDataArrayTexture?Oe=Ut.depth:O.isData3DTexture?Oe=Math.floor(Ut.depth*ii):Oe=1,je=0,Ke=0,ke=0}ie!==null?(ut=ie.x,gt=ie.y,Ht=ie.z):(ut=0,gt=0,Ht=0);const dt=Je.convert(K.format),He=Je.convert(K.type);let sn;K.isData3DTexture?(A.setTexture3D(K,0),sn=w.TEXTURE_3D):K.isDataArrayTexture||K.isCompressedArrayTexture?(A.setTexture2DArray(K,0),sn=w.TEXTURE_2D_ARRAY):(A.setTexture2D(K,0),sn=w.TEXTURE_2D),w.pixelStorei(w.UNPACK_FLIP_Y_WEBGL,K.flipY),w.pixelStorei(w.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),w.pixelStorei(w.UNPACK_ALIGNMENT,K.unpackAlignment);const _t=w.getParameter(w.UNPACK_ROW_LENGTH),_i=w.getParameter(w.UNPACK_IMAGE_HEIGHT),yo=w.getParameter(w.UNPACK_SKIP_PIXELS),jn=w.getParameter(w.UNPACK_SKIP_ROWS),Sa=w.getParameter(w.UNPACK_SKIP_IMAGES);w.pixelStorei(w.UNPACK_ROW_LENGTH,Ut.width),w.pixelStorei(w.UNPACK_IMAGE_HEIGHT,Ut.height),w.pixelStorei(w.UNPACK_SKIP_PIXELS,je),w.pixelStorei(w.UNPACK_SKIP_ROWS,Ke),w.pixelStorei(w.UNPACK_SKIP_IMAGES,ke);const Pt=O.isDataArrayTexture||O.isData3DTexture,ni=K.isDataArrayTexture||K.isData3DTexture;if(O.isDepthTexture){const ii=V.get(O),yn=V.get(K),Fn=V.get(ii.__renderTarget),sd=V.get(yn.__renderTarget);R.bindFramebuffer(w.READ_FRAMEBUFFER,Fn.__webglFramebuffer),R.bindFramebuffer(w.DRAW_FRAMEBUFFER,sd.__webglFramebuffer);for(let _s=0;_s{n.delete(s)};return{on:s=>{n.add(s);const o=()=>e(s);return di(o),{off:o}},off:e,trigger:(...s)=>Promise.all(Array.from(n).map(o=>o(...s))),clear:()=>{n.clear()}}}function w4(n){let e=!1,t;const i=Ql(!0);return(...r)=>(e||(t=i.run(()=>n(...r)),e=!0),t)}const sp=new WeakMap,aN=(...n)=>{var e;const t=n[0],i=(e=On())==null?void 0:e.proxy;if(i==null&&!Zm())throw new Error("injectLocal must be called in setup");return i&&sp.has(i)&&t in sp.get(i)?sp.get(i)[t]:In(...n)};function A4(n){let e=0,t,i;const r=()=>{e-=1,i&&e<=0&&(i.stop(),t=void 0,i=void 0)};return(...s)=>(e+=1,i||(i=Ql(!0),t=i.run(()=>n(...s))),di(r),t)}const rs=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const lN=n=>typeof n<"u",cN=n=>n!=null,uN=Object.prototype.toString,fN=n=>uN.call(n)==="[object Object]",ss=()=>{},hN=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),C4=dN();function dN(){var n,e;return rs&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function qg(n,e){function t(...i){return new Promise((r,s)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(r).catch(s)})}return t}const qM=n=>n();function YM(n,e={}){let t,i,r=ss;const s=l=>{clearTimeout(l),r(),r=ss};let o;return l=>{const c=ot(n),u=ot(e.maxWait);return t&&s(t),c<=0||u!==void 0&&u<=0?(i&&(s(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{r=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&s(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&s(i),i=null,f(l())},c)})}}function pN(...n){let e=0,t,i=!0,r=ss,s,o,a,l,c;!Mt(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,r(),r=ss)};return h=>{const d=ot(o),p=Date.now()-e,_=()=>s=h();return u(),d<=0?(e=Date.now(),_()):(p>d&&(l||!i)?(e=Date.now(),_()):a&&(s=new Promise((g,m)=>{r=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,s)}}function mN(n=qM,e={}){const{initialState:t="active"}=e,i=KM(t==="active");function r(){i.value=!1}function s(){i.value=!0}const o=(...a)=>{i.value&&n(...a)};return{isActive:hi(i),pause:r,resume:s,eventFilter:o}}function gN(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 _N(n,e){var t;if(typeof n=="number")return n+e;const i=((t=n.match(/^-?\d+\.?\d*/))==null?void 0:t[0])||"",r=n.slice(i.length),s=Number.parseFloat(i)+e;return Number.isNaN(s)?n:s+r}function ol(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function vN(n,e,t=!1){return e.reduce((i,r)=>(r in n&&(!t||n[r]!==void 0)&&(i[r]=n[r]),i),{})}function jM(n){return On()}function al(n){return Array.isArray(n)?n:[n]}function KM(...n){if(n.length!==1)return Yx(...n);const e=n[0];return typeof e=="function"?hi(Xm(()=>({get:e,set:ss}))):Xe(e)}function Yg(n,e=200,t={}){return qg(YM(e,t),n)}function Y0(n,e=200,t={}){const i=Xe(n.value),r=Yg(()=>{i.value=n.value},e,t);return qe(n,()=>r()),i}function yN(n,e=200,t=!1,i=!0,r=!1){return qg(pN(e,t,i,r),n)}function ZM(n,e,t={}){const{eventFilter:i=qM,...r}=t;return qe(n,qg(i,e),r)}function xN(n,e,t={}){const{eventFilter:i,initialState:r="active",...s}=t,{eventFilter:o,pause:a,resume:l,isActive:c}=mN(i,{initialState:r});return{stop:ZM(n,e,{...s,eventFilter:o}),pause:a,resume:l,isActive:c}}function bN(n,e={}){if(!Mt(n))return qx(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const i in n.value)t[i]=Xm(()=>({get(){return n.value[i]},set(r){var s;if((s=ot(e.replaceRef))!=null?s:!0)if(Array.isArray(n.value)){const a=[...n.value];a[i]=r,n.value=a}else{const a={...n.value,[i]:r};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[i]=r}}));return t}const on=ot;function R4(n,e){jM()&&qm(n,e)}function go(n,e=!0,t){jM()?Nn(n,t):e?n():cs(n)}function SN(n,e=1e3,t={}){const{immediate:i=!0,immediateCallback:r=!1}=t;let s=null;const o=Ve(!1);function a(){s&&(clearInterval(s),s=null)}function l(){o.value=!1,a()}function c(){const u=ot(e);u<=0||(o.value=!0,r&&n(),a(),o.value&&(s=setInterval(n,u)))}if(i&&rs&&c(),Mt(e)||typeof e=="function"){const u=qe(e,()=>{o.value&&rs&&c()});di(u)}return di(l),{isActive:o,pause:l,resume:c}}function MN(n,e,t={}){const{immediate:i=!0,immediateCallback:r=!1}=t,s=Ve(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function l(){s.value=!1,a()}function c(...u){r&&n(),a(),s.value=!0,o=setTimeout(()=>{s.value=!1,o=null,n(...u)},ot(e))}return i&&(s.value=!0,rs&&c()),di(l),{isPending:hi(s),start:c,stop:l}}function P4(n=!1,e={}){const{truthyValue:t=!0,falsyValue:i=!1}=e,r=Mt(n),s=Ve(n);function o(a){if(arguments.length)return s.value=a,s.value;{const l=ot(t);return s.value=s.value===l?ot(i):l,s.value}}return r?o:[s,o]}function I4(n,e,t={}){const{debounce:i=0,maxWait:r=void 0,...s}=t;return ZM(n,e,{...s,eventFilter:YM(i,{maxWait:r})})}function JM(n,e,t){return qe(n,e,{...t,immediate:!0})}const rn=rs?window:void 0,EN=rs?window.document:void 0,jg=rs?window.navigator:void 0;function Xn(n){var e;const t=ot(n);return(e=t==null?void 0:t.$el)!=null?e:t}function _n(...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)),r=Ce(()=>{const a=al(ot(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),s=JM(()=>{var a,l;return[(l=(a=r.value)==null?void 0:a.map(c=>Xn(c)))!=null?l:[rn].filter(c=>c!=null),al(ot(r.value?n[1]:n[0])),al(Rt(r.value?n[2]:n[1])),ot(r.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=fN(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{s(),t()};return di(t),o}function TN(){const n=Ve(!1),e=On();return e&&Nn(()=>{n.value=!0},e),n}function _o(n){const e=TN();return Ce(()=>(e.value,!!n()))}function QM(n,e,t={}){const{window:i=rn,...r}=t;let s;const o=_o(()=>i&&"MutationObserver"in i),a=()=>{s&&(s.disconnect(),s=void 0)},l=Ce(()=>{const h=ot(n),d=al(h).map(Xn).filter(cN);return new Set(d)}),c=qe(()=>l.value,h=>{a(),o.value&&h.size&&(s=new MutationObserver(e),h.forEach(d=>s.observe(d,r)))},{immediate:!0,flush:"post"}),u=()=>s==null?void 0:s.takeRecords(),f=()=>{c(),a()};return di(f),{isSupported:o,stop:f,takeRecords:u}}function wN(n){return typeof n=="function"?n:typeof n=="string"?e=>e.key===n:Array.isArray(n)?e=>n.includes(e.key):()=>!0}function L4(...n){let e,t,i={};n.length===3?(e=n[0],t=n[1],i=n[2]):n.length===2?typeof n[1]=="object"?(e=!0,t=n[0],i=n[1]):(e=n[0],t=n[1]):(e=!0,t=n[0]);const{target:r=rn,eventName:s="keydown",passive:o=!1,dedupe:a=!1}=i,l=wN(e);return _n(r,s,u=>{u.repeat&&ot(a)||l(u)&&t(u)},o)}function Kg(n,e={}){const{immediate:t=!0,fpsLimit:i=void 0,window:r=rn,once:s=!1}=e,o=Ve(!1),a=Ce(()=>i?1e3/ot(i):null);let l=0,c=null;function u(d){if(!o.value||!r)return;l||(l=d);const p=d-l;if(a.value&&pt&&"matchMedia"in t&&typeof t.matchMedia=="function"),s=Ve(typeof i=="number"),o=Ve(),a=Ve(!1),l=c=>{a.value=c.matches};return ah(()=>{if(s.value){s.value=!r.value;const c=ot(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>=ol(h[1])),d&&p&&(p=i<=ol(d[1])),f?!p:p});return}r.value&&(o.value=t.matchMedia(ot(n)),a.value=o.value.matches)}),_n(o,"change",l,{passive:!0}),Ce(()=>a.value)}const D4={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function O4(n,e={}){function t(d,p){let _=ot(n[ot(d)]);return p!=null&&(_=_N(_,p)),typeof _=="number"&&(_=`${_}px`),_}const{window:i=rn,strategy:r="min-width",ssrWidth:s=eE()}=e,o=typeof s=="number",a=o?Ve(!1):{value:!0};o&&go(()=>a.value=!!i);function l(d,p){return!a.value&&o?d==="min"?s>=ol(p):s<=ol(p):i?i.matchMedia(`(${d}-width: ${p})`).matches:!1}const c=d=>Yr(()=>`(min-width: ${t(d)})`,e),u=d=>Yr(()=>`(max-width: ${t(d)})`,e),f=Object.keys(n).reduce((d,p)=>(Object.defineProperty(d,p,{get:()=>r==="min-width"?c(p):u(p),enumerable:!0,configurable:!0}),d),{});function h(){const d=Object.keys(n).map(p=>[p,f[p],ol(t(p))]).sort((p,_)=>p[2]-_[2]);return Ce(()=>d.filter(([,p])=>p.value).map(([p])=>p))}return Object.assign(f,{greaterOrEqual:c,smallerOrEqual:u,greater(d){return Yr(()=>`(min-width: ${t(d,.1)})`,e)},smaller(d){return Yr(()=>`(max-width: ${t(d,-.1)})`,e)},between(d,p){return Yr(()=>`(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 Ce(()=>d.value.length===0?"":d.value.at(r==="min-width"?-1:0))}})}function em(n,e={}){const{controls:t=!1,navigator:i=jg}=e,r=_o(()=>i&&"permissions"in i),s=Ve(),o=typeof n=="string"?{name:n}:n,a=Ve(),l=()=>{var u,f;a.value=(f=(u=s.value)==null?void 0:u.state)!=null?f:"prompt"};_n(s,"change",l,{passive:!0});const c=gN(async()=>{if(r.value){if(!s.value)try{s.value=await i.permissions.query(o)}catch{s.value=void 0}finally{l()}if(t)return st(s.value)}});return c(),t?{state:a,isSupported:r,query:c}:a}function N4(n={}){const{navigator:e=jg,read:t=!1,source:i,copiedDuring:r=1500,legacy:s=!1}=n,o=_o(()=>e&&"clipboard"in e),a=em("clipboard-read"),l=em("clipboard-write"),c=Ce(()=>o.value||s),u=Ve(""),f=Ve(!1),h=MN(()=>f.value=!1,r,{immediate:!1});async function d(){let y=!(o.value&&m(a.value));if(!y)try{u.value=await e.clipboard.readText()}catch{y=!0}y&&(u.value=g())}c.value&&t&&_n(["copy","cut"],d,{passive:!0});async function p(y=ot(i)){if(c.value&&y!=null){let x=!(o.value&&m(l.value));if(!x)try{await e.clipboard.writeText(y)}catch{x=!0}x&&_(y),u.value=y,f.value=!0,h.start()}}function _(y){const x=document.createElement("textarea");x.value=y??"",x.style.position="absolute",x.style.opacity="0",document.body.appendChild(x),x.select(),document.execCommand("copy"),x.remove()}function g(){var y,x,v;return(v=(x=(y=document==null?void 0:document.getSelection)==null?void 0:y.call(document))==null?void 0:x.toString())!=null?v:""}function m(y){return y==="granted"||y==="prompt"}return{isSupported:c,text:u,copied:f,copy:p}}function CN(n){return JSON.parse(JSON.stringify(n))}const vu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yu="__vueuse_ssr_handlers__",RN=PN();function PN(){return yu in vu||(vu[yu]=vu[yu]||{}),vu[yu]}function tE(n,e){return RN[n]||e}function IN(n){return Yr("(prefers-color-scheme: dark)",n)}function LN(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 DN={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()}},j0="vueuse-storage";function nE(n,e,t,i={}){var r;const{flush:s="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:f=rn,eventFilter:h,onError:d=D=>{console.error(D)},initOnMounted:p}=i,_=(u?Ve:Xe)(typeof e=="function"?e():e),g=Ce(()=>ot(n));if(!t)try{t=tE("getDefaultStorage",()=>{var D;return(D=rn)==null?void 0:D.localStorage})()}catch(D){d(D)}if(!t)return _;const m=ot(e),y=LN(m),x=(r=i.serializer)!=null?r:DN[y],{pause:v,resume:E}=xN(_,()=>M(_.value),{flush:s,deep:o,eventFilter:h});qe(g,()=>b(),{flush:s}),f&&a&&go(()=>{t instanceof Storage?_n(f,"storage",b,{passive:!0}):_n(f,j0,S),p&&b()}),p||b();function T(D,B){if(f){const H={key:g.value,oldValue:D,newValue:B,storageArea:t};f.dispatchEvent(t instanceof Storage?new StorageEvent("storage",H):new CustomEvent(j0,{detail:H}))}}function M(D){try{const B=t.getItem(g.value);if(D==null)T(B,null),t.removeItem(g.value);else{const H=x.write(D);B!==H&&(t.setItem(g.value,H),T(B,H))}}catch(B){d(B)}}function P(D){const B=D?D.newValue:t.getItem(g.value);if(B==null)return l&&m!=null&&t.setItem(g.value,x.write(m)),m;if(!D&&c){const H=x.read(B);return typeof c=="function"?c(H,m):y==="object"&&!Array.isArray(H)?{...m,...H}:H}else return typeof B!="string"?B:x.read(B)}function b(D){if(!(D&&D.storageArea!==t)){if(D&&D.key==null){_.value=m;return}if(!(D&&D.key!==g.value)){v();try{(D==null?void 0:D.newValue)!==x.write(_.value)&&(_.value=P(D))}catch(B){d(B)}finally{D?cs(E):E()}}}}function S(D){b(D.detail)}return _}const ON="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function NN(n={}){const{selector:e="html",attribute:t="class",initialValue:i="auto",window:r=rn,storage:s,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=IN({window:r}),d=Ce(()=>h.value?"dark":"light"),p=l||(o==null?KM(i):nE(o,i,s,{window:r,listenToStorageChanges:a})),_=Ce(()=>p.value==="auto"?d.value:p.value),g=tE("updateHTMLAttrs",(v,E,T)=>{const M=typeof v=="string"?r==null?void 0:r.document.querySelector(v):Xn(v);if(!M)return;const P=new Set,b=new Set;let S=null;if(E==="class"){const B=T.split(/\s/g);Object.values(f).flatMap(H=>(H||"").split(/\s/g)).filter(Boolean).forEach(H=>{B.includes(H)?P.add(H):b.add(H)})}else S={key:E,value:T};if(P.size===0&&b.size===0&&S===null)return;let D;u&&(D=r.document.createElement("style"),D.appendChild(document.createTextNode(ON)),r.document.head.appendChild(D));for(const B of P)M.classList.add(B);for(const B of b)M.classList.remove(B);S&&M.setAttribute(S.key,S.value),u&&(r.getComputedStyle(D).opacity,document.head.removeChild(D))});function m(v){var E;g(e,t,(E=f[v])!=null?E:v)}function y(v){n.onChanged?n.onChanged(v,m):m(v)}qe(_,y,{flush:"post",immediate:!0}),go(()=>y(_.value));const x=Ce({get(){return c?p.value:_.value},set(v){p.value=v}});return Object.assign(x,{store:p,system:d,state:_})}function xu(n,e,t={}){const{window:i=rn,initialValue:r,observe:s=!1}=t,o=Ve(r),a=Ce(()=>{var c;return Xn(e)||((c=i==null?void 0:i.document)==null?void 0:c.documentElement)});function l(){var c;const u=ot(n),f=ot(a);if(f&&i&&u){const h=(c=i.getComputedStyle(f).getPropertyValue(u))==null?void 0:c.trim();o.value=h||o.value||r}}return s&&QM(a,l,{attributeFilter:["style","class"],window:i}),qe([a,()=>ot(n)],(c,u)=>{u[0]&&u[1]&&u[0].style.removeProperty(u[1]),l()},{immediate:!0}),qe([o,a],([c,u])=>{const f=ot(n);u!=null&&u.style&&f&&(c==null?u.style.removeProperty(f):u.style.setProperty(f,c))},{immediate:!0}),o}function UN(n={}){const{valueDark:e="dark",valueLight:t=""}=n,i=NN({...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}}),r=Ce(()=>i.system.value);return Ce({get(){return i.value==="dark"},set(o){const a=o?"dark":"light";r.value===a?i.value="auto":i.value=a}})}function FN(n={}){const{window:e=rn}=n,t=Ve(1),i=Yr(()=>`(resolution: ${t.value}dppx)`,n);let r=ss;return e&&(r=JM(i,()=>t.value=e.devicePixelRatio)),{pixelRatio:hi(t),stop:r}}function BN(n={}){const{navigator:e=jg,requestPermissions:t=!1,constraints:i={audio:!0,video:!0},onUpdated:r}=n,s=Xe([]),o=Ce(()=>s.value.filter(p=>p.kind==="videoinput")),a=Ce(()=>s.value.filter(p=>p.kind==="audioinput")),l=Ce(()=>s.value.filter(p=>p.kind==="audiooutput")),c=_o(()=>e&&e.mediaDevices&&e.mediaDevices.enumerateDevices),u=Ve(!1);let f;async function h(){c.value&&(s.value=await e.mediaDevices.enumerateDevices(),r==null||r(s.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}=em(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(),_n(e.mediaDevices,"devicechange",h,{passive:!0}),h()),{devices:s,ensurePermissions:d,permissionGranted:u,videoInputs:o,audioInputs:a,audioOutputs:l,isSupported:c}}function iE(n,e,t={}){const{window:i=rn,...r}=t;let s;const o=_o(()=>i&&"ResizeObserver"in i),a=()=>{s&&(s.disconnect(),s=void 0)},l=Ce(()=>{const f=ot(n);return Array.isArray(f)?f.map(h=>Xn(h)):[Xn(f)]}),c=qe(l,f=>{if(a(),o.value&&i){s=new ResizeObserver(e);for(const h of f)h&&s.observe(h,r)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return di(u),{isSupported:o,stop:u}}function kN(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:r=!0,immediate:s=!0,updateTiming:o="sync"}=e,a=Ve(0),l=Ve(0),c=Ve(0),u=Ve(0),f=Ve(0),h=Ve(0),d=Ve(0),p=Ve(0);function _(){const m=Xn(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 y=m.getBoundingClientRect();a.value=y.height,l.value=y.bottom,c.value=y.left,u.value=y.right,f.value=y.top,h.value=y.width,d.value=y.x,p.value=y.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return iE(n,g),qe(()=>Xn(n),m=>!m&&g()),QM(n,g,{attributeFilter:["style","class"]}),r&&_n("scroll",g,{capture:!0,passive:!0}),i&&_n("resize",g,{passive:!0}),go(()=>{s&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function VN(n,e={width:0,height:0},t={}){const{window:i=rn,box:r="content-box"}=t,s=Ce(()=>{var f,h;return(h=(f=Xn(n))==null?void 0:f.namespaceURI)==null?void 0:h.includes("svg")}),o=Ve(e.width),a=Ve(e.height),{stop:l}=iE(n,([f])=>{const h=r==="border-box"?f.borderBoxSize:r==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&s.value){const d=Xn(n);if(d){const p=d.getBoundingClientRect();o.value=p.width,a.value=p.height}}else if(h){const d=al(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);go(()=>{const f=Xn(n);f&&(o.value="offsetWidth"in f?f.offsetWidth:e.width,a.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=qe(()=>Xn(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}}const zN={multiple:!0,accept:"*",reset:!1,directory:!1};function HN(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 U4(n={}){const{document:e=EN}=n,t=Xe(HN(n.initialFiles)),{on:i,trigger:r}=zn(),{on:s,trigger:o}=zn();let a;e&&(a=e.createElement("input"),a.type="file",a.onchange=u=>{const f=u.target;t.value=f.files,r(t.value)},a.oncancel=()=>{o()});const l=()=>{t.value=null,a&&a.value&&(a.value="",r(null))},c=u=>{if(!a)return;const f={...zN,...n,...u};a.multiple=f.multiple,a.accept=f.accept,a.webkitdirectory=f.directory,hN(f,"capture")&&(a.capture=f.capture),f.reset&&l(),a.click()};return{files:hi(t),open:c,reset:l,onCancel:s,onChange:i}}function GN(n){var e;const t=Ve(0);if(typeof performance>"u")return t;const i=(e=n==null?void 0:n.every)!=null?e:10;let r=performance.now(),s=0;return Kg(()=>{if(s+=1,s>=i){const o=performance.now(),a=o-r;t.value=Math.round(1e3/(a/s)),r=o,s=0}}),t}const K0=1;function F4(n,e={}){const{throttle:t=0,idle:i=200,onStop:r=ss,onScroll:s=ss,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:a={capture:!1,passive:!0},behavior:l="auto",window:c=rn,onError:u=M=>{console.error(M)}}=e,f=Ve(0),h=Ve(0),d=Ce({get(){return f.value},set(M){_(M,void 0)}}),p=Ce({get(){return h.value},set(M){_(void 0,M)}});function _(M,P){var b,S,D,B;if(!c)return;const H=ot(n);if(!H)return;(D=H instanceof Document?c.document.body:H)==null||D.scrollTo({top:(b=ot(P))!=null?b:p.value,left:(S=ot(M))!=null?S:d.value,behavior:ot(l)});const $=((B=H==null?void 0:H.document)==null?void 0:B.documentElement)||(H==null?void 0:H.documentElement)||H;d!=null&&(f.value=$.scrollLeft),p!=null&&(h.value=$.scrollTop)}const g=Ve(!1),m=fi({left:!0,right:!1,top:!0,bottom:!1}),y=fi({left:!1,right:!1,top:!1,bottom:!1}),x=M=>{g.value&&(g.value=!1,y.left=!1,y.right=!1,y.top=!1,y.bottom=!1,r(M))},v=Yg(x,t+i),E=M=>{var P;if(!c)return;const b=((P=M==null?void 0:M.document)==null?void 0:P.documentElement)||(M==null?void 0:M.documentElement)||Xn(M),{display:S,flexDirection:D,direction:B}=getComputedStyle(b),H=B==="rtl"?-1:1,$=b.scrollLeft;y.left=$f.value;const ee=Math.abs($*H)<=(o.left||0),Z=Math.abs($*H)+b.clientWidth>=b.scrollWidth-(o.right||0)-K0;S==="flex"&&D==="row-reverse"?(m.left=Z,m.right=ee):(m.left=ee,m.right=Z),f.value=$;let te=b.scrollTop;M===c.document&&!te&&(te=c.document.body.scrollTop),y.top=teh.value;const Q=Math.abs(te)<=(o.top||0),pe=Math.abs(te)+b.clientHeight>=b.scrollHeight-(o.bottom||0)-K0;S==="flex"&&D==="column-reverse"?(m.top=pe,m.bottom=Q):(m.top=Q,m.bottom=pe),h.value=te},T=M=>{var P;if(!c)return;const b=(P=M.target.documentElement)!=null?P:M.target;E(b),g.value=!0,v(M),s(M)};return _n(n,"scroll",t?yN(T,t,!0,!1):T,a),go(()=>{try{const M=ot(n);if(!M)return;E(M)}catch(M){u(M)}}),_n(n,"scrollend",x,a),{x:d,y:p,isScrolling:g,arrivedState:m,directions:y,measure(){const M=ot(n);c&&M&&E(M)}}}function Fr(n,e,t={}){const{window:i=rn}=t;return nE(n,e,i==null?void 0:i.localStorage,t)}function WN(n={}){const e=Xe(),t=_o(()=>typeof performance<"u"&&"memory"in performance);if(t.value){const{interval:i=1e3}=n;SN(()=>{e.value=performance.memory},i,{immediate:n.immediate,immediateCallback:n.immediateCallback})}return{isSupported:t,memory:e}}function B4(n){const e=Ve(),t=()=>{e.value&&URL.revokeObjectURL(e.value),e.value=void 0};return qe(()=>ot(n),i=>{t(),i&&(e.value=URL.createObjectURL(i))},{immediate:!0}),di(t),hi(e)}const rE={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},XN=Object.keys(rE);function $N(n={}){const{target:e=rn}=n,t=Ve(!1),i=Xe(n.initialValue||{});Object.assign(i.value,rE,i.value);const r=s=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(s.pointerType))&&(i.value=vN(s,XN,!1))};if(e){const s={passive:!0};_n(e,["pointerdown","pointermove","pointerup"],r,s),_n(e,"pointerleave",()=>t.value=!1,s)}return{...bN(i),isInside:t}}const Z0="--vueuse-safe-area-top",J0="--vueuse-safe-area-right",Q0="--vueuse-safe-area-bottom",ey="--vueuse-safe-area-left";function k4(){const n=Ve(""),e=Ve(""),t=Ve(""),i=Ve("");if(rs){const s=xu(Z0),o=xu(J0),a=xu(Q0),l=xu(ey);s.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)",r(),_n("resize",Yg(r),{passive:!0})}function r(){n.value=bu(Z0),e.value=bu(J0),t.value=bu(Q0),i.value=bu(ey)}return{top:n,right:e,bottom:t,left:i,update:r}}function bu(n){return getComputedStyle(document.documentElement).getPropertyValue(n)}function V4(n,e,t,i={}){var r,s,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=i,d=On(),p=t||(d==null?void 0:d.emit)||((r=d==null?void 0:d.$emit)==null?void 0:r.bind(d))||((o=(s=d==null?void 0:d.proxy)==null?void 0:s.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let _=c;_=_||`update:${e.toString()}`;const g=x=>a?typeof a=="function"?a(x):CN(x):x,m=()=>lN(n[e])?g(n[e]):f,y=x=>{h?h(x)&&p(_,x):p(_,x)};if(l){const x=m(),v=Xe(x);let E=!1;return qe(()=>n[e],T=>{E||(E=!0,v.value=g(T),cs(()=>E=!1))}),qe(v,T=>{!E&&(T!==n[e]||u)&&y(T)},{deep:u}),v}else return Ce({get(){return m()},set(x){y(x)}})}function z4(n,e,t){const{window:i=rn}={},r=Xe(null),s=Ve(),o=(...l)=>{s.value&&s.value.postMessage(...l)},a=function(){s.value&&s.value.terminate()};return i&&(s.value=new Worker(n,e),s.value.onmessage=l=>{r.value=l.data},di(()=>{s.value&&s.value.terminate()})),{data:r,post:o,terminate:a,worker:s}}function qN(n={}){const{window:e=rn,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:s=!0,type:o="inner"}=n,a=Ve(t),l=Ve(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 s?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),go(c);const u={passive:!0};if(_n("resize",c,u),e&&o==="visual"&&e.visualViewport&&_n(e.visualViewport,"resize",c,u),r){const f=Yr("(orientation: portrait)");qe(f,()=>c())}return{width:a,height:l}}var YN=Object.defineProperty,jN=(n,e,t)=>e in n?YN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ty=(n,e,t)=>jN(n,typeof e!="symbol"?e+"":e,t);const KN="@tresjs/core",ZN="module",JN="4.3.3",QN="pnpm@9.15.5",e3="Declarative ThreeJS using Vue Components",t3="Alvaro Saburido (https://github.com/alvarosabu/)",n3="MIT",i3={type:"git",url:"git+https://github.com/Tresjs/tres.git"},r3=["vue","3d","threejs","three","threejs-vue"],s3=!1,o3={".":{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"},"./*":"./*"},a3="./dist/tres.js",l3="./dist/tres.js",c3="./dist/index.d.ts",u3=["*.d.ts","dist"],f3={access:"public"},h3={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"},d3={three:">=0.133",vue:">=3.4"},p3={"@alvarosabu/utils":"^3.2.0","@vue/devtools-api":"^6.6.3","@vueuse/core":"^12.5.0"},m3={"@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"},g3={name:KN,type:ZN,version:JN,packageManager:QN,description:e3,author:t3,license:n3,repository:i3,keywords:r3,sideEffects:s3,exports:o3,main:a3,module:l3,types:c3,files:u3,publishConfig:f3,scripts:h3,peerDependencies:d3,dependencies:p3,devDependencies:m3};class _3 extends zt{constructor(...e){super(...e),ty(this,"type","HightlightMesh"),ty(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 tm(n){return typeof n>"u"}function Gf(n){return Array.isArray(n)}function v3(n){return typeof n=="number"}function sE(n){return typeof n=="string"}function Ws(n){return typeof n=="function"}function Cr(n){return n===Object(n)&&!Gf(n)&&!Ws(n)}function Kr(n){return Cr(n)&&"isObject3D"in n&&!!n.isObject3D}function ny(n){return Cr(n)&&"isCamera"in n&&!!n.isCamera}function y3(n){return Cr(n)&&"isBufferGeometry"in n&&!!n.isBufferGeometry}function x3(n){return Cr(n)&&"isMaterial"in n&&!!n.isMaterial}function b3(n){return Cr(n)&&"isLight"in n&&!!n.isLight}function S3(n){return Cr(n)&&"isFog"in n&&!!n.isFog}function M3(n){return Cr(n)&&"isScene"in n&&!!n.isScene}function Su(n){return Kr(n)||y3(n)||x3(n)||S3(n)}function E3(n){return Cr(n)&&!!n.isPrimitive}const oE=(n,e)=>{for(const t of Object.keys(e))e[t]instanceof Object&&Object.assign(e[t],oE(n[t],e[t]));return Object.assign(n||{},e),n},T3="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",w3=R3(T3);function iy(n){return n&&n.nodeType===1}function Mu(n){return n.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const A3=/\B([A-Z])/g;function C3(n){return n.replace(A3,"-$1").toLowerCase()}function R3(n,e){const t=Object.create(null),i=n.split(",");for(let r=0;r!!t[r.toLowerCase()]:r=>!!t[r]}const ry=(n,e)=>{if(!e)return;const t=Array.isArray(e)?e:e.match(/([^[.\]])+/g);return t==null?void 0:t.reduce((i,r)=>i&&i[r],n)},P3=(n,e,t)=>{const i=Array.isArray(e)?e:e.match(/([^[.\]])+/g);i&&i.reduce((r,s,o)=>(r[s]===void 0&&(r[s]={}),o===i.length-1&&(r[s]=t),r[s]),n)};function aE(n,e){if(iy(n)&&iy(e)){const r=n.attributes,s=e.attributes;return r.length!==s.length?!1:Array.from(r).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 r of t)if(!i.includes(r)||!aE(n[r],e[r]))return!1;return!0}function I3(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=r(c);if(u)return u}},s=r(n);if(!s){console.warn("Object with UUID not found in the scene.");return}let o=s;for(let l=0;llE(i)),!(n instanceof wh)){const i=n;n&&((t=n.dispose)==null||t.call(n)),i.geometry&&i.geometry.dispose(),Array.isArray(i.material)?i.material.forEach(r=>sy(r)):i.material&&sy(i.material)}}function N3(n,e){let t=0;for(let i=0;it===0?e:e.charAt(0).toUpperCase()+e.slice(1)).join("")}const ay=/-\d+$/;function U3(n,e,t){if(sE(t)){if(ay.test(t)){const s=t.replace(ay,""),{target:o,key:a}=nm(n,s);if(!Array.isArray(o[a])){const l=o[a],c=[];c.__tresDetach=()=>{c.every(u=>tm(u))&&(o[a]=l)},o[a]=c}}const{target:i,key:r}=nm(n,t);e.__tres.previousAttach=i[r],i[r]=ca(e)}else e.__tres.previousAttach=t(n,e)}function F3(n,e,t){var i,r,s;if(sE(t)){const{target:o,key:a}=nm(n,t),l=e.__tres.previousAttach;l===void 0?delete o[a]:o[a]=l,"__tresDetach"in o&&o.__tresDetach()}else(r=(i=e.__tres)==null?void 0:i.previousAttach)==null||r.call(i,n,e);(s=e.__tres)==null||delete s.previousAttach}function zs(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 cE(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 B3(n,e,t){var i;if(!Ws(n.setPixelRatio))return;let r=0;if(t&&Gf(t)){const s=t;if(s.length>=2){const[o,a]=s;r=xg.clamp(e,o,a)}}else v3(t)?r=t:r=e;r!==((i=n.getPixelRatio)==null?void 0:i.call(n))&&n.setPixelRatio(r)}function k3(n,e,t,i,r){const s=[...e.__tres.objects],o=ca(e);if(n=ca(n),o===n)return!0;const a=zs(n,e.__tres??{},r),l=e.parent??e.__tres.parent??null,c={...e.__tres.memoizedProps};delete c.object;for(const u of s)uE(u,r),fE(u,r);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 s)i.insert(u,e);return!0}function ca(n){return E3(n)?(n.object.__tres=n.__tres,n.object):n}function uE(n,e){var t,i,r,s;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&&N3(o.__tres.objects,a=>a!==n),(i=n.__tres)!=null&&i.attach?F3(o,n,n.__tres.attach):((s=(r=n.parent)==null?void 0:r.remove)==null||s.call(r,ca(n)),n.parent=null)}function fE(n,e){var t;(t=n.traverse)==null||t.call(n,i=>{var r;e.deregisterCamera(i),(r=e.eventManager)==null||r.deregisterPointerMissedObject(i)}),e.deregisterCamera(n),cE(n)}const V3=({sizes:n})=>{const e=Xe([]),t=Ce(()=>e.value[0]),i=o=>{const a=o instanceof ac?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]},r=(o,a=!1)=>{if(ny(o)){const l=o;if(e.value.some(({uuid:c})=>c===l.uuid))return;a?i(l):e.value.push(l)}},s=o=>{if(ny(o)){const a=o;e.value=e.value.filter(({uuid:l})=>l!==a.uuid)}};return ah(()=>{n.aspectRatio.value&&e.value.forEach(o=>{!o.manual&&(o instanceof Xt||z3(o))&&(o instanceof Xt?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())})}),$i(()=>{e.value=[]}),{camera:t,cameras:e,registerCamera:r,deregisterCamera:s,setCameraActive:i}};function z3(n){return n.hasOwnProperty("isOrthographicCamera")&&n.isOrthographicCamera}const Wf="[TresJS ▲ ■ ●] ";function H3(...n){typeof n[0]=="string"?n[0]=Wf+n[0]:n.unshift(Wf),console.error(...n)}function G3(...n){typeof n[0]=="string"?n[0]=Wf+n[0]:n.unshift(Wf),console.warn(...n)}function W3(n,e){}function hE(){return{logError:H3,logWarning:G3,logMessage:W3}}const im=Xe({}),rm=n=>Object.assign(im.value,n);function op(){const n=new Map,e=new Set;let t=0,i=!1;const r=()=>{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]))},s=o=>{n.delete(o),e.delete(o)};return{on:(o,a=0)=>{n.set(o,{priority:a,addI:t++});const l=()=>s(o);return di(l),i=!0,{off:l}},off:s,trigger:(...o)=>{i&&(r(),i=!1),e.forEach(a=>a(...o))},dispose:()=>{n.clear(),e.clear()},get count(){return n.size}}}function X3(){let n=!0,e=!0,t=!1;const i=new $h(!1),r=Xe(i.running),s=Xe(!1);let o;const a=xg.generateUUID();let l=null;const c=op(),u=op(),f=op();T();let h={};function d(M){h=M}function p(M,P,b=0){switch(P){case"before":return c.on(M,b);case"render":return l||(l=M),u.dispose(),u.on(M);case"after":return f.on(M,b)}}function _(){e&&(e=!1,T(),E())}function g(){e=!0,T(),cancelAnimationFrame(o)}function m(){t=!1,T()}function y(){t=!0,T()}function x(){s.value=!0}function v(){s.value=!1}function E(){if(!n){o=requestAnimationFrame(E);return}const M=i.getDelta(),P=i.getElapsedTime(),b={camera:Rt(h.camera),scene:Rt(h.scene),renderer:Rt(h.renderer),raycaster:Rt(h.raycaster),controls:Rt(h.controls),invalidate:h.invalidate,advance:h.advance},S={delta:M,elapsed:P,clock:i,...b};r.value&&c.trigger(S),s.value||(u.count?u.trigger(S):l&&l(S)),r.value&&f.trigger(S),o=requestAnimationFrame(E)}function T(){const M=!e&&!t;i.running!==M&&(i.running?i.stop():i.start()),r.value=i.running}return{loopId:a,register:(M,P,b)=>p(M,P,b),start:_,stop:g,pause:y,resume:m,pauseRender:x,resumeRender:v,isRenderPaused:s,isActive:r,setContext:d,setReady:M=>n=M}}function Zg(n){let e=0;return n.traverse(t=>{if(t.isMesh&&t.geometry&&t.type!=="HightlightMesh"){const i=t.geometry,r=i.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,s=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=r+s+o+a;e+=l}}),e}function $3(n){return(n/1024).toFixed(2)}const q3=Number.parseInt(ic.replace("dev",""));function Y3(n){return n instanceof Te?n:Array.isArray(n)?new Te(...n):new Te(n)}const Eu={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:wn,toneMapping:hh,toneMappingExposure:3,shadowMap:{enabled:!0,type:og}},flat:{toneMapping:Gi,toneMappingExposure:1}};function j3({canvas:n,options:e,contextParts:{sizes:t,render:i,invalidate:r,advance:s}}){const o=Ce(()=>({alpha:on(e.alpha)??!0,depth:on(e.depth),canvas:Xn(n),context:on(e.context),stencil:on(e.stencil),antialias:on(e.antialias)??!0,precision:on(e.precision),powerPreference:on(e.powerPreference),premultipliedAlpha:on(e.premultipliedAlpha),preserveDrawingBuffer:on(e.preserveDrawingBuffer),logarithmicDepthBuffer:on(e.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:on(e.failIfMajorPerformanceCaveat)})),a=Ve(new Bu(o.value));function l(){e.renderMode==="on-demand"&&r()}qe(o,()=>{a.value.dispose(),a.value=new Bu(o.value),l()}),qe([t.width,t.height],()=>{a.value.setSize(t.width.value,t.height.value),l()},{immediate:!0}),qe(()=>e.clearColor,l);const{pixelRatio:c}=FN(),{logError:u}=hE(),f=(()=>{const d=new Bu,p={shadowMap:{enabled:d.shadowMap.enabled,type:d.shadowMap.type},toneMapping:d.toneMapping,toneMappingExposure:d.toneMappingExposure,outputColorSpace:d.outputColorSpace};return d.dispose(),p})(),h=on(e.renderMode);return h==="on-demand"&&r(),h==="manual"&&setTimeout(()=>{s()},100),ah(()=>{const d=on(e.preset);d&&(d in Eu||u(`Renderer Preset must be one of these: ${Object.keys(Eu).join(", ")}`),oE(a.value,Eu[d])),B3(a.value,c.value,on(e.dpr)),h==="always"&&(i.frames.value=Math.max(1,i.frames.value));const p=(m,y)=>{const x=on(m),v=()=>{if(d)return ry(Eu[d],y)};if(x!==void 0)return x;const E=v();return E!==void 0?E:ry(f,y)},_=(m,y)=>P3(a.value,y,p(m,y));_(e.shadows,"shadowMap.enabled"),_(e.toneMapping??hh,"toneMapping"),_(e.shadowMapType,"shadowMap.type"),q3<150&&_(!e.useLegacyLights,"physicallyCorrectLights"),_(e.outputColorSpace,"outputColorSpace"),_(e.toneMappingExposure,"toneMappingExposure");const g=p(e.clearColor,"clearColor");g&&a.value.setClearColor(g?Y3(g):new Te(0))}),$i(()=>{a.value.dispose(),a.value.forceContextLoss()}),{renderer:a}}function K3(n,e,t=10){const i=on(n)?qN():VN(Ce(()=>on(e).parentElement)),r=hi(Y0(i.width,t)),s=hi(Y0(i.height,t)),o=Ce(()=>r.value/s.value);return{height:s,width:r,aspectRatio:o}}const Z3=(n,e)=>{const t=Ce(()=>e.renderer.value.domElement),i=Ve([]),{x:r,y:s}=$N({target:t});let o=0;const{width:a,height:l,top:c,left:u}=kN(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)??r.value,y:(re==null?void 0:re.clientY)??s.value});return xe?h(xe)||[]:[]},p=zn(),_=zn(),g=zn(),m=zn(),y=zn(),x=zn(),v=zn(),E=zn();function T(re){const xe={};for(const ze in re)typeof ze!="function"&&(xe[ze]=re[ze]);return xe}const M=(re,xe)=>{var ze,se,ge;const be=T(xe),W=new F(xe==null?void 0:xe.clientX,xe==null?void 0:xe.clientY,0).unproject((ze=e.camera)==null?void 0:ze.value);re.trigger({...be,intersections:i.value,unprojectedPoint:W,ray:(se=e.raycaster)==null?void 0:se.value.ray,camera:(ge=e.camera)==null?void 0:ge.value,sourceEvent:xe,delta:o,stopPropagating:!1})};let P;const b=re=>{d(re),M(g,re),P=re},S=()=>{P&&b(P)};let D,B,H;const $=re=>{var xe;D=(xe=i.value[0])==null?void 0:xe.object,o=0,B=new fe((re==null?void 0:re.clientX)??r.value,(re==null?void 0:re.clientY)??s.value),M(y,re)};let ee,Z=!1;const te=re=>{var xe,ze,se;re instanceof PointerEvent&&(i.value.length===0&&M(x,re),D===((xe=i.value[0])==null?void 0:xe.object)&&(H=new fe((re==null?void 0:re.clientX)??r.value,(re==null?void 0:re.clientY)??s.value),o=B==null?void 0:B.distanceTo(H),re.button===0?(M(p,re),ee===((ze=i.value[0])==null?void 0:ze.object)?Z=!0:(ee=(se=i.value[0])==null?void 0:se.object,Z=!1)):re.button===2&&M(v,re)),M(m,re))},Q=re=>{Z&&(M(_,re),ee=void 0,Z=!1)},pe=re=>M(g,re),ve=re=>M(E,re);return t.value.addEventListener("pointerup",te),t.value.addEventListener("pointerdown",$),t.value.addEventListener("pointermove",b),t.value.addEventListener("pointerleave",pe),t.value.addEventListener("dblclick",Q),t.value.addEventListener("wheel",ve),$i(()=>{t!=null&&t.value&&(t.value.removeEventListener("pointerup",te),t.value.removeEventListener("pointerdown",$),t.value.removeEventListener("pointermove",b),t.value.removeEventListener("pointerleave",pe),t.value.removeEventListener("dblclick",Q),t.value.removeEventListener("wheel",ve))}),{intersects:i,onClick:re=>p.on(re).off,onDblClick:re=>_.on(re).off,onContextMenu:re=>v.on(re).off,onPointerMove:re=>g.on(re).off,onPointerUp:re=>m.on(re).off,onPointerDown:re=>y.on(re).off,onPointerMissed:re=>x.on(re).off,onWheel:re=>E.on(re).off,forceUpdate:S}};function ap(n,e){if(Array.isArray(n))for(const t of n)t(e);typeof n=="function"&&n(e)}function J3(n,e,t){var i;const r=Ve(),s=Ve();n&&(r.value=n),e&&(s.value=e);const o=b=>{var S;return((S=b.__tres)==null?void 0:S.eventCount)>0},a=b=>{var S;return((S=b.children)==null?void 0:S.some(D=>a(D)))||o(b)},l=Ve(((i=r.value)==null?void 0:i.children).filter(a)||[]);function c(b,S){const D=[],B=()=>S.stopPropagating=!0;S.stopPropagation=B;for(const H of S==null?void 0:S.intersections){if(S.stopPropagating)return;S={...S,...H};const{object:$}=H;S.eventObject=$,ap($[b],S),D.push($);let ee=$.parent;for(;ee!==null&&!S.stopPropagating&&!D.includes(ee);)S.eventObject=ee,ap(ee[b],S),D.push(ee),ee=ee.parent;const Z=C3(b.slice(2));t(Z,{intersection:H,event:S})}}const{onClick:u,onDblClick:f,onContextMenu:h,onPointerMove:d,onPointerDown:p,onPointerUp:_,onPointerMissed:g,onWheel:m,forceUpdate:y}=Z3(l,e);_(b=>c("onPointerUp",b)),p(b=>c("onPointerDown",b)),u(b=>c("onClick",b)),f(b=>c("onDoubleClick",b)),h(b=>c("onContextMenu",b)),m(b=>c("onWheel",b));let x=[];d(b=>{const S=b.intersections.map(({object:B})=>B),D=b.intersections;x.forEach(({object:B})=>{S.includes(B)||(b.intersections=x,c("onPointerLeave",b),c("onPointerOut",b))}),b.intersections=D,b.intersections.forEach(({object:B})=>{x.includes(B)||(c("onPointerEnter",b),c("onPointerOver",b))}),c("onPointerMove",b),x=b.intersections});const v=[];g(b=>{const S=()=>b.stopPropagating=!0;b.stopPropagation=S,v.forEach(D=>{b.stopPropagating||(b.eventObject=D,ap(D.onPointerMissed,b))}),t("pointer-missed",{event:b})});function E(b){Su(b)&&Kr(b)&&l.value.push(b)}function T(b){if(Su(b)&&Kr(b)){const S=l.value.indexOf(b);S>-1&&l.value.splice(S,1)}}function M(b){Su(b)&&Kr(b)&&b.onPointerMissed&&v.push(b)}function P(b){if(Su(b)&&Kr(b)){const S=v.indexOf(b);S>-1&&v.splice(S,1)}}return e.eventManager={forceUpdate:y,registerObject:E,deregisterObject:T,registerPointerMissedObject:M,deregisterPointerMissedObject:P},{forceUpdate:y,registerObject:E,deregisterObject:T,registerPointerMissedObject:M,deregisterPointerMissedObject:P}}function Q3(n,e,t=100){t=t<=0?100:t;const i=zn(),r=new Set;let s=!1,o=!1,a=null;function l(){a&&clearTimeout(a),!o&&!s&&n()?(i.trigger(e),r.forEach(f=>f()),r.clear(),s=!0):!o&&!s&&(a=setTimeout(l,t))}function c(){o=!0,a&&clearTimeout(a)}l();const u=(f,...h)=>{f(...h)};return{on:f=>{if(s)return u(f,e),{off:()=>{}};{const h=i.on(f);return r.add(h.off),i.on(f)}},off:i.off,trigger:i.trigger,clear:i.clear,cancel:c}}const lp=new WeakMap;function eU(n){if(n=n||dE(),lp.has(n))return lp.get(n);const e=100,t=Date.now(),i=Q3(()=>{if(Date.now()-t>=e)return!0;{const r=n.renderer.value,s=(r==null?void 0:r.domElement)||{width:0,height:0};return!!(r&&s.width>0&&s.height>0)}},n);return lp.set(n,i),i}function tU({scene:n,canvas:e,windowSize:t,rendererOptions:i,emit:r}){const s=Ve(n),o=K3(t,e),{camera:a,cameras:l,registerCamera:c,deregisterCamera:u,setCameraActive:f}=V3({sizes:o}),h={mode:Xe(i.renderMode||"always"),priority:Xe(0),frames:Xe(0),maxFrames:60,canBeInvalidated:Ce(()=>h.mode.value==="on-demand"&&h.frames.value===0)};function d(H=1){i.renderMode==="on-demand"&&(h.frames.value=Math.min(h.maxFrames,h.frames.value+H))}function p(){i.renderMode==="manual"&&(h.frames.value=1)}const{renderer:_}=j3({canvas:e,options:i,contextParts:{sizes:o,render:h,invalidate:d,advance:p}}),g={sizes:o,scene:s,camera:a,cameras:hi(l),renderer:_,raycaster:Ve(new kM),controls:Xe(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:h,advance:p,extend:rm,invalidate:d,registerCamera:c,setCameraActive:f,deregisterCamera:u,loop:X3()};Jr("useTres",g),g.scene.value.__tres={root:g},g.loop.register(()=>{a.value&&h.frames.value>0&&(_.value.render(n,a.value),r("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:y}=eU(g);g.loop.setReady(!1),g.loop.start(),m(()=>{r("ready",g),g.loop.setReady(!0),J3(n,g,r)}),$i(()=>{y(),g.loop.stop()});const x=100,v=GN({every:x}),{isSupported:E,memory:T}=WN({interval:x}),M=160;let P=performance.now();const b=({timestamp:H})=>{g.scene.value&&(g.perf.memory.allocatedMem=Zg(g.scene.value)),H-P>=x&&(P=H,g.perf.fps.accumulator.push(v.value),g.perf.fps.accumulator.length>M&&g.perf.fps.accumulator.shift(),g.perf.fps.value=v.value,E.value&&T.value&&(g.perf.memory.accumulator.push(T.value.usedJSHeapSize/1024/1024),g.perf.memory.accumulator.length>M&&g.perf.memory.accumulator.shift(),g.perf.memory.currentMem=g.perf.memory.accumulator.reduce(($,ee)=>$+ee,0)/g.perf.memory.accumulator.length))};let S=0;const D=1,{pause:B}=Kg(({delta:H})=>{window.__TRES__DEVTOOLS__&&(b({timestamp:performance.now()}),S+=H,S>=D&&(window.__TRES__DEVTOOLS__.cb(g),S=0))},{immediate:!0});return $i(()=>{B()}),g}function dE(){const n=In("useTres");if(!n)throw new Error("useTresContext must be used together with useTresContextProvider");return n}function H4(){const{camera:n,scene:e,renderer:t,loop:i,raycaster:r,controls:s,invalidate:o,advance:a}=dE();i.setContext({camera:n,scene:e,renderer:t,raycaster:r,controls:s,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 nU=zn(),iU=zn(),pE=zn(),ll=new $h;let ku=0,Vu=0;Kg(()=>{nU.trigger({delta:ku,elapsed:Vu,clock:ll}),iU.trigger({delta:ku,elapsed:Vu,clock:ll}),pE.trigger({delta:ku,elapsed:Vu,clock:ll})},{immediate:!1});pE.on(()=>{ku=ll.getDelta(),Vu=ll.getElapsedTime()});function rU(n,e={},t={}){let i=n;const r=a=>{i=a};let s=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){const u=t[l];return u&&typeof u=="function"?u(c,i,s,r):i[l]=c,!0}};return s=new Proxy({},o),s}const{logError:ly}=hE(),cy=["onClick","onContextMenu","onPointerMove","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onDoubleClick","onPointerDown","onPointerUp","onPointerCancel","onPointerMissed","onLostPointerCapture","onWheel"],sU=n=>{const e=n.scene.value;function t(c,u,f,h){if(h||(h={}),h.args||(h.args=[]),c==="template"||w3(c))return null;let d=c.replace("Tres",""),p;if(c==="primitive"){(!Cr(h.object)||Mt(h.object))&&ly("Tres primitives need an 'object' prop, whose value is an object or shallowRef"),d=h.object.type;const _={};p=rU(h.object,{object:g=>g,isPrimitive:()=>!0,__tres:()=>_},{object:(g,m,y,x)=>{k3(g,y,x,{patchProp:s,remove:r,insert:i},n)},__tres:g=>{Object.assign(_,g)}})}else{const _=im.value[d];_||ly(`${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=zs(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:zs(c,{},n),_=u.__tres?u:zs(u,{},n);c=ca(p),u=ca(_),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?U3(_,p,p.__tres.attach):Kr(c)&&Kr(_)&&(_.add(c),c.dispatchEvent({type:"added"})),p.__tres.parent=_,_.__tres.objects&&!_.__tres.objects.includes(p)&&_.__tres.objects.push(p)}function r(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=tm(u)?"default":u;const _=(d=c.__tres)==null?void 0:d.dispose;tm(_)||(_===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(y=>r(y,u)),m&&c.children&&[...c.children].forEach(y=>r(y,u)),uE(c,n),fE(c,n),m&&!M3(c)){if(Ws(u))u(c);else if(Ws(c.dispose))try{c.dispose()}catch{}}"__tres"in c&&delete c.__tres}function s(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 v=((d=c.__tres)==null?void 0:d.parent)||c.parent;r(c),zs(c,{attach:h},n),v&&i(c,v);return}if(u==="dispose"){c.__tres||(c=zs(c,{},n)),c.__tres.dispose=h;return}if(Kr(c)&&g==="blocks-pointer-events"){h||h===""?c[g]=h:delete c[g];return}cy.includes(u)&&c.__tres&&(c.__tres.eventCount+=1);let m=Mu(g),y=_==null?void 0:_[m];if(g==="args"){const v=c,E=f??[],T=h??[],M=((p=c.__tres)==null?void 0:p.type)||c.type;M&&E.length&&!I3(E,T)&&(_=Object.assign(v,new im.value[M](...h)));return}if(_.type==="BufferGeometry"){if(g==="args")return;_.setAttribute(Mu(g),new Et(...h));return}if(g.includes("-")&&y===void 0){const v=g.split("-");y=v.reduce((E,T)=>E[Mu(T)],_),g=v.pop(),m=g,y!=null&&y.set||(_=v.reduce((E,T)=>E[Mu(T)],_))}let x=h;if(x===""&&(x=!0),Ws(y)){cy.includes(u)||(Gf(x)?c[m](...x):c[m](x)),m.startsWith("on")&&Ws(x)&&(_[m]=x);return}!(y!=null&&y.set)&&!Ws(y)?_[m]=x:y.constructor===x.constructor&&y!=null&&y.copy?y==null||y.copy(x):Gf(x)?y.set(...x):!y.isColor&&y.setScalar?y.setScalar(x):y.set(x),cE(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=zs(new ct,{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:r,createElement:t,patchProp:s,parentNode:o,createText:()=>{},createComment:a,setText:()=>{},setElementText:()=>{},nextSibling:l,querySelector:()=>{},setScopeId:()=>{},cloneNode:()=>{},insertStaticContent:()=>{}}};function oU(){return mE().__VUE_DEVTOOLS_GLOBAL_HOOK__}function mE(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const aU=typeof Proxy=="function",lU="devtools-plugin:setup",cU="plugin:settings:set";let Fa,sm;function uU(){var n;return Fa!==void 0||(typeof window<"u"&&window.performance?(Fa=!0,sm=window.performance):typeof globalThis<"u"&&!((n=globalThis.perf_hooks)===null||n===void 0)&&n.performance?(Fa=!0,sm=globalThis.perf_hooks.performance):Fa=!1),Fa}function fU(){return uU()?sm.now():Date.now()}class hU{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 r=`__vue-devtools-plugin-settings__${e.id}`;let s=Object.assign({},i);try{const o=localStorage.getItem(r),a=JSON.parse(o);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(o){try{localStorage.setItem(r,JSON.stringify(o))}catch{}s=o},now(){return fU()}},t&&t.on(cU,(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 dU(n,e){const t=n,i=mE(),r=oU(),s=aU&&t.enableEarlyProxy;if(r&&(i.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))r.emit(lU,n,e);else{const o=s?new hU(t,r):null;(i.__VUE_DEVTOOLS_PLUGINS__=i.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}function pU(n,e){const t=`▲ ■ ●${n}`;typeof uy=="function"?uy(t,e):console.log(t)}function uy(n,e){throw new Error(n+e)}const gE=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=Zg(n);return t>0&&e.tags.push({label:`${$3(t)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:"Memory usage"}),n.type.includes("Light")&&(b3(n)&&e.tags.push({label:`${n.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:"Intensity"}),e.tags.push({label:`#${new Te(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 _E(n,e,t=""){n.children.forEach(i=>{if(i.type==="HightlightMesh"||t&&!i.type.includes(t)&&!i.name.includes(t))return;const r=gE(i);e.children.push(r),_E(i,r,t)})}const mU=[],Ba="tres:inspector",gU=fi({sceneGraph:null});function _U(n,e){dU({id:"dev.esm.tres",label:"TresJS 🪐",logo:"https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg",packageName:"tresjs",homepage:"https://tresjs.org",componentStateTypes:mU,app:n},t=>{typeof t.now!="function"&&pU("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:Ba,label:"TresJS 🪐",icon:"account_tree",treeFilterPlaceholder:"Search instances"}),setInterval(()=>{t.sendInspectorTree(Ba)},1e3),setInterval(()=>{t.notifyComponentUpdate()},5e3),t.on.getInspectorTree(s=>{if(s.inspectorId===Ba){const o=gE(e.scene.value);_E(e.scene.value,o,s.filter),gU.sceneGraph=o,s.rootNodes=[o]}});let i=null,r=null;t.on.getInspectorState(s=>{var o;if(s.inspectorId===Ba){const[a]=e.scene.value.getObjectsByProperty("uuid",s.nodeId);if(!a)return;if(r&&i&&i.parent&&r.remove(i),a.isMesh){const l=D3(a);a.add(l),i=l,r=a}s.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&&(s.state={...s.state,state:[{key:"Scene Info",value:{objects:a.children.length,memory:Zg(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(s=>{s.inspectorId===Ba&&L3(e.scene.value,s.nodeId,s.path,s.state.value)})})}const vU=["data-scene","data-tres"],yU=nn({__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,r=t,s=Km(),o=Xe(),a=Ve(new wh),l=On();rm(oN);const c=(p,_=!1)=>nn({setup(){var g;const m=(g=On())==null?void 0:g.appContext;m&&(m.app=l==null?void 0:l.appContext.app);const y={};function x(v){v&&(v.parent&&x(v.parent),v.provides&&Object.assign(y,v.provides))}return l!=null&&l.parent&&i.enableProvideBridge&&(x(l.parent),Reflect.ownKeys(y).forEach(v=>{Jr(v,y[v])})),Jr("useTres",p),Jr("extend",rm),typeof window<"u"&&_U(m==null?void 0:m.app,p),()=>br(Wt,null,_?[]:s.default())}}),u=(p,_=!1)=>{const g=c(p,_),{render:m}=Rb(sU(p));m(br(g),a.value)},f=(p,_=!1)=>{lE(p.scene.value),_&&(p.renderer.value.dispose(),p.renderer.value.renderLists.dispose(),p.renderer.value.forceContextLoss()),a.value.__tres={root:p}},h=Ve(null);e({context:h,dispose:()=>f(h.value,!0)});const d=()=>{f(h.value),u(h.value,!0)};return Nn(()=>{const p=o;h.value=tU({scene:a.value,canvas:p,windowSize:i.windowSize??!1,rendererOptions:i,emit:r});const{registerCamera:_,camera:g,cameras:m,deregisterCamera:y}=h.value;u(h.value);const x=()=>{const v=new Xt(45,window.innerWidth/window.innerHeight,.1,1e3);v.position.set(3,3,3),v.lookAt(0,0,0),_(v);const E=ah(()=>{m.value.length>=2&&(v.removeFromParent(),y(v),E==null||E())})};qe(()=>i.camera,(v,E)=>{v&&_(v),E&&(E.removeFromParent(),y(E))},{immediate:!0}),g.value||x()}),$i(d),(p,_)=>(ln(),ci("canvas",{ref_key:"canvas",ref:o,"data-scene":a.value.uuid,class:ma(p.$attrs.class),"data-tres":`tresjs ${Rt(g3).version}`,style:mi({display:"block",width:"100%",height:"100%",position:p.windowSize?"fixed":"relative",top:0,left:0,pointerEvents:"auto",touchAction:"none",...p.$attrs.style})},null,14,vU))}}),xU={install(n){n.component("TresCanvas",yU)}};function cp(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 om(n,e,t=".",i){if(!cp(e))return om(n,{},t,i);const r=Object.assign({},e);for(const s in n){if(s==="__proto__"||s==="constructor")continue;const o=n[s];o!=null&&(i&&i(r,s,o,t)||(Array.isArray(o)&&Array.isArray(r[s])?r[s]=[...o,...r[s]]:cp(o)&&cp(r[s])?r[s]=om(o,r[s],(t?`${t}.`:"")+s.toString(),i):r[s]=o))}return r}function bU(n){return(...e)=>e.reduce((t,i)=>om(t,i,"",n),{})}const vE=bU();function yE(n){return th()?(Fm(n),!0):!1}function Jg(n){return typeof n=="function"?n():Rt(n)}const SU=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const MU=n=>n!=null,EU=Object.prototype.toString,Xf=n=>EU.call(n)==="[object Object]",zu=()=>{};function TU(n){return On()}function wU(n,e){TU()&&$i(n,e)}function cl(n){var e;const t=Jg(n);return(e=t==null?void 0:t.$el)!=null?e:t}const xE=SU?window:void 0;function Oi(...n){let e,t,i,r;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,r]=n,e=xE):[e,t,i,r]=n,!e)return zu;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const s=[],o=()=>{s.forEach(u=>u()),s.length=0},a=(u,f,h,d)=>(u.addEventListener(f,h,d),()=>u.removeEventListener(f,h,d)),l=qe(()=>[cl(e),Jg(r)],([u,f])=>{if(o(),!u)return;const h=Xf(f)?{...f}:f;s.push(...t.flatMap(d=>i.map(p=>a(u,d,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return yE(c),c}function AU(){const n=Xe(!1),e=On();return e&&Nn(()=>{n.value=!0},e),n}function CU(n){const e=AU();return Ce(()=>(e.value,!!n()))}function RU(n,e,t={}){const{root:i,rootMargin:r="0px",threshold:s=.1,window:o=xE,immediate:a=!0}=t,l=CU(()=>o&&"IntersectionObserver"in o),c=Ce(()=>{const p=Jg(n);return(Array.isArray(p)?p:[p]).map(cl).filter(MU)});let u=zu;const f=Xe(a),h=l.value?qe(()=>[c.value,cl(i),f.value],([p,_])=>{if(u(),!f.value||!p.length)return;const g=new IntersectionObserver(e,{root:cl(_),rootMargin:r,threshold:s});p.forEach(m=>m&&g.observe(m)),u=()=>{g.disconnect(),u=zu}},{immediate:a,flush:"post"}):zu,d=()=>{u(),h(),f.value=!1};return yE(d),{isSupported:l,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:d}}const bE=1/60*1e3,PU=typeof performance<"u"?()=>performance.now():()=>Date.now(),SE=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(PU()),bE);function IU(n){let e=[],t=[],i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&r,h=f?e:t;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),f&&r&&(i=e.length)),l},cancel:l=>{const c=t.indexOf(l);c!==-1&&t.splice(c,1),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let c=0;c(n[e]=IU(()=>Xl=!0),n),{}),cm=mc.reduce((n,e)=>{const t=Yh[e];return n[e]=(i,r=!1,s=!1)=>(Xl||NU(),t.schedule(i,r,s)),n},{}),DU=mc.reduce((n,e)=>(n[e]=Yh[e].cancel,n),{});mc.reduce((n,e)=>(n[e]=()=>Yh[e].process(ea),n),{});const OU=n=>Yh[n].process(ea),ME=n=>{Xl=!1,ea.delta=am?bE:Math.max(Math.min(n-ea.timestamp,LU),1),ea.timestamp=n,lm=!0,mc.forEach(OU),lm=!1,Xl&&(am=!1,SE(ME))},NU=()=>{Xl=!0,am=!0,lm||SE(ME)},EE=()=>ea;function TE(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 r=0,i=Object.getOwnPropertySymbols(n);rMath.min(Math.max(t,n),e),hy=.001,UU=.01,FU=10,BU=.05,kU=1;function VU({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s,o=1-e;o=um(BU,kU,o),n=um(UU,FU,n/1e3),o<1?(r=c=>{const u=c*o,f=u*n,h=u-t,d=fm(c,o),p=Math.exp(-f);return hy-h/d*p},s=c=>{const f=c*o*n,h=f*t+t,d=Math.pow(o,2)*Math.pow(c,2)*n,p=Math.exp(-f),_=fm(Math.pow(c,2),o);return(-r(c)+hy>0?-1:1)*((h-d)*p)/_}):(r=c=>{const u=Math.exp(-c*n),f=(c-t)*n+1;return-.001+u*f},s=c=>{const u=Math.exp(-c*n),f=(t-c)*(n*n);return u*f});const a=5/n,l=HU(r,s,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 zU=12;function HU(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function XU(n){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},n);if(!dy(n,WU)&&dy(n,GU)){const t=VU(n);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Qg(n){var{from:e=0,to:t=1,restSpeed:i=2,restDelta:r}=n,s=TE(n,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:a,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:h}=XU(s),d=py,p=py;function _(){const g=u?-(u/1e3):0,m=t-e,y=l/(2*Math.sqrt(a*c)),x=Math.sqrt(a/c)/1e3;if(r===void 0&&(r=Math.min(Math.abs(t-e)/100,.4)),y<1){const v=fm(x,y);d=E=>{const T=Math.exp(-y*x*E);return t-T*((g+y*x*m)/v*Math.sin(v*E)+m*Math.cos(v*E))},p=E=>{const T=Math.exp(-y*x*E);return y*x*T*(Math.sin(v*E)*(g+y*x*m)/v+m*Math.cos(v*E))-T*(Math.cos(v*E)*(g+y*x*m)-v*m*Math.sin(v*E))}}else if(y===1)d=v=>t-Math.exp(-x*v)*(m+(g+x*m)*v);else{const v=x*Math.sqrt(y*y-1);d=E=>{const T=Math.exp(-y*x*E),M=Math.min(v*E,300);return t-T*((g+y*x*m)*Math.sinh(M)+v*m*Math.cosh(M))/v}}}return _(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const y=p(g)*1e3,x=Math.abs(y)<=i,v=Math.abs(t-m)<=r;o.done=x&&v}return o.value=o.done?t:m,o},flipTarget:()=>{u=-u,[e,t]=[t,e],_()}}}Qg.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const py=n=>0,wE=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},e_=(n,e,t)=>-t*n+t*e+n,AE=(n,e)=>t=>Math.max(Math.min(t,e),n),ul=n=>n%1?Number(n.toFixed(5)):n,$l=/(-)?([\d]*\.?[\d])+/g,hm=/(#[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,$U=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function gc(n){return typeof n=="string"}const _c={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},fl=Object.assign(Object.assign({},_c),{transform:AE(0,1)}),Tu=Object.assign(Object.assign({},_c),{default:1}),t_=n=>({test:e=>gc(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),Ns=t_("deg"),hl=t_("%"),nt=t_("px"),my=Object.assign(Object.assign({},hl),{parse:n=>hl.parse(n)/100,transform:n=>hl.transform(n*100)}),n_=(n,e)=>t=>!!(gc(t)&&$U.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),CE=(n,e,t)=>i=>{if(!gc(i))return i;const[r,s,o,a]=i.match($l);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},js={test:n_("hsl","hue"),parse:CE("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+hl.transform(ul(e))+", "+hl.transform(ul(t))+", "+ul(fl.transform(i))+")"},qU=AE(0,255),up=Object.assign(Object.assign({},_c),{transform:n=>Math.round(qU(n))}),Zr={test:n_("rgb","red"),parse:CE("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+up.transform(n)+", "+up.transform(e)+", "+up.transform(t)+", "+ul(fl.transform(i))+")"};function YU(n){let e="",t="",i="",r="";return n.length>5?(e=n.substr(1,2),t=n.substr(3,2),i=n.substr(5,2),r=n.substr(7,2)):(e=n.substr(1,1),t=n.substr(2,1),i=n.substr(3,1),r=n.substr(4,1),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const dm={test:n_("#"),parse:YU,transform:Zr.transform},Vn={test:n=>Zr.test(n)||dm.test(n)||js.test(n),parse:n=>Zr.test(n)?Zr.parse(n):js.test(n)?js.parse(n):dm.parse(n),transform:n=>gc(n)?n:n.hasOwnProperty("red")?Zr.transform(n):js.transform(n)},RE="${c}",PE="${n}";function jU(n){var e,t,i,r;return isNaN(n)&&gc(n)&&((t=(e=n.match($l))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((r=(i=n.match(hm))===null||i===void 0?void 0:i.length)!==null&&r!==void 0?r:0)>0}function IE(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0;const i=n.match(hm);i&&(t=i.length,n=n.replace(hm,RE),e.push(...i.map(Vn.parse)));const r=n.match($l);return r&&(n=n.replace($l,PE),e.push(...r.map(_c.parse))),{values:e,numColors:t,tokenised:n}}function LE(n){return IE(n).values}function DE(n){const{values:e,numColors:t,tokenised:i}=IE(n),r=e.length;return s=>{let o=i;for(let a=0;atypeof n=="number"?0:n;function ZU(n){const e=LE(n);return DE(n)(e.map(KU))}const vc={test:jU,parse:LE,createTransformer:DE,getAnimatableNone:ZU},JU=new Set(["brightness","contrast","saturate","opacity"]);function QU(n){let[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match($l)||[];if(!i)return n;const r=t.replace(i,"");let s=JU.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const eF=/([a-z-]*)\(.*?\)/g,pm=Object.assign(Object.assign({},vc),{getAnimatableNone:n=>{const e=n.match(eF);return e?e.map(QU).join(" "):n}});function fp(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 gy({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=fp(l,a,n+1/3),s=fp(l,a,n),o=fp(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const tF=(n,e,t)=>{const i=n*n,r=e*e;return Math.sqrt(Math.max(0,t*(r-i)+i))},nF=[dm,Zr,js],_y=n=>nF.find(e=>e.test(n)),OE=(n,e)=>{let t=_y(n),i=_y(e),r=t.parse(n),s=i.parse(e);t===js&&(r=gy(r),t=Zr),i===js&&(s=gy(s),i=Zr);const o=Object.assign({},r);return a=>{for(const l in o)l!=="alpha"&&(o[l]=tF(r[l],s[l],a));return o.alpha=e_(r.alpha,s.alpha,a),t.transform(o)}},iF=n=>typeof n=="number",rF=(n,e)=>t=>e(n(t)),NE=(...n)=>n.reduce(rF);function UE(n,e){return iF(n)?t=>e_(n,e,t):Vn.test(n)?OE(n,e):BE(n,e)}const FE=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>UE(s,e[o]));return s=>{for(let o=0;o{const t=Object.assign(Object.assign({},n),e),i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=UE(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}};function vy(n){const e=vc.parse(n),t=e.length;let i=0,r=0,s=0;for(let o=0;o{const t=vc.createTransformer(e),i=vy(n),r=vy(e);return i.numHSL===r.numHSL&&i.numRGB===r.numRGB&&i.numNumbers>=r.numNumbers?NE(FE(i.parsed,r.parsed),t):o=>`${o>0?e:n}`},oF=(n,e)=>t=>e_(n,e,t);function aF(n){if(typeof n=="number")return oF;if(typeof n=="string")return Vn.test(n)?OE:BE;if(Array.isArray(n))return FE;if(typeof n=="object")return sF}function lF(n,e,t){const i=[],r=t||aF(n[0]),s=n.length-1;for(let o=0;ot(wE(n,e,i))}function uF(n,e){const t=n.length,i=t-1;return r=>{let s=0,o=!1;if(r<=n[0]?o=!0:r>=n[i]&&(s=i-1,o=!0),!o){let l=1;for(;lr||l===i);l++);s=l-1}const a=wE(n[s],n[s+1],r);return e[s](a)}}function kE(n,e,{clamp:t=!0,ease:i,mixer:r}={}){const s=n.length;fy(s===e.length),fy(!i||!Array.isArray(i)||i.length===s-1),n[0]>n[s-1]&&(n=[].concat(n),e=[].concat(e),n.reverse(),e.reverse());const o=lF(e,i,r),a=s===2?cF(n,o):uF(n,o);return t?l=>a(um(n[0],n[s-1],l)):a}const jh=n=>e=>1-n(1-e),i_=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,fF=n=>e=>Math.pow(e,n),VE=n=>e=>e*e*((n+1)*e-n),hF=n=>{const e=VE(n);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},zE=1.525,dF=4/11,pF=8/11,mF=9/10,HE=n=>n,r_=fF(2),gF=jh(r_),GE=i_(r_),WE=n=>1-Math.sin(Math.acos(n)),XE=jh(WE),_F=i_(XE),s_=VE(zE),vF=jh(s_),yF=i_(s_),xF=hF(zE),bF=4356/361,SF=35442/1805,MF=16061/1805,$f=n=>{if(n===1||n===0)return n;const e=n*n;return nn<.5?.5*(1-$f(1-n*2)):.5*$f(n*2-1)+.5;function wF(n,e){return n.map(()=>e||GE).splice(0,n.length-1)}function AF(n){const e=n.length;return n.map((t,i)=>i!==0?i/(e-1):0)}function CF(n,e){return n.map(t=>t*e)}function Hu({from:n=0,to:e=1,ease:t,offset:i,duration:r=300}){const s={done:!1,value:n},o=Array.isArray(e)?e:[n,e],a=CF(i&&i.length===o.length?i:AF(o),r);function l(){return kE(a,o,{ease:Array.isArray(t)?t:wF(o,t)})}let c=l();return{next:u=>(s.value=c(u),s.done=u>=r,s),flipTarget:()=>{o.reverse(),c=l()}}}function RF({velocity:n=0,from:e=0,power:t=.8,timeConstant:i=350,restDelta:r=.5,modifyTarget:s}){const o={done:!1,value:e};let a=t*n;const l=e+a,c=s===void 0?l:s(l);return c!==l&&(a=c-e),{next:u=>{const f=-a*Math.exp(-u/i);return o.done=!(f>r||f<-r),o.value=o.done?c:c+f,o},flipTarget:()=>{}}}const yy={keyframes:Hu,spring:Qg,decay:RF};function PF(n){if(Array.isArray(n.to))return Hu;if(yy[n.type])return yy[n.type];const e=new Set(Object.keys(n));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Hu:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Qg:Hu}function $E(n,e,t=0){return n-e-t}function IF(n,e,t=0,i=!0){return i?$E(e+-n,e,t):e-(n-e)+t}function LF(n,e,t,i){return i?n>=e+t:n<=-t}const DF=n=>{const e=({delta:t})=>n(t);return{start:()=>cm.update(e,!0),stop:()=>DU.update(e)}};function qE(n){var e,t,{from:i,autoplay:r=!0,driver:s=DF,elapsed:o=0,repeat:a=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=n,_=TE(n,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=_,m,y=0,x=_.duration,v,E=!1,T=!0,M;const P=PF(_);!((t=(e=P).needsInterpolation)===null||t===void 0)&&t.call(e,i,g)&&(M=kE([0,100],[i,g],{clamp:!1}),i=0,g=100);const b=P(Object.assign(Object.assign({},_),{from:i,to:g}));function S(){y++,l==="reverse"?(T=y%2===0,o=IF(o,x,c,T)):(o=$E(o,x,c),l==="mirror"&&b.flipTarget()),E=!1,d&&d()}function D(){m.stop(),h&&h()}function B($){if(T||($=-$),o+=$,!E){const ee=b.next(Math.max(0,o));v=ee.value,M&&(v=M(v)),E=T?ee.done:o<=0}p==null||p(v),E&&(y===0&&(x??(x=o)),y{f==null||f(),m.stop()}}}function YE(n,e){return e?n*(1e3/e):0}function OF({from:n=0,velocity:e=0,min:t,max:i,power:r=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:f,onComplete:h,onStop:d}){let p;function _(x){return t!==void 0&&xi}function g(x){return t===void 0?i:i===void 0||Math.abs(t-x){var E;f==null||f(v),(E=x.onUpdate)===null||E===void 0||E.call(x,v)},onComplete:h,onStop:d}))}function y(x){m(Object.assign({type:"spring",stiffness:o,damping:a,restDelta:l},x))}if(_(n))y({from:n,velocity:e,to:g(n)});else{let x=r*e+n;typeof c<"u"&&(x=c(x));const v=g(x),E=v===t?-1:1;let T,M;const P=b=>{T=M,M=b,e=YE(b-T,EE().delta),(E===1&&b>v||E===-1&&bp==null?void 0:p.stop()}}const jE=(n,e)=>1-3*e+3*n,KE=(n,e)=>3*e-6*n,ZE=n=>3*n,qf=(n,e,t)=>((jE(e,t)*n+KE(e,t))*n+ZE(e))*n,JE=(n,e,t)=>3*jE(e,t)*n*n+2*KE(e,t)*n+ZE(e),NF=1e-7,UF=10;function FF(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=qf(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>NF&&++a=kF?VF(o,f,n,t):h===0?f:FF(o,a,a+wu,n,t)}return o=>o===0||o===1?o:qf(s(o),e,i)}const hp={};var HF=Object.defineProperty,GF=(n,e,t)=>e in n?HF(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,WF=(n,e,t)=>(GF(n,e+"",t),t);class XF{constructor(){WF(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 r of this.subscriptions)r(e,t,i)}clear(){this.subscriptions.clear()}}var $F=Object.defineProperty,qF=(n,e,t)=>e in n?$F(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ni=(n,e,t)=>(qF(n,typeof e!="symbol"?e+"":e,t),t);function xy(n){return!Number.isNaN(Number.parseFloat(n))}class YF{constructor(e){Ni(this,"current"),Ni(this,"prev"),Ni(this,"timeDelta",0),Ni(this,"lastUpdated",0),Ni(this,"updateSubscribers",new XF),Ni(this,"stopAnimation"),Ni(this,"canTrackVelocity",!1),Ni(this,"updateAndNotify",t=>{this.prev=this.current,this.current=t;const{delta:i,timestamp:r}=EE();this.lastUpdated!==r&&(this.timeDelta=i,this.lastUpdated=r),cm.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)}),Ni(this,"scheduleVelocityCheck",()=>cm.postRender(this.velocityCheck)),Ni(this,"velocityCheck",({timestamp:t})=>{this.canTrackVelocity||(this.canTrackVelocity=xy(this.current)),t!==this.lastUpdated&&(this.prev=this.current)}),this.prev=this.current=e,this.canTrackVelocity=xy(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?YE(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 jF(n){return new YF(n)}const{isArray:KF}=Array;function ZF(){const n=Xe({}),e=i=>{const r=s=>{n.value[s]&&(n.value[s].stop(),n.value[s].destroy(),delete n.value[s])};i?KF(i)?i.forEach(r):r(i):Object.keys(n.value).forEach(r)},t=(i,r,s)=>{if(n.value[i])return n.value[i];const o=jF(r);return o.onChange(a=>s[i]=a),n.value[i]=o,o};return wU(e),{motionValues:n,get:t,stop:e}}function JF(n){return Array.isArray(n)}function Us(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function dp(n){return{type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function QF(n){return{type:"spring",stiffness:550,damping:n===0?100:30,restDelta:.01,restSpeed:10}}function pp(){return{type:"keyframes",ease:"linear",duration:300}}function eB(n){return{type:"keyframes",duration:800,values:n}}const by={default:QF,x:Us,y:Us,z:Us,rotate:Us,rotateX:Us,rotateY:Us,rotateZ:Us,scaleX:dp,scaleY:dp,scale:dp,backgroundColor:pp,color:pp,opacity:pp};function QE(n,e){let t;return JF(e)?t=eB:t=by[n]||by.default,{to:e,...t(e)}}const Sy={..._c,transform:Math.round},eT={color:Vn,backgroundColor:Vn,outlineColor:Vn,fill:Vn,stroke:Vn,borderColor:Vn,borderTopColor:Vn,borderRightColor:Vn,borderBottomColor:Vn,borderLeftColor:Vn,borderWidth:nt,borderTopWidth:nt,borderRightWidth:nt,borderBottomWidth:nt,borderLeftWidth:nt,borderRadius:nt,radius:nt,borderTopLeftRadius:nt,borderTopRightRadius:nt,borderBottomRightRadius:nt,borderBottomLeftRadius:nt,width:nt,maxWidth:nt,height:nt,maxHeight:nt,size:nt,top:nt,right:nt,bottom:nt,left:nt,padding:nt,paddingTop:nt,paddingRight:nt,paddingBottom:nt,paddingLeft:nt,margin:nt,marginTop:nt,marginRight:nt,marginBottom:nt,marginLeft:nt,rotate:Ns,rotateX:Ns,rotateY:Ns,rotateZ:Ns,scale:Tu,scaleX:Tu,scaleY:Tu,scaleZ:Tu,skew:Ns,skewX:Ns,skewY:Ns,distance:nt,translateX:nt,translateY:nt,translateZ:nt,x:nt,y:nt,z:nt,perspective:nt,transformPerspective:nt,opacity:fl,originX:my,originY:my,originZ:nt,zIndex:Sy,filter:pm,WebkitFilter:pm,fillOpacity:fl,strokeOpacity:fl,numOctaves:Sy},o_=n=>eT[n];function mm(n,e){return e&&typeof n=="number"&&e.transform?e.transform(n):n}function tB(n,e){let t=o_(n);return t!==pm&&(t=vc),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const nB={linear:HE,easeIn:r_,easeInOut:GE,easeOut:gF,circIn:WE,circInOut:_F,circOut:XE,backIn:s_,backInOut:yF,backOut:vF,anticipate:xF,bounceIn:EF,bounceInOut:TF,bounceOut:$f};function My(n){if(Array.isArray(n)){const[e,t,i,r]=n;return zF(e,t,i,r)}else if(typeof n=="string")return nB[n];return n}function iB(n){return Array.isArray(n)&&typeof n[0]!="number"}function Ey(n,e){return n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&vc.test(e)&&!e.startsWith("url("))}function rB(n){return Array.isArray(n.to)&&n.to[0]===null&&(n.to=[...n.to],n.to[0]=n.from),n}function sB({ease:n,times:e,delay:t,...i}){const r={...i};return e&&(r.offset=e),n&&(r.ease=iB(n)?n.map(My):My(n)),t&&(r.elapsed=-t),r}function oB(n,e,t){return Array.isArray(e.to)&&(n.duration||(n.duration=800)),rB(e),aB(n)||(n={...n,...QE(t,e.to)}),{...e,...sB(n)}}function aB({delay:n,repeat:e,repeatType:t,repeatDelay:i,from:r,...s}){return!!Object.keys(s).length}function lB(n,e){return n[e]||n.default||n}function cB(n,e,t,i,r){const s=lB(i,n);let o=s.from===null||s.from===void 0?e.get():s.from;const a=Ey(n,t);o==="none"&&a&&typeof t=="string"&&(o=tB(n,t));const l=Ey(n,o);function c(f){const h={from:o,to:t,velocity:i.velocity?i.velocity:e.getVelocity(),onUpdate:d=>e.set(d)};return s.type==="inertia"||s.type==="decay"?OF({...h,...s}):qE({...oB(s,h,n),onUpdate:d=>{h.onUpdate(d),s.onUpdate&&s.onUpdate(d)},onComplete:()=>{r&&r(),f&&f()}})}function u(f){return e.set(t),r&&r(),f&&f(),{stop:()=>{}}}return!l||!a||s.type===!1?u:c}function uB(){const{motionValues:n,stop:e,get:t}=ZF();return{motionValues:n,stop:e,push:(r,s,o,a={},l)=>{const c=o[r],u=t(r,c,o);if(a&&a.immediate){u.set(s);return}const f=cB(r,u,s,a,l);u.start(f)}}}function fB(n,e={},{motionValues:t,push:i,stop:r}=uB()){const s=Rt(e),o=Xe(!1);qe(t,f=>{o.value=Object.values(f).filter(h=>h.isAnimating()).length>0},{immediate:!0,deep:!0});const a=f=>{if(!s||!s[f])throw new Error(`The variant ${f} does not exist.`);return s[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||QE(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=Xf(f)?f:a(f);Object.entries(h).forEach(([d,p])=>{d!=="transition"&&i(d,p,n,{immediate:!0})})},leave:async f=>{let h;if(s&&(s.leave&&(h=s.leave),!s.leave&&s.initial&&(h=s.initial)),!h){f();return}await l(h),f()},stop:r}}const a_=typeof window<"u",hB=()=>a_&&(window.onpointerdown===null||void 0),dB=()=>a_&&(window.ontouchstart===null||void 0),pB=()=>a_&&(window.onmousedown===null||void 0);function mB({target:n,state:e,variants:t,apply:i}){const r=Rt(t),s=Xe(!1),o=Xe(!1),a=Xe(!1),l=Ce(()=>{let u=[...Object.keys(e.value||{})];return r&&(r.hovered&&(u=[...u,...Object.keys(r.hovered)]),r.tapped&&(u=[...u,...Object.keys(r.tapped)]),r.focused&&(u=[...u,...Object.keys(r.focused)])),u}),c=Ce(()=>{const u={};Object.assign(u,e.value),s.value&&r.hovered&&Object.assign(u,r.hovered),o.value&&r.tapped&&Object.assign(u,r.tapped),a.value&&r.focused&&Object.assign(u,r.focused);for(const f in u)l.value.includes(f)||delete u[f];return u});r.hovered&&(Oi(n,"mouseenter",()=>s.value=!0),Oi(n,"mouseleave",()=>{s.value=!1,o.value=!1})),r.tapped&&(pB()&&(Oi(n,"mousedown",()=>o.value=!0),Oi(n,"mouseup",()=>o.value=!1)),hB()&&(Oi(n,"pointerdown",()=>o.value=!0),Oi(n,"pointerup",()=>o.value=!1)),dB()&&(Oi(n,"touchstart",()=>o.value=!0),Oi(n,"touchend",()=>o.value=!1))),r.focused&&(Oi(n,"focus",()=>a.value=!0),Oi(n,"blur",()=>a.value=!1)),qe([s,o,a],()=>{i(c.value)})}function gB({set:n,target:e,variants:t,variant:i}){const r=Rt(t);qe(()=>e,()=>{r&&(r.initial&&(n("initial"),i.value="initial"),r.enter&&(i.value="enter"))},{immediate:!0,flush:"pre"})}function _B({state:n,apply:e}){qe(n,t=>{t&&e(t)},{immediate:!0})}function tT({target:n,variants:e,variant:t}){const i=Rt(e);i&&(i.visible||i.visibleOnce)&&RU(n,([{isIntersecting:r}])=>{i.visible?r?t.value="visible":t.value="initial":i.visibleOnce&&(r&&t.value!=="visibleOnce"?t.value="visibleOnce":t.value||(t.value="initial"))})}function vB(n,e={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){e.lifeCycleHooks&&gB(n),e.syncVariants&&_B(n),e.visibilityHooks&&tT(n),e.eventListeners&&mB(n)}function nT(n={}){const e=fi({...n}),t=Xe({});return qe(e,()=>{const i={};for(const[r,s]of Object.entries(e)){const o=o_(r),a=mm(s,o);i[r]=a}t.value=i},{immediate:!0,deep:!0}),{state:e,style:t}}function l_(n,e){qe(()=>cl(n),t=>{t&&e(t)},{immediate:!0})}const yB={x:"translateX",y:"translateY",z:"translateZ"};function iT(n={},e=!0){const t=fi({...n}),i=Xe("");return qe(t,r=>{let s="",o=!1;if(e&&(r.x||r.y||r.z)){const a=[r.x||0,r.y||0,r.z||0].map(l=>mm(l,nt)).join(",");s+=`translate3d(${a}) `,o=!0}for(const[a,l]of Object.entries(r)){if(e&&(a==="x"||a==="y"||a==="z"))continue;const c=o_(a),u=mm(l,c);s+=`${yB[a]||a}(${u}) `}e&&!o&&(s+="translateZ(0px) "),i.value=s.trim()},{immediate:!0,deep:!0}),{state:t,transform:i}}const xB=["","X","Y","Z"],bB=["perspective","translate","scale","rotate","skew"],rT=["transformPerspective","x","y","z"];bB.forEach(n=>{xB.forEach(e=>{const t=n+e;rT.push(t)})});const SB=new Set(rT);function c_(n){return SB.has(n)}const MB=new Set(["originX","originY","originZ"]);function sT(n){return MB.has(n)}function EB(n){const e={},t={};return Object.entries(n).forEach(([i,r])=>{c_(i)||sT(i)?e[i]=r:t[i]=r}),{transform:e,style:t}}function Kh(n){const{transform:e,style:t}=EB(n),{transform:i}=iT(e),{style:r}=nT(t);return i.value&&(r.value.transform=i.value),r.value}function TB(n,e){let t,i;const{state:r,style:s}=nT();return l_(n,o=>{i=o;for(const a of Object.keys(eT))o.style[a]===null||o.style[a]===""||c_(a)||sT(a)||(r[a]=o.style[a]);t&&Object.entries(t).forEach(([a,l])=>o.style[a]=l),e&&e(r)}),qe(s,o=>{if(!i){t=o;return}for(const a in o)i.style[a]=o[a]},{immediate:!0}),{style:r}}function wB(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,r)=>{if(!r)return i;const[s,o]=r.split("("),l=o.split(",").map(u=>t(u.endsWith(")")?u.replace(")",""):u.trim())),c=l.length===1?l[0]:l;return{...i,[s]:c}},{})}function AB(n,e){Object.entries(wB(e)).forEach(([t,i])=>{const r=["x","y","z"];if(t==="translate3d"){if(i===0){r.forEach(s=>n[s]=0);return}i.forEach((s,o)=>n[r[o]]=s);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 CB(n,e){let t,i;const{state:r,transform:s}=iT();return l_(n,o=>{i=o,o.style.transform&&AB(r,o.style.transform),t&&(o.style.transform=t),e&&e(r)}),qe(s,o=>{if(!i){t=o;return}i.style.transform=o},{immediate:!0}),{transform:r}}function RB(n){return Object.entries(n)}function PB(n,e){const t=fi({}),i=o=>Object.entries(o).forEach(([a,l])=>t[a]=l),{style:r}=TB(n,i),{transform:s}=CB(n,i);return qe(t,o=>{RB(o).forEach(([a,l])=>{const c=c_(a)?s:r;c[a]&&c[a]===l||(c[a]=l)})},{immediate:!0,deep:!0}),l_(n,()=>e),{motionProperties:t,style:r,transform:s}}function IB(n={}){const e=Rt(n),t=Xe();return{state:Ce(()=>{if(t.value)return e[t.value]}),variant:t}}function oT(n,e={},t){const{motionProperties:i}=PB(n),{variant:r,state:s}=IB(e),o=fB(i,e),a={target:n,variant:r,variants:e,state:s,motionProperties:i,...o};return vB(a,t),a}const aT=["delay","duration"],LB=["initial","enter","leave","visible","visible-once","visibleOnce","hovered","tapped","focused",...aT];function DB(n){return aT.includes(n)}function OB(n,e){const t=n.props?n.props:n.data&&n.data.attrs?n.data.attrs:{};if(t){t.variants&&Xf(t.variants)&&(e.value={...e.value,...t.variants});for(let i of LB)if(!(!t||!t[i])){if(DB(i)&&typeof t[i]=="number"){for(const r of["enter","visible","visibleOnce"]){const s=e.value[r];s!=null&&(s.transition??(s.transition={}),s.transition[i]=t[i])}continue}if(Xf(t[i])){const r=t[i];i==="visible-once"&&(i="visibleOnce"),e.value[i]=r}}}}function mp(n,e=!1){return{created:(r,s,o)=>{const a=s.value&&typeof s.value=="string"?s.value:o.key;a&&hp[a]&&hp[a].stop();const l=e?structuredClone(st(n)||{}):n||{},c=Xe(l);typeof s.value=="object"&&(c.value=s.value),OB(o,c);const f=oT(r,c,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});r.motionInstance=f,a&&(hp[a]=f)},mounted:(r,s,o)=>{r.motionInstance&&tT(r.motionInstance)},getSSRProps(r,s){let{initial:o}=r.value||s&&(s==null?void 0:s.props)||{};o=Rt(o);const a=vE({},(n==null?void 0:n.initial)||{},o||{});return!a||Object.keys(a).length===0?void 0:{style:Kh(a)}}}}const NB={initial:{opacity:0},enter:{opacity:1}},UB={initial:{opacity:0},visible:{opacity:1}},FB={initial:{opacity:0},visibleOnce:{opacity:1}},BB={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},kB={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},VB={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},zB={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},HB={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},GB={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},WB={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},XB={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},$B={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},qB={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},YB={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},jB={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},KB={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},ZB={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},JB={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},QB={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},ek={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},tk={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},nk={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},ik={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},rk={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},sk={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},ok={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},ak={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},lk={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},ck={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},uk={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Xs={__proto__:null,fade:NB,fadeVisible:UB,fadeVisibleOnce:FB,pop:BB,popVisible:kB,popVisibleOnce:VB,rollBottom:KB,rollLeft:zB,rollRight:WB,rollTop:qB,rollVisibleBottom:ZB,rollVisibleLeft:HB,rollVisibleOnceBottom:JB,rollVisibleOnceLeft:GB,rollVisibleOnceRight:$B,rollVisibleOnceTop:jB,rollVisibleRight:XB,rollVisibleTop:YB,slideBottom:lk,slideLeft:QB,slideRight:nk,slideTop:sk,slideVisibleBottom:ck,slideVisibleLeft:ek,slideVisibleOnceBottom:uk,slideVisibleOnceLeft:tk,slideVisibleOnceRight:rk,slideVisibleOnceTop:ak,slideVisibleRight:ik,slideVisibleTop:ok};function fk(n){const e="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;",t="aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------",i=new RegExp(e.split("").join("|"),"g");return n.toString().replace(/[A-Z]/g,r=>`-${r}`).toLowerCase().replace(/\s+/g,"-").replace(i,r=>t.charAt(e.indexOf(r))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/-+$/,"")}const lT=Symbol(import.meta.dev?"motionCustomPresets":""),cT={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 hk(n){return Object.prototype.toString.call(n)==="[object Object]"}function gm(n){if(Array.isArray(n))return n.map(gm);if(hk(n)){const e={};for(const t in n)e[t]=gm(n[t]);return e}return n}function uT(n){const e=fi({}),t=In(lT,{}),i=Ce(()=>n.preset==null?{}:t!=null&&n.preset in t?structuredClone(st(t)[n.preset]):n.preset in Xs?structuredClone(Xs[n.preset]):{}),r=Ce(()=>({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 s(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=Ce(()=>{const l=vE({},r.value,i.value,n.variants||{});return s({...l},n)});if(import.meta.dev){n.preset!=null&&(Xs==null?void 0:Xs[n.preset])==null&&(t==null?void 0:t[n.preset])==null&&console.warn(`[@vueuse/motion]: Preset \`${n.preset}\` not found.`);const l=c=>{var u;(u=c.variants)!=null&&u.initial&&c.set("initial"),cs(()=>{var f,h,d;(f=c.variants)!=null&&f.enter&&c.apply("enter"),(h=c.variants)!=null&&h.visible&&c.apply("visible"),(d=c.variants)!=null&&d.visibleOnce&&c.apply("visibleOnce")})};db(()=>{for(const c in e)l(e[c])})}function a(l,c,u){var f;l.props??(l.props={}),(f=l.props).style??(f.style={}),l.props.style={...l.props.style,...u};const h=s(gm(o.value),l.props);return l.props.onVnodeMounted=({el:d})=>{e[c]=oT(d,h)},l.props.onVnodeUpdated=({el:d})=>{const p=Kh(e[c].state);for(const[_,g]of Object.entries(p))d.style[_]=g},l}return{motionConfig:o,setNodeInstance:a}}const dk=nn({name:"Motion",props:{...cT,is:{type:[String,Object],default:"div"}},setup(n){const e=Km(),{motionConfig:t,setNodeInstance:i}=uT(n);return()=>{const r=Kh(t.value.initial||{}),s=br(n.is,void 0,e);return i(s,0,r),s}}}),pk=nn({name:"MotionGroup",props:{...cT,is:{type:[String,Object],required:!1}},setup(n){const e=Km(),{motionConfig:t,setNodeInstance:i}=uT(n);return()=>{var o;const r=Kh(t.value.initial||{}),s=((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=r(p,i.minimum,1),t.status=p===1?null:p;var g=t.render(!_),m=g.querySelector(i.barSelector),y=i.speed,x=i.easing;return g.offsetWidth,a(function(v){i.positionUsing===""&&(i.positionUsing=t.getPositioningCSS()),l(m,o(p,y,x)),p===1?(l(g,{transition:"none",opacity:1}),g.offsetWidth,setTimeout(function(){l(g,{transition:"all "+y+"ms linear",opacity:0}),setTimeout(function(){t.remove(),v()},y)},y)):setTimeout(v,y)}),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-_)*r(Math.random()*_,.1,.95)),_=r(_+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":s(t.status||0),y=document.querySelector(i.parent),x;return l(g,{transition:"all 0 linear",transform:"translate3d("+m+"%,0,0)"}),i.showSpinner||(x=_.querySelector(i.spinnerSelector),x&&d(x)),y!=document.body&&u(y,"nprogress-custom-parent"),y.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 r(p,_,g){return p<_?_:p>g?g:p}function s(p){return(-1+p)*100}function o(p,_,g){var m;return i.positionUsing==="translate3d"?m={transform:"translate3d("+s(p)+"%,0,0)"}:i.positionUsing==="translate"?m={transform:"translate("+s(p)+"%,0)"}:m={"margin-left":s(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(v){return v.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(E,T){return T.toUpperCase()})}function m(v){var E=document.body.style;if(v in E)return v;for(var T=p.length,M=v.charAt(0).toUpperCase()+v.slice(1),P;T--;)if(P=p[T]+M,P in E)return P;return v}function y(v){return v=g(v),_[v]||(_[v]=m(v))}function x(v,E,T){E=y(E),v.style[E]=T}return function(v,E){var T=arguments,M,P;if(T.length==2)for(M in E)P=E[M],P!==void 0&&E.hasOwnProperty(M)&&x(v,M,P);else x(v,T[1],T[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})}(Wu)),Wu.exports}var yk=vk();const fT=gk(yk);/*! * pinia v3.0.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let dT;const Zh=n=>dT=n,pT=Symbol();function _m(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var dl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(dl||(dl={}));function bk(){const n=Ql(!0),e=n.run(()=>Xe({}));let t=[],i=[];const r=Xm({install(s){Zh(r),r._a=s,s.provide(pT,r),s.config.globalProperties.$pinia=r,i.forEach(o=>t.push(o)),i=[]},use(s){return this._a?t.push(s):i.push(s),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return r}const mT=()=>{};function Ay(n,e,t,i=mT){n.push(e);const r=()=>{const s=n.indexOf(e);s>-1&&(n.splice(s,1),i())};return!t&&th()&&Bm(r),r}function ko(n,...e){n.slice().forEach(t=>{t(...e)})}const Sk=n=>n(),Cy=Symbol(),gp=Symbol();function vm(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],r=n[t];_m(r)&&_m(i)&&n.hasOwnProperty(t)&&!Mt(i)&&!yr(i)?n[t]=vm(r,i):n[t]=i}return n}const Mk=Symbol();function Ek(n){return!_m(n)||!n.hasOwnProperty(Mk)}const{assign:zr}=Object;function Tk(n){return!!(Mt(n)&&n.effect)}function wk(n,e,t,i){const{state:r,actions:s,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=r?r():{});const u=Yx(t.state.value[n]);return zr(u,s,Object.keys(o||{}).reduce((f,h)=>(f[h]=Xm(Ce(()=>{Zh(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=gT(n,c,e,t,i,!0),l}function gT(n,e,t={},i,r,s){let o;const a=zr({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const p=i.state.value[n];!s&&!p&&(i.state.value[n]={}),Xe({});let _;function g(P){let b;c=u=!1,typeof P=="function"?(P(i.state.value[n]),b={type:dl.patchFunction,storeId:n,events:d}):(vm(i.state.value[n],P),b={type:dl.patchObject,payload:P,storeId:n,events:d});const S=_=Symbol();cs().then(()=>{_===S&&(c=!0)}),u=!0,ko(f,b,i.state.value[n])}const m=s?function(){const{state:b}=t,S=b?b():{};this.$patch(D=>{zr(D,S)})}:mT;function y(){o.stop(),f=[],h=[],i._s.delete(n)}const x=(P,b="")=>{if(Cy in P)return P[gp]=b,P;const S=function(){Zh(i);const D=Array.from(arguments),B=[],H=[];function $(te){B.push(te)}function ee(te){H.push(te)}ko(h,{args:D,name:S[gp],store:E,after:$,onError:ee});let Z;try{Z=P.apply(this&&this.$id===n?this:E,D)}catch(te){throw ko(H,te),te}return Z instanceof Promise?Z.then(te=>(ko(B,te),te)).catch(te=>(ko(H,te),Promise.reject(te))):(ko(B,Z),Z)};return S[Cy]=!0,S[gp]=b,S},v={_p:i,$id:n,$onAction:Ay.bind(null,h),$patch:g,$reset:m,$subscribe(P,b={}){const S=Ay(f,P,b.detached,()=>D()),D=o.run(()=>qe(()=>i.state.value[n],B=>{(b.flush==="sync"?u:c)&&P({storeId:n,type:dl.direct,events:d},B)},zr({},l,b)));return S},$dispose:y},E=hi(v);i._s.set(n,E);const M=(i._a&&i._a.runWithContext||Sk)(()=>i._e.run(()=>(o=Ql()).run(()=>e({action:x}))));for(const P in M){const b=M[P];if(Mt(b)&&!Tk(b)||yr(b))s||(p&&Ek(b)&&(Mt(b)?b.value=p[P]:vm(b,p[P])),i.state.value[n][P]=b);else if(typeof b=="function"){const S=x(b,P);M[P]=S,a.actions[P]=b}}return zr(E,M),zr(st(E),M),Object.defineProperty(E,"$state",{get:()=>i.state.value[n],set:P=>{g(b=>{zr(b,P)})}}),i._p.forEach(P=>{zr(E,o.run(()=>P({store:E,app:i._a,pinia:i,options:a})))}),p&&s&&t.hydrate&&t.hydrate(E.$state,p),c=!0,u=!0,E}/*! #__NO_SIDE_EFFECTS__ */function Ak(n,e,t){let i;const r=typeof e=="function";i=r?t:e;function s(o,a){const l=Jm();return o=o||(l?In(pT,null):null),o&&Zh(o),o=dT,o._s.has(n)||(r?gT(n,e,i,o):wk(n,i,o)),o._s.get(n)}return s.$id=n,s}function Ck(n){const e=st(n),t={};for(const i in e){const r=e[i];r.effect?t[i]=Ce({get:()=>n[i],set(s){n[i]=s}}):(Mt(r)||yr(r))&&(t[i]=jx(n,i))}return t}const Rk=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>Gt(()=>import("./default-DQA6qRZU.js"),__vite__mapDeps([0,1,2])),"/src/layouts/stage.vue":()=>Gt(()=>import("./stage-ehgLLgDT.js"),[])})).forEach(([r,s])=>{let o=r.replace("/src/layouts/","").replace(".vue","");e[o]=s});function i(r,s=!0){return r.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)),s){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 hT;const Zh=n=>hT=n,dT=Symbol();function _m(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var dl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(dl||(dl={}));function xk(){const n=Ql(!0),e=n.run(()=>Xe({}));let t=[],i=[];const r=Wm({install(s){Zh(r),r._a=s,s.provide(dT,r),s.config.globalProperties.$pinia=r,i.forEach(o=>t.push(o)),i=[]},use(s){return this._a?t.push(s):i.push(s),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return r}const pT=()=>{};function wy(n,e,t,i=pT){n.push(e);const r=()=>{const s=n.indexOf(e);s>-1&&(n.splice(s,1),i())};return!t&&th()&&Fm(r),r}function ko(n,...e){n.slice().forEach(t=>{t(...e)})}const bk=n=>n(),Ay=Symbol(),gp=Symbol();function vm(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],r=n[t];_m(r)&&_m(i)&&n.hasOwnProperty(t)&&!Mt(i)&&!vr(i)?n[t]=vm(r,i):n[t]=i}return n}const Sk=Symbol();function Mk(n){return!_m(n)||!n.hasOwnProperty(Sk)}const{assign:Vr}=Object;function Ek(n){return!!(Mt(n)&&n.effect)}function Tk(n,e,t,i){const{state:r,actions:s,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=r?r():{});const u=qx(t.state.value[n]);return Vr(u,s,Object.keys(o||{}).reduce((f,h)=>(f[h]=Wm(Ce(()=>{Zh(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=mT(n,c,e,t,i,!0),l}function mT(n,e,t={},i,r,s){let o;const a=Vr({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const p=i.state.value[n];!s&&!p&&(i.state.value[n]={}),Xe({});let _;function g(P){let b;c=u=!1,typeof P=="function"?(P(i.state.value[n]),b={type:dl.patchFunction,storeId:n,events:d}):(vm(i.state.value[n],P),b={type:dl.patchObject,payload:P,storeId:n,events:d});const S=_=Symbol();cs().then(()=>{_===S&&(c=!0)}),u=!0,ko(f,b,i.state.value[n])}const m=s?function(){const{state:b}=t,S=b?b():{};this.$patch(D=>{Vr(D,S)})}:pT;function y(){o.stop(),f=[],h=[],i._s.delete(n)}const x=(P,b="")=>{if(Ay in P)return P[gp]=b,P;const S=function(){Zh(i);const D=Array.from(arguments),B=[],H=[];function $(te){B.push(te)}function ee(te){H.push(te)}ko(h,{args:D,name:S[gp],store:E,after:$,onError:ee});let Z;try{Z=P.apply(this&&this.$id===n?this:E,D)}catch(te){throw ko(H,te),te}return Z instanceof Promise?Z.then(te=>(ko(B,te),te)).catch(te=>(ko(H,te),Promise.reject(te))):(ko(B,Z),Z)};return S[Ay]=!0,S[gp]=b,S},v={_p:i,$id:n,$onAction:wy.bind(null,h),$patch:g,$reset:m,$subscribe(P,b={}){const S=wy(f,P,b.detached,()=>D()),D=o.run(()=>qe(()=>i.state.value[n],B=>{(b.flush==="sync"?u:c)&&P({storeId:n,type:dl.direct,events:d},B)},Vr({},l,b)));return S},$dispose:y},E=fi(v);i._s.set(n,E);const M=(i._a&&i._a.runWithContext||bk)(()=>i._e.run(()=>(o=Ql()).run(()=>e({action:x}))));for(const P in M){const b=M[P];if(Mt(b)&&!Ek(b)||vr(b))s||(p&&Mk(b)&&(Mt(b)?b.value=p[P]:vm(b,p[P])),i.state.value[n][P]=b);else if(typeof b=="function"){const S=x(b,P);M[P]=S,a.actions[P]=b}}return Vr(E,M),Vr(st(E),M),Object.defineProperty(E,"$state",{get:()=>i.state.value[n],set:P=>{g(b=>{Vr(b,P)})}}),i._p.forEach(P=>{Vr(E,o.run(()=>P({store:E,app:i._a,pinia:i,options:a})))}),p&&s&&t.hydrate&&t.hydrate(E.$state,p),c=!0,u=!0,E}/*! #__NO_SIDE_EFFECTS__ */function wk(n,e,t){let i;const r=typeof e=="function";i=r?t:e;function s(o,a){const l=Zm();return o=o||(l?In(dT,null):null),o&&Zh(o),o=hT,o._s.has(n)||(r?mT(n,e,i,o):Tk(n,i,o)),o._s.get(n)}return s.$id=n,s}function Ak(n){const e=st(n),t={};for(const i in e){const r=e[i];r.effect?t[i]=Ce({get:()=>n[i],set(s){n[i]=s}}):(Mt(r)||vr(r))&&(t[i]=Yx(n,i))}return t}const Ck=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>Bt(()=>import("./default-Dk8xwEGd.js"),__vite__mapDeps([0,1,2])),"/src/layouts/stage.vue":()=>Bt(()=>import("./stage-KpHnsBCe.js"),[])})).forEach(([r,s])=>{let o=r.replace("/src/layouts/","").replace(".vue","");e[o]=s});function i(r,s=!0){return r.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)),s){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.0 * (c) 2024 Eduardo San Martin Morote * @license MIT - */const Vo=typeof document<"u";function _T(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function Pk(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&_T(n.default)}const vt=Object.assign;function _p(n,e){const t={};for(const i in e){const r=e[i];t[i]=Pi(r)?r.map(n):n(r)}return t}const pl=()=>{},Pi=Array.isArray,vT=/#/g,Ik=/&/g,Lk=/\//g,Dk=/=/g,Ok=/\?/g,yT=/\+/g,Nk=/%5B/g,Uk=/%5D/g,xT=/%5E/g,Fk=/%60/g,bT=/%7B/g,Bk=/%7C/g,ST=/%7D/g,kk=/%20/g;function f_(n){return encodeURI(""+n).replace(Bk,"|").replace(Nk,"[").replace(Uk,"]")}function zk(n){return f_(n).replace(bT,"{").replace(ST,"}").replace(xT,"^")}function ym(n){return f_(n).replace(yT,"%2B").replace(kk,"+").replace(vT,"%23").replace(Ik,"%26").replace(Fk,"`").replace(bT,"{").replace(ST,"}").replace(xT,"^")}function Vk(n){return ym(n).replace(Dk,"%3D")}function Hk(n){return f_(n).replace(vT,"%23").replace(Ok,"%3F")}function Gk(n){return n==null?"":Hk(n).replace(Lk,"%2F")}function ql(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const Wk=/\/$/,Xk=n=>n.replace(Wk,"");function vp(n,e,t="/"){let i,r={},s="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),s=e.slice(l+1,a>-1?a:e.length),r=n(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=jk(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:r,hash:ql(o)}}function $k(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Ry(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function qk(n,e,t){const i=e.matched.length-1,r=t.matched.length-1;return i>-1&&i===r&&ua(e.matched[i],t.matched[r])&&MT(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function ua(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function MT(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!Yk(n[t],e[t]))return!1;return!0}function Yk(n,e){return Pi(n)?Py(n,e):Pi(e)?Py(e,n):n===e}function Py(n,e){return Pi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function jk(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),r=i[i.length-1];(r===".."||r===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const Br={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Yl;(function(n){n.pop="pop",n.push="push"})(Yl||(Yl={}));var ml;(function(n){n.back="back",n.forward="forward",n.unknown=""})(ml||(ml={}));function Kk(n){if(!n)if(Vo){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),Xk(n)}const Zk=/^[^#]+#/;function Jk(n,e){return n.replace(Zk,"#")+e}function Qk(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 Jh=()=>({left:window.scrollX,top:window.scrollY});function ez(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),r=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!r)return;e=Qk(r,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 Iy(n,e){return(history.state?history.state.position-e:-1)+n}const xm=new Map;function tz(n,e){xm.set(n,e)}function nz(n){const e=xm.get(n);return xm.delete(n),e}let iz=()=>location.protocol+"//"+location.host;function ET(n,e){const{pathname:t,search:i,hash:r}=e,s=n.indexOf("#");if(s>-1){let a=r.includes(n.slice(s))?n.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),Ry(l,"")}return Ry(t,n)+i+r}function rz(n,e,t,i){let r=[],s=[],o=null;const a=({state:h})=>{const d=ET(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);r.forEach(m=>{m(t.value,p,{delta:g,type:Yl.pop,direction:g?g>0?ml.forward:ml.back:ml.unknown})})};function l(){o=t.value}function c(h){r.push(h);const d=()=>{const p=r.indexOf(h);p>-1&&r.splice(p,1)};return s.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(vt({},h.state,{scroll:Jh()}),"")}function f(){for(const h of s)h();s=[],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 Ly(n,e,t,i=!1,r=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:r?Jh():null}}function sz(n){const{history:e,location:t}=window,i={value:ET(n,t)},r={value:e.state};r.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(l,c,u){const f=n.indexOf("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:iz()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),r.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=vt({},e.state,Ly(r.value.back,l,r.value.forward,!0),c,{position:r.value.position});s(l,u,!0),i.value=l}function a(l,c){const u=vt({},r.value,e.state,{forward:l,scroll:Jh()});s(u.current,u,!0);const f=vt({},Ly(i.value,l,null),{position:u.position+1},c);s(l,f,!1),i.value=l}return{location:i,state:r,push:a,replace:o}}function oz(n){n=Kk(n);const e=sz(n),t=rz(n,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const r=vt({location:"",base:n,go:i,createHref:Jk.bind(null,n)},e,t);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function az(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),oz(n)}function lz(n){return typeof n=="string"||n&&typeof n=="object"}function TT(n){return typeof n=="string"||typeof n=="symbol"}const wT=Symbol("");var Dy;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(Dy||(Dy={}));function fa(n,e){return vt(new Error,{type:n,[wT]:!0},e)}function ar(n,e){return n instanceof Error&&wT in n&&(e==null||!!(n.type&e))}const Oy="[^/]+?",cz={sensitive:!1,strict:!1,start:!0,end:!0},uz=/[.+*?^${}()[\]/\\]/g;function fz(n,e){const t=vt({},cz,e),i=[];let r=t.start?"^":"";const s=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(r+="/");for(let f=0;fe.length?e.length===1&&e[0]===80?1:-1:0}function AT(n,e){let t=0;const i=n.score,r=e.score;for(;t0&&e[e.length-1]<0}const dz={type:0,value:""},pz=/[a-zA-Z0-9_]/;function mz(n){if(!n)return[[]];if(n==="/")return[[dz]];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 r=[];let s;function o(){s&&r.push(s),s=[]}let a=0,l,c="",u="";function f(){c&&(t===0?s.push({type:0,value:c}):t===1||t===2||t===3?(s.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.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(x)}:pl}function o(f){if(TT(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=xz(f,t);t.splice(h,0,f),f.record.name&&!By(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 fa(1,{location:f});g=d.record.name,p=vt(Uy(h.params,d.keys.filter(x=>!x.optional).concat(d.parent?d.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),f.params&&Uy(f.params,d.keys.map(x=>x.name))),_=d.stringify(p)}else if(f.path!=null)_=f.path,d=t.find(x=>x.re.test(_)),d&&(p=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(x=>x.re.test(h.path)),!d)throw fa(1,{location:f,currentLocation:h});g=d.record.name,p=vt({},h.params,f.params),_=d.stringify(p)}const m=[];let y=d;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:_,params:p,matched:m,meta:yz(m)}}n.forEach(f=>s(f));function u(){t.length=0,i.clear()}return{addRoute:s,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function Uy(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Fy(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:vz(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 vz(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 By(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function yz(n){return n.reduce((e,t)=>vt(e,t.meta),{})}function ky(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function xz(n,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;AT(n,e[s])<0?i=s:t=s+1}const r=bz(n);return r&&(i=e.lastIndexOf(r,i-1)),i}function bz(n){let e=n;for(;e=e.parent;)if(CT(e)&&AT(n,e)===0)return e}function CT({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function Sz(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let r=0;rs&&ym(s)):[i&&ym(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function Mz(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Pi(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return e}const Ez=Symbol(""),Vy=Symbol(""),Qh=Symbol(""),RT=Symbol(""),bm=Symbol("");function ka(){let n=[];function e(i){return n.push(i),()=>{const r=n.indexOf(i);r>-1&&n.splice(r,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function $r(n,e,t,i,r,s=o=>o()){const o=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(fa(4,{from:t,to:e})):h instanceof Error?l(h):lz(h)?l(fa(2,{from:e,to:h})):(o&&i.enterCallbacks[r]===o&&typeof h=="function"&&o.push(h),a())},u=s(()=>n.call(i&&i.instances[r],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(h=>l(h))})}function yp(n,e,t,i,r=s=>s()){const s=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(_T(l)){const u=(l.__vccOpts||l)[e];u&&s.push($r(u,t,i,o,a,r))}else{let c=l();s.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=Pk(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&$r(d,t,i,o,a,r)()}))}}return s}function Hy(n){const e=In(Qh),t=In(RT),i=Ce(()=>{const l=Rt(n.to);return e.resolve(l)}),r=Ce(()=>{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(ua.bind(null,u));if(h>-1)return h;const d=Gy(l[c-2]);return c>1&&Gy(u)===d&&f[f.length-1].path!==d?f.findIndex(ua.bind(null,l[c-2])):h}),s=Ce(()=>r.value>-1&&Rz(t.params,i.value.params)),o=Ce(()=>r.value>-1&&r.value===t.matched.length-1&&MT(t.params,i.value.params));function a(l={}){if(Cz(l)){const c=e[Rt(n.replace)?"replace":"push"](Rt(n.to)).catch(pl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Ce(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function Tz(n){return n.length===1?n[0]:n}const wz=nn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Hy,setup(n,{slots:e}){const t=hi(Hy(n)),{options:i}=In(Qh),r=Ce(()=>({[Wy(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Wy(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&Tz(e.default(t));return n.custom?s:Sr("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:r.value},s)}}}),Az=wz;function Cz(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 Rz(n,e){for(const t in e){const i=e[t],r=n[t];if(typeof i=="string"){if(i!==r)return!1}else if(!Pi(r)||r.length!==i.length||i.some((s,o)=>s!==r[o]))return!1}return!0}function Gy(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Wy=(n,e,t)=>n??e??t,Pz=nn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=In(bm),r=Ce(()=>n.route||i.value),s=In(Vy,0),o=Ce(()=>{let c=Rt(s);const{matched:u}=r.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ce(()=>r.value.matched[o.value]);Jr(Vy,Ce(()=>o.value+1)),Jr(Ez,a),Jr(bm,r);const l=Xe();return qe(()=>[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||!ua(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=r.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return Xy(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=Sr(h,vt({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Xy(t.default,{Component:g,route:c})||g}}});function Xy(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const PT=Pz;function Iz(n){const e=_z(n.routes,n),t=n.parseQuery||Sz,i=n.stringifyQuery||zy,r=n.history,s=ka(),o=ka(),a=ka(),l=ze(Br);let c=Br;Vo&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=_p.bind(null,W=>""+W),f=_p.bind(null,Gk),h=_p.bind(null,ql);function d(W,ae){let ue,le;return TT(W)?(ue=e.getRecordMatcher(W),le=ae):le=W,e.addRoute(le,ue)}function p(W){const ae=e.getRecordMatcher(W);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map(W=>W.record)}function g(W){return!!e.getRecordMatcher(W)}function m(W,ae){if(ae=vt({},ae||l.value),typeof W=="string"){const w=vp(t,W,ae.path),j=e.resolve({path:w.path},ae),G=r.createHref(w.fullPath);return vt(w,j,{params:h(j.params),hash:ql(w.hash),redirectedFrom:void 0,href:G})}let ue;if(W.path!=null)ue=vt({},W,{path:vp(t,W.path,ae.path).path});else{const w=vt({},W.params);for(const j in w)w[j]==null&&delete w[j];ue=vt({},W,{params:f(w)}),ae.params=f(ae.params)}const le=e.resolve(ue,ae),De=W.hash||"";le.params=u(h(le.params));const I=$k(i,vt({},W,{hash:zk(De),path:le.path})),L=r.createHref(I);return vt({fullPath:I,hash:De,query:i===zy?Mz(W.query):W.query||{}},le,{redirectedFrom:void 0,href:L})}function y(W){return typeof W=="string"?vp(t,W,l.value.path):vt({},W)}function x(W,ae){if(c!==W)return fa(8,{from:ae,to:W})}function v(W){return M(W)}function E(W){return v(vt(y(W),{replace:!0}))}function T(W){const ae=W.matched[W.matched.length-1];if(ae&&ae.redirect){const{redirect:ue}=ae;let le=typeof ue=="function"?ue(W):ue;return typeof le=="string"&&(le=le.includes("?")||le.includes("#")?le=y(le):{path:le},le.params={}),vt({query:W.query,hash:W.hash,params:le.path!=null?{}:W.params},le)}}function M(W,ae){const ue=c=m(W),le=l.value,De=W.state,I=W.force,L=W.replace===!0,w=T(ue);if(w)return M(vt(y(w),{state:typeof w=="object"?vt({},De,w.state):De,force:I,replace:L}),ae||ue);const j=ue;j.redirectedFrom=ae;let G;return!I&&qk(i,le,ue)&&(G=fa(16,{to:j,from:le}),re(le,le,!0,!1)),(G?Promise.resolve(G):S(j,le)).catch(q=>ar(q)?ar(q,2)?q:ve(q):Q(q,j,le)).then(q=>{if(q){if(ar(q,2))return M(vt({replace:L},y(q.to),{state:typeof q.to=="object"?vt({},De,q.to.state):De,force:I}),ae||j)}else q=B(j,le,!0,L,De);return D(j,le,q),q})}function P(W,ae){const ue=x(W,ae);return ue?Promise.reject(ue):Promise.resolve()}function b(W){const ae=se.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(W):W()}function S(W,ae){let ue;const[le,De,I]=Lz(W,ae);ue=yp(le.reverse(),"beforeRouteLeave",W,ae);for(const w of le)w.leaveGuards.forEach(j=>{ue.push($r(j,W,ae))});const L=P.bind(null,W,ae);return ue.push(L),be(ue).then(()=>{ue=[];for(const w of s.list())ue.push($r(w,W,ae));return ue.push(L),be(ue)}).then(()=>{ue=yp(De,"beforeRouteUpdate",W,ae);for(const w of De)w.updateGuards.forEach(j=>{ue.push($r(j,W,ae))});return ue.push(L),be(ue)}).then(()=>{ue=[];for(const w of I)if(w.beforeEnter)if(Pi(w.beforeEnter))for(const j of w.beforeEnter)ue.push($r(j,W,ae));else ue.push($r(w.beforeEnter,W,ae));return ue.push(L),be(ue)}).then(()=>(W.matched.forEach(w=>w.enterCallbacks={}),ue=yp(I,"beforeRouteEnter",W,ae,b),ue.push(L),be(ue))).then(()=>{ue=[];for(const w of o.list())ue.push($r(w,W,ae));return ue.push(L),be(ue)}).catch(w=>ar(w,8)?w:Promise.reject(w))}function D(W,ae,ue){a.list().forEach(le=>b(()=>le(W,ae,ue)))}function B(W,ae,ue,le,De){const I=x(W,ae);if(I)return I;const L=ae===Br,w=Vo?history.state:{};ue&&(le||L?r.replace(W.fullPath,vt({scroll:L&&w&&w.scroll},De)):r.push(W.fullPath,De)),l.value=W,re(W,ae,ue,L),ve()}let H;function $(){H||(H=r.listen((W,ae,ue)=>{if(!ge.listening)return;const le=m(W),De=T(le);if(De){M(vt(De,{replace:!0,force:!0}),le).catch(pl);return}c=le;const I=l.value;Vo&&tz(Iy(I.fullPath,ue.delta),Jh()),S(le,I).catch(L=>ar(L,12)?L:ar(L,2)?(M(vt(y(L.to),{force:!0}),le).then(w=>{ar(w,20)&&!ue.delta&&ue.type===Yl.pop&&r.go(-1,!1)}).catch(pl),Promise.reject()):(ue.delta&&r.go(-ue.delta,!1),Q(L,le,I))).then(L=>{L=L||B(le,I,!1),L&&(ue.delta&&!ar(L,8)?r.go(-ue.delta,!1):ue.type===Yl.pop&&ar(L,20)&&r.go(-1,!1)),D(le,I,L)}).catch(pl)}))}let ee=ka(),Z=ka(),te;function Q(W,ae,ue){ve(W);const le=Z.list();return le.length?le.forEach(De=>De(W,ae,ue)):console.error(W),Promise.reject(W)}function pe(){return te&&l.value!==Br?Promise.resolve():new Promise((W,ae)=>{ee.add([W,ae])})}function ve(W){return te||(te=!W,$(),ee.list().forEach(([ae,ue])=>W?ue(W):ae()),ee.reset()),W}function re(W,ae,ue,le){const{scrollBehavior:De}=n;if(!Vo||!De)return Promise.resolve();const I=!ue&&nz(Iy(W.fullPath,0))||(le||!ue)&&history.state&&history.state.scroll||null;return cs().then(()=>De(W,ae,I)).then(L=>L&&ez(L)).catch(L=>Q(L,W,ae))}const xe=W=>r.go(W);let Ve;const se=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:v,replace:E,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:pe,install(W){const ae=this;W.component("RouterLink",Az),W.component("RouterView",PT),W.config.globalProperties.$router=ae,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>Rt(l)}),Vo&&!Ve&&l.value===Br&&(Ve=!0,v(r.location).catch(De=>{}));const ue={};for(const De in Br)Object.defineProperty(ue,De,{get:()=>l.value[De],enumerable:!0});W.provide(Qh,ae),W.provide(RT,Xx(ue)),W.provide(bm,l);const le=W.unmount;se.add(W),W.unmount=function(){se.delete(W),se.size<1&&(c=Br,H&&H(),H=null,l.value=Br,Ve=!1,te=!1),le()}}};function be(W){return W.reduce((ae,ue)=>ae.then(()=>b(ue)),Promise.resolve())}return ge}function Lz(n,e){const t=[],i=[],r=[],s=Math.max(e.matched.length,n.matched.length);for(let o=0;oua(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>ua(c,l))||r.push(l))}return[t,i,r]}function Dz(){return In(Qh)}const Oz=[{path:"/",name:"/",component:()=>Gt(()=>import("./index-BJB7QhK6.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,1,2,14,15,16,17,18])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>Gt(()=>import("./_...all_-WLrcdQxR.js"),[])},{path:"/audio",name:"/audio",component:()=>Gt(()=>import("./audio-B_mSU470.js"),[])},{path:"/devtools",children:[{path:"image",name:"/devtools/image",component:()=>Gt(()=>import("./image-CVeI_914.js"),__vite__mapDeps([19,20]))}]},{path:"/queue",name:"/queue",component:()=>Gt(()=>import("./queue-a2h6DuYq.js"),__vite__mapDeps([21,9]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>Gt(()=>import("./index-DGm83CNQ.js"),__vite__mapDeps([22,6,17,23])),meta:{stageTransition:{name:"slide"}}},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>Gt(()=>import("./index-D5YcQgBT.js"),__vite__mapDeps([24,4,5,6,7,8,9,10,11,12,17])),meta:{stageTransition:{name:"slide"}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>Gt(()=>import("./index-Du_4Mb4C.js"),__vite__mapDeps([25,26,27,17])),meta:{stageTransition:{name:"slide"}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>Gt(()=>import("./consciousness-BqZoJErm.js"),__vite__mapDeps([28,11,4,5,6,8,17])),meta:{stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>Gt(()=>import("./index-D5R3unYH.js"),__vite__mapDeps([29,6,8,26,27,17])),meta:{stageTransition:{name:"slide"}}},{path:"openai",name:"/settings/providers/openai",component:()=>Gt(()=>import("./openai-DzkjcTpL.js"),__vite__mapDeps([30,12,11,4,5,6,8]))},{path:"openrouter",name:"/settings/providers/openrouter",component:()=>Gt(()=>import("./openrouter-CH2Z6_wJ.js"),__vite__mapDeps([31,12,11,4,5,6,8]))}]},{path:"themes",children:[{path:"",name:"/settings/themes/",component:()=>Gt(()=>import("./index-BGoaX9jF.js"),__vite__mapDeps([32,12,11,4,5,6,17,33])),meta:{stageTransition:{name:"slide"}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>Gt(()=>import("./filter-message-Ad9LIo6U.js"),[])},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>Gt(()=>import("./delays-EUbdoOBL.js"),__vite__mapDeps([34,14,4,5,6,10,9,15]))},{path:"emotions",name:"/test/queues/emotions",component:()=>Gt(()=>import("./emotions-D6NX8Gz6.js"),__vite__mapDeps([35,14,4,5,6,9,10]))},{path:"messages",name:"/test/queues/messages",component:()=>Gt(()=>import("./messages-CXAlPtRI.js"),__vite__mapDeps([36,14,4,5,6,9,10]))}]}]},{path:"/v2",name:"/v2",component:()=>Gt(()=>import("./v2-BX1iC0HQ.js"),__vite__mapDeps([37,4,5,6,7,8,9,10,11,12,13,1,2,14,15,16,17])),meta:{layout:"default"}}];var Sm=(n=>(n.Myriam="Myriam",n.Beatrice="Beatrice",n.Camilla_KM="Camilla_KM",n.SallySunshine="Sally Sunshine",n.Annie="Annie",n.KawaiiAerisita="Kawaii Aerisita",n.Morioki="Morioki",n))(Sm||{});const $4={Myriam:"lNxY9WuCBCZCISASyJ55",Beatrice:"KAsXoQDshjF6ehsWa1mF",Camilla_KM:"dLhSyo03JRp5WkGpUlz1","Sally Sunshine":"qswttdunP3b44zVZKMRB",Annie:"AfA1PA0ldViH0DA6pbml","Kawaii Aerisita":"vGQNBgLaiM3EdZtxIiuY",Morioki:"8EkOjt4xTPGMclNlh1pk"},Nz=354.31,Uz=Ak("settings",()=>{const n=Xe(),e=kn("settings/language","en-US"),t=kn("settings/stage/view/model-renderer","2d"),i=kn("settings/credentials/openai-api-key",""),r=kn("settings/credentials/openai-api-base-url",""),s=kn("settings/credentials/elevenlabs-api-key",""),o=kn("settings/llm/openai/model",{id:"openai/gpt-3.5-turbo",name:"OpenAI GPT3.5 Turbo"}),a=kn("settings/audio/input","true"),l=Ce(()=>{var M;return(M=n.value)==null?void 0:M.deviceId}),{audioInputs:c}=kN({constraints:{audio:!0},requestPermissions:!0}),u=kn("settings/llm/elevenlabs/voice/en",Sm.Myriam),f=kn("settings/llm/elevenlabs/voice/ja",Sm.Morioki),h=Xe(),d=Xe("./assets/live2d/models/hiyori_pro_zh.zip"),p=Xe("url"),_=Xe(!1),g=kn("settings/live2d/position",{x:0,y:0}),m=Xe({group:"Idle",index:0}),y=Xe([]),x=kn("settings/live2d/motion-map",{}),v=kn("settings/disable-transitions",!1),E=kn("settings/theme/colors/hue",Nz),T=kn("settings/theme/colors/hue-dynamic",!1);return qe(a,M=>{M==="false"&&(n.value=void 0),M==="true"&&(n.value=c.value[0])}),Nn(()=>{a.value==="true"&&!n.value&&(n.value=c.value[0])}),qe(c,()=>{a.value==="true"&&!n.value&&(n.value=c.value[0])}),{openAiApiKey:i,openAiApiBaseURL:r,openAiModel:o,elevenLabsApiKey:s,live2dModelFile:h,live2dModelUrl:d,live2dLoadSource:p,live2dCurrentMotion:m,live2dPosition:g,availableLive2dMotions:y,live2dMotionMap:x,loadingLive2dModel:_,disableTransitions:v,language:e,stageView:t,themeColorsHue:E,themeColorsHueDynamic:T,isAudioInputOn:a,selectedAudioDevice:n,selectedAudioDeviceId:l,elevenlabsVoiceEnglish:u,elevenlabsVoiceJapanese:f}}),Fz=nn({__name:"ArrowTransition",props:{stageTransition:{default:()=>({primaryColor:"#666",secondaryColor:"#ccc"})}},setup(n){const e=n,t=Ce(()=>e.stageTransition),i=Ce(()=>t.value.primaryColor||"#666"),r=Ce(()=>t.value.secondaryColor||"#ccc");return Nn(()=>{document.documentElement.style.setProperty("--stage-transition-3-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-3-overlay-color-2",r.value)}),(s,o)=>(ln(),ui("div",{class:"stage-transition-3",style:gi({zIndex:t.value.zIndex||100})},null,4))}}),vo=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},Bz=vo(Fz,[["__scopeId","data-v-df576df0"]]),kz=nn({__name:"BubbleWaveOutTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>{var i;return((i=e.stageTransition)==null?void 0:i.colors)||["#eee","#ebcb8b","#c56370","#3f3b52"]});return Nn(()=>{var i,r;document.documentElement.style.setProperty("--circle-expansion-delay",`${((i=e.stageTransition)==null?void 0:i.delay)||0}s`),document.documentElement.style.setProperty("--circle-expansion-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.4}s`),t.value.forEach((s,o)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${o+1}`,s)})}),(i,r)=>{var s;return ln(),ui("div",{class:"circle-expansion-transition",style:gi({zIndex:((s=n.stageTransition)==null?void 0:s.zIndex)||100})},[(ln(!0),ui(Wt,null,lA(t.value,(o,a)=>(ln(),ui("div",{key:a}))),128))],4)}}}),zz=vo(kz,[["__scopeId","data-v-0c29056c"]]),Vz=nn({__name:"FantasyFallTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>{var r;return((r=e.stageTransition)==null?void 0:r.direction)||"up"}),i=Ce(()=>`fantasy-fall-${t.value}`);return Nn(()=>{var r,s,o,a,l,c,u,f,h;document.documentElement.style.setProperty("--fantasy-fall-color",((r=e.stageTransition)==null?void 0:r.primaryColor)||"#eee"),document.documentElement.style.setProperty("--fantasy-fall-duration",`${((s=e.stageTransition)==null?void 0:s.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%"}`)}),(r,s)=>{var o;return ln(),ui("div",{class:ma(["fantasy-fall-transition",i.value]),style:gi({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),Hz=vo(Vz,[["__scopeId","data-v-e62bf496"]]),Gz=nn({__name:"MultipleBlocksRevealTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>e.stageTransition),i=Ce(()=>{var s;return((s=t.value)==null?void 0:s.primaryColor)||"#666"}),r=Ce(()=>{var s;return((s=t.value)==null?void 0:s.secondaryColor)||"#ccc"});return Nn(()=>{document.documentElement.style.setProperty("--stage-transition-4-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-4-overlay-color-2",r.value)}),(s,o)=>{var a;return ln(),ui("div",{class:"stage-transition-4",style:gi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[VA('
',5)]),4)}}}),Wz=vo(Gz,[["__scopeId","data-v-6d1179fc"]]),Xz=nn({__name:"SlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>e.stageTransition),i=Ce(()=>{var s;return((s=t.value)==null?void 0:s.primaryColor)||"#666"}),r=Ce(()=>{var s;return((s=t.value)==null?void 0:s.secondaryColor)||"#ccc"});return qe([t,i,r],()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",r.value)}),Nn(()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",r.value)}),(s,o)=>{var a;return ln(),ui("div",{class:"stage-transition-1",style:gi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),$z=vo(Xz,[["__scopeId","data-v-bf1d1566"]]),qz=nn({__name:"SlopeSlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>e.stageTransition),i=Ce(()=>{var s;return((s=t.value)==null?void 0:s.primaryColor)??"#666"}),r=Ce(()=>{var s;return((s=t.value)==null?void 0:s.secondaryColor)??"#ccc"});return Nn(()=>{document.documentElement.style.setProperty("--stage-transition-2-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-2-overlay-color-2",r.value)}),(s,o)=>{var a;return ln(),ui("div",{class:"stage-transition-2",style:gi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),Yz=vo(qz,[["__scopeId","data-v-8ff7120f"]]),jz=nn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return Nn(()=>{var t,i,r,s,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",((r=e.stageTransition)==null?void 0:r.tertiaryColor)||"#43445b"),document.documentElement.style.setProperty("--rectangle-rotate-duration",`${((s=e.stageTransition)==null?void 0:s.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 r;return ln(),ui("div",{class:"rectangle-rotate-transition",style:gi({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)??100})},i[0]||(i[0]=[Gr("div",{class:"rectangle rectangle-rotate-1"},[Gr("div")],-1),Gr("div",{class:"rectangle rectangle-rotate-2"},[Gr("div")],-1),Gr("div",{class:"rectangle rectangle-rotate-3"},[Gr("div")],-1)]),4)}}}),Kz=vo(jz,[["__scopeId","data-v-f4b1dc64"]]),Zz=nn({__name:"StageTransitionGroup",props:{primaryColor:null,secondaryColor:null,tertiaryColor:null,colors:null,zIndex:null,disableTransitions:{type:Boolean}},setup(n){const e=n,t=Dz(),i=Xe(!1),r=Xe(),s=Xe(""),o=Xe(),a=ze({slide:{component:$z,duration:2700},"slope-slide":{component:Yz,duration:2700},arrow:{component:Bz,duration:2700},"multiple-blocks-reveal":{component:Wz,duration:2800},"fantasy-fall":{component:Hz,duration:2700},"rectangles-rotate":{component:Kz,duration:2700},"bubble-wave-out":{component:zz,duration:1e3}}),l=Xe([]);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={}){r.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 y=!1;const v=c(E=>{E==="navigation"&&!y&&(y=!0,p())});try{await u("before-enter",{transitionName:d.name}),i.value&&(await u("before-leave",{transitionName:s.value}),s.value="",o.value=void 0,i.value=!1,await u("after-leave",{transitionName:s.value}),await new Promise(T=>setTimeout(T,50))),s.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}),y||(y=!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 E=g.exitDuration??0;setTimeout(async()=>{i.value=!1,s.value="",o.value=void 0,await u("after-leave",{transitionName:d.name}),_()},g.duration+E)}catch(E){console.error(E)}finally{v(),setTimeout(()=>{y||(y=!0,p())},g.duration*2)}}function h(d,p){return new Promise(_=>{f(d,p,_)})}return t.beforeEach((d,p,_)=>{if(typeof d.meta.stageTransition!="object"){_();return}const g=d.meta.stageTransition;if(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),e.disableTransitions){_();return}h(g,_)}),(d,p)=>(ln(),ui(Wt,null,[cA(d.$slots,"default"),i.value?(ln(),ui(Wt,{key:0},[a.value[s.value]?(ln(),bl(aA(a.value[s.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):$_("",!0)],64)):$_("",!0)],64))}});/*! + */const zo=typeof document<"u";function gT(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function Rk(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&gT(n.default)}const vt=Object.assign;function _p(n,e){const t={};for(const i in e){const r=e[i];t[i]=Ri(r)?r.map(n):n(r)}return t}const pl=()=>{},Ri=Array.isArray,_T=/#/g,Pk=/&/g,Ik=/\//g,Lk=/=/g,Dk=/\?/g,vT=/\+/g,Ok=/%5B/g,Nk=/%5D/g,yT=/%5E/g,Uk=/%60/g,xT=/%7B/g,Fk=/%7C/g,bT=/%7D/g,Bk=/%20/g;function u_(n){return encodeURI(""+n).replace(Fk,"|").replace(Ok,"[").replace(Nk,"]")}function kk(n){return u_(n).replace(xT,"{").replace(bT,"}").replace(yT,"^")}function ym(n){return u_(n).replace(vT,"%2B").replace(Bk,"+").replace(_T,"%23").replace(Pk,"%26").replace(Uk,"`").replace(xT,"{").replace(bT,"}").replace(yT,"^")}function Vk(n){return ym(n).replace(Lk,"%3D")}function zk(n){return u_(n).replace(_T,"%23").replace(Dk,"%3F")}function Hk(n){return n==null?"":zk(n).replace(Ik,"%2F")}function ql(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const Gk=/\/$/,Wk=n=>n.replace(Gk,"");function vp(n,e,t="/"){let i,r={},s="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),s=e.slice(l+1,a>-1?a:e.length),r=n(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=Yk(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:r,hash:ql(o)}}function Xk(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Cy(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function $k(n,e,t){const i=e.matched.length-1,r=t.matched.length-1;return i>-1&&i===r&&ua(e.matched[i],t.matched[r])&&ST(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function ua(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function ST(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!qk(n[t],e[t]))return!1;return!0}function qk(n,e){return Ri(n)?Ry(n,e):Ri(e)?Ry(e,n):n===e}function Ry(n,e){return Ri(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function Yk(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),r=i[i.length-1];(r===".."||r===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const Br={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Yl;(function(n){n.pop="pop",n.push="push"})(Yl||(Yl={}));var ml;(function(n){n.back="back",n.forward="forward",n.unknown=""})(ml||(ml={}));function jk(n){if(!n)if(zo){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),Wk(n)}const Kk=/^[^#]+#/;function Zk(n,e){return n.replace(Kk,"#")+e}function Jk(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 Jh=()=>({left:window.scrollX,top:window.scrollY});function Qk(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),r=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!r)return;e=Jk(r,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 Py(n,e){return(history.state?history.state.position-e:-1)+n}const xm=new Map;function eV(n,e){xm.set(n,e)}function tV(n){const e=xm.get(n);return xm.delete(n),e}let nV=()=>location.protocol+"//"+location.host;function MT(n,e){const{pathname:t,search:i,hash:r}=e,s=n.indexOf("#");if(s>-1){let a=r.includes(n.slice(s))?n.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),Cy(l,"")}return Cy(t,n)+i+r}function iV(n,e,t,i){let r=[],s=[],o=null;const a=({state:h})=>{const d=MT(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);r.forEach(m=>{m(t.value,p,{delta:g,type:Yl.pop,direction:g?g>0?ml.forward:ml.back:ml.unknown})})};function l(){o=t.value}function c(h){r.push(h);const d=()=>{const p=r.indexOf(h);p>-1&&r.splice(p,1)};return s.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(vt({},h.state,{scroll:Jh()}),"")}function f(){for(const h of s)h();s=[],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 Iy(n,e,t,i=!1,r=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:r?Jh():null}}function rV(n){const{history:e,location:t}=window,i={value:MT(n,t)},r={value:e.state};r.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(l,c,u){const f=n.indexOf("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:nV()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),r.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=vt({},e.state,Iy(r.value.back,l,r.value.forward,!0),c,{position:r.value.position});s(l,u,!0),i.value=l}function a(l,c){const u=vt({},r.value,e.state,{forward:l,scroll:Jh()});s(u.current,u,!0);const f=vt({},Iy(i.value,l,null),{position:u.position+1},c);s(l,f,!1),i.value=l}return{location:i,state:r,push:a,replace:o}}function sV(n){n=jk(n);const e=rV(n),t=iV(n,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const r=vt({location:"",base:n,go:i,createHref:Zk.bind(null,n)},e,t);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function oV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),sV(n)}function aV(n){return typeof n=="string"||n&&typeof n=="object"}function ET(n){return typeof n=="string"||typeof n=="symbol"}const TT=Symbol("");var Ly;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(Ly||(Ly={}));function fa(n,e){return vt(new Error,{type:n,[TT]:!0},e)}function or(n,e){return n instanceof Error&&TT in n&&(e==null||!!(n.type&e))}const Dy="[^/]+?",lV={sensitive:!1,strict:!1,start:!0,end:!0},cV=/[.+*?^${}()[\]/\\]/g;function uV(n,e){const t=vt({},lV,e),i=[];let r=t.start?"^":"";const s=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(r+="/");for(let f=0;fe.length?e.length===1&&e[0]===80?1:-1:0}function wT(n,e){let t=0;const i=n.score,r=e.score;for(;t0&&e[e.length-1]<0}const hV={type:0,value:""},dV=/[a-zA-Z0-9_]/;function pV(n){if(!n)return[[]];if(n==="/")return[[hV]];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 r=[];let s;function o(){s&&r.push(s),s=[]}let a=0,l,c="",u="";function f(){c&&(t===0?s.push({type:0,value:c}):t===1||t===2||t===3?(s.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.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(x)}:pl}function o(f){if(ET(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=yV(f,t);t.splice(h,0,f),f.record.name&&!Fy(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 fa(1,{location:f});g=d.record.name,p=vt(Ny(h.params,d.keys.filter(x=>!x.optional).concat(d.parent?d.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),f.params&&Ny(f.params,d.keys.map(x=>x.name))),_=d.stringify(p)}else if(f.path!=null)_=f.path,d=t.find(x=>x.re.test(_)),d&&(p=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(x=>x.re.test(h.path)),!d)throw fa(1,{location:f,currentLocation:h});g=d.record.name,p=vt({},h.params,f.params),_=d.stringify(p)}const m=[];let y=d;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:_,params:p,matched:m,meta:vV(m)}}n.forEach(f=>s(f));function u(){t.length=0,i.clear()}return{addRoute:s,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function Ny(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Uy(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:_V(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 _V(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 Fy(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function vV(n){return n.reduce((e,t)=>vt(e,t.meta),{})}function By(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function yV(n,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;wT(n,e[s])<0?i=s:t=s+1}const r=xV(n);return r&&(i=e.lastIndexOf(r,i-1)),i}function xV(n){let e=n;for(;e=e.parent;)if(AT(e)&&wT(n,e)===0)return e}function AT({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function bV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let r=0;rs&&ym(s)):[i&&ym(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function SV(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Ri(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return e}const MV=Symbol(""),Vy=Symbol(""),Qh=Symbol(""),CT=Symbol(""),bm=Symbol("");function ka(){let n=[];function e(i){return n.push(i),()=>{const r=n.indexOf(i);r>-1&&n.splice(r,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function $r(n,e,t,i,r,s=o=>o()){const o=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(fa(4,{from:t,to:e})):h instanceof Error?l(h):aV(h)?l(fa(2,{from:e,to:h})):(o&&i.enterCallbacks[r]===o&&typeof h=="function"&&o.push(h),a())},u=s(()=>n.call(i&&i.instances[r],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(h=>l(h))})}function yp(n,e,t,i,r=s=>s()){const s=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(gT(l)){const u=(l.__vccOpts||l)[e];u&&s.push($r(u,t,i,o,a,r))}else{let c=l();s.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=Rk(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&$r(d,t,i,o,a,r)()}))}}return s}function zy(n){const e=In(Qh),t=In(CT),i=Ce(()=>{const l=Rt(n.to);return e.resolve(l)}),r=Ce(()=>{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(ua.bind(null,u));if(h>-1)return h;const d=Hy(l[c-2]);return c>1&&Hy(u)===d&&f[f.length-1].path!==d?f.findIndex(ua.bind(null,l[c-2])):h}),s=Ce(()=>r.value>-1&&CV(t.params,i.value.params)),o=Ce(()=>r.value>-1&&r.value===t.matched.length-1&&ST(t.params,i.value.params));function a(l={}){if(AV(l)){const c=e[Rt(n.replace)?"replace":"push"](Rt(n.to)).catch(pl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Ce(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function EV(n){return n.length===1?n[0]:n}const TV=nn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:zy,setup(n,{slots:e}){const t=fi(zy(n)),{options:i}=In(Qh),r=Ce(()=>({[Gy(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Gy(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&EV(e.default(t));return n.custom?s:br("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:r.value},s)}}}),wV=TV;function AV(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 CV(n,e){for(const t in e){const i=e[t],r=n[t];if(typeof i=="string"){if(i!==r)return!1}else if(!Ri(r)||r.length!==i.length||i.some((s,o)=>s!==r[o]))return!1}return!0}function Hy(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Gy=(n,e,t)=>n??e??t,RV=nn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=In(bm),r=Ce(()=>n.route||i.value),s=In(Vy,0),o=Ce(()=>{let c=Rt(s);const{matched:u}=r.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ce(()=>r.value.matched[o.value]);Jr(Vy,Ce(()=>o.value+1)),Jr(MV,a),Jr(bm,r);const l=Xe();return qe(()=>[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||!ua(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=r.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return Wy(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=br(h,vt({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Wy(t.default,{Component:g,route:c})||g}}});function Wy(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const RT=RV;function PV(n){const e=gV(n.routes,n),t=n.parseQuery||bV,i=n.stringifyQuery||ky,r=n.history,s=ka(),o=ka(),a=ka(),l=Ve(Br);let c=Br;zo&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=_p.bind(null,W=>""+W),f=_p.bind(null,Hk),h=_p.bind(null,ql);function d(W,ae){let ue,le;return ET(W)?(ue=e.getRecordMatcher(W),le=ae):le=W,e.addRoute(le,ue)}function p(W){const ae=e.getRecordMatcher(W);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map(W=>W.record)}function g(W){return!!e.getRecordMatcher(W)}function m(W,ae){if(ae=vt({},ae||l.value),typeof W=="string"){const w=vp(t,W,ae.path),j=e.resolve({path:w.path},ae),G=r.createHref(w.fullPath);return vt(w,j,{params:h(j.params),hash:ql(w.hash),redirectedFrom:void 0,href:G})}let ue;if(W.path!=null)ue=vt({},W,{path:vp(t,W.path,ae.path).path});else{const w=vt({},W.params);for(const j in w)w[j]==null&&delete w[j];ue=vt({},W,{params:f(w)}),ae.params=f(ae.params)}const le=e.resolve(ue,ae),De=W.hash||"";le.params=u(h(le.params));const I=Xk(i,vt({},W,{hash:kk(De),path:le.path})),L=r.createHref(I);return vt({fullPath:I,hash:De,query:i===ky?SV(W.query):W.query||{}},le,{redirectedFrom:void 0,href:L})}function y(W){return typeof W=="string"?vp(t,W,l.value.path):vt({},W)}function x(W,ae){if(c!==W)return fa(8,{from:ae,to:W})}function v(W){return M(W)}function E(W){return v(vt(y(W),{replace:!0}))}function T(W){const ae=W.matched[W.matched.length-1];if(ae&&ae.redirect){const{redirect:ue}=ae;let le=typeof ue=="function"?ue(W):ue;return typeof le=="string"&&(le=le.includes("?")||le.includes("#")?le=y(le):{path:le},le.params={}),vt({query:W.query,hash:W.hash,params:le.path!=null?{}:W.params},le)}}function M(W,ae){const ue=c=m(W),le=l.value,De=W.state,I=W.force,L=W.replace===!0,w=T(ue);if(w)return M(vt(y(w),{state:typeof w=="object"?vt({},De,w.state):De,force:I,replace:L}),ae||ue);const j=ue;j.redirectedFrom=ae;let G;return!I&&$k(i,le,ue)&&(G=fa(16,{to:j,from:le}),re(le,le,!0,!1)),(G?Promise.resolve(G):S(j,le)).catch(q=>or(q)?or(q,2)?q:ve(q):Q(q,j,le)).then(q=>{if(q){if(or(q,2))return M(vt({replace:L},y(q.to),{state:typeof q.to=="object"?vt({},De,q.to.state):De,force:I}),ae||j)}else q=B(j,le,!0,L,De);return D(j,le,q),q})}function P(W,ae){const ue=x(W,ae);return ue?Promise.reject(ue):Promise.resolve()}function b(W){const ae=se.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(W):W()}function S(W,ae){let ue;const[le,De,I]=IV(W,ae);ue=yp(le.reverse(),"beforeRouteLeave",W,ae);for(const w of le)w.leaveGuards.forEach(j=>{ue.push($r(j,W,ae))});const L=P.bind(null,W,ae);return ue.push(L),be(ue).then(()=>{ue=[];for(const w of s.list())ue.push($r(w,W,ae));return ue.push(L),be(ue)}).then(()=>{ue=yp(De,"beforeRouteUpdate",W,ae);for(const w of De)w.updateGuards.forEach(j=>{ue.push($r(j,W,ae))});return ue.push(L),be(ue)}).then(()=>{ue=[];for(const w of I)if(w.beforeEnter)if(Ri(w.beforeEnter))for(const j of w.beforeEnter)ue.push($r(j,W,ae));else ue.push($r(w.beforeEnter,W,ae));return ue.push(L),be(ue)}).then(()=>(W.matched.forEach(w=>w.enterCallbacks={}),ue=yp(I,"beforeRouteEnter",W,ae,b),ue.push(L),be(ue))).then(()=>{ue=[];for(const w of o.list())ue.push($r(w,W,ae));return ue.push(L),be(ue)}).catch(w=>or(w,8)?w:Promise.reject(w))}function D(W,ae,ue){a.list().forEach(le=>b(()=>le(W,ae,ue)))}function B(W,ae,ue,le,De){const I=x(W,ae);if(I)return I;const L=ae===Br,w=zo?history.state:{};ue&&(le||L?r.replace(W.fullPath,vt({scroll:L&&w&&w.scroll},De)):r.push(W.fullPath,De)),l.value=W,re(W,ae,ue,L),ve()}let H;function $(){H||(H=r.listen((W,ae,ue)=>{if(!ge.listening)return;const le=m(W),De=T(le);if(De){M(vt(De,{replace:!0,force:!0}),le).catch(pl);return}c=le;const I=l.value;zo&&eV(Py(I.fullPath,ue.delta),Jh()),S(le,I).catch(L=>or(L,12)?L:or(L,2)?(M(vt(y(L.to),{force:!0}),le).then(w=>{or(w,20)&&!ue.delta&&ue.type===Yl.pop&&r.go(-1,!1)}).catch(pl),Promise.reject()):(ue.delta&&r.go(-ue.delta,!1),Q(L,le,I))).then(L=>{L=L||B(le,I,!1),L&&(ue.delta&&!or(L,8)?r.go(-ue.delta,!1):ue.type===Yl.pop&&or(L,20)&&r.go(-1,!1)),D(le,I,L)}).catch(pl)}))}let ee=ka(),Z=ka(),te;function Q(W,ae,ue){ve(W);const le=Z.list();return le.length?le.forEach(De=>De(W,ae,ue)):console.error(W),Promise.reject(W)}function pe(){return te&&l.value!==Br?Promise.resolve():new Promise((W,ae)=>{ee.add([W,ae])})}function ve(W){return te||(te=!W,$(),ee.list().forEach(([ae,ue])=>W?ue(W):ae()),ee.reset()),W}function re(W,ae,ue,le){const{scrollBehavior:De}=n;if(!zo||!De)return Promise.resolve();const I=!ue&&tV(Py(W.fullPath,0))||(le||!ue)&&history.state&&history.state.scroll||null;return cs().then(()=>De(W,ae,I)).then(L=>L&&Qk(L)).catch(L=>Q(L,W,ae))}const xe=W=>r.go(W);let ze;const se=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:v,replace:E,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:pe,install(W){const ae=this;W.component("RouterLink",wV),W.component("RouterView",RT),W.config.globalProperties.$router=ae,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>Rt(l)}),zo&&!ze&&l.value===Br&&(ze=!0,v(r.location).catch(De=>{}));const ue={};for(const De in Br)Object.defineProperty(ue,De,{get:()=>l.value[De],enumerable:!0});W.provide(Qh,ae),W.provide(CT,Wx(ue)),W.provide(bm,l);const le=W.unmount;se.add(W),W.unmount=function(){se.delete(W),se.size<1&&(c=Br,H&&H(),H=null,l.value=Br,ze=!1,te=!1),le()}}};function be(W){return W.reduce((ae,ue)=>ae.then(()=>b(ue)),Promise.resolve())}return ge}function IV(n,e){const t=[],i=[],r=[],s=Math.max(e.matched.length,n.matched.length);for(let o=0;oua(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>ua(c,l))||r.push(l))}return[t,i,r]}function LV(){return In(Qh)}const DV=[{path:"/",name:"/",component:()=>Bt(()=>import("./index-2bw7rTOf.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,1,2,15,16,17,18,19,20])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>Bt(()=>import("./_...all_-DuBG0OD_.js"),[])},{path:"/audio",name:"/audio",component:()=>Bt(()=>import("./audio-f__i9FT_.js"),[])},{path:"/devtools",children:[{path:"image",name:"/devtools/image",component:()=>Bt(()=>import("./image-BIETLXD0.js"),__vite__mapDeps([21,22]))}]},{path:"/queue",name:"/queue",component:()=>Bt(()=>import("./queue-B8LsoNb_.js"),__vite__mapDeps([23,9]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>Bt(()=>import("./index-Bp-4JWYg.js"),__vite__mapDeps([24,6,19,25])),meta:{stageTransition:{name:"slide"}}},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>Bt(()=>import("./index-CHGD8voK.js"),__vite__mapDeps([26,4,5,6,7,8,9,10,11,12,13,19])),meta:{stageTransition:{name:"slide"}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>Bt(()=>import("./index-BoxcUgjw.js"),__vite__mapDeps([27,28,29,19])),meta:{stageTransition:{name:"slide"}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>Bt(()=>import("./consciousness-jUPNmBFs.js"),__vite__mapDeps([30,31,12,4,5,6,16,8,19])),meta:{stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>Bt(()=>import("./speech-DOiNlGmE.js"),__vite__mapDeps([32,31,4,5,6,8,11,19])),meta:{stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>Bt(()=>import("./index-CJP4FDm3.js"),__vite__mapDeps([33,6,8,28,29,19])),meta:{stageTransition:{name:"slide"}}},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>Bt(()=>import("./elevenlabs-Bohuloj3.js"),__vite__mapDeps([34,13,12,4,5,6,8,11]))},{path:"openai",name:"/settings/providers/openai",component:()=>Bt(()=>import("./openai-Cno5TrKr.js"),__vite__mapDeps([35,13,12,4,5,6,8]))},{path:"openrouter",name:"/settings/providers/openrouter",component:()=>Bt(()=>import("./openrouter-DeKZSuQ4.js"),__vite__mapDeps([36,13,12,4,5,6,8]))}]},{path:"themes",children:[{path:"",name:"/settings/themes/",component:()=>Bt(()=>import("./index-BfrnsB2c.js"),__vite__mapDeps([37,13,12,4,5,6,19,38])),meta:{stageTransition:{name:"slide"}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>Bt(()=>import("./filter-message-WXIEfvZ2.js"),[])},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>Bt(()=>import("./delays-BqxW5uC2.js"),__vite__mapDeps([39,15,4,5,6,10,9,17]))},{path:"emotions",name:"/test/queues/emotions",component:()=>Bt(()=>import("./emotions-Cv9Jr9zp.js"),__vite__mapDeps([40,15,4,5,6,9,10]))},{path:"messages",name:"/test/queues/messages",component:()=>Bt(()=>import("./messages-BElHmTzU.js"),__vite__mapDeps([41,15,4,5,6,9,10]))}]}]},{path:"/v2",name:"/v2",component:()=>Bt(()=>import("./v2-frchrMBQ.js"),__vite__mapDeps([42,4,5,6,7,8,9,10,11,12,13,14,1,2,15,16,17,18,19])),meta:{layout:"default"}}],OV=354.31,NV=wk("settings",()=>{const n=Xe(),e=Fr("settings/language","en-US"),t=Fr("settings/stage/view/model-renderer","2d"),i=Fr("settings/audio/input","true"),r=Ce(()=>{var m;return(m=n.value)==null?void 0:m.deviceId}),{audioInputs:s}=BN({constraints:{audio:!0},requestPermissions:!0}),o=Xe(),a=Xe("./assets/live2d/models/hiyori_pro_zh.zip"),l=Xe("url"),c=Xe(!1),u=Fr("settings/live2d/position",{x:0,y:0}),f=Xe({group:"Idle",index:0}),h=Xe([]),d=Fr("settings/live2d/motion-map",{}),p=Fr("settings/disable-transitions",!1),_=Fr("settings/theme/colors/hue",OV),g=Fr("settings/theme/colors/hue-dynamic",!1);return qe(i,m=>{m==="false"&&(n.value=void 0),m==="true"&&(n.value=s.value[0])}),Nn(()=>{i.value==="true"&&!n.value&&(n.value=s.value[0])}),qe(s,()=>{i.value==="true"&&!n.value&&(n.value=s.value[0])}),{live2dModelFile:o,live2dModelUrl:a,live2dLoadSource:l,live2dCurrentMotion:f,live2dPosition:u,availableLive2dMotions:h,live2dMotionMap:d,loadingLive2dModel:c,disableTransitions:p,language:e,stageView:t,themeColorsHue:_,themeColorsHueDynamic:g,isAudioInputOn:i,selectedAudioDevice:n,selectedAudioDeviceId:r}}),UV=nn({__name:"ArrowTransition",props:{stageTransition:{default:()=>({primaryColor:"#666",secondaryColor:"#ccc"})}},setup(n){const e=n,t=Ce(()=>e.stageTransition),i=Ce(()=>t.value.primaryColor||"#666"),r=Ce(()=>t.value.secondaryColor||"#ccc");return Nn(()=>{document.documentElement.style.setProperty("--stage-transition-3-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-3-overlay-color-2",r.value)}),(s,o)=>(ln(),ci("div",{class:"stage-transition-3",style:mi({zIndex:t.value.zIndex||100})},null,4))}}),vo=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},FV=vo(UV,[["__scopeId","data-v-df576df0"]]),BV=nn({__name:"BubbleWaveOutTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>{var i;return((i=e.stageTransition)==null?void 0:i.colors)||["#eee","#ebcb8b","#c56370","#3f3b52"]});return Nn(()=>{var i,r;document.documentElement.style.setProperty("--circle-expansion-delay",`${((i=e.stageTransition)==null?void 0:i.delay)||0}s`),document.documentElement.style.setProperty("--circle-expansion-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.4}s`),t.value.forEach((s,o)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${o+1}`,s)})}),(i,r)=>{var s;return ln(),ci("div",{class:"circle-expansion-transition",style:mi({zIndex:((s=n.stageTransition)==null?void 0:s.zIndex)||100})},[(ln(!0),ci(Wt,null,aA(t.value,(o,a)=>(ln(),ci("div",{key:a}))),128))],4)}}}),kV=vo(BV,[["__scopeId","data-v-0c29056c"]]),VV=nn({__name:"FantasyFallTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>{var r;return((r=e.stageTransition)==null?void 0:r.direction)||"up"}),i=Ce(()=>`fantasy-fall-${t.value}`);return Nn(()=>{var r,s,o,a,l,c,u,f,h;document.documentElement.style.setProperty("--fantasy-fall-color",((r=e.stageTransition)==null?void 0:r.primaryColor)||"#eee"),document.documentElement.style.setProperty("--fantasy-fall-duration",`${((s=e.stageTransition)==null?void 0:s.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%"}`)}),(r,s)=>{var o;return ln(),ci("div",{class:ma(["fantasy-fall-transition",i.value]),style:mi({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),zV=vo(VV,[["__scopeId","data-v-e62bf496"]]),HV=nn({__name:"MultipleBlocksRevealTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>e.stageTransition),i=Ce(()=>{var s;return((s=t.value)==null?void 0:s.primaryColor)||"#666"}),r=Ce(()=>{var s;return((s=t.value)==null?void 0:s.secondaryColor)||"#ccc"});return Nn(()=>{document.documentElement.style.setProperty("--stage-transition-4-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-4-overlay-color-2",r.value)}),(s,o)=>{var a;return ln(),ci("div",{class:"stage-transition-4",style:mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[VA('
',5)]),4)}}}),GV=vo(HV,[["__scopeId","data-v-6d1179fc"]]),WV=nn({__name:"SlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>e.stageTransition),i=Ce(()=>{var s;return((s=t.value)==null?void 0:s.primaryColor)||"#666"}),r=Ce(()=>{var s;return((s=t.value)==null?void 0:s.secondaryColor)||"#ccc"});return qe([t,i,r],()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",r.value)}),Nn(()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",r.value)}),(s,o)=>{var a;return ln(),ci("div",{class:"stage-transition-1",style:mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),XV=vo(WV,[["__scopeId","data-v-bf1d1566"]]),$V=nn({__name:"SlopeSlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Ce(()=>e.stageTransition),i=Ce(()=>{var s;return((s=t.value)==null?void 0:s.primaryColor)??"#666"}),r=Ce(()=>{var s;return((s=t.value)==null?void 0:s.secondaryColor)??"#ccc"});return Nn(()=>{document.documentElement.style.setProperty("--stage-transition-2-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-2-overlay-color-2",r.value)}),(s,o)=>{var a;return ln(),ci("div",{class:"stage-transition-2",style:mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),qV=vo($V,[["__scopeId","data-v-8ff7120f"]]),YV=nn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return Nn(()=>{var t,i,r,s,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",((r=e.stageTransition)==null?void 0:r.tertiaryColor)||"#43445b"),document.documentElement.style.setProperty("--rectangle-rotate-duration",`${((s=e.stageTransition)==null?void 0:s.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 r;return ln(),ci("div",{class:"rectangle-rotate-transition",style:mi({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)??100})},i[0]||(i[0]=[Gr("div",{class:"rectangle rectangle-rotate-1"},[Gr("div")],-1),Gr("div",{class:"rectangle rectangle-rotate-2"},[Gr("div")],-1),Gr("div",{class:"rectangle rectangle-rotate-3"},[Gr("div")],-1)]),4)}}}),jV=vo(YV,[["__scopeId","data-v-f4b1dc64"]]),KV=nn({__name:"StageTransitionGroup",props:{primaryColor:null,secondaryColor:null,tertiaryColor:null,colors:null,zIndex:null,disableTransitions:{type:Boolean}},setup(n){const e=n,t=LV(),i=Xe(!1),r=Xe(),s=Xe(""),o=Xe(),a=Ve({slide:{component:XV,duration:2700},"slope-slide":{component:qV,duration:2700},arrow:{component:FV,duration:2700},"multiple-blocks-reveal":{component:GV,duration:2800},"fantasy-fall":{component:zV,duration:2700},"rectangles-rotate":{component:jV,duration:2700},"bubble-wave-out":{component:kV,duration:1e3}}),l=Xe([]);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={}){r.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 y=!1;const v=c(E=>{E==="navigation"&&!y&&(y=!0,p())});try{await u("before-enter",{transitionName:d.name}),i.value&&(await u("before-leave",{transitionName:s.value}),s.value="",o.value=void 0,i.value=!1,await u("after-leave",{transitionName:s.value}),await new Promise(T=>setTimeout(T,50))),s.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}),y||(y=!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 E=g.exitDuration??0;setTimeout(async()=>{i.value=!1,s.value="",o.value=void 0,await u("after-leave",{transitionName:d.name}),_()},g.duration+E)}catch(E){console.error(E)}finally{v(),setTimeout(()=>{y||(y=!0,p())},g.duration*2)}}function h(d,p){return new Promise(_=>{f(d,p,_)})}return t.beforeEach((d,p,_)=>{if(typeof d.meta.stageTransition!="object"){_();return}const g=d.meta.stageTransition;if(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),e.disableTransitions){_();return}h(g,_)}),(d,p)=>(ln(),ci(Wt,null,[lA(d.$slots,"default"),i.value?(ln(),ci(Wt,{key:0},[a.value[s.value]?(ln(),bl(oA(a.value[s.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):X_("",!0)],64)):X_("",!0)],64))}});/*! * shared v11.1.2 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const Yf=typeof window<"u",ds=(n,e=!1)=>e?Symbol.for(n):Symbol(n),Jz=(n,e,t)=>Qz({l:n,k:e,s:t}),Qz=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),$t=n=>typeof n=="number"&&isFinite(n),eV=n=>d_(n)==="[object Date]",jf=n=>d_(n)==="[object RegExp]",ed=n=>lt(n)&&Object.keys(n).length===0,tn=Object.assign,tV=Object.create,Tt=(n=null)=>tV(n);let $y;const h_=()=>$y||($y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Tt());function qy(n){return n.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const nV=Object.prototype.hasOwnProperty;function Ti(n,e){return nV.call(n,e)}const jt=Array.isArray,Lt=n=>typeof n=="function",Le=n=>typeof n=="string",Dt=n=>typeof n=="boolean",mt=n=>n!==null&&typeof n=="object",iV=n=>mt(n)&&Lt(n.then)&&Lt(n.catch),IT=Object.prototype.toString,d_=n=>IT.call(n),lt=n=>d_(n)==="[object Object]",rV=n=>n==null?"":jt(n)||lt(n)&&n.toString===IT?JSON.stringify(n,null,2):String(n);function p_(n,e=""){return n.reduce((t,i,r)=>r===0?t+i:t+e+i,"")}function sV(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const Au=n=>!mt(n)||jt(n);function Xu(n,e){if(Au(n)||Au(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:i,des:r}=t.pop();Object.keys(i).forEach(s=>{s!=="__proto__"&&(mt(i[s])&&!mt(r[s])&&(r[s]=Array.isArray(i[s])?[]:Tt()),Au(r[s])||Au(i[s])?r[s]=i[s]:t.push({src:i[s],des:r[s]}))})}}/*! + */const Yf=typeof window<"u",ds=(n,e=!1)=>e?Symbol.for(n):Symbol(n),ZV=(n,e,t)=>JV({l:n,k:e,s:t}),JV=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),$t=n=>typeof n=="number"&&isFinite(n),QV=n=>h_(n)==="[object Date]",jf=n=>h_(n)==="[object RegExp]",ed=n=>lt(n)&&Object.keys(n).length===0,tn=Object.assign,ez=Object.create,Tt=(n=null)=>ez(n);let Xy;const f_=()=>Xy||(Xy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Tt());function $y(n){return n.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const tz=Object.prototype.hasOwnProperty;function Ei(n,e){return tz.call(n,e)}const jt=Array.isArray,Lt=n=>typeof n=="function",Le=n=>typeof n=="string",Dt=n=>typeof n=="boolean",mt=n=>n!==null&&typeof n=="object",nz=n=>mt(n)&&Lt(n.then)&&Lt(n.catch),PT=Object.prototype.toString,h_=n=>PT.call(n),lt=n=>h_(n)==="[object Object]",iz=n=>n==null?"":jt(n)||lt(n)&&n.toString===PT?JSON.stringify(n,null,2):String(n);function d_(n,e=""){return n.reduce((t,i,r)=>r===0?t+i:t+e+i,"")}function rz(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const Au=n=>!mt(n)||jt(n);function Xu(n,e){if(Au(n)||Au(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:i,des:r}=t.pop();Object.keys(i).forEach(s=>{s!=="__proto__"&&(mt(i[s])&&!mt(r[s])&&(r[s]=Array.isArray(i[s])?[]:Tt()),Au(r[s])||Au(i[s])?r[s]=i[s]:t.push({src:i[s],des:r[s]}))})}}/*! * message-compiler v11.1.2 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function oV(n,e,t){return{line:n,column:e,offset:t}}function Mm(n,e,t){return{start:n,end:e}}const St={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},aV=17;function td(n,e,t={}){const{domain:i,messages:r,args:s}=t,o=n,a=new SyntaxError(String(o));return a.code=n,e&&(a.location=e),a.domain=i,a}function lV(n){throw n}const lr=" ",cV="\r",Mn=` -`,uV="\u2028",fV="\u2029";function hV(n){const e=n;let t=0,i=1,r=1,s=0;const o=M=>e[M]===cV&&e[M+1]===Mn,a=M=>e[M]===Mn,l=M=>e[M]===fV,c=M=>e[M]===uV,u=M=>o(M)||a(M)||l(M)||c(M),f=()=>t,h=()=>i,d=()=>r,p=()=>s,_=M=>o(M)||l(M)||c(M)?Mn:e[M],g=()=>_(t),m=()=>_(t+s);function y(){return s=0,u(t)&&(i++,r=0),o(t)&&t++,t++,r++,e[t]}function x(){return o(t+s)&&s++,s++,e[t+s]}function v(){t=0,i=1,r=1,s=0}function E(M=0){s=M}function T(){const M=t+s;for(;M!==t;)y();s=0}return{index:f,line:h,column:d,peekOffset:p,charAt:_,currentChar:g,currentPeek:m,next:y,peek:x,reset:v,resetPeek:E,skipToPeek:T}}const kr=void 0,dV=".",Yy="'",pV="tokenizer";function mV(n,e={}){const t=e.location!==!1,i=hV(n),r=()=>i.index(),s=()=>oV(i.line(),i.column(),i.index()),o=s(),a=r(),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(R,N,z,...A){const C=c();if(N.column+=z,N.offset+=z,u){const k=t?Mm(C.startLoc,N):null,U=td(R,k,{domain:pV,args:A});u(U)}}function h(R,N,z){R.endLoc=s(),R.currentType=N;const A={type:N};return t&&(A.loc=Mm(R.startLoc,R.endLoc)),z!=null&&(A.value=z),A}const d=R=>h(R,13);function p(R,N){return R.currentChar()===N?(R.next(),N):(f(St.EXPECTED_TOKEN,s(),0,N),"")}function _(R){let N="";for(;R.currentPeek()===lr||R.currentPeek()===Mn;)N+=R.currentPeek(),R.peek();return N}function g(R){const N=_(R);return R.skipToPeek(),N}function m(R){if(R===kr)return!1;const N=R.charCodeAt(0);return N>=97&&N<=122||N>=65&&N<=90||N===95}function y(R){if(R===kr)return!1;const N=R.charCodeAt(0);return N>=48&&N<=57}function x(R,N){const{currentType:z}=N;if(z!==2)return!1;_(R);const A=m(R.currentPeek());return R.resetPeek(),A}function v(R,N){const{currentType:z}=N;if(z!==2)return!1;_(R);const A=R.currentPeek()==="-"?R.peek():R.currentPeek(),C=y(A);return R.resetPeek(),C}function E(R,N){const{currentType:z}=N;if(z!==2)return!1;_(R);const A=R.currentPeek()===Yy;return R.resetPeek(),A}function T(R,N){const{currentType:z}=N;if(z!==7)return!1;_(R);const A=R.currentPeek()===".";return R.resetPeek(),A}function M(R,N){const{currentType:z}=N;if(z!==8)return!1;_(R);const A=m(R.currentPeek());return R.resetPeek(),A}function P(R,N){const{currentType:z}=N;if(!(z===7||z===11))return!1;_(R);const A=R.currentPeek()===":";return R.resetPeek(),A}function b(R,N){const{currentType:z}=N;if(z!==9)return!1;const A=()=>{const k=R.currentPeek();return k==="{"?m(R.peek()):k==="@"||k==="|"||k===":"||k==="."||k===lr||!k?!1:k===Mn?(R.peek(),A()):D(R,!1)},C=A();return R.resetPeek(),C}function S(R){_(R);const N=R.currentPeek()==="|";return R.resetPeek(),N}function D(R,N=!0){const z=(C=!1,k="")=>{const U=R.currentPeek();return U==="{"||U==="@"||!U?C:U==="|"?!(k===lr||k===Mn):U===lr?(R.peek(),z(!0,lr)):U===Mn?(R.peek(),z(!0,Mn)):!0},A=z();return N&&R.resetPeek(),A}function B(R,N){const z=R.currentChar();return z===kr?kr:N(z)?(R.next(),z):null}function H(R){const N=R.charCodeAt(0);return N>=97&&N<=122||N>=65&&N<=90||N>=48&&N<=57||N===95||N===36}function $(R){return B(R,H)}function ee(R){const N=R.charCodeAt(0);return N>=97&&N<=122||N>=65&&N<=90||N>=48&&N<=57||N===95||N===36||N===45}function Z(R){return B(R,ee)}function te(R){const N=R.charCodeAt(0);return N>=48&&N<=57}function Q(R){return B(R,te)}function pe(R){const N=R.charCodeAt(0);return N>=48&&N<=57||N>=65&&N<=70||N>=97&&N<=102}function ve(R){return B(R,pe)}function re(R){let N="",z="";for(;N=Q(R);)z+=N;return z}function xe(R){let N="";for(;;){const z=R.currentChar();if(z==="{"||z==="}"||z==="@"||z==="|"||!z)break;if(z===lr||z===Mn)if(D(R))N+=z,R.next();else{if(S(R))break;N+=z,R.next()}else N+=z,R.next()}return N}function Ve(R){g(R);let N="",z="";for(;N=Z(R);)z+=N;return R.currentChar()===kr&&f(St.UNTERMINATED_CLOSING_BRACE,s(),0),z}function se(R){g(R);let N="";return R.currentChar()==="-"?(R.next(),N+=`-${re(R)}`):N+=re(R),R.currentChar()===kr&&f(St.UNTERMINATED_CLOSING_BRACE,s(),0),N}function ge(R){return R!==Yy&&R!==Mn}function be(R){g(R),p(R,"'");let N="",z="";for(;N=B(R,ge);)N==="\\"?z+=W(R):z+=N;const A=R.currentChar();return A===Mn||A===kr?(f(St.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),A===Mn&&(R.next(),p(R,"'")),z):(p(R,"'"),z)}function W(R){const N=R.currentChar();switch(N){case"\\":case"'":return R.next(),`\\${N}`;case"u":return ae(R,N,4);case"U":return ae(R,N,6);default:return f(St.UNKNOWN_ESCAPE_SEQUENCE,s(),0,N),""}}function ae(R,N,z){p(R,N);let A="";for(let C=0;C{const A=R.currentChar();return A==="{"||A==="@"||A==="|"||A==="("||A===")"||!A||A===lr?z:(z+=A,R.next(),N(z))};return N("")}function L(R){g(R);const N=p(R,"|");return g(R),N}function w(R,N){let z=null;switch(R.currentChar()){case"{":return N.braceNest>=1&&f(St.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),R.next(),z=h(N,2,"{"),g(R),N.braceNest++,z;case"}":return N.braceNest>0&&N.currentType===2&&f(St.EMPTY_PLACEHOLDER,s(),0),R.next(),z=h(N,3,"}"),N.braceNest--,N.braceNest>0&&g(R),N.inLinked&&N.braceNest===0&&(N.inLinked=!1),z;case"@":return N.braceNest>0&&f(St.UNTERMINATED_CLOSING_BRACE,s(),0),z=j(R,N)||d(N),N.braceNest=0,z;default:{let C=!0,k=!0,U=!0;if(S(R))return N.braceNest>0&&f(St.UNTERMINATED_CLOSING_BRACE,s(),0),z=h(N,1,L(R)),N.braceNest=0,N.inLinked=!1,z;if(N.braceNest>0&&(N.currentType===4||N.currentType===5||N.currentType===6))return f(St.UNTERMINATED_CLOSING_BRACE,s(),0),N.braceNest=0,G(R,N);if(C=x(R,N))return z=h(N,4,Ve(R)),g(R),z;if(k=v(R,N))return z=h(N,5,se(R)),g(R),z;if(U=E(R,N))return z=h(N,6,be(R)),g(R),z;if(!C&&!k&&!U)return z=h(N,12,le(R)),f(St.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,z.value),g(R),z;break}}return z}function j(R,N){const{currentType:z}=N;let A=null;const C=R.currentChar();switch((z===7||z===8||z===11||z===9)&&(C===Mn||C===lr)&&f(St.INVALID_LINKED_FORMAT,s(),0),C){case"@":return R.next(),A=h(N,7,"@"),N.inLinked=!0,A;case".":return g(R),R.next(),h(N,8,".");case":":return g(R),R.next(),h(N,9,":");default:return S(R)?(A=h(N,1,L(R)),N.braceNest=0,N.inLinked=!1,A):T(R,N)||P(R,N)?(g(R),j(R,N)):M(R,N)?(g(R),h(N,11,De(R))):b(R,N)?(g(R),C==="{"?w(R,N)||A:h(N,10,I(R))):(z===7&&f(St.INVALID_LINKED_FORMAT,s(),0),N.braceNest=0,N.inLinked=!1,G(R,N))}}function G(R,N){let z={type:13};if(N.braceNest>0)return w(R,N)||d(N);if(N.inLinked)return j(R,N)||d(N);switch(R.currentChar()){case"{":return w(R,N)||d(N);case"}":return f(St.UNBALANCED_CLOSING_BRACE,s(),0),R.next(),h(N,3,"}");case"@":return j(R,N)||d(N);default:{if(S(R))return z=h(N,1,L(R)),N.braceNest=0,N.inLinked=!1,z;if(D(R))return h(N,0,xe(R));break}}return z}function q(){const{currentType:R,offset:N,startLoc:z,endLoc:A}=l;return l.lastType=R,l.lastOffset=N,l.lastStartLoc=z,l.lastEndLoc=A,l.offset=r(),l.startLoc=s(),i.currentChar()===kr?h(l,13):G(i,l)}return{nextToken:q,currentOffset:r,currentPosition:s,context:c}}const gV="parser",_V=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function vV(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 yV(n={}){const e=n.location!==!1,{onError:t}=n;function i(m,y,x,v,...E){const T=m.currentPosition();if(T.offset+=v,T.column+=v,t){const M=e?Mm(x,T):null,P=td(y,M,{domain:gV,args:E});t(P)}}function r(m,y,x){const v={type:m};return e&&(v.start=y,v.end=y,v.loc={start:x,end:x}),v}function s(m,y,x,v){e&&(m.end=y,m.loc&&(m.loc.end=x))}function o(m,y){const x=m.context(),v=r(3,x.offset,x.startLoc);return v.value=y,s(v,m.currentOffset(),m.currentPosition()),v}function a(m,y){const x=m.context(),{lastOffset:v,lastStartLoc:E}=x,T=r(5,v,E);return T.index=parseInt(y,10),m.nextToken(),s(T,m.currentOffset(),m.currentPosition()),T}function l(m,y){const x=m.context(),{lastOffset:v,lastStartLoc:E}=x,T=r(4,v,E);return T.key=y,m.nextToken(),s(T,m.currentOffset(),m.currentPosition()),T}function c(m,y){const x=m.context(),{lastOffset:v,lastStartLoc:E}=x,T=r(9,v,E);return T.value=y.replace(_V,vV),m.nextToken(),s(T,m.currentOffset(),m.currentPosition()),T}function u(m){const y=m.nextToken(),x=m.context(),{lastOffset:v,lastStartLoc:E}=x,T=r(8,v,E);return y.type!==11?(i(m,St.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),T.value="",s(T,v,E),{nextConsumeToken:y,node:T}):(y.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Fi(y)),T.value=y.value||"",s(T,m.currentOffset(),m.currentPosition()),{node:T})}function f(m,y){const x=m.context(),v=r(7,x.offset,x.startLoc);return v.value=y,s(v,m.currentOffset(),m.currentPosition()),v}function h(m){const y=m.context(),x=r(6,y.offset,y.startLoc);let v=m.nextToken();if(v.type===8){const E=u(m);x.modifier=E.node,v=E.nextConsumeToken||m.nextToken()}switch(v.type!==9&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Fi(v)),v=m.nextToken(),v.type===2&&(v=m.nextToken()),v.type){case 10:v.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Fi(v)),x.key=f(m,v.value||"");break;case 4:v.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Fi(v)),x.key=l(m,v.value||"");break;case 5:v.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Fi(v)),x.key=a(m,v.value||"");break;case 6:v.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Fi(v)),x.key=c(m,v.value||"");break;default:{i(m,St.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const E=m.context(),T=r(7,E.offset,E.startLoc);return T.value="",s(T,E.offset,E.startLoc),x.key=T,s(x,E.offset,E.startLoc),{nextConsumeToken:v,node:x}}}return s(x,m.currentOffset(),m.currentPosition()),{node:x}}function d(m){const y=m.context(),x=y.currentType===1?m.currentOffset():y.offset,v=y.currentType===1?y.endLoc:y.startLoc,E=r(2,x,v);E.items=[];let T=null;do{const b=T||m.nextToken();switch(T=null,b.type){case 0:b.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Fi(b)),E.items.push(o(m,b.value||""));break;case 5:b.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Fi(b)),E.items.push(a(m,b.value||""));break;case 4:b.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Fi(b)),E.items.push(l(m,b.value||""));break;case 6:b.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Fi(b)),E.items.push(c(m,b.value||""));break;case 7:{const S=h(m);E.items.push(S.node),T=S.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const M=y.currentType===1?y.lastOffset:m.currentOffset(),P=y.currentType===1?y.lastEndLoc:m.currentPosition();return s(E,M,P),E}function p(m,y,x,v){const E=m.context();let T=v.items.length===0;const M=r(1,y,x);M.cases=[],M.cases.push(v);do{const P=d(m);T||(T=P.items.length===0),M.cases.push(P)}while(E.currentType!==13);return T&&i(m,St.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),s(M,m.currentOffset(),m.currentPosition()),M}function _(m){const y=m.context(),{offset:x,startLoc:v}=y,E=d(m);return y.currentType===13?E:p(m,x,v,E)}function g(m){const y=mV(m,tn({},n)),x=y.context(),v=r(0,x.offset,x.startLoc);return e&&v.loc&&(v.loc.source=m),v.body=_(y),n.onCacheKey&&(v.cacheKey=n.onCacheKey(m)),x.currentType!==13&&i(y,St.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,m[x.offset]||""),s(v,y.currentOffset(),y.currentPosition()),v}return{parse:g}}function Fi(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 xV(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:s=>(t.helpers.add(s),s)}}function jy(n,e){for(let t=0;tKy(t)),n}function Ky(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(r?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 EV(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),ha(n,e.key),e.modifier?(n.push(", "),ha(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function TV(n,e){const{helper:t,needIndent:i}=n;n.push(`${t("normalize")}([`),n.indent(i());const r=e.items.length;for(let s=0;s1){n.push(`${t("plural")}([`),n.indent(i());const r=e.cases.length;for(let s=0;s{const t=Le(e.mode)?e.mode:"normal",i=Le(e.filename)?e.filename:"message.intl";e.sourceMap;const r=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":` -`,s=e.needIndent?e.needIndent:t!=="arrow",o=n.helpers||[],a=MV(n,{filename:i,breakLineCode:r,needIndent:s});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),o.length>0&&(a.push(`const { ${p_(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),ha(a,n),a.deindent(s),a.push("}"),delete n.helpers;const{code:l,map:c}=a.context();return{ast:n,code:l,map:c?c.toJSON():void 0}};function RV(n,e={}){const t=tn({},e),i=!!t.jit,r=!!t.minify,s=t.optimize==null?!0:t.optimize,a=yV(t).parse(n);return i?(s&&SV(a),r&&Ho(a),{ast:a,code:""}):(bV(a,t),CV(a,t))}/*! + */function sz(n,e,t){return{line:n,column:e,offset:t}}function Sm(n,e,t){return{start:n,end:e}}const St={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},oz=17;function td(n,e,t={}){const{domain:i,messages:r,args:s}=t,o=n,a=new SyntaxError(String(o));return a.code=n,e&&(a.location=e),a.domain=i,a}function az(n){throw n}const ar=" ",lz="\r",Mn=` +`,cz="\u2028",uz="\u2029";function fz(n){const e=n;let t=0,i=1,r=1,s=0;const o=M=>e[M]===lz&&e[M+1]===Mn,a=M=>e[M]===Mn,l=M=>e[M]===uz,c=M=>e[M]===cz,u=M=>o(M)||a(M)||l(M)||c(M),f=()=>t,h=()=>i,d=()=>r,p=()=>s,_=M=>o(M)||l(M)||c(M)?Mn:e[M],g=()=>_(t),m=()=>_(t+s);function y(){return s=0,u(t)&&(i++,r=0),o(t)&&t++,t++,r++,e[t]}function x(){return o(t+s)&&s++,s++,e[t+s]}function v(){t=0,i=1,r=1,s=0}function E(M=0){s=M}function T(){const M=t+s;for(;M!==t;)y();s=0}return{index:f,line:h,column:d,peekOffset:p,charAt:_,currentChar:g,currentPeek:m,next:y,peek:x,reset:v,resetPeek:E,skipToPeek:T}}const kr=void 0,hz=".",qy="'",dz="tokenizer";function pz(n,e={}){const t=e.location!==!1,i=fz(n),r=()=>i.index(),s=()=>sz(i.line(),i.column(),i.index()),o=s(),a=r(),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(R,N,V,...A){const C=c();if(N.column+=V,N.offset+=V,u){const k=t?Sm(C.startLoc,N):null,U=td(R,k,{domain:dz,args:A});u(U)}}function h(R,N,V){R.endLoc=s(),R.currentType=N;const A={type:N};return t&&(A.loc=Sm(R.startLoc,R.endLoc)),V!=null&&(A.value=V),A}const d=R=>h(R,13);function p(R,N){return R.currentChar()===N?(R.next(),N):(f(St.EXPECTED_TOKEN,s(),0,N),"")}function _(R){let N="";for(;R.currentPeek()===ar||R.currentPeek()===Mn;)N+=R.currentPeek(),R.peek();return N}function g(R){const N=_(R);return R.skipToPeek(),N}function m(R){if(R===kr)return!1;const N=R.charCodeAt(0);return N>=97&&N<=122||N>=65&&N<=90||N===95}function y(R){if(R===kr)return!1;const N=R.charCodeAt(0);return N>=48&&N<=57}function x(R,N){const{currentType:V}=N;if(V!==2)return!1;_(R);const A=m(R.currentPeek());return R.resetPeek(),A}function v(R,N){const{currentType:V}=N;if(V!==2)return!1;_(R);const A=R.currentPeek()==="-"?R.peek():R.currentPeek(),C=y(A);return R.resetPeek(),C}function E(R,N){const{currentType:V}=N;if(V!==2)return!1;_(R);const A=R.currentPeek()===qy;return R.resetPeek(),A}function T(R,N){const{currentType:V}=N;if(V!==7)return!1;_(R);const A=R.currentPeek()===".";return R.resetPeek(),A}function M(R,N){const{currentType:V}=N;if(V!==8)return!1;_(R);const A=m(R.currentPeek());return R.resetPeek(),A}function P(R,N){const{currentType:V}=N;if(!(V===7||V===11))return!1;_(R);const A=R.currentPeek()===":";return R.resetPeek(),A}function b(R,N){const{currentType:V}=N;if(V!==9)return!1;const A=()=>{const k=R.currentPeek();return k==="{"?m(R.peek()):k==="@"||k==="|"||k===":"||k==="."||k===ar||!k?!1:k===Mn?(R.peek(),A()):D(R,!1)},C=A();return R.resetPeek(),C}function S(R){_(R);const N=R.currentPeek()==="|";return R.resetPeek(),N}function D(R,N=!0){const V=(C=!1,k="")=>{const U=R.currentPeek();return U==="{"||U==="@"||!U?C:U==="|"?!(k===ar||k===Mn):U===ar?(R.peek(),V(!0,ar)):U===Mn?(R.peek(),V(!0,Mn)):!0},A=V();return N&&R.resetPeek(),A}function B(R,N){const V=R.currentChar();return V===kr?kr:N(V)?(R.next(),V):null}function H(R){const N=R.charCodeAt(0);return N>=97&&N<=122||N>=65&&N<=90||N>=48&&N<=57||N===95||N===36}function $(R){return B(R,H)}function ee(R){const N=R.charCodeAt(0);return N>=97&&N<=122||N>=65&&N<=90||N>=48&&N<=57||N===95||N===36||N===45}function Z(R){return B(R,ee)}function te(R){const N=R.charCodeAt(0);return N>=48&&N<=57}function Q(R){return B(R,te)}function pe(R){const N=R.charCodeAt(0);return N>=48&&N<=57||N>=65&&N<=70||N>=97&&N<=102}function ve(R){return B(R,pe)}function re(R){let N="",V="";for(;N=Q(R);)V+=N;return V}function xe(R){let N="";for(;;){const V=R.currentChar();if(V==="{"||V==="}"||V==="@"||V==="|"||!V)break;if(V===ar||V===Mn)if(D(R))N+=V,R.next();else{if(S(R))break;N+=V,R.next()}else N+=V,R.next()}return N}function ze(R){g(R);let N="",V="";for(;N=Z(R);)V+=N;return R.currentChar()===kr&&f(St.UNTERMINATED_CLOSING_BRACE,s(),0),V}function se(R){g(R);let N="";return R.currentChar()==="-"?(R.next(),N+=`-${re(R)}`):N+=re(R),R.currentChar()===kr&&f(St.UNTERMINATED_CLOSING_BRACE,s(),0),N}function ge(R){return R!==qy&&R!==Mn}function be(R){g(R),p(R,"'");let N="",V="";for(;N=B(R,ge);)N==="\\"?V+=W(R):V+=N;const A=R.currentChar();return A===Mn||A===kr?(f(St.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),A===Mn&&(R.next(),p(R,"'")),V):(p(R,"'"),V)}function W(R){const N=R.currentChar();switch(N){case"\\":case"'":return R.next(),`\\${N}`;case"u":return ae(R,N,4);case"U":return ae(R,N,6);default:return f(St.UNKNOWN_ESCAPE_SEQUENCE,s(),0,N),""}}function ae(R,N,V){p(R,N);let A="";for(let C=0;C{const A=R.currentChar();return A==="{"||A==="@"||A==="|"||A==="("||A===")"||!A||A===ar?V:(V+=A,R.next(),N(V))};return N("")}function L(R){g(R);const N=p(R,"|");return g(R),N}function w(R,N){let V=null;switch(R.currentChar()){case"{":return N.braceNest>=1&&f(St.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),R.next(),V=h(N,2,"{"),g(R),N.braceNest++,V;case"}":return N.braceNest>0&&N.currentType===2&&f(St.EMPTY_PLACEHOLDER,s(),0),R.next(),V=h(N,3,"}"),N.braceNest--,N.braceNest>0&&g(R),N.inLinked&&N.braceNest===0&&(N.inLinked=!1),V;case"@":return N.braceNest>0&&f(St.UNTERMINATED_CLOSING_BRACE,s(),0),V=j(R,N)||d(N),N.braceNest=0,V;default:{let C=!0,k=!0,U=!0;if(S(R))return N.braceNest>0&&f(St.UNTERMINATED_CLOSING_BRACE,s(),0),V=h(N,1,L(R)),N.braceNest=0,N.inLinked=!1,V;if(N.braceNest>0&&(N.currentType===4||N.currentType===5||N.currentType===6))return f(St.UNTERMINATED_CLOSING_BRACE,s(),0),N.braceNest=0,G(R,N);if(C=x(R,N))return V=h(N,4,ze(R)),g(R),V;if(k=v(R,N))return V=h(N,5,se(R)),g(R),V;if(U=E(R,N))return V=h(N,6,be(R)),g(R),V;if(!C&&!k&&!U)return V=h(N,12,le(R)),f(St.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,V.value),g(R),V;break}}return V}function j(R,N){const{currentType:V}=N;let A=null;const C=R.currentChar();switch((V===7||V===8||V===11||V===9)&&(C===Mn||C===ar)&&f(St.INVALID_LINKED_FORMAT,s(),0),C){case"@":return R.next(),A=h(N,7,"@"),N.inLinked=!0,A;case".":return g(R),R.next(),h(N,8,".");case":":return g(R),R.next(),h(N,9,":");default:return S(R)?(A=h(N,1,L(R)),N.braceNest=0,N.inLinked=!1,A):T(R,N)||P(R,N)?(g(R),j(R,N)):M(R,N)?(g(R),h(N,11,De(R))):b(R,N)?(g(R),C==="{"?w(R,N)||A:h(N,10,I(R))):(V===7&&f(St.INVALID_LINKED_FORMAT,s(),0),N.braceNest=0,N.inLinked=!1,G(R,N))}}function G(R,N){let V={type:13};if(N.braceNest>0)return w(R,N)||d(N);if(N.inLinked)return j(R,N)||d(N);switch(R.currentChar()){case"{":return w(R,N)||d(N);case"}":return f(St.UNBALANCED_CLOSING_BRACE,s(),0),R.next(),h(N,3,"}");case"@":return j(R,N)||d(N);default:{if(S(R))return V=h(N,1,L(R)),N.braceNest=0,N.inLinked=!1,V;if(D(R))return h(N,0,xe(R));break}}return V}function q(){const{currentType:R,offset:N,startLoc:V,endLoc:A}=l;return l.lastType=R,l.lastOffset=N,l.lastStartLoc=V,l.lastEndLoc=A,l.offset=r(),l.startLoc=s(),i.currentChar()===kr?h(l,13):G(i,l)}return{nextToken:q,currentOffset:r,currentPosition:s,context:c}}const mz="parser",gz=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function _z(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 vz(n={}){const e=n.location!==!1,{onError:t}=n;function i(m,y,x,v,...E){const T=m.currentPosition();if(T.offset+=v,T.column+=v,t){const M=e?Sm(x,T):null,P=td(y,M,{domain:mz,args:E});t(P)}}function r(m,y,x){const v={type:m};return e&&(v.start=y,v.end=y,v.loc={start:x,end:x}),v}function s(m,y,x,v){e&&(m.end=y,m.loc&&(m.loc.end=x))}function o(m,y){const x=m.context(),v=r(3,x.offset,x.startLoc);return v.value=y,s(v,m.currentOffset(),m.currentPosition()),v}function a(m,y){const x=m.context(),{lastOffset:v,lastStartLoc:E}=x,T=r(5,v,E);return T.index=parseInt(y,10),m.nextToken(),s(T,m.currentOffset(),m.currentPosition()),T}function l(m,y){const x=m.context(),{lastOffset:v,lastStartLoc:E}=x,T=r(4,v,E);return T.key=y,m.nextToken(),s(T,m.currentOffset(),m.currentPosition()),T}function c(m,y){const x=m.context(),{lastOffset:v,lastStartLoc:E}=x,T=r(9,v,E);return T.value=y.replace(gz,_z),m.nextToken(),s(T,m.currentOffset(),m.currentPosition()),T}function u(m){const y=m.nextToken(),x=m.context(),{lastOffset:v,lastStartLoc:E}=x,T=r(8,v,E);return y.type!==11?(i(m,St.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),T.value="",s(T,v,E),{nextConsumeToken:y,node:T}):(y.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Ui(y)),T.value=y.value||"",s(T,m.currentOffset(),m.currentPosition()),{node:T})}function f(m,y){const x=m.context(),v=r(7,x.offset,x.startLoc);return v.value=y,s(v,m.currentOffset(),m.currentPosition()),v}function h(m){const y=m.context(),x=r(6,y.offset,y.startLoc);let v=m.nextToken();if(v.type===8){const E=u(m);x.modifier=E.node,v=E.nextConsumeToken||m.nextToken()}switch(v.type!==9&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ui(v)),v=m.nextToken(),v.type===2&&(v=m.nextToken()),v.type){case 10:v.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ui(v)),x.key=f(m,v.value||"");break;case 4:v.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ui(v)),x.key=l(m,v.value||"");break;case 5:v.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ui(v)),x.key=a(m,v.value||"");break;case 6:v.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ui(v)),x.key=c(m,v.value||"");break;default:{i(m,St.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const E=m.context(),T=r(7,E.offset,E.startLoc);return T.value="",s(T,E.offset,E.startLoc),x.key=T,s(x,E.offset,E.startLoc),{nextConsumeToken:v,node:x}}}return s(x,m.currentOffset(),m.currentPosition()),{node:x}}function d(m){const y=m.context(),x=y.currentType===1?m.currentOffset():y.offset,v=y.currentType===1?y.endLoc:y.startLoc,E=r(2,x,v);E.items=[];let T=null;do{const b=T||m.nextToken();switch(T=null,b.type){case 0:b.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ui(b)),E.items.push(o(m,b.value||""));break;case 5:b.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ui(b)),E.items.push(a(m,b.value||""));break;case 4:b.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ui(b)),E.items.push(l(m,b.value||""));break;case 6:b.value==null&&i(m,St.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ui(b)),E.items.push(c(m,b.value||""));break;case 7:{const S=h(m);E.items.push(S.node),T=S.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const M=y.currentType===1?y.lastOffset:m.currentOffset(),P=y.currentType===1?y.lastEndLoc:m.currentPosition();return s(E,M,P),E}function p(m,y,x,v){const E=m.context();let T=v.items.length===0;const M=r(1,y,x);M.cases=[],M.cases.push(v);do{const P=d(m);T||(T=P.items.length===0),M.cases.push(P)}while(E.currentType!==13);return T&&i(m,St.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),s(M,m.currentOffset(),m.currentPosition()),M}function _(m){const y=m.context(),{offset:x,startLoc:v}=y,E=d(m);return y.currentType===13?E:p(m,x,v,E)}function g(m){const y=pz(m,tn({},n)),x=y.context(),v=r(0,x.offset,x.startLoc);return e&&v.loc&&(v.loc.source=m),v.body=_(y),n.onCacheKey&&(v.cacheKey=n.onCacheKey(m)),x.currentType!==13&&i(y,St.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,m[x.offset]||""),s(v,y.currentOffset(),y.currentPosition()),v}return{parse:g}}function Ui(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 yz(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:s=>(t.helpers.add(s),s)}}function Yy(n,e){for(let t=0;tjy(t)),n}function jy(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(r?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 Mz(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),ha(n,e.key),e.modifier?(n.push(", "),ha(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function Ez(n,e){const{helper:t,needIndent:i}=n;n.push(`${t("normalize")}([`),n.indent(i());const r=e.items.length;for(let s=0;s1){n.push(`${t("plural")}([`),n.indent(i());const r=e.cases.length;for(let s=0;s{const t=Le(e.mode)?e.mode:"normal",i=Le(e.filename)?e.filename:"message.intl";e.sourceMap;const r=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":` +`,s=e.needIndent?e.needIndent:t!=="arrow",o=n.helpers||[],a=Sz(n,{filename:i,breakLineCode:r,needIndent:s});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),o.length>0&&(a.push(`const { ${d_(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),ha(a,n),a.deindent(s),a.push("}"),delete n.helpers;const{code:l,map:c}=a.context();return{ast:n,code:l,map:c?c.toJSON():void 0}};function Cz(n,e={}){const t=tn({},e),i=!!t.jit,r=!!t.minify,s=t.optimize==null?!0:t.optimize,a=vz(t).parse(n);return i?(s&&bz(a),r&&Ho(a),{ast:a,code:""}):(xz(a,t),Az(a,t))}/*! * core-base v11.1.2 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function PV(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(h_().__INTLIFY_PROD_DEVTOOLS__=!1)}function xp(n){return t=>IV(t,n)}function IV(n,e){const t=DV(e);if(t==null)throw jl(0);if(g_(t)===1){const s=NV(t);return n.plural(s.reduce((o,a)=>[...o,Zy(n,a)],[]))}else return Zy(n,t)}const LV=["b","body"];function DV(n){return ps(n,LV)}const OV=["c","cases"];function NV(n){return ps(n,OV,[])}function Zy(n,e){const t=FV(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const i=kV(e).reduce((r,s)=>[...r,Em(n,s)],[]);return n.normalize(i)}}const UV=["s","static"];function FV(n){return ps(n,UV)}const BV=["i","items"];function kV(n){return ps(n,BV,[])}function Em(n,e){const t=g_(e);switch(t){case 3:return Cu(e,t);case 9:return Cu(e,t);case 4:{const i=e;if(Ti(i,"k")&&i.k)return n.interpolate(n.named(i.k));if(Ti(i,"key")&&i.key)return n.interpolate(n.named(i.key));throw jl(t)}case 5:{const i=e;if(Ti(i,"i")&&$t(i.i))return n.interpolate(n.list(i.i));if(Ti(i,"index")&&$t(i.index))return n.interpolate(n.list(i.index));throw jl(t)}case 6:{const i=e,r=GV(i),s=XV(i);return n.linked(Em(n,s),r?Em(n,r):void 0,n.type)}case 7:return Cu(e,t);case 8:return Cu(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const zV=["t","type"];function g_(n){return ps(n,zV)}const VV=["v","value"];function Cu(n,e){const t=ps(n,VV);if(t)return t;throw jl(e)}const HV=["m","modifier"];function GV(n){return ps(n,HV)}const WV=["k","key"];function XV(n){const e=ps(n,WV);if(e)return e;throw jl(6)}function ps(n,e,t){for(let i=0;in;let Ru=Tt();function da(n){return mt(n)&&g_(n)===0&&(Ti(n,"b")||Ti(n,"body"))}function qV(n,e={}){let t=!1;const i=e.onError||lV;return e.onError=r=>{t=!0,i(r)},{...RV(n,e),detectError:t}}function YV(n,e){if(Le(n)){Dt(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||$V)(n),r=Ru[i];if(r)return r;const{ast:s,detectError:o}=qV(n,{...e,location:!1,jit:!0}),a=xp(s);return o?a:Ru[i]=a}else{const t=n.cacheKey;if(t){const i=Ru[t];return i||(Ru[t]=xp(n))}else return xp(n)}}let Kl=null;function jV(n){Kl=n}function KV(n,e,t){Kl&&Kl.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const ZV=JV("function:translate");function JV(n){return e=>Kl&&Kl.emit(n,e)}const _r={INVALID_ARGUMENT:aV,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},QV=24;function vr(n){return td(n,null,void 0)}function __(n,e){return e.locale!=null?Jy(e.locale):Jy(n.locale)}let bp;function Jy(n){if(Le(n))return n;if(Lt(n)){if(n.resolvedOnce&&bp!=null)return bp;if(n.constructor.name==="Function"){const e=n();if(iV(e))throw vr(_r.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return bp=e}else throw vr(_r.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw vr(_r.NOT_SUPPORT_LOCALE_TYPE)}function eH(n,e,t){return[...new Set([t,...jt(e)?e:mt(e)?Object.keys(e):Le(e)?[e]:[t]])]}function LT(n,e,t){const i=Le(t)?t:Kf,r=n;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(i);if(!s){s=[];let o=[t];for(;jt(o);)o=Qy(s,o,e);const a=jt(e)||!lt(e)?e:e.default?e.default:null;o=Le(a)?[a]:a,jt(o)&&Qy(s,o,!1),r.__localeChainCache.set(i,s)}return s}function Qy(n,e,t){let i=!0;for(let r=0;r{o===void 0?o=a:o+=a},h[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,i=4,h[0]();else{if(r=0,o===void 0||(o=aH(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++,s=n[t],!(s==="\\"&&d())){if(l=oH(s),f=ms[i],c=f[l]||f.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(a=s,u()===!1))))return;if(i===7)return e}}const ex=new Map;function cH(n,e){return mt(n)?n[e]:null}function uH(n,e){if(!mt(n))return null;let t=ex.get(e);if(t||(t=lH(e),t&&ex.set(e,t)),!t)return null;const i=t.length;let r=n,s=0;for(;s`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function hH(){return{upper:(n,e)=>e==="text"&&Le(n)?n.toUpperCase():e==="vnode"&&mt(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&Le(n)?n.toLowerCase():e==="vnode"&&mt(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&Le(n)?nx(n):e==="vnode"&&mt(n)&&"__v_isVNode"in n?nx(n.children):n}}let DT;function dH(n){DT=n}let OT;function pH(n){OT=n}let NT;function mH(n){NT=n}let UT=null;const gH=n=>{UT=n},_H=()=>UT;let FT=null;const ix=n=>{FT=n},vH=()=>FT;let rx=0;function yH(n={}){const e=Lt(n.onWarn)?n.onWarn:sV,t=Le(n.version)?n.version:fH,i=Le(n.locale)||Lt(n.locale)?n.locale:Kf,r=Lt(i)?Kf:i,s=jt(n.fallbackLocale)||lt(n.fallbackLocale)||Le(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:r,o=lt(n.messages)?n.messages:Sp(r),a=lt(n.datetimeFormats)?n.datetimeFormats:Sp(r),l=lt(n.numberFormats)?n.numberFormats:Sp(r),c=tn(Tt(),n.modifiers,hH()),u=n.pluralRules||Tt(),f=Lt(n.missing)?n.missing:null,h=Dt(n.missingWarn)||jf(n.missingWarn)?n.missingWarn:!0,d=Dt(n.fallbackWarn)||jf(n.fallbackWarn)?n.fallbackWarn:!0,p=!!n.fallbackFormat,_=!!n.unresolving,g=Lt(n.postTranslation)?n.postTranslation:null,m=lt(n.processor)?n.processor:null,y=Dt(n.warnHtmlMessage)?n.warnHtmlMessage:!0,x=!!n.escapeParameter,v=Lt(n.messageCompiler)?n.messageCompiler:DT,E=Lt(n.messageResolver)?n.messageResolver:OT||cH,T=Lt(n.localeFallbacker)?n.localeFallbacker:NT||eH,M=mt(n.fallbackContext)?n.fallbackContext:void 0,P=n,b=mt(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,S=mt(P.__numberFormatters)?P.__numberFormatters:new Map,D=mt(P.__meta)?P.__meta:{};rx++;const B={version:t,cid:rx,locale:i,fallbackLocale:s,messages:o,modifiers:c,pluralRules:u,missing:f,missingWarn:h,fallbackWarn:d,fallbackFormat:p,unresolving:_,postTranslation:g,processor:m,warnHtmlMessage:y,escapeParameter:x,messageCompiler:v,messageResolver:E,localeFallbacker:T,fallbackContext:M,onWarn:e,__meta:D};return B.datetimeFormats=a,B.numberFormats=l,B.__datetimeFormatters=b,B.__numberFormatters=S,__INTLIFY_PROD_DEVTOOLS__&&KV(B,t,D),B}const Sp=n=>({[n]:Tt()});function v_(n,e,t,i,r){const{missing:s,onWarn:o}=n;if(s!==null){const a=s(n,t,e,r);return Le(a)?a:e}else return e}function za(n,e,t){const i=n;i.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function xH(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function bH(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let i=t+1;i{BT.includes(l)?o[l]=t[l]:s[l]=t[l]}),Le(i)?s.locale=i:lt(i)&&(o=i),lt(r)&&(o=r),[s.key||"",a,s,o]}function ox(n,e,t){const i=n;for(const r in t){const s=`${e}__${r}`;i.__datetimeFormatters.has(s)&&i.__datetimeFormatters.delete(s)}}function ax(n,...e){const{numberFormats:t,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=n,{__numberFormatters:a}=n,[l,c,u,f]=wm(...e),h=Dt(u.missingWarn)?u.missingWarn:n.missingWarn;Dt(u.fallbackWarn)?u.fallbackWarn:n.fallbackWarn;const d=!!u.part,p=__(n,u),_=o(n,r,p);if(!Le(l)||l==="")return new Intl.NumberFormat(p,f).format(c);let g={},m,y=null;const x="number format";for(let T=0;T<_.length&&(m=_[T],g=t[m]||{},y=g[l],!lt(y));T++)v_(n,l,m,h,x);if(!lt(y)||!Le(m))return i?nd:l;let v=`${m}__${l}`;ed(f)||(v=`${v}__${JSON.stringify(f)}`);let E=a.get(v);return E||(E=new Intl.NumberFormat(m,tn({},y,f)),a.set(v,E)),d?E.formatToParts(c):E.format(c)}const kT=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function wm(...n){const[e,t,i,r]=n,s=Tt();let o=Tt();if(!$t(e))throw vr(_r.INVALID_ARGUMENT);const a=e;return Le(t)?s.key=t:lt(t)&&Object.keys(t).forEach(l=>{kT.includes(l)?o[l]=t[l]:s[l]=t[l]}),Le(i)?s.locale=i:lt(i)&&(o=i),lt(r)&&(o=r),[s.key||"",a,s,o]}function lx(n,e,t){const i=n;for(const r in t){const s=`${e}__${r}`;i.__numberFormatters.has(s)&&i.__numberFormatters.delete(s)}}const SH=n=>n,MH=n=>"",EH="text",TH=n=>n.length===0?"":p_(n),wH=rV;function cx(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function AH(n){const e=$t(n.pluralIndex)?n.pluralIndex:-1;return n.named&&($t(n.named.count)||$t(n.named.n))?$t(n.named.count)?n.named.count:$t(n.named.n)?n.named.n:e:e}function CH(n,e){e.count||(e.count=n),e.n||(e.n=n)}function RH(n={}){const e=n.locale,t=AH(n),i=mt(n.pluralRules)&&Le(e)&&Lt(n.pluralRules[e])?n.pluralRules[e]:cx,r=mt(n.pluralRules)&&Le(e)&&Lt(n.pluralRules[e])?cx:void 0,s=m=>m[i(t,m.length,r)],o=n.list||[],a=m=>o[m],l=n.named||Tt();$t(n.pluralIndex)&&CH(t,l);const c=m=>l[m];function u(m,y){const x=Lt(n.messages)?n.messages(m,!!y):mt(n.messages)?n.messages[m]:!1;return x||(n.parent?n.parent.message(m):MH)}const f=m=>n.modifiers?n.modifiers[m]:SH,h=lt(n.processor)&&Lt(n.processor.normalize)?n.processor.normalize:TH,d=lt(n.processor)&&Lt(n.processor.interpolate)?n.processor.interpolate:wH,p=lt(n.processor)&&Le(n.processor.type)?n.processor.type:EH,g={list:a,named:c,plural:s,linked:(m,...y)=>{const[x,v]=y;let E="text",T="";y.length===1?mt(x)?(T=x.modifier||T,E=x.type||E):Le(x)&&(T=x||T):y.length===2&&(Le(x)&&(T=x||T),Le(v)&&(E=v||E));const M=u(m,!0)(g),P=E==="vnode"&&jt(M)&&T?M[0]:M;return T?f(T)(P,E):P},message:u,type:p,interpolate:d,normalize:h,values:tn(Tt(),o,l)};return g}const ux=()=>"",ai=n=>Lt(n);function fx(n,...e){const{fallbackFormat:t,postTranslation:i,unresolving:r,messageCompiler:s,fallbackLocale:o,messages:a}=n,[l,c]=Am(...e),u=Dt(c.missingWarn)?c.missingWarn:n.missingWarn,f=Dt(c.fallbackWarn)?c.fallbackWarn:n.fallbackWarn,h=Dt(c.escapeParameter)?c.escapeParameter:n.escapeParameter,d=!!c.resolvedMessage,p=Le(c.default)||Dt(c.default)?Dt(c.default)?s?l:()=>l:c.default:t?s?l:()=>l:null,_=t||p!=null&&(Le(p)||Lt(p)),g=__(n,c);h&&PH(c);let[m,y,x]=d?[l,g,a[g]||Tt()]:zT(n,l,g,o,f,u),v=m,E=l;if(!d&&!(Le(v)||da(v)||ai(v))&&_&&(v=p,E=v),!d&&(!(Le(v)||da(v)||ai(v))||!Le(y)))return r?nd:l;let T=!1;const M=()=>{T=!0},P=ai(v)?v:VT(n,l,y,v,E,M);if(T)return v;const b=DH(n,y,x,c),S=RH(b),D=IH(n,P,S),B=i?i(D,l):D;if(__INTLIFY_PROD_DEVTOOLS__){const H={timestamp:Date.now(),key:Le(l)?l:ai(v)?v.key:"",locale:y||(ai(v)?v.locale:""),format:Le(v)?v:ai(v)?v.source:"",message:B};H.meta=tn({},n.__meta,_H()||{}),ZV(H)}return B}function PH(n){jt(n.list)?n.list=n.list.map(e=>Le(e)?qy(e):e):mt(n.named)&&Object.keys(n.named).forEach(e=>{Le(n.named[e])&&(n.named[e]=qy(n.named[e]))})}function zT(n,e,t,i,r,s){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=n,u=c(n,i,t);let f=Tt(),h,d=null;const p="translate";for(let _=0;_i;return c.locale=t,c.key=e,c}const l=o(i,LH(n,t,r,i,a,s));return l.locale=t,l.key=e,l.source=i,l}function IH(n,e,t){return e(t)}function Am(...n){const[e,t,i]=n,r=Tt();if(!Le(e)&&!$t(e)&&!ai(e)&&!da(e))throw vr(_r.INVALID_ARGUMENT);const s=$t(e)?String(e):(ai(e),e);return $t(t)?r.plural=t:Le(t)?r.default=t:lt(t)&&!ed(t)?r.named=t:jt(t)&&(r.list=t),$t(i)?r.plural=i:Le(i)?r.default=i:lt(i)&&tn(r,i),[s,r]}function LH(n,e,t,i,r,s){return{locale:e,key:t,warnHtmlMessage:r,onError:o=>{throw s&&s(o),o},onCacheKey:o=>Jz(e,t,o)}}function DH(n,e,t,i){const{modifiers:r,pluralRules:s,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=n,h={locale:e,modifiers:r,pluralRules:s,messages:(d,p)=>{let _=o(t,d);if(_==null&&(u||p)){const[,,g]=zT(u||n,d,e,a,l,c);_=o(g,d)}if(Le(_)||da(_)){let g=!1;const y=VT(n,d,e,_,d,()=>{g=!0});return g?ux:y}else return ai(_)?_:ux}};return n.processor&&(h.processor=n.processor),i.list&&(h.list=i.list),i.named&&(h.named=i.named),$t(i.plural)&&(h.pluralIndex=i.plural),h}PV();/*! + */function Rz(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(f_().__INTLIFY_PROD_DEVTOOLS__=!1)}function xp(n){return t=>Pz(t,n)}function Pz(n,e){const t=Lz(e);if(t==null)throw jl(0);if(m_(t)===1){const s=Oz(t);return n.plural(s.reduce((o,a)=>[...o,Ky(n,a)],[]))}else return Ky(n,t)}const Iz=["b","body"];function Lz(n){return ps(n,Iz)}const Dz=["c","cases"];function Oz(n){return ps(n,Dz,[])}function Ky(n,e){const t=Uz(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const i=Bz(e).reduce((r,s)=>[...r,Mm(n,s)],[]);return n.normalize(i)}}const Nz=["s","static"];function Uz(n){return ps(n,Nz)}const Fz=["i","items"];function Bz(n){return ps(n,Fz,[])}function Mm(n,e){const t=m_(e);switch(t){case 3:return Cu(e,t);case 9:return Cu(e,t);case 4:{const i=e;if(Ei(i,"k")&&i.k)return n.interpolate(n.named(i.k));if(Ei(i,"key")&&i.key)return n.interpolate(n.named(i.key));throw jl(t)}case 5:{const i=e;if(Ei(i,"i")&&$t(i.i))return n.interpolate(n.list(i.i));if(Ei(i,"index")&&$t(i.index))return n.interpolate(n.list(i.index));throw jl(t)}case 6:{const i=e,r=Hz(i),s=Wz(i);return n.linked(Mm(n,s),r?Mm(n,r):void 0,n.type)}case 7:return Cu(e,t);case 8:return Cu(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const kz=["t","type"];function m_(n){return ps(n,kz)}const Vz=["v","value"];function Cu(n,e){const t=ps(n,Vz);if(t)return t;throw jl(e)}const zz=["m","modifier"];function Hz(n){return ps(n,zz)}const Gz=["k","key"];function Wz(n){const e=ps(n,Gz);if(e)return e;throw jl(6)}function ps(n,e,t){for(let i=0;in;let Ru=Tt();function da(n){return mt(n)&&m_(n)===0&&(Ei(n,"b")||Ei(n,"body"))}function $z(n,e={}){let t=!1;const i=e.onError||az;return e.onError=r=>{t=!0,i(r)},{...Cz(n,e),detectError:t}}function qz(n,e){if(Le(n)){Dt(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||Xz)(n),r=Ru[i];if(r)return r;const{ast:s,detectError:o}=$z(n,{...e,location:!1,jit:!0}),a=xp(s);return o?a:Ru[i]=a}else{const t=n.cacheKey;if(t){const i=Ru[t];return i||(Ru[t]=xp(n))}else return xp(n)}}let Kl=null;function Yz(n){Kl=n}function jz(n,e,t){Kl&&Kl.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const Kz=Zz("function:translate");function Zz(n){return e=>Kl&&Kl.emit(n,e)}const gr={INVALID_ARGUMENT:oz,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},Jz=24;function _r(n){return td(n,null,void 0)}function g_(n,e){return e.locale!=null?Zy(e.locale):Zy(n.locale)}let bp;function Zy(n){if(Le(n))return n;if(Lt(n)){if(n.resolvedOnce&&bp!=null)return bp;if(n.constructor.name==="Function"){const e=n();if(nz(e))throw _r(gr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return bp=e}else throw _r(gr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw _r(gr.NOT_SUPPORT_LOCALE_TYPE)}function Qz(n,e,t){return[...new Set([t,...jt(e)?e:mt(e)?Object.keys(e):Le(e)?[e]:[t]])]}function IT(n,e,t){const i=Le(t)?t:Kf,r=n;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(i);if(!s){s=[];let o=[t];for(;jt(o);)o=Jy(s,o,e);const a=jt(e)||!lt(e)?e:e.default?e.default:null;o=Le(a)?[a]:a,jt(o)&&Jy(s,o,!1),r.__localeChainCache.set(i,s)}return s}function Jy(n,e,t){let i=!0;for(let r=0;r{o===void 0?o=a:o+=a},h[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,i=4,h[0]();else{if(r=0,o===void 0||(o=oH(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++,s=n[t],!(s==="\\"&&d())){if(l=sH(s),f=ms[i],c=f[l]||f.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(a=s,u()===!1))))return;if(i===7)return e}}const Qy=new Map;function lH(n,e){return mt(n)?n[e]:null}function cH(n,e){if(!mt(n))return null;let t=Qy.get(e);if(t||(t=aH(e),t&&Qy.set(e,t)),!t)return null;const i=t.length;let r=n,s=0;for(;s`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function fH(){return{upper:(n,e)=>e==="text"&&Le(n)?n.toUpperCase():e==="vnode"&&mt(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&Le(n)?n.toLowerCase():e==="vnode"&&mt(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&Le(n)?tx(n):e==="vnode"&&mt(n)&&"__v_isVNode"in n?tx(n.children):n}}let LT;function hH(n){LT=n}let DT;function dH(n){DT=n}let OT;function pH(n){OT=n}let NT=null;const mH=n=>{NT=n},gH=()=>NT;let UT=null;const nx=n=>{UT=n},_H=()=>UT;let ix=0;function vH(n={}){const e=Lt(n.onWarn)?n.onWarn:rz,t=Le(n.version)?n.version:uH,i=Le(n.locale)||Lt(n.locale)?n.locale:Kf,r=Lt(i)?Kf:i,s=jt(n.fallbackLocale)||lt(n.fallbackLocale)||Le(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:r,o=lt(n.messages)?n.messages:Sp(r),a=lt(n.datetimeFormats)?n.datetimeFormats:Sp(r),l=lt(n.numberFormats)?n.numberFormats:Sp(r),c=tn(Tt(),n.modifiers,fH()),u=n.pluralRules||Tt(),f=Lt(n.missing)?n.missing:null,h=Dt(n.missingWarn)||jf(n.missingWarn)?n.missingWarn:!0,d=Dt(n.fallbackWarn)||jf(n.fallbackWarn)?n.fallbackWarn:!0,p=!!n.fallbackFormat,_=!!n.unresolving,g=Lt(n.postTranslation)?n.postTranslation:null,m=lt(n.processor)?n.processor:null,y=Dt(n.warnHtmlMessage)?n.warnHtmlMessage:!0,x=!!n.escapeParameter,v=Lt(n.messageCompiler)?n.messageCompiler:LT,E=Lt(n.messageResolver)?n.messageResolver:DT||lH,T=Lt(n.localeFallbacker)?n.localeFallbacker:OT||Qz,M=mt(n.fallbackContext)?n.fallbackContext:void 0,P=n,b=mt(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,S=mt(P.__numberFormatters)?P.__numberFormatters:new Map,D=mt(P.__meta)?P.__meta:{};ix++;const B={version:t,cid:ix,locale:i,fallbackLocale:s,messages:o,modifiers:c,pluralRules:u,missing:f,missingWarn:h,fallbackWarn:d,fallbackFormat:p,unresolving:_,postTranslation:g,processor:m,warnHtmlMessage:y,escapeParameter:x,messageCompiler:v,messageResolver:E,localeFallbacker:T,fallbackContext:M,onWarn:e,__meta:D};return B.datetimeFormats=a,B.numberFormats=l,B.__datetimeFormatters=b,B.__numberFormatters=S,__INTLIFY_PROD_DEVTOOLS__&&jz(B,t,D),B}const Sp=n=>({[n]:Tt()});function __(n,e,t,i,r){const{missing:s,onWarn:o}=n;if(s!==null){const a=s(n,t,e,r);return Le(a)?a:e}else return e}function Va(n,e,t){const i=n;i.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function yH(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function xH(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let i=t+1;i{FT.includes(l)?o[l]=t[l]:s[l]=t[l]}),Le(i)?s.locale=i:lt(i)&&(o=i),lt(r)&&(o=r),[s.key||"",a,s,o]}function sx(n,e,t){const i=n;for(const r in t){const s=`${e}__${r}`;i.__datetimeFormatters.has(s)&&i.__datetimeFormatters.delete(s)}}function ox(n,...e){const{numberFormats:t,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=n,{__numberFormatters:a}=n,[l,c,u,f]=Tm(...e),h=Dt(u.missingWarn)?u.missingWarn:n.missingWarn;Dt(u.fallbackWarn)?u.fallbackWarn:n.fallbackWarn;const d=!!u.part,p=g_(n,u),_=o(n,r,p);if(!Le(l)||l==="")return new Intl.NumberFormat(p,f).format(c);let g={},m,y=null;const x="number format";for(let T=0;T<_.length&&(m=_[T],g=t[m]||{},y=g[l],!lt(y));T++)__(n,l,m,h,x);if(!lt(y)||!Le(m))return i?nd:l;let v=`${m}__${l}`;ed(f)||(v=`${v}__${JSON.stringify(f)}`);let E=a.get(v);return E||(E=new Intl.NumberFormat(m,tn({},y,f)),a.set(v,E)),d?E.formatToParts(c):E.format(c)}const BT=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Tm(...n){const[e,t,i,r]=n,s=Tt();let o=Tt();if(!$t(e))throw _r(gr.INVALID_ARGUMENT);const a=e;return Le(t)?s.key=t:lt(t)&&Object.keys(t).forEach(l=>{BT.includes(l)?o[l]=t[l]:s[l]=t[l]}),Le(i)?s.locale=i:lt(i)&&(o=i),lt(r)&&(o=r),[s.key||"",a,s,o]}function ax(n,e,t){const i=n;for(const r in t){const s=`${e}__${r}`;i.__numberFormatters.has(s)&&i.__numberFormatters.delete(s)}}const bH=n=>n,SH=n=>"",MH="text",EH=n=>n.length===0?"":d_(n),TH=iz;function lx(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function wH(n){const e=$t(n.pluralIndex)?n.pluralIndex:-1;return n.named&&($t(n.named.count)||$t(n.named.n))?$t(n.named.count)?n.named.count:$t(n.named.n)?n.named.n:e:e}function AH(n,e){e.count||(e.count=n),e.n||(e.n=n)}function CH(n={}){const e=n.locale,t=wH(n),i=mt(n.pluralRules)&&Le(e)&&Lt(n.pluralRules[e])?n.pluralRules[e]:lx,r=mt(n.pluralRules)&&Le(e)&&Lt(n.pluralRules[e])?lx:void 0,s=m=>m[i(t,m.length,r)],o=n.list||[],a=m=>o[m],l=n.named||Tt();$t(n.pluralIndex)&&AH(t,l);const c=m=>l[m];function u(m,y){const x=Lt(n.messages)?n.messages(m,!!y):mt(n.messages)?n.messages[m]:!1;return x||(n.parent?n.parent.message(m):SH)}const f=m=>n.modifiers?n.modifiers[m]:bH,h=lt(n.processor)&&Lt(n.processor.normalize)?n.processor.normalize:EH,d=lt(n.processor)&&Lt(n.processor.interpolate)?n.processor.interpolate:TH,p=lt(n.processor)&&Le(n.processor.type)?n.processor.type:MH,g={list:a,named:c,plural:s,linked:(m,...y)=>{const[x,v]=y;let E="text",T="";y.length===1?mt(x)?(T=x.modifier||T,E=x.type||E):Le(x)&&(T=x||T):y.length===2&&(Le(x)&&(T=x||T),Le(v)&&(E=v||E));const M=u(m,!0)(g),P=E==="vnode"&&jt(M)&&T?M[0]:M;return T?f(T)(P,E):P},message:u,type:p,interpolate:d,normalize:h,values:tn(Tt(),o,l)};return g}const cx=()=>"",oi=n=>Lt(n);function ux(n,...e){const{fallbackFormat:t,postTranslation:i,unresolving:r,messageCompiler:s,fallbackLocale:o,messages:a}=n,[l,c]=wm(...e),u=Dt(c.missingWarn)?c.missingWarn:n.missingWarn,f=Dt(c.fallbackWarn)?c.fallbackWarn:n.fallbackWarn,h=Dt(c.escapeParameter)?c.escapeParameter:n.escapeParameter,d=!!c.resolvedMessage,p=Le(c.default)||Dt(c.default)?Dt(c.default)?s?l:()=>l:c.default:t?s?l:()=>l:null,_=t||p!=null&&(Le(p)||Lt(p)),g=g_(n,c);h&&RH(c);let[m,y,x]=d?[l,g,a[g]||Tt()]:kT(n,l,g,o,f,u),v=m,E=l;if(!d&&!(Le(v)||da(v)||oi(v))&&_&&(v=p,E=v),!d&&(!(Le(v)||da(v)||oi(v))||!Le(y)))return r?nd:l;let T=!1;const M=()=>{T=!0},P=oi(v)?v:VT(n,l,y,v,E,M);if(T)return v;const b=LH(n,y,x,c),S=CH(b),D=PH(n,P,S),B=i?i(D,l):D;if(__INTLIFY_PROD_DEVTOOLS__){const H={timestamp:Date.now(),key:Le(l)?l:oi(v)?v.key:"",locale:y||(oi(v)?v.locale:""),format:Le(v)?v:oi(v)?v.source:"",message:B};H.meta=tn({},n.__meta,gH()||{}),Kz(H)}return B}function RH(n){jt(n.list)?n.list=n.list.map(e=>Le(e)?$y(e):e):mt(n.named)&&Object.keys(n.named).forEach(e=>{Le(n.named[e])&&(n.named[e]=$y(n.named[e]))})}function kT(n,e,t,i,r,s){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=n,u=c(n,i,t);let f=Tt(),h,d=null;const p="translate";for(let _=0;_i;return c.locale=t,c.key=e,c}const l=o(i,IH(n,t,r,i,a,s));return l.locale=t,l.key=e,l.source=i,l}function PH(n,e,t){return e(t)}function wm(...n){const[e,t,i]=n,r=Tt();if(!Le(e)&&!$t(e)&&!oi(e)&&!da(e))throw _r(gr.INVALID_ARGUMENT);const s=$t(e)?String(e):(oi(e),e);return $t(t)?r.plural=t:Le(t)?r.default=t:lt(t)&&!ed(t)?r.named=t:jt(t)&&(r.list=t),$t(i)?r.plural=i:Le(i)?r.default=i:lt(i)&&tn(r,i),[s,r]}function IH(n,e,t,i,r,s){return{locale:e,key:t,warnHtmlMessage:r,onError:o=>{throw s&&s(o),o},onCacheKey:o=>ZV(e,t,o)}}function LH(n,e,t,i){const{modifiers:r,pluralRules:s,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=n,h={locale:e,modifiers:r,pluralRules:s,messages:(d,p)=>{let _=o(t,d);if(_==null&&(u||p)){const[,,g]=kT(u||n,d,e,a,l,c);_=o(g,d)}if(Le(_)||da(_)){let g=!1;const y=VT(n,d,e,_,d,()=>{g=!0});return g?cx:y}else return oi(_)?_:cx}};return n.processor&&(h.processor=n.processor),i.list&&(h.list=i.list),i.named&&(h.named=i.named),$t(i.plural)&&(h.pluralIndex=i.plural),h}Rz();/*! * vue-i18n v11.1.2 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const OH="11.1.2";function NH(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(h_().__INTLIFY_PROD_DEVTOOLS__=!1)}const mi={UNEXPECTED_RETURN_TYPE:QV,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 Ii(n,...e){return td(n,null,void 0)}const Cm=ds("__translateVNode"),Rm=ds("__datetimeParts"),Pm=ds("__numberParts"),UH=ds("__setPluralRules"),FH=ds("__injectWithOption"),Im=ds("__dispose");function Zl(n){if(!mt(n))return n;for(const e in n)if(Ti(n,e))if(!e.includes("."))mt(n[e])&&Zl(n[e]);else{const t=e.split("."),i=t.length-1;let r=n,s=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||Tt(),Xu(c,o[l])):Xu(c,o)}else Le(a)&&Xu(JSON.parse(a),o)}),r==null&&s)for(const a in o)Ti(o,a)&&Zl(o[a]);return o}function GT(n){return n.type}function BH(n,e,t){let i=mt(e.messages)?e.messages:Tt();"__i18nGlobal"in t&&(i=HT(n.locale.value,{messages:i,__i18n:t.__i18nGlobal}));const r=Object.keys(i);r.length&&r.forEach(s=>{n.mergeLocaleMessage(s,i[s])});{if(mt(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(o=>{n.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(mt(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(o=>{n.mergeNumberFormat(o,e.numberFormats[o])})}}}function hx(n){return an(tc,null,n,0)}const dx="__INTLIFY_META__",px=()=>[],kH=()=>!1;let mx=0;function gx(n){return(e,t,i,r)=>n(t,i,On()||void 0,r)}const zH=()=>{const n=On();let e=null;return n&&(e=GT(n)[dx])?{[dx]:e}:null};function WT(n={}){const{__root:e,__injectWithOption:t}=n,i=e===void 0,r=n.flatJson,s=Yf?Xe:ze;let o=Dt(n.inheritLocale)?n.inheritLocale:!0;const a=s(e&&o?e.locale.value:Le(n.locale)?n.locale:Kf),l=s(e&&o?e.fallbackLocale.value:Le(n.fallbackLocale)||jt(n.fallbackLocale)||lt(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:a.value),c=s(HT(a.value,n)),u=s(lt(n.datetimeFormats)?n.datetimeFormats:{[a.value]:{}}),f=s(lt(n.numberFormats)?n.numberFormats:{[a.value]:{}});let h=e?e.missingWarn:Dt(n.missingWarn)||jf(n.missingWarn)?n.missingWarn:!0,d=e?e.fallbackWarn:Dt(n.fallbackWarn)||jf(n.fallbackWarn)?n.fallbackWarn:!0,p=e?e.fallbackRoot:Dt(n.fallbackRoot)?n.fallbackRoot:!0,_=!!n.fallbackFormat,g=Lt(n.missing)?n.missing:null,m=Lt(n.missing)?gx(n.missing):null,y=Lt(n.postTranslation)?n.postTranslation:null,x=e?e.warnHtmlMessage:Dt(n.warnHtmlMessage)?n.warnHtmlMessage:!0,v=!!n.escapeParameter;const E=e?e.modifiers:lt(n.modifiers)?n.modifiers:{};let T=n.pluralRules||e&&e.pluralRules,M;M=(()=>{i&&ix(null);const U={version:OH,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:E,pluralRules:T,missing:m===null?void 0:m,missingWarn:h,fallbackWarn:d,fallbackFormat:_,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:x,escapeParameter:v,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};U.datetimeFormats=u.value,U.numberFormats=f.value,U.__datetimeFormatters=lt(M)?M.__datetimeFormatters:void 0,U.__numberFormatters=lt(M)?M.__numberFormatters:void 0;const V=yH(U);return i&&ix(V),V})(),za(M,a.value,l.value);function b(){return[a.value,l.value,c.value,u.value,f.value]}const S=Ce({get:()=>a.value,set:U=>{M.locale=U,a.value=U}}),D=Ce({get:()=>l.value,set:U=>{M.fallbackLocale=U,l.value=U,za(M,a.value,U)}}),B=Ce(()=>c.value),H=Ce(()=>u.value),$=Ce(()=>f.value);function ee(){return Lt(y)?y:null}function Z(U){y=U,M.postTranslation=U}function te(){return g}function Q(U){U!==null&&(m=gx(U)),g=U,M.missing=m}const pe=(U,V,Y,he,ce,ye)=>{b();let Ue;try{__INTLIFY_PROD_DEVTOOLS__,i||(M.fallbackContext=e?vH():void 0),Ue=U(M)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(M.fallbackContext=void 0)}if(Y!=="translate exists"&&$t(Ue)&&Ue===nd||Y==="translate exists"&&!Ue){const[me,Ee]=V();return e&&p?he(e):ce(me)}else{if(ye(Ue))return Ue;throw Ii(mi.UNEXPECTED_RETURN_TYPE)}};function ve(...U){return pe(V=>Reflect.apply(fx,null,[V,...U]),()=>Am(...U),"translate",V=>Reflect.apply(V.t,V,[...U]),V=>V,V=>Le(V))}function re(...U){const[V,Y,he]=U;if(he&&!mt(he))throw Ii(mi.INVALID_ARGUMENT);return ve(V,Y,tn({resolvedMessage:!0},he||{}))}function xe(...U){return pe(V=>Reflect.apply(sx,null,[V,...U]),()=>Tm(...U),"datetime format",V=>Reflect.apply(V.d,V,[...U]),()=>tx,V=>Le(V))}function Ve(...U){return pe(V=>Reflect.apply(ax,null,[V,...U]),()=>wm(...U),"number format",V=>Reflect.apply(V.n,V,[...U]),()=>tx,V=>Le(V))}function se(U){return U.map(V=>Le(V)||$t(V)||Dt(V)?hx(String(V)):V)}const be={normalize:se,interpolate:U=>U,type:"vnode"};function W(...U){return pe(V=>{let Y;const he=V;try{he.processor=be,Y=Reflect.apply(fx,null,[he,...U])}finally{he.processor=null}return Y},()=>Am(...U),"translate",V=>V[Cm](...U),V=>[hx(V)],V=>jt(V))}function ae(...U){return pe(V=>Reflect.apply(ax,null,[V,...U]),()=>wm(...U),"number format",V=>V[Pm](...U),px,V=>Le(V)||jt(V))}function ue(...U){return pe(V=>Reflect.apply(sx,null,[V,...U]),()=>Tm(...U),"datetime format",V=>V[Rm](...U),px,V=>Le(V)||jt(V))}function le(U){T=U,M.pluralRules=T}function De(U,V){return pe(()=>{if(!U)return!1;const Y=Le(V)?V:a.value,he=w(Y),ce=M.messageResolver(he,U);return da(ce)||ai(ce)||Le(ce)},()=>[U],"translate exists",Y=>Reflect.apply(Y.te,Y,[U,V]),kH,Y=>Dt(Y))}function I(U){let V=null;const Y=LT(M,l.value,a.value);for(let he=0;he{o&&(a.value=U,M.locale=U,za(M,a.value,l.value))}),qe(e.fallbackLocale,U=>{o&&(l.value=U,M.fallbackLocale=U,za(M,a.value,l.value))}));const k={id:mx,locale:S,fallbackLocale:D,get inheritLocale(){return o},set inheritLocale(U){o=U,U&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,za(M,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:B,get modifiers(){return E},get pluralRules(){return T||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(U){h=U,M.missingWarn=h},get fallbackWarn(){return d},set fallbackWarn(U){d=U,M.fallbackWarn=d},get fallbackRoot(){return p},set fallbackRoot(U){p=U},get fallbackFormat(){return _},set fallbackFormat(U){_=U,M.fallbackFormat=_},get warnHtmlMessage(){return x},set warnHtmlMessage(U){x=U,M.warnHtmlMessage=U},get escapeParameter(){return v},set escapeParameter(U){v=U,M.escapeParameter=U},t:ve,getLocaleMessage:w,setLocaleMessage:j,mergeLocaleMessage:G,getPostTranslationHandler:ee,setPostTranslationHandler:Z,getMissingHandler:te,setMissingHandler:Q,[UH]:le};return k.datetimeFormats=H,k.numberFormats=$,k.rt=re,k.te=De,k.tm=L,k.d=xe,k.n=Ve,k.getDateTimeFormat=q,k.setDateTimeFormat=R,k.mergeDateTimeFormat=N,k.getNumberFormat=z,k.setNumberFormat=A,k.mergeNumberFormat=C,k[FH]=t,k[Cm]=W,k[Rm]=ue,k[Pm]=ae,k}const y_={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function VH({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((i,r)=>[...i,...r.type===Wt?r.children:[r]],[]):e.reduce((t,i)=>{const r=n[i];return r&&(t[i]=r()),t},Tt())}function XT(){return Wt}const HH=nn({name:"i18n-t",props:tn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>$t(n)||!isNaN(n)}},y_),setup(n,e){const{slots:t,attrs:i}=e,r=n.i18n||id({useScope:n.scope,__useComponent:!0});return()=>{const s=Object.keys(t).filter(f=>f!=="_"),o=Tt();n.locale&&(o.locale=n.locale),n.plural!==void 0&&(o.plural=Le(n.plural)?+n.plural:n.plural);const a=VH(e,s),l=r[Cm](n.keypath,a,o),c=tn(Tt(),i),u=Le(n.tag)||mt(n.tag)?n.tag:XT();return Sr(u,c,l)}}}),_x=HH;function GH(n){return jt(n)&&!Le(n[0])}function $T(n,e,t,i){const{slots:r,attrs:s}=e;return()=>{const o={part:!0};let a=Tt();n.locale&&(o.locale=n.locale),Le(n.format)?o.key=n.format:mt(n.format)&&(Le(n.format.key)&&(o.key=n.format.key),a=Object.keys(n.format).reduce((h,d)=>t.includes(d)?tn(Tt(),h,{[d]:n.format[d]}):h,Tt()));const l=i(n.value,o,a);let c=[o.key];jt(l)?c=l.map((h,d)=>{const p=r[h.type],_=p?p({[h.type]:h.value,index:d,parts:l}):[h.value];return GH(_)&&(_[0].key=`${h.type}-${d}`),_}):Le(l)&&(c=[l]);const u=tn(Tt(),s),f=Le(n.tag)||mt(n.tag)?n.tag:XT();return Sr(f,u,c)}}const WH=nn({name:"i18n-n",props:tn({value:{type:Number,required:!0},format:{type:[String,Object]}},y_),setup(n,e){const t=n.i18n||id({useScope:n.scope,__useComponent:!0});return $T(n,e,kT,(...i)=>t[Pm](...i))}}),vx=WH;function XH(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 $H(n){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw Ii(mi.UNEXPECTED_ERROR);const c=XH(n,a.$),u=yx(l);return[Reflect.apply(c.t,c,[...xx(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);Yf&&n.global===c&&(o.__i18nWatcher=qe(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{Yf&&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=yx(a);o.textContent=Reflect.apply(l.t,l,[...xx(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function yx(n){if(Le(n))return{path:n};if(lt(n)){if(!("path"in n))throw Ii(mi.REQUIRED_VALUE,"path");return n}else throw Ii(mi.INVALID_VALUE)}function xx(n){const{path:e,locale:t,args:i,choice:r,plural:s}=n,o={},a=i||{};return Le(t)&&(o.locale=t),$t(r)&&(o.plural=r),$t(s)&&(o.plural=s),[e,a,o]}function qH(n,e,...t){const i=lt(t[0])?t[0]:{};(Dt(i.globalInstall)?i.globalInstall:!0)&&([_x.name,"I18nT"].forEach(s=>n.component(s,_x)),[vx.name,"I18nN"].forEach(s=>n.component(s,vx)),[Sx.name,"I18nD"].forEach(s=>n.component(s,Sx))),n.directive("t",$H(e))}const YH=ds("global-vue-i18n");function jH(n={}){const e=Dt(n.globalInjection)?n.globalInjection:!0,t=new Map,[i,r]=KH(n),s=ds("");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__=s,u.provide(u.__VUE_I18N_SYMBOL__,c),lt(f[0])){const p=f[0];c.__composerExtend=p.__composerExtend,c.__vueI18nExtend=p.__vueI18nExtend}let h=null;e&&(h=r4(u,c.global)),qH(u,c,...f);const d=u.unmount;u.unmount=()=>{h&&h(),c.dispose(),d()}},get global(){return r},dispose(){i.stop()},__instances:t,__getInstance:o,__setInstance:a,__deleteInstance:l};return c}function id(n={}){const e=On();if(e==null)throw Ii(mi.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Ii(mi.NOT_INSTALLED);const t=ZH(e),i=QH(t),r=GT(e),s=JH(n,r);if(s==="global")return BH(i,n,r),i;if(s==="parent"){let l=e4(t,e,n.__useComponent);return l==null&&(l=i),l}const o=t;let a=o.__getInstance(e);if(a==null){const l=tn({},n);"__i18n"in r&&(l.__i18n=r.__i18n),i&&(l.__root=i),a=WT(l),o.__composerExtend&&(a[Im]=o.__composerExtend(a)),n4(o,e,a),o.__setInstance(e,a)}return a}function KH(n,e){const t=Ql(),i=t.run(()=>WT(n));if(i==null)throw Ii(mi.UNEXPECTED_ERROR);return[t,i]}function ZH(n){const e=In(n.isCE?YH:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Ii(n.isCE?mi.NOT_INSTALLED_WITH_PROVIDE:mi.UNEXPECTED_ERROR);return e}function JH(n,e){return ed(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function QH(n){return n.mode==="composition"?n.global:n.global.__composer}function e4(n,e,t=!1){let i=null;const r=e.root;let s=t4(e,t);for(;s!=null;){const o=n;if(n.mode==="composition"&&(i=o.__getInstance(s)),i!=null||r===s)break;s=s.parent}return i}function t4(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function n4(n,e,t){Nn(()=>{},e),qi(()=>{const i=t;n.__deleteInstance(e);const r=i[Im];r&&(r(),delete i[Im])},e)}const i4=["locale","fallbackLocale","availableLocales"],bx=["t","rt","d","n","tm","te"];function r4(n,e){const t=Object.create(null);return i4.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s)throw Ii(mi.UNEXPECTED_ERROR);const o=Mt(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(t,r,o)}),n.config.globalProperties.$i18n=t,bx.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s||!s.value)throw Ii(mi.UNEXPECTED_ERROR);Object.defineProperty(n.config.globalProperties,`$${r}`,s)}),()=>{delete n.config.globalProperties.$i18n,bx.forEach(r=>{delete n.config.globalProperties[`$${r}`]})}}const s4=nn({name:"i18n-d",props:tn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},y_),setup(n,e){const t=n.i18n||id({useScope:n.scope,__useComponent:!0});return $T(n,e,BT,(...i)=>t[Rm](...i))}}),Sx=s4;NH();dH(YV);pH(uH);mH(LT);if(__INTLIFY_PROD_DEVTOOLS__){const n=h_();n.__INTLIFY__=!0,jV(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const o4=nn({__name:"App",setup(n){const e=id(),t=Ck(Uz()),i=FN();return qe(t.language,()=>{e.locale.value=t.language.value}),qe(t.themeColorsHue,()=>{document.documentElement.style.setProperty("--theme-colors-hue",t.themeColorsHue.value.toString())},{immediate:!0}),qe(t.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle("dynamic-hue",t.themeColorsHueDynamic.value)},{immediate:!0}),(r,s)=>(ln(),bl(Rt(Zz),{"primary-color":"#FF57C8","secondary-color":"#946BFF","tertiary-color":"#121212",colors:Rt(i)?["#FF57C8","#946BFF","#64BCFF","#121212"]:["#FF57C8","#946BFF","#64BCFF","#FFFFFF"],"z-index":100,"disable-transitions":Rt(t).disableTransitions.value},{default:nb(()=>[an(Rt(PT))]),_:1},8,["colors","disable-transitions"]))}}),Mp=n=>n&&typeof n=="object"&&!Array.isArray(n),Lm=(n,...e)=>{if(!e.length)return n;const t=e.shift();if(Mp(n)&&Mp(t))for(const i in t)Mp(t[i])?(n[i]||Object.assign(n,{[i]:{}}),Lm(n[i],t[i])):Object.assign(n,{[i]:t[i]});return Lm(n,...e)},qT=Lm({},{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 DH="11.1.2";function OH(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(f_().__INTLIFY_PROD_DEVTOOLS__=!1)}const pi={UNEXPECTED_RETURN_TYPE:Jz,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 Pi(n,...e){return td(n,null,void 0)}const Am=ds("__translateVNode"),Cm=ds("__datetimeParts"),Rm=ds("__numberParts"),NH=ds("__setPluralRules"),UH=ds("__injectWithOption"),Pm=ds("__dispose");function Zl(n){if(!mt(n))return n;for(const e in n)if(Ei(n,e))if(!e.includes("."))mt(n[e])&&Zl(n[e]);else{const t=e.split("."),i=t.length-1;let r=n,s=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||Tt(),Xu(c,o[l])):Xu(c,o)}else Le(a)&&Xu(JSON.parse(a),o)}),r==null&&s)for(const a in o)Ei(o,a)&&Zl(o[a]);return o}function HT(n){return n.type}function FH(n,e,t){let i=mt(e.messages)?e.messages:Tt();"__i18nGlobal"in t&&(i=zT(n.locale.value,{messages:i,__i18n:t.__i18nGlobal}));const r=Object.keys(i);r.length&&r.forEach(s=>{n.mergeLocaleMessage(s,i[s])});{if(mt(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(o=>{n.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(mt(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(o=>{n.mergeNumberFormat(o,e.numberFormats[o])})}}}function fx(n){return an(tc,null,n,0)}const hx="__INTLIFY_META__",dx=()=>[],BH=()=>!1;let px=0;function mx(n){return(e,t,i,r)=>n(t,i,On()||void 0,r)}const kH=()=>{const n=On();let e=null;return n&&(e=HT(n)[hx])?{[hx]:e}:null};function GT(n={}){const{__root:e,__injectWithOption:t}=n,i=e===void 0,r=n.flatJson,s=Yf?Xe:Ve;let o=Dt(n.inheritLocale)?n.inheritLocale:!0;const a=s(e&&o?e.locale.value:Le(n.locale)?n.locale:Kf),l=s(e&&o?e.fallbackLocale.value:Le(n.fallbackLocale)||jt(n.fallbackLocale)||lt(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:a.value),c=s(zT(a.value,n)),u=s(lt(n.datetimeFormats)?n.datetimeFormats:{[a.value]:{}}),f=s(lt(n.numberFormats)?n.numberFormats:{[a.value]:{}});let h=e?e.missingWarn:Dt(n.missingWarn)||jf(n.missingWarn)?n.missingWarn:!0,d=e?e.fallbackWarn:Dt(n.fallbackWarn)||jf(n.fallbackWarn)?n.fallbackWarn:!0,p=e?e.fallbackRoot:Dt(n.fallbackRoot)?n.fallbackRoot:!0,_=!!n.fallbackFormat,g=Lt(n.missing)?n.missing:null,m=Lt(n.missing)?mx(n.missing):null,y=Lt(n.postTranslation)?n.postTranslation:null,x=e?e.warnHtmlMessage:Dt(n.warnHtmlMessage)?n.warnHtmlMessage:!0,v=!!n.escapeParameter;const E=e?e.modifiers:lt(n.modifiers)?n.modifiers:{};let T=n.pluralRules||e&&e.pluralRules,M;M=(()=>{i&&nx(null);const U={version:DH,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:E,pluralRules:T,missing:m===null?void 0:m,missingWarn:h,fallbackWarn:d,fallbackFormat:_,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:x,escapeParameter:v,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};U.datetimeFormats=u.value,U.numberFormats=f.value,U.__datetimeFormatters=lt(M)?M.__datetimeFormatters:void 0,U.__numberFormatters=lt(M)?M.__numberFormatters:void 0;const z=vH(U);return i&&nx(z),z})(),Va(M,a.value,l.value);function b(){return[a.value,l.value,c.value,u.value,f.value]}const S=Ce({get:()=>a.value,set:U=>{M.locale=U,a.value=U}}),D=Ce({get:()=>l.value,set:U=>{M.fallbackLocale=U,l.value=U,Va(M,a.value,U)}}),B=Ce(()=>c.value),H=Ce(()=>u.value),$=Ce(()=>f.value);function ee(){return Lt(y)?y:null}function Z(U){y=U,M.postTranslation=U}function te(){return g}function Q(U){U!==null&&(m=mx(U)),g=U,M.missing=m}const pe=(U,z,Y,he,ce,ye)=>{b();let Ue;try{__INTLIFY_PROD_DEVTOOLS__,i||(M.fallbackContext=e?_H():void 0),Ue=U(M)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(M.fallbackContext=void 0)}if(Y!=="translate exists"&&$t(Ue)&&Ue===nd||Y==="translate exists"&&!Ue){const[me,Ee]=z();return e&&p?he(e):ce(me)}else{if(ye(Ue))return Ue;throw Pi(pi.UNEXPECTED_RETURN_TYPE)}};function ve(...U){return pe(z=>Reflect.apply(ux,null,[z,...U]),()=>wm(...U),"translate",z=>Reflect.apply(z.t,z,[...U]),z=>z,z=>Le(z))}function re(...U){const[z,Y,he]=U;if(he&&!mt(he))throw Pi(pi.INVALID_ARGUMENT);return ve(z,Y,tn({resolvedMessage:!0},he||{}))}function xe(...U){return pe(z=>Reflect.apply(rx,null,[z,...U]),()=>Em(...U),"datetime format",z=>Reflect.apply(z.d,z,[...U]),()=>ex,z=>Le(z))}function ze(...U){return pe(z=>Reflect.apply(ox,null,[z,...U]),()=>Tm(...U),"number format",z=>Reflect.apply(z.n,z,[...U]),()=>ex,z=>Le(z))}function se(U){return U.map(z=>Le(z)||$t(z)||Dt(z)?fx(String(z)):z)}const be={normalize:se,interpolate:U=>U,type:"vnode"};function W(...U){return pe(z=>{let Y;const he=z;try{he.processor=be,Y=Reflect.apply(ux,null,[he,...U])}finally{he.processor=null}return Y},()=>wm(...U),"translate",z=>z[Am](...U),z=>[fx(z)],z=>jt(z))}function ae(...U){return pe(z=>Reflect.apply(ox,null,[z,...U]),()=>Tm(...U),"number format",z=>z[Rm](...U),dx,z=>Le(z)||jt(z))}function ue(...U){return pe(z=>Reflect.apply(rx,null,[z,...U]),()=>Em(...U),"datetime format",z=>z[Cm](...U),dx,z=>Le(z)||jt(z))}function le(U){T=U,M.pluralRules=T}function De(U,z){return pe(()=>{if(!U)return!1;const Y=Le(z)?z:a.value,he=w(Y),ce=M.messageResolver(he,U);return da(ce)||oi(ce)||Le(ce)},()=>[U],"translate exists",Y=>Reflect.apply(Y.te,Y,[U,z]),BH,Y=>Dt(Y))}function I(U){let z=null;const Y=IT(M,l.value,a.value);for(let he=0;he{o&&(a.value=U,M.locale=U,Va(M,a.value,l.value))}),qe(e.fallbackLocale,U=>{o&&(l.value=U,M.fallbackLocale=U,Va(M,a.value,l.value))}));const k={id:px,locale:S,fallbackLocale:D,get inheritLocale(){return o},set inheritLocale(U){o=U,U&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,Va(M,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:B,get modifiers(){return E},get pluralRules(){return T||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(U){h=U,M.missingWarn=h},get fallbackWarn(){return d},set fallbackWarn(U){d=U,M.fallbackWarn=d},get fallbackRoot(){return p},set fallbackRoot(U){p=U},get fallbackFormat(){return _},set fallbackFormat(U){_=U,M.fallbackFormat=_},get warnHtmlMessage(){return x},set warnHtmlMessage(U){x=U,M.warnHtmlMessage=U},get escapeParameter(){return v},set escapeParameter(U){v=U,M.escapeParameter=U},t:ve,getLocaleMessage:w,setLocaleMessage:j,mergeLocaleMessage:G,getPostTranslationHandler:ee,setPostTranslationHandler:Z,getMissingHandler:te,setMissingHandler:Q,[NH]:le};return k.datetimeFormats=H,k.numberFormats=$,k.rt=re,k.te=De,k.tm=L,k.d=xe,k.n=ze,k.getDateTimeFormat=q,k.setDateTimeFormat=R,k.mergeDateTimeFormat=N,k.getNumberFormat=V,k.setNumberFormat=A,k.mergeNumberFormat=C,k[UH]=t,k[Am]=W,k[Cm]=ue,k[Rm]=ae,k}const v_={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function VH({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((i,r)=>[...i,...r.type===Wt?r.children:[r]],[]):e.reduce((t,i)=>{const r=n[i];return r&&(t[i]=r()),t},Tt())}function WT(){return Wt}const zH=nn({name:"i18n-t",props:tn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>$t(n)||!isNaN(n)}},v_),setup(n,e){const{slots:t,attrs:i}=e,r=n.i18n||id({useScope:n.scope,__useComponent:!0});return()=>{const s=Object.keys(t).filter(f=>f!=="_"),o=Tt();n.locale&&(o.locale=n.locale),n.plural!==void 0&&(o.plural=Le(n.plural)?+n.plural:n.plural);const a=VH(e,s),l=r[Am](n.keypath,a,o),c=tn(Tt(),i),u=Le(n.tag)||mt(n.tag)?n.tag:WT();return br(u,c,l)}}}),gx=zH;function HH(n){return jt(n)&&!Le(n[0])}function XT(n,e,t,i){const{slots:r,attrs:s}=e;return()=>{const o={part:!0};let a=Tt();n.locale&&(o.locale=n.locale),Le(n.format)?o.key=n.format:mt(n.format)&&(Le(n.format.key)&&(o.key=n.format.key),a=Object.keys(n.format).reduce((h,d)=>t.includes(d)?tn(Tt(),h,{[d]:n.format[d]}):h,Tt()));const l=i(n.value,o,a);let c=[o.key];jt(l)?c=l.map((h,d)=>{const p=r[h.type],_=p?p({[h.type]:h.value,index:d,parts:l}):[h.value];return HH(_)&&(_[0].key=`${h.type}-${d}`),_}):Le(l)&&(c=[l]);const u=tn(Tt(),s),f=Le(n.tag)||mt(n.tag)?n.tag:WT();return br(f,u,c)}}const GH=nn({name:"i18n-n",props:tn({value:{type:Number,required:!0},format:{type:[String,Object]}},v_),setup(n,e){const t=n.i18n||id({useScope:n.scope,__useComponent:!0});return XT(n,e,BT,(...i)=>t[Rm](...i))}}),_x=GH;function WH(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 XH(n){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw Pi(pi.UNEXPECTED_ERROR);const c=WH(n,a.$),u=vx(l);return[Reflect.apply(c.t,c,[...yx(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);Yf&&n.global===c&&(o.__i18nWatcher=qe(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{Yf&&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=vx(a);o.textContent=Reflect.apply(l.t,l,[...yx(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function vx(n){if(Le(n))return{path:n};if(lt(n)){if(!("path"in n))throw Pi(pi.REQUIRED_VALUE,"path");return n}else throw Pi(pi.INVALID_VALUE)}function yx(n){const{path:e,locale:t,args:i,choice:r,plural:s}=n,o={},a=i||{};return Le(t)&&(o.locale=t),$t(r)&&(o.plural=r),$t(s)&&(o.plural=s),[e,a,o]}function $H(n,e,...t){const i=lt(t[0])?t[0]:{};(Dt(i.globalInstall)?i.globalInstall:!0)&&([gx.name,"I18nT"].forEach(s=>n.component(s,gx)),[_x.name,"I18nN"].forEach(s=>n.component(s,_x)),[bx.name,"I18nD"].forEach(s=>n.component(s,bx))),n.directive("t",XH(e))}const qH=ds("global-vue-i18n");function YH(n={}){const e=Dt(n.globalInjection)?n.globalInjection:!0,t=new Map,[i,r]=jH(n),s=ds("");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__=s,u.provide(u.__VUE_I18N_SYMBOL__,c),lt(f[0])){const p=f[0];c.__composerExtend=p.__composerExtend,c.__vueI18nExtend=p.__vueI18nExtend}let h=null;e&&(h=i4(u,c.global)),$H(u,c,...f);const d=u.unmount;u.unmount=()=>{h&&h(),c.dispose(),d()}},get global(){return r},dispose(){i.stop()},__instances:t,__getInstance:o,__setInstance:a,__deleteInstance:l};return c}function id(n={}){const e=On();if(e==null)throw Pi(pi.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Pi(pi.NOT_INSTALLED);const t=KH(e),i=JH(t),r=HT(e),s=ZH(n,r);if(s==="global")return FH(i,n,r),i;if(s==="parent"){let l=QH(t,e,n.__useComponent);return l==null&&(l=i),l}const o=t;let a=o.__getInstance(e);if(a==null){const l=tn({},n);"__i18n"in r&&(l.__i18n=r.__i18n),i&&(l.__root=i),a=GT(l),o.__composerExtend&&(a[Pm]=o.__composerExtend(a)),t4(o,e,a),o.__setInstance(e,a)}return a}function jH(n,e){const t=Ql(),i=t.run(()=>GT(n));if(i==null)throw Pi(pi.UNEXPECTED_ERROR);return[t,i]}function KH(n){const e=In(n.isCE?qH:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Pi(n.isCE?pi.NOT_INSTALLED_WITH_PROVIDE:pi.UNEXPECTED_ERROR);return e}function ZH(n,e){return ed(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function JH(n){return n.mode==="composition"?n.global:n.global.__composer}function QH(n,e,t=!1){let i=null;const r=e.root;let s=e4(e,t);for(;s!=null;){const o=n;if(n.mode==="composition"&&(i=o.__getInstance(s)),i!=null||r===s)break;s=s.parent}return i}function e4(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function t4(n,e,t){Nn(()=>{},e),$i(()=>{const i=t;n.__deleteInstance(e);const r=i[Pm];r&&(r(),delete i[Pm])},e)}const n4=["locale","fallbackLocale","availableLocales"],xx=["t","rt","d","n","tm","te"];function i4(n,e){const t=Object.create(null);return n4.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s)throw Pi(pi.UNEXPECTED_ERROR);const o=Mt(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(t,r,o)}),n.config.globalProperties.$i18n=t,xx.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s||!s.value)throw Pi(pi.UNEXPECTED_ERROR);Object.defineProperty(n.config.globalProperties,`$${r}`,s)}),()=>{delete n.config.globalProperties.$i18n,xx.forEach(r=>{delete n.config.globalProperties[`$${r}`]})}}const r4=nn({name:"i18n-d",props:tn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},v_),setup(n,e){const t=n.i18n||id({useScope:n.scope,__useComponent:!0});return XT(n,e,FT,(...i)=>t[Cm](...i))}}),bx=r4;OH();hH(qz);dH(cH);pH(IT);if(__INTLIFY_PROD_DEVTOOLS__){const n=f_();n.__INTLIFY__=!0,Yz(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const s4=nn({__name:"App",setup(n){const e=id(),t=Ak(NV()),i=UN();return qe(t.language,()=>{e.locale.value=t.language.value}),qe(t.themeColorsHue,()=>{document.documentElement.style.setProperty("--theme-colors-hue",t.themeColorsHue.value.toString())},{immediate:!0}),qe(t.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle("dynamic-hue",t.themeColorsHueDynamic.value)},{immediate:!0}),(r,s)=>(ln(),bl(Rt(KV),{"primary-color":"#FF57C8","secondary-color":"#946BFF","tertiary-color":"#121212",colors:Rt(i)?["#FF57C8","#946BFF","#64BCFF","#121212"]:["#FF57C8","#946BFF","#64BCFF","#FFFFFF"],"z-index":100,"disable-transitions":Rt(t).disableTransitions.value},{default:tb(()=>[an(Rt(RT))]),_:1},8,["colors","disable-transitions"]))}}),Mp=n=>n&&typeof n=="object"&&!Array.isArray(n),Im=(n,...e)=>{if(!e.length)return n;const t=e.shift();if(Mp(n)&&Mp(t))for(const i in t)Mp(t[i])?(n[i]||Object.assign(n,{[i]:{}}),Im(n[i],t[i])):Object.assign(n,{[i]:t[i]});return Im(n,...e)},$T=Im({},{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. @@ -3900,4 +3900,4 @@ And the last, do what ever you want! - <|DELAY:3|> (延迟 3 秒) 最后,做任何你想做的事! -`}}},settings:{"elevenlabs-api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs API 密钥"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入您的 ElevenLabs API 密钥"}},placeholder_mobile:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs API Key"}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"从文件加载"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"选择"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"从 URL 加载"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"加载"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"输入 Live2D 模型 URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"更换模型"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"播放动作"}},title:{t:0,b:{t:2,i:[{t:3}],s:"映射动作"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D 设置"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"麦克风"}},"model-provider":{title:{t:0,b:{t:2,i:[{t:3}],s:"模型提供商"}}},models:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},"openai-api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI API 密钥"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入您的 API 密钥"}},placeholder_mobile:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI API Key"}}},"openai-base-url":{label:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI API BaseURL"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入您的 API BaseURL"}},placeholder_mobile:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI BaseURL"}}},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:"声线"}},modules:{consciousness:{"provider-model-selection":{title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"获取模型中..."}},error:{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:"该提供商的模型列表没有返回任何的数据"}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"无法列出模型"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"此提供商不支持列出模型的功能"}},custom_model_placeholder:{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:"输入与该提供商一起使用的模型名字"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"Show more"}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"Show less"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search models..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"Found "},{t:4,k:"count"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" models"}]}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"No matching models"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"No models match '"},{t:4,k:"query"},{t:3,v:"'. Try a different search term."}]}},expand:{t:0,b:{t:2,i:[{t:3}],s:"Expand"}},collapse:{t:0,b:{t:2,i:[{t:3}],s:"Collapse"}}}}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"核心系统"}},you:{t:0,b:{t:2,i:[{t:3}],s:"你"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"聊天"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"换装"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"自定义"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"消息"}},operations:{"load-models":{t:0,b:{t:2,i:[{t:3}],s:"加载推理模型"}},"load-models-status":{loading:{t:0,b:{t:2,i:[{t:3}],s:"加载中"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"已就绪"}}}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"选择一个音频输入设备"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"选择一个声线"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"表情"}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"等待中"}}},providers:{openrouter:{name:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}},description:{t:0,b:{t:2,i:[{t:3}],s:"openrouter.ai"}}},openai:{name:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}},description:{t:0,b:{t:2,i:[{t:3}],s:"openai.com"}}},ollama:{name:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}},description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}}},vllm:{name:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}},description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}}},elevenlabs:{name:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs"}},description:{t:0,b:{t:2,i:[{t:3}],s:"elevenlabs.io"}}},xai:{name:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}},description:{t:0,b:{t:2,i:[{t:3}],s:"x.ai"}}},deepseek:{name:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek"}},description:{t:0,b:{t:2,i:[{t:3}],s:"deepseek.com"}}},together:{name:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}},description:{t:0,b:{t:2,i:[{t:3}],s:"together.ai"}}},novita:{name:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}},description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}}},fireworks:{name:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}},description:{t:0,b:{t:2,i:[{t:3}],s:"fireworks.ai"}}},cloudflare:{name:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Workers AI"}},description:{t:0,b:{t:2,i:[{t:3}],s:"cloudflare.com"}}},mistral:{name:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}},description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}}},moonshot:{name:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot AI"}},description:{t:0,b:{t:2,i:[{t:3}],s:"moonshot.ai"}}}}}}),a4=jH({locale:l4(),fallbackLocale:"en",messages:qT});function l4(){const n=localStorage.getItem("settings/language"),e=Object.keys(qT);return n&&e.includes(n)?n:"en"}const c4=bk(),u4=Rk(Oz);let yc;yc=Iz({routes:u4,history:az()});yc.beforeEach((n,e)=>{n.path!==e.path&&hT.start()});yc.afterEach(()=>{hT.done()});yc.isReady().then(async()=>{}).catch(()=>{});w1(o4).use(gk).use($1).use(yc).use(c4).use(a4).use(bU).mount("#app");export{Cn as $,S4 as A,Mt as B,lA as C,T4 as D,Ak as E,Wt as F,kn as G,Az as H,b4 as I,I4 as J,zA as K,Nz as L,yE as M,em as N,jx as O,go as P,qi as Q,PT as R,H4 as S,x4 as T,zN as U,B4 as V,cs as W,g4 as X,kN as Y,M4 as Z,vo as _,Gr as a,gn as a$,HA as a0,Qr as a1,Sr as a2,In as a3,Jr as a4,$n as a5,On as a6,p4 as a7,rn as a8,rs as a9,Y1 as aA,pE as aB,G4 as aC,Ki as aD,F as aE,nI as aF,Yn as aG,Wh as aH,fe as aI,Xt as aJ,va as aK,Xr as aL,ft as aM,kf as aN,Te as aO,rt as aP,Ah as aQ,co as aR,Ri as aS,Ln as aT,GS as aU,Wn as aV,ni as aW,We as aX,Dn as aY,ht as aZ,sI as a_,Yx as aa,od as ab,ti as ac,V4 as ad,wN as ae,d4 as af,ah as ag,hi as ah,D4 as ai,A4 as aj,C4 as ak,P4 as al,R4 as am,_n as an,f4 as ao,kA as ap,Zm as aq,Ym as ar,st as as,N4 as at,ze as au,jg as av,L4 as aw,O4 as ax,YN as ay,q1 as az,an as b,Ch as b$,bg as b0,xa as b1,_4 as b2,w4 as b3,Mi as b4,th as b5,Bm as b6,ic as b7,zt as b8,ho as b9,nC as bA,rC as bB,iC as bC,jn as bD,jp as bE,wr as bF,dM as bG,lo as bH,wn as bI,AM as bJ,CM as bK,RM as bL,KS as bM,la as bN,ct as bO,EP as bP,PP as bQ,wg as bR,vn as bS,Un as bT,Og as bU,jS as bV,Zi as bW,is as bX,JS as bY,QS as bZ,$o as b_,ji as ba,_a as bb,Wi as bc,Rh as bd,Bt as be,Pn as bf,Et as bg,Il as bh,wh as bi,Cr as bj,Xi as bk,cn as bl,li as bm,hM as bn,kp as bo,rI as bp,Xg as bq,Bu as br,lg as bs,Wo as bt,Yt as bu,Za as bv,Hi as bw,Rl as bx,Pl as by,xI as bz,ui as c,Gl as c0,Tg as c1,Hl as c2,Vl as c3,pc as c4,at as c5,Mr as c6,dc as c7,jP as c8,xU as c9,_k as ca,Sm as cb,$4 as cc,F4 as cd,k4 as ce,E4 as cf,v4 as cg,y4 as ch,X4 as ci,W4 as cj,Wl as ck,us as cl,Me as cm,Qe as cn,bC as co,tI as cp,yI as cq,Gt as cr,nn as d,Rt as e,cA as f,Xe as g,Ce as h,FN as i,bl as j,nb as k,U4 as l,$_ as m,gi as n,ln as o,Nn as p,ma as q,m4 as r,Dz as s,mw as t,z4 as u,id as v,qe as w,Ck as x,Uz as y,h4 as z}; +`}}},settings:{"elevenlabs-api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs API 密钥"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入您的 ElevenLabs API 密钥"}},placeholder_mobile:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs API Key"}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"从文件加载"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"选择"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"从 URL 加载"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"加载"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"输入 Live2D 模型 URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"更换模型"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"播放动作"}},title:{t:0,b:{t:2,i:[{t:3}],s:"映射动作"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D 设置"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"麦克风"}},"model-provider":{title:{t:0,b:{t:2,i:[{t:3}],s:"模型提供商"}}},models:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},"openai-api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI API 密钥"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入您的 API 密钥"}},placeholder_mobile:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI API Key"}}},"openai-base-url":{label:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI API BaseURL"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入您的 API BaseURL"}},placeholder_mobile:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI BaseURL"}}},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:"声线"}},modules:{consciousness:{"provider-model-selection":{title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"获取模型中..."}},error:{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:"该提供商的模型列表没有返回任何的数据"}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"无法列出模型"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"此提供商不支持列出模型的功能"}},custom_model_placeholder:{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:"输入与该提供商一起使用的模型名字"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"Show more"}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"Show less"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search models..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"Found "},{t:4,k:"count"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" models"}]}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"No matching models"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"No models match '"},{t:4,k:"query"},{t:3,v:"'. Try a different search term."}]}},expand:{t:0,b:{t:2,i:[{t:3}],s:"Expand"}},collapse:{t:0,b:{t:2,i:[{t:3}],s:"Collapse"}}}}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"核心系统"}},you:{t:0,b:{t:2,i:[{t:3}],s:"你"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"聊天"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"换装"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"自定义"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"消息"}},operations:{"load-models":{t:0,b:{t:2,i:[{t:3}],s:"加载推理模型"}},"load-models-status":{loading:{t:0,b:{t:2,i:[{t:3}],s:"加载中"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"已就绪"}}}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"选择一个音频输入设备"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"选择一个声线"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"表情"}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"等待中"}}},providers:{openrouter:{name:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}},description:{t:0,b:{t:2,i:[{t:3}],s:"openrouter.ai"}}},openai:{name:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}},description:{t:0,b:{t:2,i:[{t:3}],s:"openai.com"}}},ollama:{name:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}},description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}}},vllm:{name:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}},description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}}},elevenlabs:{name:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs"}},description:{t:0,b:{t:2,i:[{t:3}],s:"elevenlabs.io"}}},xai:{name:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}},description:{t:0,b:{t:2,i:[{t:3}],s:"x.ai"}}},deepseek:{name:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek"}},description:{t:0,b:{t:2,i:[{t:3}],s:"deepseek.com"}}},together:{name:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}},description:{t:0,b:{t:2,i:[{t:3}],s:"together.ai"}}},novita:{name:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}},description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}}},fireworks:{name:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}},description:{t:0,b:{t:2,i:[{t:3}],s:"fireworks.ai"}}},cloudflare:{name:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Workers AI"}},description:{t:0,b:{t:2,i:[{t:3}],s:"cloudflare.com"}}},mistral:{name:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}},description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}}},moonshot:{name:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot AI"}},description:{t:0,b:{t:2,i:[{t:3}],s:"moonshot.ai"}}}}}}),o4=YH({locale:a4(),fallbackLocale:"en",messages:$T});function a4(){const n=localStorage.getItem("settings/language"),e=Object.keys($T);return n&&e.includes(n)?n:"en"}const l4=xk(),c4=Ck(DV);let yc;yc=PV({routes:c4,history:oV()});yc.beforeEach((n,e)=>{n.path!==e.path&&fT.start()});yc.afterEach(()=>{fT.done()});yc.isReady().then(async()=>{}).catch(()=>{});T1(s4).use(mk).use(X1).use(yc).use(l4).use(o4).use(xU).mount("#app");export{zA as $,b4 as A,Mt as B,aA as C,E4 as D,x4 as E,Wt as F,wV as G,M4 as H,P4 as I,kA as J,OV as K,vE as L,em as M,Yx as N,go as O,$i as P,z4 as Q,RT as R,kN as S,y4 as T,F4 as U,cs as V,m4 as W,BN as X,S4 as Y,Cn as Z,vo as _,Gr as a,gn as a$,Qr as a0,br as a1,In as a2,Jr as a3,Xn as a4,On as a5,d4 as a6,rn as a7,rs as a8,qx as a9,q1 as aA,dE as aB,H4 as aC,ji as aD,F as aE,tI as aF,qn as aG,Wh as aH,fe as aI,Xt as aJ,va as aK,Xr as aL,ft as aM,kf as aN,Te as aO,rt as aP,Ah as aQ,co as aR,Ci as aS,Ln as aT,HS as aU,Gn as aV,ti as aW,We as aX,Dn as aY,ht as aZ,rI as a_,od as aa,ei as ab,V4 as ac,TN as ad,h4 as ae,ah as af,fi as ag,L4 as ah,w4 as ai,A4 as aj,R4 as ak,C4 as al,_n as am,u4 as an,BA as ao,Km as ap,qm as aq,wk as ar,st as as,O4 as at,Ve as au,Yg as av,I4 as aw,D4 as ax,qN as ay,$1 as az,an as b,Ch as b$,xg as b0,xa as b1,g4 as b2,T4 as b3,Si as b4,th as b5,Fm as b6,ic as b7,zt as b8,ho as b9,tC as bA,iC as bB,nC as bC,Yn as bD,jp as bE,Tr as bF,hM as bG,lo as bH,wn as bI,wM as bJ,AM as bK,CM as bL,jS as bM,la as bN,ct as bO,MP as bP,RP as bQ,Tg as bR,vn as bS,Un as bT,Dg as bU,YS as bV,Ki as bW,is as bX,ZS as bY,JS as bZ,$o as b_,Yi as ba,_a as bb,Gi as bc,Rh as bd,kt as be,Pn as bf,Et as bg,Il as bh,wh as bi,Ar as bj,Wi as bk,cn as bl,ai as bm,fM as bn,kp as bo,iI as bp,Wg as bq,Bu as br,ag as bs,Wo as bt,Yt as bu,Za as bv,zi as bw,Rl as bx,Pl as by,yI as bz,ci as c,Gl as c0,Eg as c1,Hl as c2,zl as c3,pc as c4,at as c5,Sr as c6,dc as c7,YP as c8,yU as c9,gk as ca,U4 as cb,B4 as cc,Fr as cd,_4 as ce,v4 as cf,W4 as cg,G4 as ch,Wl as ci,us as cj,Me as ck,Qe as cl,xC as cm,eI as cn,vI as co,Bt as cp,nn as d,Rt as e,lA as f,Xe as g,Ce as h,UN as i,bl as j,tb as k,N4 as l,X_ as m,mi as n,ln as o,Nn as p,ma as q,p4 as r,LV as s,pw as t,k4 as u,id as v,qe as w,Ak as x,NV as y,f4 as z}; diff --git a/assets/messages-CXAlPtRI.js b/assets/messages-BElHmTzU.js similarity index 76% rename from assets/messages-CXAlPtRI.js rename to assets/messages-BElHmTzU.js index 64f3ab2566d6406c78b22a57dce5b6dbb847f7d9..df9fbab3f6f5021258e908226e1a96980a8fd109 100644 --- a/assets/messages-CXAlPtRI.js +++ b/assets/messages-BElHmTzU.js @@ -1 +1 @@ -import{_ as m}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-CfG2YTbd.js";import"./Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js";import"./emotions-D2WM87AE.js";import{u as g}from"./queue-DqQ_HXOh.js";import{b as _,l as v}from"./queues-wwQOO-CJ.js";import{d as b,g as t,c as l,o as u,a as e,b as x,e as k,t as c,F as h,C as z}from"./index-SpDrDth7.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},V={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},y={"w-full":"",flex:"","flex-row":"","gap-4":""},C={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=b({__name:"messages",setup(M){const s=t(""),r=t([]),a=t(!1),p=g({handlers:[async i=>{r.value.push(i.data)}]}),d=_(p);async function f(){a.value=!0,d.add(s.value),d.add(v),s.value="",a.value=!1}return(i,n)=>(u(),l("div",w,[e("div",S,[x(k(m),{modelValue:s.value,"onUpdate:modelValue":n[0]||(n[0]=o=>s.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:f},null,8,["modelValue"]),e("button",V,c(a.value?"Processing...":"Send"),1)]),e("div",y,[e("div",C,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(h,null,z(r.value,o=>(u(),l("div",{key:o},[e("div",null,c(o),1)]))),128))])])]))}});export{N as default}; +import{_ as m}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-DTJgscnz.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{u as g}from"./queue-BJ5EFzA4.js";import{b as _,l as v}from"./queues-Bj3v4TZ0.js";import{d as b,g as t,c as l,o as u,a as e,b as x,e as k,t as c,F as h,C as z}from"./index-lQIQ1Nea.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},V={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},y={"w-full":"",flex:"","flex-row":"","gap-4":""},C={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=b({__name:"messages",setup(M){const s=t(""),r=t([]),a=t(!1),p=g({handlers:[async i=>{r.value.push(i.data)}]}),d=_(p);async function f(){a.value=!0,d.add(s.value),d.add(v),s.value="",a.value=!1}return(i,n)=>(u(),l("div",w,[e("div",S,[x(k(m),{modelValue:s.value,"onUpdate:modelValue":n[0]||(n[0]=o=>s.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:f},null,8,["modelValue"]),e("button",V,c(a.value?"Processing...":"Send"),1)]),e("div",y,[e("div",C,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(h,null,z(r.value,o=>(u(),l("div",{key:o},[e("div",null,c(o),1)]))),128))])])]))}});export{N as default}; diff --git a/assets/openai-Cno5TrKr.js b/assets/openai-Cno5TrKr.js new file mode 100644 index 0000000000000000000000000000000000000000..dcdf2d23b7b29c49acd38518294ac69400eb835a --- /dev/null +++ b/assets/openai-Cno5TrKr.js @@ -0,0 +1 @@ +import{d as b,s as g,x as k,g as l,I as w,p as z,w as y,c as U,o as V,a as e,e as i,z as u,J as _,E as p,b as C,k as x,q as A,F as B}from"./index-lQIQ1Nea.js";import{_ as I}from"./Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{u as K}from"./providers-B5WAuhMk.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";const R={flex:"~ row","items-center":"","gap-2":""},T={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},E={flex:"~ col gap-6"},N={"max-w-full":""},F={grid:"~ cols-2 gap-4"},L=["onClick"],M={"mt-4":""},O={grid:"~ cols-2 gap-4"},G=b({__name:"openai",setup(P){var r,d;const v=g(),m=K(),{providers:a}=k(m),n=l(((r=a.value.openai)==null?void 0:r.apiKey)||""),s=l(((d=a.value.openai)==null?void 0:d.baseUrl)||""),c=l(!1),f=w(c);return z(()=>{a.value.openai||(a.value.openai={baseUrl:"https://api.openai.com/v1/"})}),y([n,s],()=>{a.value.openai={apiKey:n.value,baseUrl:s.value||"https://api.openai.com/v1/"}}),(S,t)=>(V(),U(B,null,[e("div",R,[e("button",{onClick:t[0]||(t[0]=o=>i(v).back())},t[3]||(t[3]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t[4]||(t[4]=e("h1",{relative:""},[e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Provider")]),e("div",{"text-3xl":"","font-semibold":""}," OpenAI ")],-1))]),e("div",T,[e("div",null,[e("div",E,[t[6]||(t[6]=e("div",null,[e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"}," Basic "),e("div",{text:"neutral-400 dark:neutral-500"},[e("span",null,"Essential settings")])],-1)),e("div",N,[e("label",F,[t[5]||(t[5]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"},[_(" API Key "),e("span",{class:"text-red-500"},"*")]),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400","text-nowrap":""}," API Key for OpenAI ")],-1)),u(e("input",{"onUpdate:modelValue":t[1]||(t[1]=o=>n.value=o),type:"password",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:"sk-..."},null,512),[[p,n.value]])])])])]),e("div",null,[C(i(I),{"w-full":""},{trigger:x(o=>[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:()=>o.setVisible(!o.visible)&&i(f)()},[t[8]||(t[8]=e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},[e("span",null,"Advanced")],-1)),e("div",{transform:"",transition:"transform duration-250",class:A({"rotate-180":o.visible})},t[7]||(t[7]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,L)]),default:x(()=>[e("div",M,[e("label",O,[t[9]||(t[9]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," Base URL "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Custom base URL (optional) ")],-1)),u(e("input",{"onUpdate:modelValue":t[2]||(t[2]=o=>s.value=o),type:"text",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:"https://api.openai.com/v1/"},null,512),[[p,s.value]])])])]),_:1})])]),t[10]||(t[10]=e("div",{fixed:"","bottom-0":"","right-0":"",text:"neutral-100/80 dark:neutral-500/20"},[e("div",{text:"40","i-lobe-icons:openai":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});export{G as default}; diff --git a/assets/openai-DzkjcTpL.js b/assets/openai-DzkjcTpL.js deleted file mode 100644 index 85d3b8e5d5dd9abd61f3a335c8899d08fa7928bb..0000000000000000000000000000000000000000 --- a/assets/openai-DzkjcTpL.js +++ /dev/null @@ -1 +0,0 @@ -import{d as b,s as g,x as w,g as s,J as k,p as z,w as y,c as U,o as V,a as e,e as l,b as C,z as u,K as A,I as p,k as v,q as K,D as B,F as I}from"./index-SpDrDth7.js";import{_ as R}from"./Collapsable.vue_vue_type_script_setup_true_lang-BcCSAMoU.js";import"./Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js";import"./emotions-D2WM87AE.js";import{u as T}from"./providers-CpyZMi_V.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js";const M={flex:"~ row","items-center":"","gap-2":""},N={grid:"~ cols-2 gap-4"},S=["onClick"],D={"mt-4":""},F={grid:"~ cols-2 gap-4"},j=b({__name:"openai",setup(L){var r,d;const x=g(),m=T(),{providers:n}=w(m),a=s(((r=n.value.openai)==null?void 0:r.apiKey)||""),i=s(((d=n.value.openai)==null?void 0:d.baseUrl)||""),f=s(!1),c=k(f);return z(()=>{n.value.openai||(n.value.openai={baseUrl:"https://api.openai.com/v1/"})}),y([a,i],()=>{n.value.openai={apiKey:a.value,baseUrl:i.value||"https://api.openai.com/v1/"}}),(O,t)=>(V(),U(I,null,[e("div",M,[e("button",{onClick:t[0]||(t[0]=o=>l(x).back())},t[3]||(t[3]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t[4]||(t[4]=e("h1",{relative:""},[e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Provider")]),e("div",{"text-3xl":"","font-semibold":""}," OpenAI ")],-1))]),e("form",{flex:"~ col gap-4",onSubmit:B(()=>{},["prevent"])},[t[9]||(t[9]=e("div",null,[e("h2",{"text-2xl":""},[e("span",null,"Basic")])],-1)),e("div",null,[e("label",N,[t[5]||(t[5]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"},[A(" API Key "),e("span",{class:"text-red-500"},"*")]),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400","text-nowrap":""}," API Key for OpenAI ")],-1)),u(e("input",{"onUpdate:modelValue":t[1]||(t[1]=o=>a.value=o),type:"password",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:"sk-..."},null,512),[[p,a.value]])])]),C(l(R),{"w-full":""},{trigger:v(o=>[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:()=>o.setVisible(!o.visible)&&l(c)()},[t[7]||(t[7]=e("h2",{"text-2xl":""},[e("span",null,"Advanced")],-1)),e("div",{transform:"",transition:"transform duration-250",class:K({"rotate-180":o.visible})},t[6]||(t[6]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,S)]),default:v(()=>[e("div",D,[e("label",F,[t[8]||(t[8]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," Base URL "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Custom base URL (optional) ")],-1)),u(e("input",{"onUpdate:modelValue":t[2]||(t[2]=o=>i.value=o),type:"text",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:"https://api.openai.com/v1/"},null,512),[[p,i.value]])])])]),_:1})],32),t[10]||(t[10]=e("div",{fixed:"","bottom-0":"","right-0":"",text:"neutral-100/80 dark:neutral-500/20"},[e("div",{text:"40","i-lobe-icons:openai":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});export{j as default}; diff --git a/assets/openrouter-CH2Z6_wJ.js b/assets/openrouter-CH2Z6_wJ.js deleted file mode 100644 index 2cff52278a02fbe99db35b6ecc57bf7baaea449b..0000000000000000000000000000000000000000 --- a/assets/openrouter-CH2Z6_wJ.js +++ /dev/null @@ -1 +0,0 @@ -import{d as C,s as K,x as D,h as B,g as v,J as M,p as N,w as h,c as A,o as I,a as e,e as p,t as b,b as P,z as g,K as R,I as w,k as z,q as k,D as S,F as T}from"./index-SpDrDth7.js";import{_ as F}from"./Collapsable.vue_vue_type_script_setup_true_lang-BcCSAMoU.js";import"./Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js";import"./emotions-D2WM87AE.js";import{u as L}from"./providers-CpyZMi_V.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js";const $={flex:"~ row","items-center":"","gap-2":""},q={relative:""},E={"text-3xl":"","font-semibold":""},J={grid:"~ cols-2 gap-4"},j={class:"text-xs text-zinc-500 dark:text-zinc-400","text-nowrap":""},G=["onClick"],H={"mt-4":""},O={grid:"~ cols-2 gap-4"},Q=["placeholder"],W={fixed:"","bottom-0":"","right-0":"",text:"neutral-100/80 dark:neutral-500/20"},a="openrouter-ai",le=C({__name:"openrouter",setup(X){var c,x;const y=K(),u=L(),{providers:i}=D(u),l=B(()=>u.getProviderMetadata(a)),n=v(((c=i.value[a])==null?void 0:c.apiKey)||""),r=v(((x=i.value[a])==null?void 0:x.baseUrl)||""),_=v(!1),U=M(_);return N(()=>{var s,t,d;u.initializeProvider(a),n.value=((s=i.value[a])==null?void 0:s.apiKey)||"",r.value=((t=i.value[a])==null?void 0:t.baseUrl)||((d=l.value)==null?void 0:d.baseUrlDefault)||""}),h([n,r],()=>{var s;i.value[a]={apiKey:n.value,baseUrl:r.value||((s=l.value)==null?void 0:s.baseUrlDefault)||""}}),(s,t)=>{var d,m,f;return I(),A(T,null,[e("div",$,[e("button",{onClick:t[0]||(t[0]=o=>p(y).back())},t[3]||(t[3]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e("h1",q,[t[4]||(t[4]=e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Provider")],-1)),e("div",E,b((d=l.value)==null?void 0:d.localizedName),1)])]),e("form",{flex:"~ col gap-4",onSubmit:S(()=>{},["prevent"])},[t[9]||(t[9]=e("div",null,[e("h2",{"text-2xl":""},[e("span",null,"Basic")])],-1)),e("div",null,[e("label",J,[e("div",null,[t[5]||(t[5]=e("div",{class:"flex items-center gap-1 text-sm font-medium"},[R(" API Key "),e("span",{class:"text-red-500"},"*")],-1)),e("div",j," API Key for "+b((m=l.value)==null?void 0:m.localizedName),1)]),g(e("input",{"onUpdate:modelValue":t[1]||(t[1]=o=>n.value=o),type:"password",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:"sk-or-..."},null,512),[[w,n.value]])])]),P(p(F),{"w-full":""},{trigger:z(o=>[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:()=>o.setVisible(!o.visible)&&p(U)()},[t[7]||(t[7]=e("h2",{"text-2xl":""},[e("span",null,"Advanced")],-1)),e("div",{transform:"",transition:"transform duration-250",class:k({"rotate-180":o.visible})},t[6]||(t[6]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,G)]),default:z(()=>{var o;return[e("div",H,[e("label",O,[t[8]||(t[8]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," Base URL "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Custom base URL (optional) ")],-1)),g(e("input",{"onUpdate:modelValue":t[2]||(t[2]=V=>r.value=V),type:"text",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:(o=l.value)==null?void 0:o.baseUrlDefault},null,8,Q),[[w,r.value]])])])]}),_:1})],32),e("div",W,[e("div",{text:"40",class:k((f=l.value)==null?void 0:f.icon),"translate-x-10":"","translate-y-10":""},null,2)])],64)}}});export{le as default}; diff --git a/assets/openrouter-DeKZSuQ4.js b/assets/openrouter-DeKZSuQ4.js new file mode 100644 index 0000000000000000000000000000000000000000..25962d9a9370b23040b0e6f87eafde42ff6c38f0 --- /dev/null +++ b/assets/openrouter-DeKZSuQ4.js @@ -0,0 +1 @@ +import{d as C,s as h,x as K,h as B,g as v,I as D,p as N,w as A,c as I,o as M,a as e,e as p,t as b,z as g,J as P,E as k,b as R,k as _,q as w,F as T}from"./index-lQIQ1Nea.js";import{_ as E}from"./Collapsable.vue_vue_type_script_setup_true_lang-BAV-V_-M.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{u as S}from"./providers-B5WAuhMk.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CCwiwh3o.js";const F={flex:"~ row","items-center":"","gap-2":""},L={relative:""},$={"text-3xl":"","font-semibold":""},q={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},J={flex:"~ col gap-6"},j={"max-w-full":""},G={grid:"~ cols-2 gap-4"},H={class:"text-xs text-zinc-500 dark:text-zinc-400","text-nowrap":""},O=["onClick"],Q={"mt-4":""},W={grid:"~ cols-2 gap-4"},X=["placeholder"],Y={fixed:"","bottom-0":"","right-0":"",text:"neutral-100/80 dark:neutral-500/20"},l="openrouter-ai",ne=C({__name:"openrouter",setup(Z){var x,c;const z=h(),u=S(),{providers:n}=K(u),o=B(()=>u.getProviderMetadata(l)),i=v(((x=n.value[l])==null?void 0:x.apiKey)||""),r=v(((c=n.value[l])==null?void 0:c.baseUrl)||""),y=v(!1),U=D(y);return N(()=>{var s,t,d;u.initializeProvider(l),i.value=((s=n.value[l])==null?void 0:s.apiKey)||"",r.value=((t=n.value[l])==null?void 0:t.baseUrl)||((d=o.value)==null?void 0:d.baseUrlDefault)||""}),A([i,r],()=>{var s;n.value[l]={apiKey:i.value,baseUrl:r.value||((s=o.value)==null?void 0:s.baseUrlDefault)||""}}),(s,t)=>{var d,m,f;return M(),I(T,null,[e("div",F,[e("button",{onClick:t[0]||(t[0]=a=>p(z).back())},t[3]||(t[3]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e("h1",L,[t[4]||(t[4]=e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Provider")],-1)),e("div",$,b((d=o.value)==null?void 0:d.localizedName),1)])]),e("div",q,[e("div",null,[e("div",J,[t[6]||(t[6]=e("div",null,[e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"}," Basic "),e("div",{text:"neutral-400 dark:neutral-500"},[e("span",null,"Essential settings")])],-1)),e("div",j,[e("label",G,[e("div",null,[t[5]||(t[5]=e("div",{class:"flex items-center gap-1 text-sm font-medium"},[P(" API Key "),e("span",{class:"text-red-500"},"*")],-1)),e("div",H," API Key for "+b((m=o.value)==null?void 0:m.localizedName),1)]),g(e("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>i.value=a),type:"password",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:"sk-or-..."},null,512),[[k,i.value]])])])])]),e("div",null,[R(p(E),{"w-full":""},{trigger:_(a=>[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:()=>a.setVisible(!a.visible)&&p(U)()},[t[8]||(t[8]=e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},[e("span",null,"Advanced")],-1)),e("div",{transform:"",transition:"transform duration-250",class:w({"rotate-180":a.visible})},t[7]||(t[7]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,O)]),default:_(()=>{var a;return[e("div",Q,[e("label",W,[t[9]||(t[9]=e("div",null,[e("div",{class:"flex items-center gap-1 text-sm font-medium"}," Base URL "),e("div",{class:"text-xs text-zinc-500 dark:text-zinc-400"}," Custom base URL (optional) ")],-1)),g(e("input",{"onUpdate:modelValue":t[2]||(t[2]=V=>r.value=V),type:"text",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","w-full":"",rounded:"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",placeholder:(a=o.value)==null?void 0:a.baseUrlDefault},null,8,X),[[k,r.value]])])])]}),_:1})])]),e("div",Y,[e("div",{text:"40",class:w((f=o.value)==null?void 0:f.icon),"translate-x-10":"","translate-y-10":""},null,2)])],64)}}});export{ne as default}; diff --git a/assets/providers-B5WAuhMk.js b/assets/providers-B5WAuhMk.js new file mode 100644 index 0000000000000000000000000000000000000000..7cc3bd65ee943d0f950e091983b93c569b5042fc --- /dev/null +++ b/assets/providers-B5WAuhMk.js @@ -0,0 +1 @@ +var F=Object.defineProperty;var N=(e,o,i)=>o in e?F(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i;var E=(e,o,i)=>N(e,typeof o!="symbol"?o+"":o,i);import{ar as W,cd as X,g as S,w as q,h as M,v as j}from"./index-lQIQ1Nea.js";var k=class extends Error{constructor(o,i){super(o);E(this,"response");this.name="XSAIError",this.response=i}},J=e=>e.replace(/[A-Z]/g,o=>`_${o.toLowerCase()}`),g=e=>Object.fromEntries(Object.entries(e).map(([o,i])=>[J(o),i])),L=e=>Object.fromEntries(Object.entries(e).filter(([,o])=>o!==void 0)),me=e=>JSON.stringify(g(L({...e,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),_=(e,o)=>L({Authorization:o!==void 0?`Bearer ${o}`:void 0,...e}),R=(e,o)=>{const i=o.toString();return new URL(e,i.endsWith("/")?i:`${i}/`)},Z=async e=>{if(!e.ok){const o=new k(`Remote sent ${e.status} response`,e);throw o.cause=new Error(await e.text()),o}if(!e.body)throw new k("Response body is empty from remote server",e);if(!(e.body instanceof ReadableStream)){const o=new k(`Expected Response body to be a ReadableStream, but got ${String(e.body)}`,e);throw o.cause=new Error(`Content-Type is ${e.headers.get("Content-Type")}`),o}return e},G=async e=>Z(e).then(async o=>o.json()),H=async e=>(e.fetch??globalThis.fetch)(R("models",e.baseURL),{headers:_({"Content-Type":"application/json",...e.headers},e.apiKey),signal:e.abortSignal}).then(G).then(({data:o})=>o),m=e=>({chat:o=>Object.assign(e,{model:o})}),w=e=>({embed:o=>Object.assign(e,{model:o})}),v=e=>({model:()=>e}),Q=e=>({speech:o=>Object.assign(e,{model:o})}),V=e=>({transcription:o=>Object.assign(e,{model:o})}),l=(e,o)=>({metadata:{id:e,...o}}),c=(...e)=>Object.assign(e[0],...e.slice(1)),Y=(e,o="https://api.deepseek.com/")=>c(l("deepseek"),m({apiKey:e,baseURL:o}),v({apiKey:e,baseURL:o})),I=(e,o="https://api.fireworks.ai/inference/v1/")=>c(l("fireworks"),m({apiKey:e,baseURL:o}),w({apiKey:e,baseURL:o}),v({apiKey:e,baseURL:o})),ee=(e,o="https://api.mistral.ai/v1/")=>c(l("mistral"),m({apiKey:e,baseURL:o}),w({apiKey:e,baseURL:o}),v({apiKey:e,baseURL:o})),re=(e,o="https://api.moonshot.cn/v1/")=>c(l("moonshot"),m({apiKey:e,baseURL:o}),v({apiKey:e,baseURL:o})),oe=(e,o="https://api.novita.ai/v3/openai/")=>c(l("novita"),m({apiKey:e,baseURL:o}),v({apiKey:e,baseURL:o})),ae=(e,o="https://api.openai.com/v1/")=>c(l("openai"),m({apiKey:e,baseURL:o}),w({apiKey:e,baseURL:o}),v({apiKey:e,baseURL:o}),Q({apiKey:e,baseURL:o}),V({apiKey:e,baseURL:o})),ie=(e,o="")=>c(l("openrouter"),{chat:(i,p)=>{const s={apiKey:e,baseURL:o,model:i};return{...p?(({extraHeaders:f,models:h,provider:d})=>{f!=null&&(s.headers??(s.headers={}),Object.assign(s.headers,f));let y;return d!=null&&(y=g(d)),g({models:h,provider:y})})(p):{},...s}}}),te=(e,o="https://api.perplexity.ai/")=>c(l("perplexity"),m({apiKey:e,baseURL:o})),ne=(e,o="https://api.together.xyz/v1/")=>c(l("together-ai"),m({apiKey:e,baseURL:o}),w({apiKey:e,baseURL:o}),v({apiKey:e,baseURL:o,fetch:async(...i)=>globalThis.fetch(...i).then(async p=>p.json()).then(p=>Response.json({data:p,object:"list"}))})),se=(e,o)=>{const i=`https://api.cloudflare.com/client/v4/accounts/${o}/ai/v1/`;return c(l("workers-ai"),m({apiKey:e,baseURL:i}),w({apiKey:e,baseURL:i}))},le=(e,o="https://api.x.ai/v1/")=>c(l("xai"),m({apiKey:e,baseURL:o}),v({apiKey:e,baseURL:o})),C=(e="http://localhost:11434/v1/")=>c(l("ollama"),m({baseURL:e}),w({baseURL:e}),v({baseURL:e})),ce=(e,o="http://localhost:5933/v1/")=>{const i=({applyTextNormalization:s,languageCode:u,nextRequestIds:f,nextText:h,previousRequestIds:d,previousText:y,pronunciationDictionaryLocators:b,seed:P,voiceSettings:x})=>({extraBody:g({applyTextNormalization:s,languageCode:u,nextRequestIds:f,nextText:h,previousRequestIds:d,previousText:y,pronunciationDictionaryLocators:b?b.map(K=>g(K)):void 0,seed:P,voiceSettings:x?g(x):void 0})}),p={speech:(s,u)=>({...u?i(u):{},apiKey:e,baseURL:o,model:`elevenlabs/${s}`})};return c(l("unspeech/elevenlabs"),p)};const ve=W("providers",()=>{const e=X("settings/credentials/providers",{});async function o(r){try{const a=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${r.apiKey}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`Failed to fetch OpenRouter models: ${a.statusText}`);return(await a.json()).data.map(n=>({id:n.id,name:n.name||n.id,provider:"openrouter-ai",description:n.description||"",contextLength:n.context_length,deprecated:!1}))}catch(a){throw console.error("Error fetching OpenRouter models:",a),a}}const i={"openrouter-ai":{id:"openrouter-ai",nameKey:"providers.openrouter.name",name:"OpenRouter",descriptionKey:"providers.openrouter.description",description:"openrouter.ai",icon:"i-lobe-icons:openrouter",baseUrlDefault:"https://openrouter.ai/api/v1/",createProvider:r=>ie(r.apiKey,r.baseUrl),modelSelectionType:"manual",fetchModelsManually:o},openai:{id:"openai",nameKey:"providers.openai.name",name:"OpenAI",descriptionKey:"providers.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",baseUrlDefault:"https://api.openai.com/v1/",createProvider:r=>ae(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"ollama-ai":{id:"ollama-ai",nameKey:"providers.ollama.name",name:"Ollama",descriptionKey:"providers.ollama.description",description:"ollama.com",icon:"i-lobe-icons:ollama",baseUrlDefault:"http://localhost:11434/api/",createProvider:r=>C(r.baseUrl),modelSelectionType:"dynamic"},vllm:{id:"vllm",nameKey:"providers.vllm.name",name:"vLLM",descriptionKey:"providers.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm-color",createProvider:r=>C(r.baseUrl),modelSelectionType:"hardcoded",hardcodedModels:[{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}]},"perplexity-ai":{id:"perplexity-ai",nameKey:"providers.perplexity.name",name:"Perplexity",descriptionKey:"providers.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",baseUrlDefault:"https://api.perplexity.ai",createProvider:r=>te(r.apiKey,r.baseUrl),modelSelectionType:"hardcoded",hardcodedModels:[{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}]},elevenlabs:{id:"elevenlabs",nameKey:"providers.elevenlabs.name",name:"ElevenLabs",descriptionKey:"providers.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",baseUrlDefault:"https://unspeech.hyp3r.link/v1/",createProvider:r=>ce(r.apiKey,r.baseUrl),modelSelectionType:"hardcoded",hardcodedModels:[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3}]},xai:{id:"xai",nameKey:"providers.xai.name",name:"xAI",descriptionKey:"providers.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:r=>le(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},deepseek:{id:"deepseek",nameKey:"providers.deepseek.name",name:"DeepSeek",descriptionKey:"providers.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek-color",createProvider:r=>Y(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"together-ai":{id:"together-ai",nameKey:"providers.together.name",name:"Together.ai",descriptionKey:"providers.together.description",description:"together.ai",iconColor:"i-lobe-icons:together-color",createProvider:r=>ne(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"novita-ai":{id:"novita-ai",nameKey:"providers.novita.name",name:"Novita",descriptionKey:"providers.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita-color",createProvider:r=>oe(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"fireworks-ai":{id:"fireworks-ai",nameKey:"providers.fireworks.name",name:"Fireworks.ai",descriptionKey:"providers.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:r=>I(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"providers.cloudflare.name",name:"Cloudflare Workers AI",descriptionKey:"providers.cloudflare.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare-color",createProvider:r=>se(r.apiKey,r.accountId),modelSelectionType:"dynamic"},"mistral-ai":{id:"mistral-ai",nameKey:"providers.mistral.name",name:"Mistral",descriptionKey:"providers.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral-color",createProvider:r=>ee(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"moonshot-ai":{id:"moonshot-ai",nameKey:"providers.moonshot.name",name:"Moonshot AI",descriptionKey:"providers.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:r=>re(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"}};function p(r){const a=e.value[r];if(!a)return!1;switch(r){case"openrouter-ai":return!!a.apiKey&&!!a.baseUrl;case"openai":return!!a.apiKey;case"ollama-ai":return!!a.baseUrl;case"vllm":return!!a.baseUrl;case"elevenlabs":return!!a.apiKey;case"xai":return!!a.apiKey;case"deepseek":return!!a.apiKey;case"together-ai":return!!a.apiKey;case"novita-ai":return!!a.apiKey;case"fireworks-ai":return!!a.apiKey;case"cloudflare-workers-ai":return!!a.apiKey;case"mistral-ai":return!!a.apiKey;case"moonshot-ai":return!!a.apiKey;default:return!1}}const s=S({});function u(r){if(!e.value[r]){const a=i[r];e.value[r]={baseUrl:a.baseUrlDefault||""}}}Object.keys(i).forEach(u);function f(){Object.keys(i).forEach(r=>{s.value[r]=p(r)})}f(),q(e,f,{deep:!0});const h=M(()=>Object.keys(i).filter(r=>s.value[r])),d=S({}),y=S({}),b=S({});function P(r){var t;const a=i[r];return a?a.modelSelectionType==="dynamic"||a.modelSelectionType==="manual"||a.modelSelectionType==="hardcoded"&&!!((t=a.hardcodedModels)!=null&&t.length):!1}async function x(r){const a=e.value[r];if(!a)return[];const t=i[r];if(!t)return[];y.value[r]=!0,b.value[r]=null;try{switch(t.modelSelectionType){case"dynamic":if(!t.createProvider)throw new Error(`Provider ${r} has no createProvider function`);const n=t.createProvider(a);if(!("model"in n&&typeof n.model=="function"))throw new Error(`Provider ${r} does not support model listing`);const z=await H(n.model());d.value[r]=z.map(T=>({id:T.id,name:T.id,provider:r}));break;case"manual":if(!t.fetchModelsManually)throw new Error(`Provider ${r} has no fetchModelsManually function`);d.value[r]=await t.fetchModelsManually(a);break;case"hardcoded":if(!t.hardcodedModels)throw new Error(`Provider ${r} has no hardcodedModels defined`);d.value[r]=t.hardcodedModels;break}return d.value[r]}catch(n){return console.error(`Error fetching models for ${r}:`,n),b.value[r]=n instanceof Error?n.message:"Unknown error",[]}finally{y.value[r]=!1}}function K(r){return d.value[r]||[]}const $=M(()=>{const r=[];for(const a of h.value)r.push(...d.value[a]||[]);return r});async function A(){for(const r of h.value)P(r)&&await x(r)}function O(r){const{t:a}=j(),t=i[r];if(!t)throw new Error(`Provider metadata for ${r} not found`);return{...t,localizedName:a(t.nameKey,t.name),localizedDescription:a(t.descriptionKey,t.description)}}const B=M(()=>{const{t:r}=j();return Object.values(i).map(a=>({...a,localizedName:r(a.nameKey,a.name),localizedDescription:r(a.descriptionKey,a.description),configured:s.value[a.id]||!1}))});function U(r){const a=e.value[r];if(!a)throw new Error(`Provider credentials for ${r} not found`);const t=i[r];if(!t)throw new Error(`Provider metadata for ${r} not found`);try{return t.createProvider(a)}catch(n){throw console.error(`Error creating provider instance for ${r}:`,n),n}}const D=M(()=>h.value.map(r=>O(r)));return{providers:e,availableProviders:h,configuredProviders:s,providerMetadata:i,getProviderMetadata:O,allProvidersMetadata:B,initializeProvider:u,validateProvider:p,availableModels:d,isLoadingModels:y,modelLoadError:b,fetchModelsForProvider:x,getModelsForProvider:K,allAvailableModels:$,loadModelsForConfiguredProviders:A,supportsModelListing:P,getProviderInstance:U,availableProvidersMetadata:D}});export{_ as a,me as b,Z as c,H as l,R as r,ve as u}; diff --git a/assets/providers-CpyZMi_V.js b/assets/providers-CpyZMi_V.js deleted file mode 100644 index b3dd20a406d8e2cdfbb9438deabeda246296a0a6..0000000000000000000000000000000000000000 --- a/assets/providers-CpyZMi_V.js +++ /dev/null @@ -1 +0,0 @@ -var N=Object.defineProperty;var W=(e,o,i)=>o in e?N(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i;var C=(e,o,i)=>W(e,typeof o!="symbol"?o+"":o,i);import{E as X,G as K,g as M,w as q,h as k,v as j}from"./index-SpDrDth7.js";var O=class extends Error{constructor(o,i){super(o);C(this,"response");this.name="XSAIError",this.response=i}},J=e=>e.replace(/[A-Z]/g,o=>`_${o.toLowerCase()}`),w=e=>Object.fromEntries(Object.entries(e).map(([o,i])=>[J(o),i])),A=e=>Object.fromEntries(Object.entries(e).filter(([,o])=>o!==void 0)),pe=e=>JSON.stringify(w(A({...e,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),_=(e,o)=>A({Authorization:o!==void 0?`Bearer ${o}`:void 0,...e}),G=(e,o)=>{const i=o.toString();return new URL(e,i.endsWith("/")?i:`${i}/`)},R=async e=>{if(!e.ok){const o=new O(`Remote sent ${e.status} response`,e);throw o.cause=new Error(await e.text()),o}if(!e.body)throw new O("Response body is empty from remote server",e);if(!(e.body instanceof ReadableStream)){const o=new O(`Expected Response body to be a ReadableStream, but got ${String(e.body)}`,e);throw o.cause=new Error(`Content-Type is ${e.headers.get("Content-Type")}`),o}return e},Z=async e=>R(e).then(async o=>o.json()),H=async e=>(e.fetch??globalThis.fetch)(G("models",e.baseURL),{headers:_({"Content-Type":"application/json",...e.headers},e.apiKey),signal:e.abortSignal}).then(Z).then(({data:o})=>o),m=e=>({chat:o=>Object.assign(e,{model:o})}),x=e=>({embed:o=>Object.assign(e,{model:o})}),u=e=>({model:()=>e}),Q=e=>({speech:o=>Object.assign(e,{model:o})}),V=e=>({transcription:o=>Object.assign(e,{model:o})}),l=(e,o)=>({metadata:{id:e,...o}}),c=(...e)=>Object.assign(e[0],...e.slice(1)),Y=(e,o="https://api.deepseek.com/")=>c(l("deepseek"),m({apiKey:e,baseURL:o}),u({apiKey:e,baseURL:o})),I=(e,o="https://api.fireworks.ai/inference/v1/")=>c(l("fireworks"),m({apiKey:e,baseURL:o}),x({apiKey:e,baseURL:o}),u({apiKey:e,baseURL:o})),ee=(e,o="https://api.mistral.ai/v1/")=>c(l("mistral"),m({apiKey:e,baseURL:o}),x({apiKey:e,baseURL:o}),u({apiKey:e,baseURL:o})),re=(e,o="https://api.moonshot.cn/v1/")=>c(l("moonshot"),m({apiKey:e,baseURL:o}),u({apiKey:e,baseURL:o})),oe=(e,o="https://api.novita.ai/v3/openai/")=>c(l("novita"),m({apiKey:e,baseURL:o}),u({apiKey:e,baseURL:o})),ae=(e,o="https://api.openai.com/v1/")=>c(l("openai"),m({apiKey:e,baseURL:o}),x({apiKey:e,baseURL:o}),u({apiKey:e,baseURL:o}),Q({apiKey:e,baseURL:o}),V({apiKey:e,baseURL:o})),ie=(e,o="")=>c(l("openrouter"),{chat:(i,d)=>{const t={apiKey:e,baseURL:o,model:i};return{...d?(({extraHeaders:v,models:b,provider:f})=>{v!=null&&(t.headers??(t.headers={}),Object.assign(t.headers,v));let y;return f!=null&&(y=w(f)),w({models:b,provider:y})})(d):{},...t}}}),te=(e,o="https://api.together.xyz/v1/")=>c(l("together-ai"),m({apiKey:e,baseURL:o}),x({apiKey:e,baseURL:o}),u({apiKey:e,baseURL:o,fetch:async(...i)=>globalThis.fetch(...i).then(async d=>d.json()).then(d=>Response.json({data:d,object:"list"}))})),ne=(e,o)=>{const i=`https://api.cloudflare.com/client/v4/accounts/${o}/ai/v1/`;return c(l("workers-ai"),m({apiKey:e,baseURL:i}),x({apiKey:e,baseURL:i}))},se=(e,o="https://api.x.ai/v1/")=>c(l("xai"),m({apiKey:e,baseURL:o}),u({apiKey:e,baseURL:o})),L=(e="http://localhost:11434/v1/")=>c(l("ollama"),m({baseURL:e}),x({baseURL:e}),u({baseURL:e})),le=(e,o="http://localhost:5933/v1/")=>{const i=({applyTextNormalization:t,languageCode:h,nextRequestIds:v,nextText:b,previousRequestIds:f,previousText:y,pronunciationDictionaryLocators:p,seed:S,voiceSettings:g})=>({extraBody:w({applyTextNormalization:t,languageCode:h,nextRequestIds:v,nextText:b,previousRequestIds:f,previousText:y,pronunciationDictionaryLocators:p?p.map(P=>w(P)):void 0,seed:S,voiceSettings:g?w(g):void 0})}),d={speech:(t,h)=>({...h?i(h):{},apiKey:e,baseURL:o,model:`elevenlabs/${t}`})};return c(l("unspeech/elevenlabs"),d)};const me=X("providers",()=>{const e=K("settings/credentials/providers",{}),o=K("settings/credentials/coreControllerProvider","openai"),i=K("settings/credentials/audioSynthesisProvider","elevenlabs");async function d(r){try{const a=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${r.apiKey}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`Failed to fetch OpenRouter models: ${a.statusText}`);return(await a.json()).data.map(s=>({id:s.id,name:s.name||s.id,provider:"openrouter-ai",description:s.description||"",contextLength:s.context_length,deprecated:!1}))}catch(a){throw console.error("Error fetching OpenRouter models:",a),a}}const t={"openrouter-ai":{id:"openrouter-ai",nameKey:"providers.openrouter.name",name:"OpenRouter",descriptionKey:"providers.openrouter.description",description:"openrouter.ai",icon:"i-lobe-icons:openrouter",baseUrlDefault:"https://openrouter.ai/api/v1/",createProvider:r=>ie(r.apiKey,r.baseUrl),modelSelectionType:"manual",fetchModelsManually:d},openai:{id:"openai",nameKey:"providers.openai.name",name:"OpenAI",descriptionKey:"providers.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",baseUrlDefault:"https://api.openai.com/v1/",createProvider:r=>ae(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"ollama-ai":{id:"ollama-ai",nameKey:"providers.ollama.name",name:"Ollama",descriptionKey:"providers.ollama.description",description:"ollama.com",icon:"i-lobe-icons:ollama",baseUrlDefault:"http://localhost:11434/api/",createProvider:r=>L(r.baseUrl),modelSelectionType:"dynamic"},vllm:{id:"vllm",nameKey:"providers.vllm.name",name:"vLLM",descriptionKey:"providers.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm-color",createProvider:r=>L(r.baseUrl),modelSelectionType:"hardcoded",hardcodedModels:[{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}]},"perplexity-ai":{id:"perplexity-ai",nameKey:"providers.perplexity.name",name:"Perplexity",descriptionKey:"providers.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",baseUrlDefault:"https://api.perplexity.ai",createProvider:r=>({apiKey:r.apiKey,baseUrl:r.baseUrl}),modelSelectionType:"hardcoded",hardcodedModels:[{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}]},elevenlabs:{id:"elevenlabs",nameKey:"providers.elevenlabs.name",name:"ElevenLabs",descriptionKey:"providers.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",baseUrlDefault:"https://unspeech.hyp3r.link/v1/",createProvider:r=>le(r.apiKey,r.baseUrl),modelSelectionType:"hardcoded",hardcodedModels:[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3}]},xai:{id:"xai",nameKey:"providers.xai.name",name:"xAI",descriptionKey:"providers.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:r=>se(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},deepseek:{id:"deepseek",nameKey:"providers.deepseek.name",name:"DeepSeek",descriptionKey:"providers.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek-color",createProvider:r=>Y(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"together-ai":{id:"together-ai",nameKey:"providers.together.name",name:"Together.ai",descriptionKey:"providers.together.description",description:"together.ai",iconColor:"i-lobe-icons:together-color",createProvider:r=>te(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"novita-ai":{id:"novita-ai",nameKey:"providers.novita.name",name:"Novita",descriptionKey:"providers.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita-color",createProvider:r=>oe(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"fireworks-ai":{id:"fireworks-ai",nameKey:"providers.fireworks.name",name:"Fireworks.ai",descriptionKey:"providers.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:r=>I(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"providers.cloudflare.name",name:"Cloudflare Workers AI",descriptionKey:"providers.cloudflare.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare-color",createProvider:r=>ne(r.apiKey,r.accountId),modelSelectionType:"dynamic"},"mistral-ai":{id:"mistral-ai",nameKey:"providers.mistral.name",name:"Mistral",descriptionKey:"providers.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral-color",createProvider:r=>ee(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"},"moonshot-ai":{id:"moonshot-ai",nameKey:"providers.moonshot.name",name:"Moonshot AI",descriptionKey:"providers.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:r=>re(r.apiKey,r.baseUrl),modelSelectionType:"dynamic"}};function h(r){const a=e.value[r];if(!a)return!1;switch(r){case"openrouter-ai":return!!a.apiKey&&!!a.baseUrl;case"openai":return!!a.apiKey;case"ollama-ai":return!!a.baseUrl;case"vllm":return!!a.baseUrl;case"elevenlabs":return!!a.apiKey;case"xai":return!!a.apiKey;case"deepseek":return!!a.apiKey;case"together-ai":return!!a.apiKey;case"novita-ai":return!!a.apiKey;case"fireworks-ai":return!!a.apiKey;case"cloudflare-workers-ai":return!!a.apiKey;case"mistral-ai":return!!a.apiKey;case"moonshot-ai":return!!a.apiKey;default:return!1}}const v=M({});function b(r){if(!e.value[r]){const a=t[r];e.value[r]={baseUrl:a.baseUrlDefault||""}}}Object.keys(t).forEach(b);function f(){Object.keys(t).forEach(r=>{v.value[r]=h(r)})}f(),q(e,f,{deep:!0});const y=k(()=>Object.keys(t).filter(r=>v.value[r])),p=M({}),S=M({}),g=M({});function P(r){var n;const a=t[r];return a?a.modelSelectionType==="dynamic"||a.modelSelectionType==="manual"||a.modelSelectionType==="hardcoded"&&!!((n=a.hardcodedModels)!=null&&n.length):!1}async function T(r){const a=e.value[r];if(!a)return[];const n=t[r];if(!n)return[];S.value[r]=!0,g.value[r]=null;try{switch(n.modelSelectionType){case"dynamic":if(!n.createProvider)throw new Error(`Provider ${r} has no createProvider function`);const s=n.createProvider(a);if(!("model"in s&&typeof s.model=="function"))throw new Error(`Provider ${r} does not support model listing`);const F=await H(s.model());p.value[r]=F.map(E=>({id:E.id,name:E.id,provider:r}));break;case"manual":if(!n.fetchModelsManually)throw new Error(`Provider ${r} has no fetchModelsManually function`);p.value[r]=await n.fetchModelsManually(a);break;case"hardcoded":if(!n.hardcodedModels)throw new Error(`Provider ${r} has no hardcodedModels defined`);p.value[r]=n.hardcodedModels;break}return p.value[r]}catch(s){return console.error(`Error fetching models for ${r}:`,s),g.value[r]=s instanceof Error?s.message:"Unknown error",[]}finally{S.value[r]=!1}}function U(r){return p.value[r]||[]}const $=k(()=>{const r=[];for(const a of y.value)r.push(...p.value[a]||[]);return r});async function B(){for(const r of y.value)P(r)&&await T(r)}function D(r){const{t:a}=j(),n=t[r];if(!n)throw new Error(`Provider metadata for ${r} not found`);return{...n,localizedName:a(n.nameKey,n.name),localizedDescription:a(n.descriptionKey,n.description)}}const z=k(()=>{const{t:r}=j();return Object.values(t).map(a=>({...a,localizedName:r(a.nameKey,a.name),localizedDescription:r(a.descriptionKey,a.description),configured:v.value[a.id]||!1}))});return{providers:e,coreControllerProvider:o,audioSynthesisProvider:i,availableProviders:y,configuredProviders:v,providerMetadata:t,getProviderMetadata:D,allProvidersMetadata:z,initializeProvider:b,validateProvider:h,availableModels:p,isLoadingModels:S,modelLoadError:g,fetchModelsForProvider:T,getModelsForProvider:U,allAvailableModels:$,loadModelsForConfiguredProviders:B,supportsModelListing:P}});export{_ as a,pe as b,R as c,le as d,H as l,G as r,me as u}; diff --git a/assets/queue-a2h6DuYq.js b/assets/queue-B8LsoNb_.js similarity index 90% rename from assets/queue-a2h6DuYq.js rename to assets/queue-B8LsoNb_.js index 5864b8cf0703fffb5c0fa54ab0d487aa96f7cec5..db1caf679262c168ec000fb9ec719dcae04c692d 100644 --- a/assets/queue-a2h6DuYq.js +++ b/assets/queue-B8LsoNb_.js @@ -1 +1 @@ -import{u as o}from"./queue-DqQ_HXOh.js";import{d as v,g as h,p as g,c as k,o as w,a as I}from"./index-SpDrDth7.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 g(()=>{m()}),(e,a)=>(w(),k("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default}; +import{u as o}from"./queue-BJ5EFzA4.js";import{d as v,g as h,p as g,c as k,o as w,a as I}from"./index-lQIQ1Nea.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 g(()=>{m()}),(e,a)=>(w(),k("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default}; diff --git a/assets/queue-DqQ_HXOh.js b/assets/queue-BJ5EFzA4.js similarity index 91% rename from assets/queue-DqQ_HXOh.js rename to assets/queue-BJ5EFzA4.js index 22733e7c3a5c9d87c6bde09b90bf8805b5f8d8e5..02a78afcb355146669197152ee42389d253712f5 100644 --- a/assets/queue-DqQ_HXOh.js +++ b/assets/queue-BJ5EFzA4.js @@ -1 +1 @@ -import{g as l}from"./index-SpDrDth7.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function g(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=g();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u}; +import{g as l}from"./index-lQIQ1Nea.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function g(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=g();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u}; diff --git a/assets/queues-wwQOO-CJ.js b/assets/queues-Bj3v4TZ0.js similarity index 94% rename from assets/queues-wwQOO-CJ.js rename to assets/queues-Bj3v4TZ0.js index 0c9364b40af1e7c8ac2bcbca336bf7cf470472d0..b3dda4d76ee2127549d033368d833ab884d8db6b 100644 --- a/assets/queues-wwQOO-CJ.js +++ b/assets/queues-Bj3v4TZ0.js @@ -1 +1 @@ -import{E as i}from"./emotions-D2WM87AE.js";import{u as s}from"./queue-DqQ_HXOh.js";import{g as d}from"./index-SpDrDth7.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,p as b,l,k as u}; +import{E as i}from"./emotions-D2WM87AE.js";import{u as s}from"./queue-BJ5EFzA4.js";import{g as d}from"./index-lQIQ1Nea.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,p as b,l,k as u}; diff --git a/assets/speech-DOiNlGmE.js b/assets/speech-DOiNlGmE.js new file mode 100644 index 0000000000000000000000000000000000000000..5ad412f68370097323fd5c9c62bfdd079c02aec8 --- /dev/null +++ b/assets/speech-DOiNlGmE.js @@ -0,0 +1,13 @@ +import{d as R,x as S,s as z,g as U,p as B,c as r,o,a as e,e as s,m as x,F as h,C as D,b as F,k as j,G as H,t as c,z as v,E as g,B as m,H as T,A as q,q as G,j as J}from"./index-lQIQ1Nea.js";import{_ as K}from"./RadioCardSimple.vue_vue_type_script_setup_true_lang-BPQCQDzL.js";import"./Stage.vue_vue_type_style_index_0_scoped_ab8bfbcc_lang-DI8TOzXx.js";import"./emotions-D2WM87AE.js";import{u as O}from"./providers-B5WAuhMk.js";import{u as Q}from"./speech-Dj8k8vbX.js";import{b as M}from"./route-block-B_A1xBdJ.js";const W={flex:"~ row","items-center":"","gap-2":""},X={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},Y={flex:"~ col gap-4"},Z={"max-w-full":""},ee={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},te={key:1},le={key:0},se={flex:"~ col gap-4"},oe={key:0,class:"flex items-center justify-center py-4"},re={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"},ne={class:"flex flex-col"},ae={class:"text-sm text-red-600 dark:text-red-400"},ie={key:2,class:"space-y-6"},de={key:0},ue={class:"grid grid-cols-1 gap-4 md:grid-cols-2"},pe={class:"flex items-center gap-3"},me={class:"w-12 text-center"},ve={class:"flex items-center gap-3"},xe={class:"w-12 text-center"},ce={key:1,class:"border border-neutral-200 rounded-lg p-4 dark:border-neutral-700"},be={class:"mb-3 flex items-center justify-between"},fe={class:"relative mr-2 inline-block w-10 select-none align-middle"},ge={for:"ssml-toggle",class:"block h-6 cursor-pointer overflow-hidden rounded-full bg-neutral-300 dark:bg-neutral-700"},ke={key:0,class:"mt-3"},ye={class:"overflow-auto rounded bg-neutral-50 p-3 text-xs dark:bg-neutral-800"},we=R({__name:"speech",setup(Se){const V=O(),k=Q(),{availableProviders:_,availableProvidersMetadata:C}=S(V),{activeSpeechProvider:i,activeSpeechModel:b,voiceName:d,pitch:n,rate:a,isLoadingSpeechProviderVoices:E,speechProviderError:y,supportsSSML:P,ssmlEnabled:u}=S(k),L=z(),w=U(` + Hello, my name is + + AI Assistant + + +`);B(async()=>{await k.loadVoicesForProvider(i.value)});function N(p){d.value=p,f()}function $(p){n.value=p,f()}function A(p){a.value=p,f()}function f(){w.value=` + Hello, my name is + + AI Assistant + + +`}return(p,t)=>(o(),r(h,null,[e("div",W,[e("button",{onClick:t[0]||(t[0]=l=>s(L).back())},t[10]||(t[10]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-xl":""},null,-1)])),t[11]||(t[11]=e("h1",{relative:""},[e("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[e("span",{text:"neutral-300 dark:neutral-500"},"Modules")]),e("div",{"text-3xl":"","font-semibold":""}," Speech ")],-1))]),e("div",X,[e("div",null,[e("div",Y,[t[13]||(t[13]=e("div",null,[e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"}," Provider "),e("div",{text:"neutral-400 dark:neutral-500"},[e("span",null,"Select the suitable speech provider")])],-1)),e("div",Z,[s(_).length>0?(o(),r("fieldset",ee,[(o(!0),r(h,null,D(s(C),l=>(o(),J(s(K),{id:l.id,key:l.id,modelValue:s(i),"onUpdate:modelValue":t[1]||(t[1]=I=>m(i)?i.value=I:null),name:"speech-provider",value:l.id,title:l.localizedName,description:l.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(o(),r("div",te,[F(s(H),{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:j(()=>t[12]||(t[12]=[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})]))])])]),s(i)?(o(),r("div",le,[e("div",se,[t[26]||(t[26]=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)),s(E)?(o(),r("div",oe,t[14]||(t[14]=[e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1),e("span",null,"Loading available voices...",-1)]))):s(y)?(o(),r("div",re,[t[16]||(t[16]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",ne,[t[15]||(t[15]=e("span",{class:"font-medium"},"Error loading voices",-1)),e("span",ae,c(s(y)),1)])])):(o(),r("div",ie,[e("div",null,[t[17]||(t[17]=e("label",{class:"mb-1 block text-sm font-medium"}," Voice Name ",-1)),v(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>m(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:"Enter voice name (e.g., 'Rachel', 'Josh')",onInput:t[3]||(t[3]=l=>N(l.target.value))},null,544),[[g,s(d)]]),t[18]||(t[18]=e("p",{class:"mt-1 text-xs text-neutral-500"}," For ElevenLabs, enter the exact voice name from your account ",-1))]),s(i)==="elevenlabs"?(o(),r("div",de,[t[20]||(t[20]=e("label",{class:"mb-1 block text-sm font-medium"}," Model ",-1)),v(e("select",{"onUpdate:modelValue":t[4]||(t[4]=l=>m(b)?b.value=l:null),class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900"},t[19]||(t[19]=[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),[[T,s(b)]])])):x("",!0),e("div",ue,[e("div",null,[t[21]||(t[21]=e("label",{class:"mb-1 block text-sm font-medium"}," Pitch Adjustment (%) ",-1)),e("div",pe,[v(e("input",{"onUpdate:modelValue":t[5]||(t[5]=l=>m(n)?n.value=l:null),type:"range",min:"-50",max:"50",step:"5",class:"w-full",onInput:t[6]||(t[6]=l=>$(parseInt(l.target.value)))},null,544),[[g,s(n)]]),e("span",me,c(s(n))+"%",1)])]),e("div",null,[t[22]||(t[22]=e("label",{class:"mb-1 block text-sm font-medium"}," Speech Rate ",-1)),e("div",ve,[v(e("input",{"onUpdate:modelValue":t[7]||(t[7]=l=>m(a)?a.value=l:null),type:"range",min:"0.5",max:"2",step:"0.1",class:"w-full",onInput:t[8]||(t[8]=l=>A(parseFloat(l.target.value)))},null,544),[[g,s(a)]]),e("span",xe,c(s(a))+"x",1)])])]),s(P)?(o(),r("div",ce,[e("div",be,[t[23]||(t[23]=e("label",{class:"font-medium"},"SSML Support",-1)),e("div",fe,[v(e("input",{id:"ssml-toggle","onUpdate:modelValue":t[9]||(t[9]=l=>m(u)?u.value=l:null),type:"checkbox",class:"sr-only"},null,512),[[q,s(u)]]),e("label",ge,[e("span",{class:G([{"translate-x-4":s(u),"translate-x-0":!s(u)},"block h-6 w-6 transform rounded-full bg-white shadow transition-transform duration-200 ease-in-out"])},null,2)])])]),t[25]||(t[25]=e("p",{class:"mb-3 text-sm text-neutral-500"}," Enable Speech Synthesis Markup Language for more control over speech output ",-1)),s(u)?(o(),r("div",ke,[t[24]||(t[24]=e("label",{class:"mb-1 block text-sm font-medium"}," SSML Example ",-1)),e("pre",ye,c(w.value),1)])):x("",!0)])):x("",!0)]))])])):x("",!0)]),t[27]||(t[27]=e("div",{fixed:"","bottom-0":"","right-0":"","z--1":"",class:"text-neutral-100/80 dark:text-neutral-500/20"},[e("div",{text:"40","i-lucide:volume-2":"","translate-x-10":"","translate-y-10":""})],-1))],64))}});typeof M=="function"&&M(we);export{we as default}; diff --git a/assets/speech-Dj8k8vbX.js b/assets/speech-Dj8k8vbX.js new file mode 100644 index 0000000000000000000000000000000000000000..1dde7a3a3db11529485f5d8da97d63df82555734 --- /dev/null +++ b/assets/speech-Dj8k8vbX.js @@ -0,0 +1 @@ +import{ar as R,cd as t,g as y,h as p,w as W}from"./index-lQIQ1Nea.js";import{u as Y}from"./providers-B5WAuhMk.js";var n=(i=>(i.Myriam="Myriam",i.Beatrice="Beatrice",i.Camilla_KM="Camilla_KM",i.SallySunshine="Sally Sunshine",i.Annie="Annie",i.KawaiiAerisita="Kawaii Aerisita",i.Morioki="Morioki",i))(n||{});const c={Myriam:"lNxY9WuCBCZCISASyJ55",Beatrice:"KAsXoQDshjF6ehsWa1mF",Camilla_KM:"dLhSyo03JRp5WkGpUlz1","Sally Sunshine":"qswttdunP3b44zVZKMRB",Annie:"AfA1PA0ldViH0DA6pbml","Kawaii Aerisita":"vGQNBgLaiM3EdZtxIiuY",Morioki:"8EkOjt4xTPGMclNlh1pk"},k=["Myriam","Beatrice","Camilla_KM","Sally Sunshine","Annie","Kawaii Aerisita"],L=["Morioki"],u={en:k,"en-US":k,ja:L,"ja-JP":L},Q=R("speech",()=>{const i=Y(),v=t("settings/speech/active-provider",""),b=t("settings/speech/active-model","eleven_multilingual_v2"),o=t("settings/speech/voice-name",""),f=t("settings/speech/voice-id",""),s=t("settings/speech/pitch",0),r=t("settings/speech/rate",1),m=t("settings/speech/ssml-enabled",!1),g=y(!1),h=y(null),l=y({}),S=t("settings/speech/language","en-US"),w=p(()=>i.availableProviders.filter(e=>M(e)).map(e=>i.getProviderMetadata(e))),K=p(()=>["elevenlabs","microsoft","google"].includes(v.value)),V=p(()=>Object.keys(u)),C=p(()=>{const e=S.value;return!e||!u[e]?[]:u[e].map(a=>({id:c[a],name:a,provider:"elevenlabs",language:e}))});function M(e){return["elevenlabs","microsoft","google","amazon"].includes(e)}function E(e){v.value=e}function B(e){b.value=e}function U(e){o.value=e;for(const a in c)if(a===e){f.value=c[a];break}}function N(e){f.value=e;for(const a in c)if(c[a]===e){o.value=a;break}}function _(e){s.value=e}function j(e){r.value=e}function F(e){m.value=e}function G(e){S.value=e}function D(){o.value="",f.value="",s.value=0,r.value=1,m.value=!1}async function A(e){if(!e||!M(e))return[];g.value=!0,h.value=null;try{if(await new Promise(a=>setTimeout(a,500)),e==="elevenlabs"){const a=[];for(const P in u){const z=u[P];for(const d of z)a.push({id:c[d],name:d,provider:"elevenlabs",language:P,description:I(d),gender:J(d)})}l.value[e]=a}else e==="microsoft"?l.value[e]=[{id:"en-US-AriaNeural",name:"Aria",provider:"microsoft",description:"Microsoft neural voice (female)",gender:"female",language:"en-US"},{id:"en-US-GuyNeural",name:"Guy",provider:"microsoft",description:"Microsoft neural voice (male)",gender:"male",language:"en-US"}]:l.value[e]=[];return l.value[e]}catch(a){return console.error(`Error fetching voices for ${e}:`,a),h.value=a instanceof Error?a.message:"Unknown error",[]}finally{g.value=!1}}function I(e){return{[n.Myriam]:"Professional female voice with clear articulation",[n.Beatrice]:"Mature and sophisticated female voice",[n.Camilla_KM]:"Friendly and approachable female voice",[n.SallySunshine]:"Cheerful and upbeat female voice",[n.Annie]:"Young and energetic female voice",[n.KawaiiAerisita]:"Cute and playful female voice",[n.Morioki]:"Deep and authoritative Japanese male voice"}[e]||"ElevenLabs voice"}function J(e){return[n.Morioki].includes(e)?"male":"female"}function $(e){return l.value[e]||[]}W(v,async e=>{e&&await A(e)});function x(e){if(!m.value)return e;let a="";return o.value&&(a+=``),(s.value!==0||r.value!==1)&&(a+=``),a+=e,(s.value!==0||r.value!==1)&&(a+=""),o.value&&(a+=""),a+="",a}return{activeSpeechProvider:v,activeSpeechModel:b,voiceName:o,voiceId:f,pitch:s,rate:r,ssmlEnabled:m,selectedLanguage:S,isLoadingSpeechProviderVoices:g,speechProviderError:h,availableVoices:l,availableSpeechProvidersMetadata:w,supportsSSML:K,availableLanguages:V,availableVoicesForLanguage:C,setActiveSpeechProvider:E,setActiveSpeechModel:B,setVoiceName:U,setVoiceId:N,setPitch:_,setRate:j,setSSMLEnabled:F,setLanguage:G,resetVoiceSettings:D,loadVoicesForProvider:A,getVoicesForProvider:$,generateSSML:x,isSpeechProvider:M}});export{Q as u}; diff --git a/assets/stage-ehgLLgDT.js b/assets/stage-KpHnsBCe.js similarity index 84% rename from assets/stage-ehgLLgDT.js rename to assets/stage-KpHnsBCe.js index 0d3db8faff02fa916a7ea4a5c970b97af719c243..066817a8615bae8489b4b9deaf26d7eda93f24bb 100644 --- a/assets/stage-ehgLLgDT.js +++ b/assets/stage-KpHnsBCe.js @@ -1 +1 @@ -import{d as p,u as s,c,b as d,r as i,n as m,e,o as l}from"./index-SpDrDth7.js";const x=p({__name:"stage",setup(u){const{top:t,right:o,bottom:a,left:n}=s();return(f,_)=>{const r=i("RouterView");return l(),c("main",{text:"gray-700 dark:gray-200","h-full":"","font-cuteen":"",style:m({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; +import{d as p,u as s,c,b as d,r as i,n as m,e,o as l}from"./index-lQIQ1Nea.js";const x=p({__name:"stage",setup(u){const{top:t,right:o,bottom:a,left:n}=s();return(f,_)=>{const r=i("RouterView");return l(),c("main",{text:"gray-700 dark:gray-200","h-full":"","font-cuteen":"",style:m({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; diff --git a/assets/v2-BX1iC0HQ.js b/assets/v2-BX1iC0HQ.js deleted file mode 100644 index 6a43e290a0eda16c66e4c41ba8db959f179261e6..0000000000000000000000000000000000000000 --- a/assets/v2-BX1iC0HQ.js +++ /dev/null @@ -1 +0,0 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_4bb9f885_lang-BkM1iBVD.js";import"./emotions-D2WM87AE.js";import{W as t}from"./Live2DSettings.vue_vue_type_script_setup_true_lang-kg4G8Afm.js";import{_ as i,M as r,I as m,a as s}from"./MobileInteractiveArea.vue_vue_type_script_setup_true_lang-Ds2PSx0x.js";import{d,c,o as l,a as o,b as e,e as n}from"./index-SpDrDth7.js";import{b as a}from"./route-block-B_A1xBdJ.js";import"./providers-CpyZMi_V.js";import"./queue-DqQ_HXOh.js";import"./queues-wwQOO-CJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CLEqku1k.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BcCSAMoU.js";import"./HeaderLink-BKyhECz0.js";import"./BasicTextarea.vue_vue_type_script_setup_true_lang-CfG2YTbd.js";import"./index-aMTQzeGD.js";const p={relative:"",flex:"~ col","z-2":"","h-100vh":"","w-100vw":"","of-hidden":""},f={relative:"",flex:"~ 1 row gap-y-0 gap-x-2 (l(),c("div",null,[o("div",p,[o("div",null,[e(i,{class:"flex (l(),c("div",null,[o("div",p,[o("div",null,[e(a,{class:"flex - - + +