nekomeowww commited on
Commit
cbf0dd3
·
1 Parent(s): adf6e80

release: build 57be907359e162dc0dce071be29bd42c6040c10b

Browse files
assets/{Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-C-SjLrPw.js → Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-BjHMXKfD.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{d as jh,aJ as Gh,aK as Hh,e as Ao,k as Wh,y as Xh,bM as $h,o as qh,c as Yh,n as Zh,bC as Qh,bm as Au,b$ as Ne,b_ as Kh,b2 as Jh,X as tc,a5 as Ot,V as nt,Q as gt,$ as cr,ba as Nr,ar as na,ac as ia,ag as oa,b3 as li,b6 as As,c0 as ec,W as rc,c1 as nc,Y as ic,c2 as Gr,c3 as _e,K as se,a0 as Me,a_ as un,ao as Gt,c4 as oc,L as ze,b7 as sc,b5 as ac,c5 as sa,bb as Rs,c6 as lc,af as qn,G as Rr,bc as uc,bf as hc,bg as cc}from"./index-DP-njuuq.js";import{u as Is}from"./queue-bsTN8_gk.js";const Wy=jh({__name:"BasicTextarea",props:{modelValue:{default:""},modelModifiers:{}},emits:Gh(["submit"],["update:modelValue"]),setup(r,{emit:t}){const e=t,n=Hh(r,"modelValue"),i=Ao(),o=Ao({height:"auto",overflowY:"hidden"});function s(l){l.target instanceof HTMLTextAreaElement&&(l.target.style.height="auto",l.target.style.height=`${l.target.scrollHeight}px`)}function a(l){var u,h;if(l.target instanceof HTMLTextAreaElement)if(l.code==="Enter"&&l.shiftKey){l.preventDefault();const d=(u=l.target)==null?void 0:u.selectionStart,v=(h=l.target)==null?void 0:h.selectionEnd;n.value=`${n.value.substring(0,d)}
2
  ${n.value.substring(v)}`,o.value.height="0",Qh().then(()=>{i.value&&(i.value.selectionStart=i.value.selectionEnd=d+1,o.value.height=`${i.value.scrollHeight}px`)})}else l.code==="Enter"&&(l.preventDefault(),e("submit",n.value))}return Wh(()=>{i.value&&(o.value.height=`${i.value.scrollHeight}px`)}),(l,u)=>Xh((qh(),Yh("textarea",{ref_key:"textareaRef",ref:i,"onUpdate:modelValue":u[0]||(u[0]=h=>n.value=h),style:Zh(o.value),onInput:s,onKeydown:a},null,36)),[[$h,n.value]])}});/*!
3
  * @pixi/constants - v6.5.10
4
  * Compiled Thu, 06 Jul 2023 15:25:11 UTC
 
1
+ import{d as jh,aJ as Gh,aK as Hh,e as Ao,k as Wh,y as Xh,bM as $h,o as qh,c as Yh,n as Zh,bC as Qh,bm as Au,b$ as Ne,b_ as Kh,b2 as Jh,X as tc,a5 as Ot,V as nt,Q as gt,$ as cr,ba as Nr,ar as na,ac as ia,ag as oa,b3 as li,b6 as As,c0 as ec,W as rc,c1 as nc,Y as ic,c2 as Gr,c3 as _e,K as se,a0 as Me,a_ as un,ao as Gt,c4 as oc,L as ze,b7 as sc,b5 as ac,c5 as sa,bb as Rs,c6 as lc,af as qn,G as Rr,bc as uc,bf as hc,bg as cc}from"./index-BLLVP689.js";import{u as Is}from"./queue-CUO21uzo.js";const Wy=jh({__name:"BasicTextarea",props:{modelValue:{default:""},modelModifiers:{}},emits:Gh(["submit"],["update:modelValue"]),setup(r,{emit:t}){const e=t,n=Hh(r,"modelValue"),i=Ao(),o=Ao({height:"auto",overflowY:"hidden"});function s(l){l.target instanceof HTMLTextAreaElement&&(l.target.style.height="auto",l.target.style.height=`${l.target.scrollHeight}px`)}function a(l){var u,h;if(l.target instanceof HTMLTextAreaElement)if(l.code==="Enter"&&l.shiftKey){l.preventDefault();const d=(u=l.target)==null?void 0:u.selectionStart,v=(h=l.target)==null?void 0:h.selectionEnd;n.value=`${n.value.substring(0,d)}
2
  ${n.value.substring(v)}`,o.value.height="0",Qh().then(()=>{i.value&&(i.value.selectionStart=i.value.selectionEnd=d+1,o.value.height=`${i.value.scrollHeight}px`)})}else l.code==="Enter"&&(l.preventDefault(),e("submit",n.value))}return Wh(()=>{i.value&&(o.value.height=`${i.value.scrollHeight}px`)}),(l,u)=>Xh((qh(),Yh("textarea",{ref_key:"textareaRef",ref:i,"onUpdate:modelValue":u[0]||(u[0]=h=>n.value=h),style:Zh(o.value),onInput:s,onKeydown:a},null,36)),[[$h,n.value]])}});/*!
3
  * @pixi/constants - v6.5.10
4
  * Compiled Thu, 06 Jul 2023 15:25:11 UTC
assets/{_...all_-EQKFQugU.js → _...all_-BzVwBEm1.js} RENAMED
@@ -1 +1 @@
1
- import{_ as e}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as o,o as _}from"./index-DP-njuuq.js";const c={};function n(r,t){return _(),o("div",null," 404 - Page not found ")}const f=e(c,[["render",n]]);export{f as default};
 
1
+ import{_ as e}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as o,o as _}from"./index-BLLVP689.js";const c={};function n(r,t){return _(),o("div",null," 404 - Page not found ")}const f=e(c,[["render",n]]);export{f as default};
assets/{audio-D2gDJdAe.js → audio-BxvHbnrt.js} RENAMED
@@ -1 +1 @@
1
- import{d as s,e as f,c as d,o as p,v as t}from"./index-DP-njuuq.js";const v=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{v as default};
 
1
+ import{d as s,e as f,c as d,o as p,v as t}from"./index-BLLVP689.js";const v=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{v as default};
assets/{default-C1FPVDIN.js → default-BLImF5lU.js} RENAMED
@@ -1 +1 @@
1
- import{d as p,u as s,c,a as d,r as i,n as l,b as e,o as m}from"./index-DP-njuuq.js";const x=p({__name:"default",setup(u){const{top:t,right:o,bottom:a,left:n}=s();return(f,_)=>{const r=i("RouterView");return m(),c("main",{text:"gray-700 dark:gray-200","font-cuteen":"","h-full":"",style:l({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default};
 
1
+ import{d as p,u as s,c,a as d,r as i,n as l,b as e,o as m}from"./index-BLLVP689.js";const x=p({__name:"default",setup(u){const{top:t,right:o,bottom:a,left:n}=s();return(f,_)=>{const r=i("RouterView");return m(),c("main",{text:"gray-700 dark:gray-200","font-cuteen":"","h-full":"",style:l({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default};
assets/{delays-B2LfrQ9q.js → delays-BMx_bHZK.js} RENAMED
@@ -1 +1 @@
1
- import{p as g,_,q as b}from"./Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-C-SjLrPw.js";import"./index-C48T3KEs.js";import{d as k,e as d,c as s,o as l,v as e,a as y,b as x,B as i,bH as f,bO as p}from"./index-DP-njuuq.js";import"./queue-bsTN8_gk.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":""},B={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},H=k({__name:"delays",setup(E){const t=d(""),v=d([]),c=d([]),u=d(!1),r=g();r.onHandlerEvent("delay",a=>{c.value.push(a)});function m(){u.value=!0;const a=t.value.split("");for(const n of a)r.add(n);r.add(b),t.value="",u.value=!1}return(a,n)=>(l(),s("div",z,[e("div",w,[y(x(_),{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:m},null,8,["modelValue"]),e("button",h,i(u.value?"Processing...":"Send"),1)]),e("div",M,[e("div",V,[n[1]||(n[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(l(!0),s(f,null,p(v.value,o=>(l(),s("div",{key:o},[e("div",null,i(o),1)]))),128))]),e("div",B,[n[2]||(n[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(l(!0),s(f,null,p(c.value,o=>(l(),s("div",{key:o},[e("div",null,i(o)+"s",1)]))),128))])])]))}});export{H as default};
 
1
+ import{p as g,_,q as b}from"./Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-BjHMXKfD.js";import"./index-qwnPePdB.js";import{d as k,e as d,c as s,o as l,v as e,a as y,b as x,B as i,bH as f,bO as p}from"./index-BLLVP689.js";import"./queue-CUO21uzo.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":""},B={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},H=k({__name:"delays",setup(E){const t=d(""),v=d([]),c=d([]),u=d(!1),r=g();r.onHandlerEvent("delay",a=>{c.value.push(a)});function m(){u.value=!0;const a=t.value.split("");for(const n of a)r.add(n);r.add(b),t.value="",u.value=!1}return(a,n)=>(l(),s("div",z,[e("div",w,[y(x(_),{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:m},null,8,["modelValue"]),e("button",h,i(u.value?"Processing...":"Send"),1)]),e("div",M,[e("div",V,[n[1]||(n[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(l(!0),s(f,null,p(v.value,o=>(l(),s("div",{key:o},[e("div",null,i(o),1)]))),128))]),e("div",B,[n[2]||(n[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(l(!0),s(f,null,p(c.value,o=>(l(),s("div",{key:o},[e("div",null,i(o)+"s",1)]))),128))])])]))}});export{H as default};
assets/{emotions-BaDA-gTy.js → emotions-DOBYOJCg.js} RENAMED
@@ -1 +1 @@
1
- import{o as _,_ as b,q as k}from"./Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-C-SjLrPw.js";import{u as x}from"./queue-bsTN8_gk.js";import{d as z,e as u,c as s,o as t,v as e,a as h,b as w,B as i,bH as f,bO as m}from"./index-DP-njuuq.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":""},B={"w-full":"",flex:"","flex-row":"","gap-4":""},E={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},Q={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=z({__name:"emotions",setup(S){const l=u(""),p=u([]),r=u([]),d=u(!1),g=x({handlers:[async a=>{r.value.push(a.data)}]}),c=_(g);function v(){d.value=!0;const a=l.value.split("");for(const o of a)c.add(o);c.add(k),l.value="",d.value=!1}return(a,o)=>(t(),s("div",M,[e("div",V,[h(w(b),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",y,i(d.value?"Processing...":"Send"),1)]),e("div",B,[e("div",E,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,m(p.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))]),e("div",Q,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,m(r.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))])])]))}});export{N as default};
 
1
+ import{o as _,_ as b,q as k}from"./Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-BjHMXKfD.js";import{u as x}from"./queue-CUO21uzo.js";import{d as z,e as u,c as s,o as t,v as e,a as h,b as w,B as i,bH as f,bO as m}from"./index-BLLVP689.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":""},B={"w-full":"",flex:"","flex-row":"","gap-4":""},E={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},Q={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=z({__name:"emotions",setup(S){const l=u(""),p=u([]),r=u([]),d=u(!1),g=x({handlers:[async a=>{r.value.push(a.data)}]}),c=_(g);function v(){d.value=!0;const a=l.value.split("");for(const o of a)c.add(o);c.add(k),l.value="",d.value=!1}return(a,o)=>(t(),s("div",M,[e("div",V,[h(w(b),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",y,i(d.value?"Processing...":"Send"),1)]),e("div",B,[e("div",E,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,m(p.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))]),e("div",Q,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,m(r.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))])])]))}});export{N as default};
assets/{filter-message-DhvAKWhV.js → filter-message-BaQ-MCkO.js} RENAMED
@@ -1 +1 @@
1
- import{d as g,e as u,r as m,c as v,o as _,v as s,a as x,B as d}from"./index-DP-njuuq.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};
 
1
+ import{d as g,e as u,r as m,c as v,o as _,v as s,a as x,B as d}from"./index-BLLVP689.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};
assets/{image-Bh2Nzwnq.js → image-Be-MqGry.js} RENAMED
@@ -1,2 +1,2 @@
1
- import{d as _,e as c,bZ as y,c as d,o as u,v as a,A as x,B as v,b}from"./index-DP-njuuq.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.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(),o=c(""),{copy:m}=y({source:o});async function g(s){return new Promise((e,n)=>{const t=new FileReader;t.onload=r=>{var l,i;e(((i=(l=r.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=r=>{n(r)},t.readAsDataURL(s)})}async function f(s){var t;const n=(t=s.target.files)==null?void 0:t[0];if(n){p.value=n;const r=await g(n);o.value=r}}return(s,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))]),o.value?(u(),d("div",C,[a("img",{src:o.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",R," "+v(o.value)+`
2
  `,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>b(m)())}," Copy Data URL ")])):x("",!0)]))}}),A=w(k,[["__scopeId","data-v-7edd53e6"]]);export{A as default};
 
1
+ import{d as _,e as c,bZ as y,c as d,o as u,v as a,A as x,B as v,b}from"./index-BLLVP689.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.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(),o=c(""),{copy:m}=y({source:o});async function g(s){return new Promise((e,n)=>{const t=new FileReader;t.onload=r=>{var l,i;e(((i=(l=r.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=r=>{n(r)},t.readAsDataURL(s)})}async function f(s){var t;const n=(t=s.target.files)==null?void 0:t[0];if(n){p.value=n;const r=await g(n);o.value=r}}return(s,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))]),o.value?(u(),d("div",C,[a("img",{src:o.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",R," "+v(o.value)+`
2
  `,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>b(m)())}," Copy Data URL ")])):x("",!0)]))}}),A=w(k,[["__scopeId","data-v-7edd53e6"]]);export{A as default};
assets/{index-DP-njuuq.js → index-BLLVP689.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/{index-CVBHpNOJ.js → index-C90rWeT3.js} RENAMED
@@ -1,4 +1,4 @@
1
- var tu=Object.defineProperty;var nu=(t,e,n)=>e in t?tu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var vo=(t,e,n)=>nu(t,typeof e!="symbol"?e+"":e,n);import{r as Ya,e as ru,T as iu,A as ou,L as yo,M as au,a as su,D as lu,b as uu,E as cu,c as du,d as fu,f as pu,g as hu,h as mu,i as Xa,V as gu,j as vu,k as yu,l as hi,m as bu,n as xu,u as wu,o as ku,p as Tu,q as Au,s as _u,t as Eu,_ as Qa}from"./Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-C-SjLrPw.js";import{d as xe,e as U,f as Me,g as Di,h as Za,i as vr,w as Se,j as Mu,k as ft,l as ut,c as Z,o as Y,m as Ja,p as Su,q as ze,r as Iu,s as Fe,t as be,a as de,v as P,x as Gt,y as at,z as yr,A as Ke,B as oe,b as L,T as Dt,C as vn,D as br,E as es,Z as Bi,F as Ru,V as fe,M as tn,S as bo,Q as cr,O as cn,G as Ge,P as Bt,R as Cu,H as ts,I as Cn,J as Fi,K as Xe,L as ns,N as rs,U as zi,W as Pn,X as Nu,Y as Ui,_ as Ou,$ as is,a0 as Mt,a1 as ji,a2 as Ft,a3 as Pu,a4 as os,a5 as Yt,a6 as as,a7 as ss,a8 as Lu,a9 as ls,aa as Du,ab as yt,ac as xr,ad as us,ae as cs,af as Bu,ag as Wt,ah as Fu,ai as zu,aj as Uu,ak as ju,al as Rr,am as dr,an as mi,ao as Kt,ap as ds,aq as gi,ar as ln,as as xo,at as qt,au as un,av as Cr,aw as $u,ax as Vu,ay as Hu,az as Gu,aA as fs,aB as ps,aC as fr,aD as hs,aE as $i,aF as pr,aG as ms,aH as Ku,aI as Vi,aJ as qu,aK as Wu,aL as wo,n as mn,aM as Yu,aN as vi,aO as gs,aP as Xu,aQ as Sn,aR as vs,aS as xt,aT as St,aU as Nn,aV as Qu,aW as Zu,aX as Ju,aY as ec,aZ as tc,a_ as Hi,a$ as nc,b0 as rc,b1 as ic,b2 as Nr,b3 as oc,b4 as ys,b5 as ac,b6 as sc,b7 as lc,b8 as uc,b9 as cc,ba as Or,bb as dc,bc as fc,bd as pc,be as ko,bf as To,bg as Ao,bh as _o,bi as hc,bj as mc,bk as gc,bl as vc,bm as yc,bn as wr,bo as Ln,bp as zt,bq as Dn,br as bc,bs as xc,bt as wc,bu as Ut,bv as kc,bw as Tc,bx as Ac,by as Qt,bz as Eo,bA as ar,bB as _c,bC as pt,bD as Ec,bE as Mc,bF as Sc,bG as Ic,bH as gn,bI as bs,bJ as xs,bK as ws,bL as Rc,bM as Pr,bN as Cc,bO as On,bP as Nc,bQ as ks,bR as Oc,bS as Pc,bT as Lc,bU as Dc,bV as Ts,bW as As,bX as Bc,bY as Lr}from"./index-DP-njuuq.js";import{u as Dr}from"./queue-bsTN8_gk.js";import{_ as kr}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{d as Mo}from"./index-C48T3KEs.js";function So(t,e,n){return(1-n)*t+n*e}function Ht(t,e){return t+Math.random()*(e-t)}async function*Fc(t,e){const n=t.getReader();try{for(;;){const{done:r,value:i}=await n.read();if(r)return;yield e(i)}}finally{n.releaseLock()}}function zc(){let t=-1,e,n=-1;function r(i,o){(o>=t||o<n)&&(e=[Ht(-1,1),Ht(-1,.7)],n=o,t=o+Ya()/1e3,i.focusController.focus(e[0]*.5,e[1]*.5,!1)),i.focusController.update(o-n);const a=i.coreModel;a.setParameterValueById("ParamEyeBallX",So(a.getParameterValueById("ParamEyeBallX"),e[0],.3)),a.setParameterValueById("ParamEyeBallY",So(a.getParameterValueById("ParamEyeBallY"),e[1],.3))}return{update:r}}const Uc=xe({__name:"Viewer",props:{model:null,mouthOpenSize:{default:0}},setup(t,{expose:e}){const n=t,r=U(),i=U(),o=U(),a=U(),s=U(0),l=U(0),u=Me(()=>Math.max(0,Math.min(100,n.mouthOpenSize))),c=Di(),d=Za(Ja),p=Me(()=>d.between("sm","md").value||d.smaller("sm").value),{height:f,width:h}=vr(r,{immediate:!0,windowResize:!0,reset:!0}),w=zc();function g(){return a.value.internalModel.coreModel}function y(m){if(!m.value)return;let E=2.2;p.value&&(E=2.2);const x=f.value*.95/l.value*E,b=h.value*.95/s.value*E,v=Math.min(x,b);m.value.scale.set(v,v)}async function _(m){var A;yo.registerTicker(uu),ru.add(iu),i.value=new ou({width:h.value,height:f.value,backgroundAlpha:0}),o.value=i.value.view,o.value.style.objectFit="contain",m.appendChild(i.value.view),a.value=await yo.from(n.model,{motionPreload:au.ALL}),i.value.stage.addChild(a.value),s.value=a.value.width,l.value=a.value.height,a.value.x=h.value/2,a.value.y=f.value,a.value.rotation=Math.PI,a.value.skew.x=Math.PI,a.value.anchor.set(.5,.5),y(a),a.value.on("hit",R=>{a.value&&R.includes("body")&&a.value.motion("tap_body")});const E=a.value.internalModel,x=E.coreModel,b=E.motionManager;x.setParameterValueById("ParamMouthOpenY",u.value),b.groups.idle&&((A=b.motionGroups[b.groups.idle])==null||A.forEach(R=>{R._motionData.curves.forEach(F=>{(F.id==="ParamEyeBallX"||F.id==="ParamEyeBallY")&&(F.id=`_${F.id}`)})}));const v=b.update;b.update=function(R,F){return v==null||v.call(this,R,F),b.state.currentGroup===b.groups.idle&&w.update(E,F),!0}}async function T(m){await a.value.motion(m,void 0,su.FORCE)}const M=Mu(()=>{i.value&&i.value.renderer.resize(h.value,f.value),o.value&&(o.value.width=h.value,o.value.height=f.value),a.value&&(a.value.x=h.value/2,a.value.y=f.value,y(a))},100);function N(){a.value&&(a.value.filters=[new lu({color:c.value?10053247:14662098,alpha:.3,blur:0,distance:20,rotation:45})])}return Se([h,f],()=>{M()}),Se(c,N,{immediate:!0}),Se(a,N),ft(N),ft(async()=>{r.value&&await _(r.value)}),ut(()=>{var m;(m=i.value)==null||m.destroy()}),Se(u,m=>{g().setParameterValueById("ParamMouthOpenY",m)}),e({setMotion:T}),(m,E)=>(Y(),Z("div",{ref_key:"containerRef",ref:r,"h-full":"","w-full":""},null,512))}}),_s=xe({__name:"Screen",setup(t){const e=U(),n=Za(Ja),{width:r,height:i}=Su(),o=vr(e,{immediate:!0,windowResize:!0,reset:!0}),a=Me(()=>n.between("sm","md").value||n.smaller("sm").value),s=Me(()=>n.between("md","lg").value),l=Me(()=>n.greaterOrEqual("lg").value),u=Me(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=U(0);return Se([r,i,e],()=>{var p,f;const d=(f=(p=e.value)==null?void 0:p.parentElement)==null?void 0:f.getBoundingClientRect();l.value||a.value||s.value?c.value=(d==null?void 0:d.height)||0:c.value=600}),Se([o.width,o.height],()=>{l.value||a.value||s.value?c.value=o.height.value:c.value=600}),ft(async()=>{e.value&&o.update()}),(d,p)=>(Y(),Z("div",{ref_key:"containerRef",ref:e,"h-full":"","w-full":""},[ze(d.$slots,"default",{width:u.value,height:c.value})],512))}}),jc={absolute:"",bottom:"3",right:"3"},$c={flex:"~ row","cursor-pointer":""},Vc=["checked","aria-checked"],Hc={key:0,"min-w":"50vw",z:"<md:20",class:"bottom-11 right-0",absolute:"","m-1":"","w-full":""},Gc={bg:"zinc-200/20 dark:black/20","rounded-lg":"","p-2":"","backdrop-blur-sm":""},Kc={"font-mono":""},qc={flex:"~ row","flex-wrap":"","gap-2":""},Wc=xe({__name:"Live2D",props:{model:null,mouthOpenSize:{default:0}},setup(t,{expose:e}){const n=U(),r=U(!1);return e({setMotion:async i=>{var o;await((o=n.value)==null?void 0:o.setMotion(i))}}),(i,o)=>{const a=Iu("TransitionVertical");return Y(),Fe(_s,{relative:""},{default:be(({width:s,height:l})=>[de(Uc,{ref_key:"modelRef",ref:n,"canvas-width":s,"canvas-height":l,model:t.model,"mouth-open-size":t.mouthOpenSize},null,8,["canvas-width","canvas-height","model","mouth-open-size"]),P("div",jc,[P("div",$c,[P("label",{class:Gt([r.value?"bg-zinc-300 dark:bg-zinc-200":"bg-zinc-100 dark:bg-zinc-700"]),transition:"all ease-in-out duration-500",text:"lg zinc-500 dark:zinc-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[at(P("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>r.value=u),checked:r.value,"aria-checked":r.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,Vc),[[yr,r.value]]),o[8]||(o[8]=P("div",{"select-none":""},[P("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),de(a,null,{default:be(()=>[r.value?(Y(),Z("div",Hc,[P("div",Gc,[P("div",Kc,[P("span",null,oe(i.$t("stage.viewers.debug-menu.emotions")),1)]),P("div",qc,[P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(cu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.surprised")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(du))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.sad")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(fu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.angry")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(pu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.happy")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(hu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.awkward")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(mu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.question")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(Xa))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):Ke("",!0)]),_:1})])]),_:1})}}});var Yc=Object.defineProperty,Xc=(t,e,n)=>e in t?Yc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qc=(t,e,n)=>Xc(t,e+"",n);function Zc(t){return us()?(cs(t),!0):!1}function Es(t){return typeof t=="function"?t():L(t)}const Jc=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ed=Object.prototype.toString,td=t=>ed.call(t)==="[object Object]",nd=()=>{},rd=Jc?window:void 0;function id(t){var e;const n=Es(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Br(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=rd):[e,n,r,i]=t,!e)return nd;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,d,p,f)=>(c.addEventListener(d,p,f),()=>c.removeEventListener(d,p,f)),l=Se(()=>[id(e),Es(i)],([c,d])=>{if(a(),!c)return;const p=td(d)?{...d}:d;o.push(...n.flatMap(f=>r.map(h=>s(c,f,h,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Zc(u),u}function Ms(t,e,n,r){const i=class extends Pn{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((s,[l,u])=>{const c=Ui.clone({[l]:{value:u}});return{...s,...c}},{}),vertexShader:e,fragmentShader:n}),Qc(this,"key",""),a.forEach(([s])=>Object.defineProperty(this,s,{get:()=>this.uniforms[s].value,set:l=>this.uniforms[s].value=l})),Object.assign(this,o)}};return i.key=Yt.generateUUID(),i}Ms({color:new Xe("white"),scale:new Ge(1,1),imageBounds:new Ge(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},`
2
  varying vec2 vUv;
3
  varying vec2 vPos;
4
  void main() {
 
1
+ var tu=Object.defineProperty;var nu=(t,e,n)=>e in t?tu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var vo=(t,e,n)=>nu(t,typeof e!="symbol"?e+"":e,n);import{r as Ya,e as ru,T as iu,A as ou,L as yo,M as au,a as su,D as lu,b as uu,E as cu,c as du,d as fu,f as pu,g as hu,h as mu,i as Xa,V as gu,j as vu,k as yu,l as hi,m as bu,n as xu,u as wu,o as ku,p as Tu,q as Au,s as _u,t as Eu,_ as Qa}from"./Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-BjHMXKfD.js";import{d as xe,e as U,f as Me,g as Di,h as Za,i as vr,w as Se,j as Mu,k as ft,l as ut,c as Z,o as Y,m as Ja,p as Su,q as ze,r as Iu,s as Fe,t as be,a as de,v as P,x as Gt,y as at,z as yr,A as Ke,B as oe,b as L,T as Dt,C as vn,D as br,E as es,Z as Bi,F as Ru,V as fe,M as tn,S as bo,Q as cr,O as cn,G as Ge,P as Bt,R as Cu,H as ts,I as Cn,J as Fi,K as Xe,L as ns,N as rs,U as zi,W as Pn,X as Nu,Y as Ui,_ as Ou,$ as is,a0 as Mt,a1 as ji,a2 as Ft,a3 as Pu,a4 as os,a5 as Yt,a6 as as,a7 as ss,a8 as Lu,a9 as ls,aa as Du,ab as yt,ac as xr,ad as us,ae as cs,af as Bu,ag as Wt,ah as Fu,ai as zu,aj as Uu,ak as ju,al as Rr,am as dr,an as mi,ao as Kt,ap as ds,aq as gi,ar as ln,as as xo,at as qt,au as un,av as Cr,aw as $u,ax as Vu,ay as Hu,az as Gu,aA as fs,aB as ps,aC as fr,aD as hs,aE as $i,aF as pr,aG as ms,aH as Ku,aI as Vi,aJ as qu,aK as Wu,aL as wo,n as mn,aM as Yu,aN as vi,aO as gs,aP as Xu,aQ as Sn,aR as vs,aS as xt,aT as St,aU as Nn,aV as Qu,aW as Zu,aX as Ju,aY as ec,aZ as tc,a_ as Hi,a$ as nc,b0 as rc,b1 as ic,b2 as Nr,b3 as oc,b4 as ys,b5 as ac,b6 as sc,b7 as lc,b8 as uc,b9 as cc,ba as Or,bb as dc,bc as fc,bd as pc,be as ko,bf as To,bg as Ao,bh as _o,bi as hc,bj as mc,bk as gc,bl as vc,bm as yc,bn as wr,bo as Ln,bp as zt,bq as Dn,br as bc,bs as xc,bt as wc,bu as Ut,bv as kc,bw as Tc,bx as Ac,by as Qt,bz as Eo,bA as ar,bB as _c,bC as pt,bD as Ec,bE as Mc,bF as Sc,bG as Ic,bH as gn,bI as bs,bJ as xs,bK as ws,bL as Rc,bM as Pr,bN as Cc,bO as On,bP as Nc,bQ as ks,bR as Oc,bS as Pc,bT as Lc,bU as Dc,bV as Ts,bW as As,bX as Bc,bY as Lr}from"./index-BLLVP689.js";import{u as Dr}from"./queue-CUO21uzo.js";import{_ as kr}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{d as Mo}from"./index-qwnPePdB.js";function So(t,e,n){return(1-n)*t+n*e}function Ht(t,e){return t+Math.random()*(e-t)}async function*Fc(t,e){const n=t.getReader();try{for(;;){const{done:r,value:i}=await n.read();if(r)return;yield e(i)}}finally{n.releaseLock()}}function zc(){let t=-1,e,n=-1;function r(i,o){(o>=t||o<n)&&(e=[Ht(-1,1),Ht(-1,.7)],n=o,t=o+Ya()/1e3,i.focusController.focus(e[0]*.5,e[1]*.5,!1)),i.focusController.update(o-n);const a=i.coreModel;a.setParameterValueById("ParamEyeBallX",So(a.getParameterValueById("ParamEyeBallX"),e[0],.3)),a.setParameterValueById("ParamEyeBallY",So(a.getParameterValueById("ParamEyeBallY"),e[1],.3))}return{update:r}}const Uc=xe({__name:"Viewer",props:{model:null,mouthOpenSize:{default:0}},setup(t,{expose:e}){const n=t,r=U(),i=U(),o=U(),a=U(),s=U(0),l=U(0),u=Me(()=>Math.max(0,Math.min(100,n.mouthOpenSize))),c=Di(),d=Za(Ja),p=Me(()=>d.between("sm","md").value||d.smaller("sm").value),{height:f,width:h}=vr(r,{immediate:!0,windowResize:!0,reset:!0}),w=zc();function g(){return a.value.internalModel.coreModel}function y(m){if(!m.value)return;let E=2.2;p.value&&(E=2.2);const x=f.value*.95/l.value*E,b=h.value*.95/s.value*E,v=Math.min(x,b);m.value.scale.set(v,v)}async function _(m){var A;yo.registerTicker(uu),ru.add(iu),i.value=new ou({width:h.value,height:f.value,backgroundAlpha:0}),o.value=i.value.view,o.value.style.objectFit="contain",m.appendChild(i.value.view),a.value=await yo.from(n.model,{motionPreload:au.ALL}),i.value.stage.addChild(a.value),s.value=a.value.width,l.value=a.value.height,a.value.x=h.value/2,a.value.y=f.value,a.value.rotation=Math.PI,a.value.skew.x=Math.PI,a.value.anchor.set(.5,.5),y(a),a.value.on("hit",R=>{a.value&&R.includes("body")&&a.value.motion("tap_body")});const E=a.value.internalModel,x=E.coreModel,b=E.motionManager;x.setParameterValueById("ParamMouthOpenY",u.value),b.groups.idle&&((A=b.motionGroups[b.groups.idle])==null||A.forEach(R=>{R._motionData.curves.forEach(F=>{(F.id==="ParamEyeBallX"||F.id==="ParamEyeBallY")&&(F.id=`_${F.id}`)})}));const v=b.update;b.update=function(R,F){return v==null||v.call(this,R,F),b.state.currentGroup===b.groups.idle&&w.update(E,F),!0}}async function T(m){await a.value.motion(m,void 0,su.FORCE)}const M=Mu(()=>{i.value&&i.value.renderer.resize(h.value,f.value),o.value&&(o.value.width=h.value,o.value.height=f.value),a.value&&(a.value.x=h.value/2,a.value.y=f.value,y(a))},100);function N(){a.value&&(a.value.filters=[new lu({color:c.value?10053247:14662098,alpha:.3,blur:0,distance:20,rotation:45})])}return Se([h,f],()=>{M()}),Se(c,N,{immediate:!0}),Se(a,N),ft(N),ft(async()=>{r.value&&await _(r.value)}),ut(()=>{var m;(m=i.value)==null||m.destroy()}),Se(u,m=>{g().setParameterValueById("ParamMouthOpenY",m)}),e({setMotion:T}),(m,E)=>(Y(),Z("div",{ref_key:"containerRef",ref:r,"h-full":"","w-full":""},null,512))}}),_s=xe({__name:"Screen",setup(t){const e=U(),n=Za(Ja),{width:r,height:i}=Su(),o=vr(e,{immediate:!0,windowResize:!0,reset:!0}),a=Me(()=>n.between("sm","md").value||n.smaller("sm").value),s=Me(()=>n.between("md","lg").value),l=Me(()=>n.greaterOrEqual("lg").value),u=Me(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=U(0);return Se([r,i,e],()=>{var p,f;const d=(f=(p=e.value)==null?void 0:p.parentElement)==null?void 0:f.getBoundingClientRect();l.value||a.value||s.value?c.value=(d==null?void 0:d.height)||0:c.value=600}),Se([o.width,o.height],()=>{l.value||a.value||s.value?c.value=o.height.value:c.value=600}),ft(async()=>{e.value&&o.update()}),(d,p)=>(Y(),Z("div",{ref_key:"containerRef",ref:e,"h-full":"","w-full":""},[ze(d.$slots,"default",{width:u.value,height:c.value})],512))}}),jc={absolute:"",bottom:"3",right:"3"},$c={flex:"~ row","cursor-pointer":""},Vc=["checked","aria-checked"],Hc={key:0,"min-w":"50vw",z:"<md:20",class:"bottom-11 right-0",absolute:"","m-1":"","w-full":""},Gc={bg:"zinc-200/20 dark:black/20","rounded-lg":"","p-2":"","backdrop-blur-sm":""},Kc={"font-mono":""},qc={flex:"~ row","flex-wrap":"","gap-2":""},Wc=xe({__name:"Live2D",props:{model:null,mouthOpenSize:{default:0}},setup(t,{expose:e}){const n=U(),r=U(!1);return e({setMotion:async i=>{var o;await((o=n.value)==null?void 0:o.setMotion(i))}}),(i,o)=>{const a=Iu("TransitionVertical");return Y(),Fe(_s,{relative:""},{default:be(({width:s,height:l})=>[de(Uc,{ref_key:"modelRef",ref:n,"canvas-width":s,"canvas-height":l,model:t.model,"mouth-open-size":t.mouthOpenSize},null,8,["canvas-width","canvas-height","model","mouth-open-size"]),P("div",jc,[P("div",$c,[P("label",{class:Gt([r.value?"bg-zinc-300 dark:bg-zinc-200":"bg-zinc-100 dark:bg-zinc-700"]),transition:"all ease-in-out duration-500",text:"lg zinc-500 dark:zinc-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[at(P("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>r.value=u),checked:r.value,"aria-checked":r.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,Vc),[[yr,r.value]]),o[8]||(o[8]=P("div",{"select-none":""},[P("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),de(a,null,{default:be(()=>[r.value?(Y(),Z("div",Hc,[P("div",Gc,[P("div",Kc,[P("span",null,oe(i.$t("stage.viewers.debug-menu.emotions")),1)]),P("div",qc,[P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(cu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.surprised")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(du))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.sad")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(fu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.angry")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(pu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.happy")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(hu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.awkward")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(mu))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.question")),1),P("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=u=>{var c;return(c=n.value)==null?void 0:c.setMotion(L(Xa))})},oe(i.$t("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):Ke("",!0)]),_:1})])]),_:1})}}});var Yc=Object.defineProperty,Xc=(t,e,n)=>e in t?Yc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qc=(t,e,n)=>Xc(t,e+"",n);function Zc(t){return us()?(cs(t),!0):!1}function Es(t){return typeof t=="function"?t():L(t)}const Jc=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ed=Object.prototype.toString,td=t=>ed.call(t)==="[object Object]",nd=()=>{},rd=Jc?window:void 0;function id(t){var e;const n=Es(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Br(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=rd):[e,n,r,i]=t,!e)return nd;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,d,p,f)=>(c.addEventListener(d,p,f),()=>c.removeEventListener(d,p,f)),l=Se(()=>[id(e),Es(i)],([c,d])=>{if(a(),!c)return;const p=td(d)?{...d}:d;o.push(...n.flatMap(f=>r.map(h=>s(c,f,h,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Zc(u),u}function Ms(t,e,n,r){const i=class extends Pn{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((s,[l,u])=>{const c=Ui.clone({[l]:{value:u}});return{...s,...c}},{}),vertexShader:e,fragmentShader:n}),Qc(this,"key",""),a.forEach(([s])=>Object.defineProperty(this,s,{get:()=>this.uniforms[s].value,set:l=>this.uniforms[s].value=l})),Object.assign(this,o)}};return i.key=Yt.generateUUID(),i}Ms({color:new Xe("white"),scale:new Ge(1,1),imageBounds:new Ge(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},`
2
  varying vec2 vUv;
3
  varying vec2 vPos;
4
  void main() {
assets/{index-C48T3KEs.js → index-qwnPePdB.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{b_ as getAugmentedNamespace}from"./index-DP-njuuq.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<backendsSortedByPriority.length;h++)if(backends[backendsSortedByPriority[h]].priority<=b){backendsSortedByPriority.splice(h,0,D);return}backendsSortedByPriority.push(D)}return}throw new TypeError("not a valid backend")},resolveBackend=async D=>{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<D.length;b++){const g=D[b];if(typeof g!="number"||!Number.isSafeInteger(g))throw new TypeError(`dims[${b}] must be an integer, got: ${g}`);if(g<0)throw new RangeError(`dims[${b}] must be a non-negative integer, got: ${g}`);u*=g}return u};let Tensor$1=class at{constructor(u,b,g){let p,h,o;if(typeof u=="string")if(p=u,o=g,u==="string"){if(!Array.isArray(b))throw new TypeError("A string tensor's data must be a string array.");h=b}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(u);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${u}.`);if(Array.isArray(b))h=f.from(b);else if(b instanceof f)h=b;else throw new TypeError(`A ${p} tensor's data must be type of ${f}`)}else if(o=b,Array.isArray(u)){if(u.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof u[0];if(f==="string")p="string",h=u;else if(f==="boolean")p="bool",h=Uint8Array.from(u);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(u.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${u.constructor}.`);p=f,h=u}if(o===void 0)o=[h.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(o);if(c!==h.length)throw new Error(`Tensor's size(${c}) does not match data length(${h.length}).`);this.dims=o,this.type=p,this.data=h,this.size=c}static bufferToTensor(u,b){if(u===void 0)throw new Error("Image buffer must be defined");if(b.height===void 0||b.width===void 0)throw new Error("Image height and width must be defined");const{height:g,width:p}=b,h=b.norm;let o,c;h===void 0||h.mean===void 0?o=255:o=h.mean,h===void 0||h.bias===void 0?c=0:c=h.bias;const f=b.bitmapFormat!==void 0?b.bitmapFormat:"RGBA",s=b.tensorFormat!==void 0&&b.tensorFormat!==void 0?b.tensorFormat:"RGB",i=g*p,t=s==="RGBA"?new Float32Array(i*4):new Float32Array(i*3);let e=4,n=0,r=1,a=2,l=3,d=0,m=i,y=i*2,v=-1;f==="RGB"&&(e=3,n=0,r=1,a=2,l=-1),s==="RGBA"?v=i*3:s==="RBG"?(d=0,y=i,m=i*2):s==="BGR"&&(y=0,m=i,d=i*2);for(let T=0;T<i;T++,n+=e,a+=e,r+=e,l+=e)t[d++]=(u[n]+c)/o,t[m++]=(u[r]+c)/o,t[y++]=(u[a]+c)/o,v!==-1&&l!==-1&&(t[v++]=(u[l]+c)/o);return s==="RGBA"?new at("float32",t,[1,4,g,p]):new at("float32",t,[1,3,g,p])}static async fromImage(u,b){const g=typeof HTMLImageElement<"u"&&u instanceof HTMLImageElement,p=typeof ImageData<"u"&&u instanceof ImageData,h=typeof ImageBitmap<"u"&&u instanceof ImageBitmap,o=typeof String<"u"&&(u instanceof String||typeof u=="string");let c,f={};if(g){const s=document.createElement("canvas"),i=s.getContext("2d");if(i!=null){let t=u.naturalHeight,e=u.naturalWidth;if(b!==void 0&&b.resizedHeight!==void 0&&b.resizedWidth!==void 0&&(t=b.resizedHeight,e=b.resizedWidth),b!==void 0){if(f=b,b.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",b.height!==void 0&&b.height!==t)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=t,b.width!==void 0&&b.width!==e)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=e}else f.tensorFormat="RGBA",f.height=t,f.width=e;s.width=e,s.height=t,i.drawImage(u,0,0,e,t),c=i.getImageData(0,0,e,t).data}else throw new Error("Can not access image data")}else if(p){const s="RGBA";let i,t;if(b!==void 0&&b.resizedWidth!==void 0&&b.resizedHeight!==void 0?(i=b.resizedHeight,t=b.resizedWidth):(i=u.height,t=u.width),b!==void 0){if(f=b,b.bitmapFormat!==void 0&&b.bitmapFormat!==s)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=i,f.width=t,b!==void 0){const e=document.createElement("canvas");e.width=t,e.height=i;const n=e.getContext("2d");if(n!=null)n.putImageData(u,0,0),c=n.getImageData(0,0,t,i).data;else throw new Error("Can not access image data")}else c=u.data}else if(h){if(b===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(b.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const s=document.createElement("canvas").getContext("2d");if(s!=null){const i=u.height,t=u.width;if(s.drawImage(u,0,0,t,i),c=s.getImageData(0,0,t,i).data,b!==void 0){if(b.height!==void 0&&b.height!==i)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=i,b.width!==void 0&&b.width!==t)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t}else f.height=i,f.width=t;return at.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(o)return new Promise((s,i)=>{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<c*o;r+=n,a+=n,l+=n,d+=n,T++)h.data[r]=(this.data[m++]-t)*i,h.data[a]=(this.data[y++]-t)*i,h.data[l]=(this.data[v++]-t)*i,h.data[d]=_===-1?255:(this.data[_++]-t)*i}else throw new Error("Can not access image data");return h}reshape(u){return new at(this.type,this.data,u)}};const Tensor=Tensor$1;let InferenceSession$1=class cn{constructor(u){this.handler=u}async run(u,b,g){const p={};let h={};if(typeof u!="object"||u===null||u instanceof Tensor||Array.isArray(u))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let o=!0;if(typeof b=="object"){if(b===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(b instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(b)){if(b.length===0)throw new TypeError("'fetches' cannot be an empty array.");o=!1;for(const s of b){if(typeof s!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(s)===-1)throw new RangeError(`'fetches' contains invalid output name: ${s}.`);p[s]=null}if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else{let s=!1;const i=Object.getOwnPropertyNames(b);for(const t of this.outputNames)if(i.indexOf(t)!==-1){const e=b[t];(e===null||e instanceof Tensor)&&(s=!0,o=!1,p[t]=e)}if(s){if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else h=b}}else if(typeof b<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const s of this.inputNames)if(typeof u[s]>"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);/*!
2
  * ONNX Runtime Web v1.14.0
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
  * Licensed under the MIT License.
 
1
+ import{b_ as getAugmentedNamespace}from"./index-BLLVP689.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<backendsSortedByPriority.length;h++)if(backends[backendsSortedByPriority[h]].priority<=b){backendsSortedByPriority.splice(h,0,D);return}backendsSortedByPriority.push(D)}return}throw new TypeError("not a valid backend")},resolveBackend=async D=>{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<D.length;b++){const g=D[b];if(typeof g!="number"||!Number.isSafeInteger(g))throw new TypeError(`dims[${b}] must be an integer, got: ${g}`);if(g<0)throw new RangeError(`dims[${b}] must be a non-negative integer, got: ${g}`);u*=g}return u};let Tensor$1=class at{constructor(u,b,g){let p,h,o;if(typeof u=="string")if(p=u,o=g,u==="string"){if(!Array.isArray(b))throw new TypeError("A string tensor's data must be a string array.");h=b}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(u);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${u}.`);if(Array.isArray(b))h=f.from(b);else if(b instanceof f)h=b;else throw new TypeError(`A ${p} tensor's data must be type of ${f}`)}else if(o=b,Array.isArray(u)){if(u.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof u[0];if(f==="string")p="string",h=u;else if(f==="boolean")p="bool",h=Uint8Array.from(u);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(u.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${u.constructor}.`);p=f,h=u}if(o===void 0)o=[h.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(o);if(c!==h.length)throw new Error(`Tensor's size(${c}) does not match data length(${h.length}).`);this.dims=o,this.type=p,this.data=h,this.size=c}static bufferToTensor(u,b){if(u===void 0)throw new Error("Image buffer must be defined");if(b.height===void 0||b.width===void 0)throw new Error("Image height and width must be defined");const{height:g,width:p}=b,h=b.norm;let o,c;h===void 0||h.mean===void 0?o=255:o=h.mean,h===void 0||h.bias===void 0?c=0:c=h.bias;const f=b.bitmapFormat!==void 0?b.bitmapFormat:"RGBA",s=b.tensorFormat!==void 0&&b.tensorFormat!==void 0?b.tensorFormat:"RGB",i=g*p,t=s==="RGBA"?new Float32Array(i*4):new Float32Array(i*3);let e=4,n=0,r=1,a=2,l=3,d=0,m=i,y=i*2,v=-1;f==="RGB"&&(e=3,n=0,r=1,a=2,l=-1),s==="RGBA"?v=i*3:s==="RBG"?(d=0,y=i,m=i*2):s==="BGR"&&(y=0,m=i,d=i*2);for(let T=0;T<i;T++,n+=e,a+=e,r+=e,l+=e)t[d++]=(u[n]+c)/o,t[m++]=(u[r]+c)/o,t[y++]=(u[a]+c)/o,v!==-1&&l!==-1&&(t[v++]=(u[l]+c)/o);return s==="RGBA"?new at("float32",t,[1,4,g,p]):new at("float32",t,[1,3,g,p])}static async fromImage(u,b){const g=typeof HTMLImageElement<"u"&&u instanceof HTMLImageElement,p=typeof ImageData<"u"&&u instanceof ImageData,h=typeof ImageBitmap<"u"&&u instanceof ImageBitmap,o=typeof String<"u"&&(u instanceof String||typeof u=="string");let c,f={};if(g){const s=document.createElement("canvas"),i=s.getContext("2d");if(i!=null){let t=u.naturalHeight,e=u.naturalWidth;if(b!==void 0&&b.resizedHeight!==void 0&&b.resizedWidth!==void 0&&(t=b.resizedHeight,e=b.resizedWidth),b!==void 0){if(f=b,b.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",b.height!==void 0&&b.height!==t)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=t,b.width!==void 0&&b.width!==e)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=e}else f.tensorFormat="RGBA",f.height=t,f.width=e;s.width=e,s.height=t,i.drawImage(u,0,0,e,t),c=i.getImageData(0,0,e,t).data}else throw new Error("Can not access image data")}else if(p){const s="RGBA";let i,t;if(b!==void 0&&b.resizedWidth!==void 0&&b.resizedHeight!==void 0?(i=b.resizedHeight,t=b.resizedWidth):(i=u.height,t=u.width),b!==void 0){if(f=b,b.bitmapFormat!==void 0&&b.bitmapFormat!==s)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=i,f.width=t,b!==void 0){const e=document.createElement("canvas");e.width=t,e.height=i;const n=e.getContext("2d");if(n!=null)n.putImageData(u,0,0),c=n.getImageData(0,0,t,i).data;else throw new Error("Can not access image data")}else c=u.data}else if(h){if(b===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(b.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const s=document.createElement("canvas").getContext("2d");if(s!=null){const i=u.height,t=u.width;if(s.drawImage(u,0,0,t,i),c=s.getImageData(0,0,t,i).data,b!==void 0){if(b.height!==void 0&&b.height!==i)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=i,b.width!==void 0&&b.width!==t)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t}else f.height=i,f.width=t;return at.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(o)return new Promise((s,i)=>{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<c*o;r+=n,a+=n,l+=n,d+=n,T++)h.data[r]=(this.data[m++]-t)*i,h.data[a]=(this.data[y++]-t)*i,h.data[l]=(this.data[v++]-t)*i,h.data[d]=_===-1?255:(this.data[_++]-t)*i}else throw new Error("Can not access image data");return h}reshape(u){return new at(this.type,this.data,u)}};const Tensor=Tensor$1;let InferenceSession$1=class cn{constructor(u){this.handler=u}async run(u,b,g){const p={};let h={};if(typeof u!="object"||u===null||u instanceof Tensor||Array.isArray(u))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let o=!0;if(typeof b=="object"){if(b===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(b instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(b)){if(b.length===0)throw new TypeError("'fetches' cannot be an empty array.");o=!1;for(const s of b){if(typeof s!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(s)===-1)throw new RangeError(`'fetches' contains invalid output name: ${s}.`);p[s]=null}if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else{let s=!1;const i=Object.getOwnPropertyNames(b);for(const t of this.outputNames)if(i.indexOf(t)!==-1){const e=b[t];(e===null||e instanceof Tensor)&&(s=!0,o=!1,p[t]=e)}if(s){if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else h=b}}else if(typeof b<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const s of this.inputNames)if(typeof u[s]>"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);/*!
2
  * ONNX Runtime Web v1.14.0
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
  * Licensed under the MIT License.
assets/{messages-Ctjyuoyh.js → messages-BJ-3RKwD.js} RENAMED
@@ -1 +1 @@
1
- import{u as m,_ as g,q as _}from"./Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-C-SjLrPw.js";import{u as v}from"./queue-bsTN8_gk.js";import{d as b,e as t,c as l,o as u,v as e,a as x,b as k,B as c,bH as h,bO as z}from"./index-DP-njuuq.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":""},B={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E=b({__name:"messages",setup(M){const s=t(""),d=t([]),o=t(!1),f=v({handlers:[async i=>{d.value.push(i.data)}]}),r=m(f);async function p(){o.value=!0,r.add(s.value),r.add(_),s.value="",o.value=!1}return(i,n)=>(u(),l("div",w,[e("div",S,[x(k(g),{modelValue:s.value,"onUpdate:modelValue":n[0]||(n[0]=a=>s.value=a),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),e("button",V,c(o.value?"Processing...":"Send"),1)]),e("div",y,[e("div",B,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(h,null,z(d.value,a=>(u(),l("div",{key:a},[e("div",null,c(a),1)]))),128))])])]))}});export{E as default};
 
1
+ import{u as m,_ as g,q as _}from"./Stage.vue_vue_type_style_index_0_scoped_af8e2d0b_lang-BjHMXKfD.js";import{u as v}from"./queue-CUO21uzo.js";import{d as b,e as t,c as l,o as u,v as e,a as x,b as k,B as c,bH as h,bO as z}from"./index-BLLVP689.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":""},B={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E=b({__name:"messages",setup(M){const s=t(""),d=t([]),o=t(!1),f=v({handlers:[async i=>{d.value.push(i.data)}]}),r=m(f);async function p(){o.value=!0,r.add(s.value),r.add(_),s.value="",o.value=!1}return(i,n)=>(u(),l("div",w,[e("div",S,[x(k(g),{modelValue:s.value,"onUpdate:modelValue":n[0]||(n[0]=a=>s.value=a),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),e("button",V,c(o.value?"Processing...":"Send"),1)]),e("div",y,[e("div",B,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(h,null,z(d.value,a=>(u(),l("div",{key:a},[e("div",null,c(a),1)]))),128))])])]))}});export{E as default};
assets/{queue-Cr9Q5V_m.js → queue-BZPcZ_IN.js} RENAMED
@@ -1 +1 @@
1
- import{u as o}from"./queue-bsTN8_gk.js";import{d as y,e as h,k,c as w,o as g,v as I}from"./index-DP-njuuq.js";const Q=y({__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),v=e.data.slice(r+1);n.value+=p,u.add(n.value.trim()),n.value=v,s=!0}s||(n.value+=e.data)}]}),l=["Hello"," N","eko","! I"," am"," an"," AI"," assistant"," trained"," to"," help"," with"," a"," variety"," of"," tasks"," such"," as"," answering"," questions",","," providing"," information",","," giving"," recommendations",","," and"," more",". How"," can"," I"," assist"," you"," today","?","Hello"," N","eko",","," I"," am"," an"," AI"," assistant","."," I"," can"," help"," answer"," questions",","," provide"," information",","," assist"," with"," tasks",","," and"," engage"," in"," conversation","."," How"," can"," I"," assist"," you"," today","?"];async function f(){for(const e of l)await i(100),c.add(e)}async function m(){f()}return k(()=>{m()}),(e,a)=>(g(),w("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default};
 
1
+ import{u as o}from"./queue-CUO21uzo.js";import{d as y,e as h,k,c as w,o as g,v as I}from"./index-BLLVP689.js";const Q=y({__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),v=e.data.slice(r+1);n.value+=p,u.add(n.value.trim()),n.value=v,s=!0}s||(n.value+=e.data)}]}),l=["Hello"," N","eko","! I"," am"," an"," AI"," assistant"," trained"," to"," help"," with"," a"," variety"," of"," tasks"," such"," as"," answering"," questions",","," providing"," information",","," giving"," recommendations",","," and"," more",". How"," can"," I"," assist"," you"," today","?","Hello"," N","eko",","," I"," am"," an"," AI"," assistant","."," I"," can"," help"," answer"," questions",","," provide"," information",","," assist"," with"," tasks",","," and"," engage"," in"," conversation","."," How"," can"," I"," assist"," you"," today","?"];async function f(){for(const e of l)await i(100),c.add(e)}async function m(){f()}return k(()=>{m()}),(e,a)=>(g(),w("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default};
assets/{queue-bsTN8_gk.js → queue-CUO21uzo.js} RENAMED
@@ -1 +1 @@
1
- import{e as l}from"./index-DP-njuuq.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function E(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=E();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u};
 
1
+ import{e as l}from"./index-BLLVP689.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function E(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=E();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u};
index.html CHANGED
@@ -24,7 +24,7 @@
24
  src="/remote-assets/page-external-data/js/script.js"
25
  ></script>
26
  <script src="/assets/js/CubismSdkForWeb-5-r.1/Core/live2dcubismcore.min.js"></script>
27
- <script type="module" crossorigin src="/assets/index-DP-njuuq.js"></script>
28
  <link rel="stylesheet" crossorigin href="/assets/index-QEdxcPXq.css">
29
  </head>
30
  <body class="font-sans">
 
24
  src="/remote-assets/page-external-data/js/script.js"
25
  ></script>
26
  <script src="/assets/js/CubismSdkForWeb-5-r.1/Core/live2dcubismcore.min.js"></script>
27
+ <script type="module" crossorigin src="/assets/index-BLLVP689.js"></script>
28
  <link rel="stylesheet" crossorigin href="/assets/index-QEdxcPXq.css">
29
  </head>
30
  <body class="font-sans">