nekomeowww commited on
Commit
3ccf4ec
·
1 Parent(s): d669cf0

release: build 45def6201ccc3cf7b97c38ce89f15551a192c4e6

Browse files
assets/{BasicTextarea.vue_vue_type_script_setup_true_lang-BsQkxH6e.js → BasicTextarea.vue_vue_type_script_setup_true_lang-DYLULqjM.js} RENAMED
@@ -1,2 +1,2 @@
1
- import{d as g,aW as m,aX as h,e as s,g as p,q as x,z as y,o as E,c as M,n as T,J as _}from"./index-DUs41D0m.js";const $=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)}
2
- ${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 _};
 
1
+ import{d as g,aV as m,aW as h,e as s,g as p,q as x,z as y,o as E,c as M,n as T,J as _}from"./index-D1kvczNl.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)}
2
+ ${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 _};
assets/{audio-CzkD1kaA.js → audio-4UYpDumN.js} RENAMED
@@ -1 +1 @@
1
- import{d as s,e as f,o as d,c as p,m as t}from"./index-DUs41D0m.js";const R=s({__name:"audio",setup(m){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)=>(d(),p("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};
 
1
+ import{d as s,e as f,o as d,c as p,m as t}from"./index-D1kvczNl.js";const R=s({__name:"audio",setup(m){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)=>(d(),p("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};
assets/{default-D-XkYWdr.js → default-DNNqlzhw.js} RENAMED
@@ -1 +1 @@
1
- import{u as p}from"./index-DM_lg1vq.js";import{d as s,c,a as d,n as i,u as e,r as m,o as u}from"./index-DUs41D0m.js";const h=s({__name:"default",setup(f){const{top:t,right:o,bottom:a,left:n}=p();return(l,_)=>{const r=m("RouterView");return u(),c("main",{text:"gray-700 dark:gray-200","font-cuteen":"","h-full":"",style:i({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{h as default};
 
1
+ import{u as p}from"./index-BUtQmW0A.js";import{d as s,c,a as d,n as i,u as e,r as m,o as u}from"./index-D1kvczNl.js";const h=s({__name:"default",setup(f){const{top:t,right:o,bottom:a,left:n}=p();return(l,_)=>{const r=m("RouterView");return u(),c("main",{text:"gray-700 dark:gray-200","font-cuteen":"","h-full":"",style:i({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{h as default};
assets/{delays-Cs3vXPhv.js → delays-Bi0QknVh.js} RENAMED
@@ -1 +1 @@
1
- import{_ as g}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-BsQkxH6e.js";import{i as _,l as k}from"./queues-CQnjJaMZ.js";import{d as y,e as d,o as s,c as l,m as e,a as b,y as i,F as f,C as p}from"./index-DUs41D0m.js";import"./queue-Br3KBcIu.js";const x={flex:"","flex-col":"","gap-2":"","p-2":""},z={flex:"","flex-row":"","gap-2":""},w={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},h={"w-full":"",flex:"","flex-row":"","gap-4":""},M={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},P=y({__name:"delays",setup(E){const t=d(""),m=d([]),c=d([]),r=d(!1),u=_();u.onHandlerEvent("delay",a=>{c.value.push(a)});function v(){r.value=!0;const a=t.value.split("");for(const n of a)u.add(n);u.add(k),t.value="",r.value=!1}return(a,n)=>(s(),l("div",x,[e("div",z,[b(g,{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:v},null,8,["modelValue"]),e("button",w,i(r.value?"Processing...":"Send"),1)]),e("div",h,[e("div",M,[n[1]||(n[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(s(!0),l(f,null,p(m.value,o=>(s(),l("div",{key:o},[e("div",null,i(o),1)]))),128))]),e("div",V,[n[2]||(n[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(s(!0),l(f,null,p(c.value,o=>(s(),l("div",{key:o},[e("div",null,i(o)+"s",1)]))),128))])])]))}});export{P as default};
 
1
+ import{_ as g}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-DYLULqjM.js";import{i as _,l as k}from"./queues-Bj9-D8li.js";import{d as y,e as d,o as s,c as l,m as e,a as b,y as i,F as f,C as p}from"./index-D1kvczNl.js";import"./queue-CHpXWY4T.js";const x={flex:"","flex-col":"","gap-2":"","p-2":""},z={flex:"","flex-row":"","gap-2":""},w={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},h={"w-full":"",flex:"","flex-row":"","gap-4":""},M={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},P=y({__name:"delays",setup(E){const t=d(""),m=d([]),c=d([]),r=d(!1),u=_();u.onHandlerEvent("delay",a=>{c.value.push(a)});function v(){r.value=!0;const a=t.value.split("");for(const n of a)u.add(n);u.add(k),t.value="",r.value=!1}return(a,n)=>(s(),l("div",x,[e("div",z,[b(g,{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:v},null,8,["modelValue"]),e("button",w,i(r.value?"Processing...":"Send"),1)]),e("div",h,[e("div",M,[n[1]||(n[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(s(!0),l(f,null,p(m.value,o=>(s(),l("div",{key:o},[e("div",null,i(o),1)]))),128))]),e("div",V,[n[2]||(n[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(s(!0),l(f,null,p(c.value,o=>(s(),l("div",{key:o},[e("div",null,i(o)+"s",1)]))),128))])])]))}});export{P as default};
assets/{emotions-BZn1vlkb.js → emotions-aOJI9u5v.js} RENAMED
@@ -1 +1 @@
1
- import{_ as k}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-BsQkxH6e.js";import{u as f}from"./queue-Br3KBcIu.js";import{h,l as b}from"./queues-CQnjJaMZ.js";import{d as x,e as u,o as t,c as l,m as e,a as z,y as r,F as p,C as g}from"./index-DUs41D0m.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},M={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},V={"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":""},I=x({__name:"emotions",setup(S){const a=u(""),i=u([]),c=u([]),d=u(!1);f({handlers:[async s=>{i.value.push(s.data)}]});const v=f({handlers:[async s=>{c.value.push(s.data)}]}),m=h(v);function _(){d.value=!0;const s=a.value.split("");for(const o of s)m.add(o);m.add(b),a.value="",d.value=!1}return(s,o)=>(t(),l("div",w,[e("div",y,[z(k,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=n=>a.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:_},null,8,["modelValue"]),e("button",M,r(d.value?"Processing...":"Send"),1)]),e("div",V,[e("div",E,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),l(p,null,g(i.value,n=>(t(),l("div",{key:n},[e("div",null,r(n),1)]))),128))]),e("div",Q,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),l(p,null,g(c.value,n=>(t(),l("div",{key:n},[e("div",null,r(n),1)]))),128))])])]))}});export{I as default};
 
1
+ import{_ as k}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-DYLULqjM.js";import{u as f}from"./queue-CHpXWY4T.js";import{h,l as b}from"./queues-Bj9-D8li.js";import{d as x,e as u,o as t,c as l,m as e,a as z,y as r,F as p,C as g}from"./index-D1kvczNl.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},M={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},V={"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":""},I=x({__name:"emotions",setup(S){const a=u(""),i=u([]),c=u([]),d=u(!1);f({handlers:[async s=>{i.value.push(s.data)}]});const v=f({handlers:[async s=>{c.value.push(s.data)}]}),m=h(v);function _(){d.value=!0;const s=a.value.split("");for(const o of s)m.add(o);m.add(b),a.value="",d.value=!1}return(s,o)=>(t(),l("div",w,[e("div",y,[z(k,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=n=>a.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:_},null,8,["modelValue"]),e("button",M,r(d.value?"Processing...":"Send"),1)]),e("div",V,[e("div",E,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),l(p,null,g(i.value,n=>(t(),l("div",{key:n},[e("div",null,r(n),1)]))),128))]),e("div",Q,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),l(p,null,g(c.value,n=>(t(),l("div",{key:n},[e("div",null,r(n),1)]))),128))])])]))}});export{I as default};
assets/{filter-message-CnF9NXbe.js → filter-message-_NdlXpNN.js} RENAMED
@@ -1 +1 @@
1
- import{_ as m}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-BsQkxH6e.js";import{d as g,e as u,o as _,c as v,m as s,a as x,y as d}from"./index-DUs41D0m.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":""},B=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;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{B as default};
 
1
+ import{_ as m}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-DYLULqjM.js";import{d as g,e as u,o as _,c as v,m as s,a as x,y as d}from"./index-D1kvczNl.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":""},B=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;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{B as default};
assets/{image-BXOqNX--.js → image-CdSTjmvC.js} RENAMED
@@ -1,2 +1,2 @@
1
- import{k as _}from"./index-DM_lg1vq.js";import{d as y,e as c,o as d,c as u,m as a,y as x,u as v,B as w}from"./index-DUs41D0m.js";import{_ as b}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"],k={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},R=y({__name:"image",setup(D){const p=c(),o=c(""),{copy:m}=_({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)=>(d(),u("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?(d(),u("div",C,[a("img",{src:o.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",k," "+x(o.value)+`
2
  `,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>v(m)())}," Copy Data URL ")])):w("",!0)]))}}),A=b(R,[["__scopeId","data-v-7edd53e6"]]);export{A as default};
 
1
+ import{k as _}from"./index-BUtQmW0A.js";import{d as y,e as c,o as d,c as u,m as a,y as x,u as v,B as w}from"./index-D1kvczNl.js";import{_ as b}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"],k={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},R=y({__name:"image",setup(D){const p=c(),o=c(""),{copy:m}=_({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)=>(d(),u("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?(d(),u("div",C,[a("img",{src:o.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",k," "+x(o.value)+`
2
  `,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>v(m)())}," Copy Data URL ")])):w("",!0)]))}}),A=b(R,[["__scopeId","data-v-7edd53e6"]]);export{A as default};
assets/{index-Ckxf9bjh.js → index-BJcsf0u0.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{b as defineStore,e as ref$1,f as computed,w as watch,g as onMounted,i as i18n,d as defineComponent,o as openBlock,h as createBlock,j as withCtx,T as Transition,k as renderSlot,l as useI18n,s as storeToRefs,c as createElementBlock,m as createBaseVNode,p as normalizeClass,u as unref,q as withDirectives,v as vModelRadio,t as vModelCheckbox,a as createVNode,x as isRef,y as toDisplayString,z as vModelText,A as vModelSelect,B as createCommentVNode,F as Fragment,C as renderList,D as getAugmentedNamespace,E as defu,G as toRef,H as onUnmounted,I as getDefaultExportFromCjs,J as nextTick,K as resolveDirective,L as commonjsGlobal,M as BufferGeometry,N as InterleavedBuffer,O as InterleavedBufferAttribute,P as MathUtils,Q as Color,V as Vector3,S as ShaderMaterial,U as UniformsUtils,R as BackSide,W as Triangle,X as Euler,Y as Ray,Z as Plane,$ as me,a0 as shallowRef,a1 as toRefs,a2 as TOUCH,a3 as Zr,a4 as Matrix4,a5 as PlaneGeometry,a6 as useSlots,a7 as useAttrs,a8 as render,a9 as watchEffect,aa as DoubleSide,ab as Box3,ac as UniformsLib,ad as Vector2,ae as ShaderLib,af as Vector4,ag as Line3,ah as Sphere,ai as Mesh,aj as MeshBasicMaterial,ak as FramebufferTexture,al as RawShaderMaterial,am as AdditiveBlending,an as Box2,ao as UnsignedByteType,ap as REVISION,aq as PropertyBinding,ar as InterpolateLinear,as as EventDispatcher,at as MOUSE,au as Quaternion,av as PerspectiveCamera,aw as OrthographicCamera,ax as Spherical,ay as WebGLRenderTarget,az as HalfFloatType,aA as NoToneMapping,aB as BoxGeometry,aC as getCurrentScope,aD as onScopeDispose,aE as CompressedTexture,aF as Texture$1,aG as RGBAFormat,aH as BufferAttribute,aI as InterpolateDiscrete,aJ as Scene,aK as ShapePath,aL as Uniform,aM as WebGLRenderer,aN as NearestFilter,aO as NearestMipmapNearestFilter,aP as NearestMipmapLinearFilter,aQ as LinearFilter,aR as LinearMipmapNearestFilter,aS as LinearMipmapLinearFilter,aT as ClampToEdgeWrapping,aU as RepeatWrapping,aV as MirroredRepeatWrapping,aW as mergeModels,aX as useModel,aY as createTextVNode,n as normalizeStyle,aZ as Object3D,a_ as AnimationClip,a$ as QuaternionKeyframeTrack,b0 as NumberKeyframeTrack,b1 as Matrix3,b2 as Skeleton,b3 as Group,b4 as LineBasicMaterial,b5 as LineSegments,b6 as ImageLoader,b7 as Material,b8 as AxesHelper,b9 as TangentSpaceNormalMap,ba as DynamicDrawUsage,bb as Line,bc as SkinnedMesh,bd as GLBufferAttribute,be as TrianglesDrawMode,bf as TriangleFanDrawMode,bg as TriangleStripDrawMode,bh as Loader,bi as LoaderUtils,bj as FileLoader$1,bk as LinearSRGBColorSpace,bl as SpotLight,bm as PointLight,bn as DirectionalLight,bo as SRGBColorSpace,bp as MeshPhysicalMaterial,bq as InstancedMesh,br as InstancedBufferAttribute,bs as TextureLoader,bt as ImageBitmapLoader,bu as PointsMaterial,bv as MeshStandardMaterial,bw as LineLoop,bx as Points,by as Bone,bz as ColorManagement,bA as FrontSide,bB as VectorKeyframeTrack,bC as Interpolant,bD as AnimationMixer,bE as Hr}from"./index-DUs41D0m.js";import{a as useLocalStorage,b as useDevicesList,c as useDark,d as usePermission,t as tryOnMounted,e as useWebWorker,f as useElementBounding,g as useScroll,h as useBreakpoints,i as breakpointsTailwind,j as useWindowSize}from"./index-DM_lg1vq.js";import{_ as _export_sfc}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as _sfc_main$e}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-BsQkxH6e.js";import{E as EMOTION_VALUES,a as EmotionSurpriseMotionName,b as EmotionSadMotionName,c as EmotionAngryMotionName,d as EmotionHappyMotionName,e as EmotionAwkwardMotionName,f as EmotionQuestionMotionName,g as EmotionThinkMotionName,u as useMessageContentQueue,h as useEmotionsMessageQueue,i as useDelayMessageQueue,l as llmInferenceEndToken,j as EMOTION_VRMExpressionName_value,k as EMOTION_EmotionMotionName_value}from"./queues-CQnjJaMZ.js";import{u as useQueue}from"./queue-Br3KBcIu.js";const strCamelToSnake=n=>n.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),objCamelToSnake=n=>Object.fromEntries(Object.entries(n).map(([e,t])=>[strCamelToSnake(e),t])),clean=n=>Object.fromEntries(Object.entries(n).filter(([,e])=>e!==void 0)),requestBody=n=>JSON.stringify(objCamelToSnake(clean({...n,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),requestHeaders=(n,e)=>clean({Authorization:e?`Bearer ${e}`:void 0,...n}),listModels=async n=>await(n.fetch??globalThis.fetch)(new URL("models",n.baseURL),{headers:requestHeaders({"Content-Type":"application/json",...n.headers},n.apiKey),signal:n.abortSignal}).then(e=>e.json()).then(({data:e})=>e),chatCompletion=async n=>{var e;return await(n.fetch??globalThis.fetch)(new URL("chat/completions",n.baseURL),{body:requestBody({...n,tools:(e=n.tools)==null?void 0:e.map(t=>({function:t.function,type:"function"}))}),headers:requestHeaders({"Content-Type":"application/json",...n.headers},n.apiKey),method:"POST",signal:n.abortSignal})},dataHeaderPrefix="data: ",dataErrorPrefix='{"error":',streamText=async n=>await chatCompletion({...n,stream:!0}).then(e=>{if(!e.body)return Promise.reject(e);const t=new TextDecoder;let r,i,a="";const l=e.body.pipeThrough(new TransformStream({transform:(h,s)=>{a+=t.decode(h);const o=a.split(`
2
 
3
  `);a=o.pop()||"";for(const u of o){if(!u||!u.startsWith(dataHeaderPrefix))continue;if(u.startsWith(dataErrorPrefix)){s.error(new Error(`Error from server: ${u}`));continue}const m=u.slice(dataHeaderPrefix.length);if(m==="[DONE]"){s.terminate();continue}const g=JSON.parse(m);s.enqueue(g),g.choices[0].finish_reason&&(r=g.choices[0].finish_reason),g.usage&&(i=g.usage)}}})),[c,f]=l.tee(),d=f.pipeThrough(new TransformStream({transform:(h,s)=>s.enqueue(h.choices[0].delta.content)}));return{chunkStream:c,finishReason:r,textStream:d,usage:i}}),suspectProtoRx=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,suspectConstructorRx=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,JsonSigRx=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function jsonParseTransform(n,e){if(n==="__proto__"||n==="constructor"&&e&&typeof e=="object"&&"prototype"in e){warnKeyDropped(n);return}return e}function warnKeyDropped(n){console.warn(`[destr] Dropping "${n}" key to prevent prototype pollution.`)}function destr(n,e={}){if(typeof n!="string")return n;const t=n.trim();if(n[0]==='"'&&n.endsWith('"')&&!n.includes("\\"))return t.slice(1,-1);if(t.length<=9){const r=t.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!JsonSigRx.test(n)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return n}try{if(suspectProtoRx.test(n)||suspectConstructorRx.test(n)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(n,jsonParseTransform)}return JSON.parse(n)}catch(r){if(e.strict)throw r;return n}}const HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,PLUS_RE=/\+/g,ENC_CARET_RE=/%5e/gi,ENC_BACKTICK_RE=/%60/gi,ENC_PIPE_RE=/%7c/gi,ENC_SPACE_RE=/%20/gi;function encode(n){return encodeURI(""+n).replace(ENC_PIPE_RE,"|")}function encodeQueryValue(n){return encode(typeof n=="string"?n:JSON.stringify(n)).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CARET_RE,"^").replace(SLASH_RE,"%2F")}function encodeQueryKey(n){return encodeQueryValue(n).replace(EQUAL_RE,"%3D")}function decode$1(n=""){try{return decodeURIComponent(""+n)}catch{return""+n}}function decodeQueryKey(n){return decode$1(n.replace(PLUS_RE," "))}function decodeQueryValue(n){return decode$1(n.replace(PLUS_RE," "))}function parseQuery(n=""){const e={};n[0]==="?"&&(n=n.slice(1));for(const t of n.split("&")){const r=t.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const i=decodeQueryKey(r[1]);if(i==="__proto__"||i==="constructor")continue;const a=decodeQueryValue(r[2]||"");e[i]===void 0?e[i]=a:Array.isArray(e[i])?e[i].push(a):e[i]=[e[i],a]}return e}function encodeQueryItem(n,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(t=>`${encodeQueryKey(n)}=${encodeQueryValue(t)}`).join("&"):`${encodeQueryKey(n)}=${encodeQueryValue(e)}`:encodeQueryKey(n)}function stringifyQuery(n){return Object.keys(n).filter(e=>n[e]!==void 0).map(e=>encodeQueryItem(e,n[e])).filter(Boolean).join("&")}const PROTOCOL_STRICT_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,PROTOCOL_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,PROTOCOL_RELATIVE_REGEX=/^([/\\]\s*){2,}[^/\\]/,JOIN_LEADING_SLASH_RE=/^\.?\//;function hasProtocol(n,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?PROTOCOL_STRICT_REGEX.test(n):PROTOCOL_REGEX.test(n)||(e.acceptRelative?PROTOCOL_RELATIVE_REGEX.test(n):!1)}function hasTrailingSlash(n="",e){return n.endsWith("/")}function withoutTrailingSlash(n="",e){return(hasTrailingSlash(n)?n.slice(0,-1):n)||"/"}function withTrailingSlash(n="",e){return n.endsWith("/")?n:n+"/"}function withBase(n,e){if(isEmptyURL(e)||hasProtocol(n))return n;const t=withoutTrailingSlash(e);return n.startsWith(t)?n:joinURL(t,n)}function withQuery(n,e){const t=parseURL(n),r={...parseQuery(t.search),...e};return t.search=stringifyQuery(r),stringifyParsedURL(t)}function isEmptyURL(n){return!n||n==="/"}function isNonEmptyURL(n){return n&&n!=="/"}function joinURL(n,...e){let t=n||"";for(const r of e.filter(i=>isNonEmptyURL(i)))if(t){const i=r.replace(JOIN_LEADING_SLASH_RE,"");t=withTrailingSlash(t)+i}else t=r;return t}const protocolRelative=Symbol.for("ufo:protocolRelative");function parseURL(n="",e){const t=n.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(t){const[,s,o=""]=t;return{protocol:s.toLowerCase(),pathname:o,href:s+o,auth:"",host:"",search:"",hash:""}}if(!hasProtocol(n,{acceptRelative:!0}))return parsePath(n);const[,r="",i,a=""]=n.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,l="",c=""]=a.match(/([^#/?]*)(.*)?/)||[];r==="file:"&&(c=c.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:f,search:d,hash:h}=parsePath(c);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:l,pathname:f,search:d,hash:h,[protocolRelative]:!r}}function parsePath(n=""){const[e="",t="",r=""]=(n.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:t,hash:r}}function stringifyParsedURL(n){const e=n.pathname||"",t=n.search?(n.search.startsWith("?")?"":"?")+n.search:"",r=n.hash||"",i=n.auth?n.auth+"@":"",a=n.host||"";return(n.protocol||n[protocolRelative]?(n.protocol||"")+"//":"")+i+a+e+t+r}class FetchError extends Error{constructor(e,t){super(e,t),this.name="FetchError",t!=null&&t.cause&&!this.cause&&(this.cause=t.cause)}}function createFetchError(n){var f,d,h,s,o;const e=((f=n.error)==null?void 0:f.message)||((d=n.error)==null?void 0:d.toString())||"",t=((h=n.request)==null?void 0:h.method)||((s=n.options)==null?void 0:s.method)||"GET",r=((o=n.request)==null?void 0:o.url)||String(n.request)||"/",i=`[${t}] ${JSON.stringify(r)}`,a=n.response?`${n.response.status} ${n.response.statusText}`:"<no response>",l=`${i}: ${a}${e?` ${e}`:""}`,c=new FetchError(l,n.error?{cause:n.error}:void 0);for(const u of["request","options","response"])Object.defineProperty(c,u,{get(){return n[u]}});for(const[u,m]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(c,u,{get(){return n.response&&n.response[m]}});return c}const payloadMethods=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function isPayloadMethod(n="GET"){return payloadMethods.has(n.toUpperCase())}function isJSONSerializable(n){if(n===void 0)return!1;const e=typeof n;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}const textTypes=new Set(["image/svg","application/xml","application/xhtml","application/html"]),JSON_RE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function detectResponseType(n=""){if(!n)return"json";const e=n.split(";").shift()||"";return JSON_RE.test(e)?"json":textTypes.has(e)||e.startsWith("text/")?"text":"blob"}function resolveFetchOptions(n,e,t,r){const i=mergeHeaders((e==null?void 0:e.headers)??(n==null?void 0:n.headers),t==null?void 0:t.headers,r);let a;return(t!=null&&t.query||t!=null&&t.params||e!=null&&e.params||e!=null&&e.query)&&(a={...t==null?void 0:t.params,...t==null?void 0:t.query,...e==null?void 0:e.params,...e==null?void 0:e.query}),{...t,...e,query:a,params:a,headers:i}}function mergeHeaders(n,e,t){if(!e)return new t(n);const r=new t(e);if(n)for(const[i,a]of Symbol.iterator in n||Array.isArray(n)?n:new t(n))r.set(i,a);return r}async function callHooks(n,e){if(e)if(Array.isArray(e))for(const t of e)await t(n);else await e(n)}const retryStatusCodes=new Set([408,409,425,429,500,502,503,504]),nullBodyResponses=new Set([101,204,205,304]);function createFetch(n={}){const{fetch:e=globalThis.fetch,Headers:t=globalThis.Headers,AbortController:r=globalThis.AbortController}=n;async function i(c){const f=c.error&&c.error.name==="AbortError"&&!c.options.timeout||!1;if(c.options.retry!==!1&&!f){let h;typeof c.options.retry=="number"?h=c.options.retry:h=isPayloadMethod(c.options.method)?0:1;const s=c.response&&c.response.status||500;if(h>0&&(Array.isArray(c.options.retryStatusCodes)?c.options.retryStatusCodes.includes(s):retryStatusCodes.has(s))){const o=typeof c.options.retryDelay=="function"?c.options.retryDelay(c):c.options.retryDelay||0;return o>0&&await new Promise(u=>setTimeout(u,o)),a(c.request,{...c.options,retry:h-1})}}const d=createFetchError(c);throw Error.captureStackTrace&&Error.captureStackTrace(d,a),d}const a=async function(f,d={}){const h={request:f,options:resolveFetchOptions(f,d,n.defaults,t),response:void 0,error:void 0};h.options.method&&(h.options.method=h.options.method.toUpperCase()),h.options.onRequest&&await callHooks(h,h.options.onRequest),typeof h.request=="string"&&(h.options.baseURL&&(h.request=withBase(h.request,h.options.baseURL)),h.options.query&&(h.request=withQuery(h.request,h.options.query),delete h.options.query),"query"in h.options&&delete h.options.query,"params"in h.options&&delete h.options.params),h.options.body&&isPayloadMethod(h.options.method)&&(isJSONSerializable(h.options.body)?(h.options.body=typeof h.options.body=="string"?h.options.body:JSON.stringify(h.options.body),h.options.headers=new t(h.options.headers||{}),h.options.headers.has("content-type")||h.options.headers.set("content-type","application/json"),h.options.headers.has("accept")||h.options.headers.set("accept","application/json")):("pipeTo"in h.options.body&&typeof h.options.body.pipeTo=="function"||typeof h.options.body.pipe=="function")&&("duplex"in h.options||(h.options.duplex="half")));let s;if(!h.options.signal&&h.options.timeout){const u=new r;s=setTimeout(()=>{const m=new Error("[TimeoutError]: The operation was aborted due to timeout");m.name="TimeoutError",m.code=23,u.abort(m)},h.options.timeout),h.options.signal=u.signal}try{h.response=await e(h.request,h.options)}catch(u){return h.error=u,h.options.onRequestError&&await callHooks(h,h.options.onRequestError),await i(h)}finally{s&&clearTimeout(s)}if((h.response.body||h.response._bodyInit)&&!nullBodyResponses.has(h.response.status)&&h.options.method!=="HEAD"){const u=(h.options.parseResponse?"json":h.options.responseType)||detectResponseType(h.response.headers.get("content-type")||"");switch(u){case"json":{const m=await h.response.text(),g=h.options.parseResponse||destr;h.response._data=g(m);break}case"stream":{h.response._data=h.response.body||h.response._bodyInit;break}default:h.response._data=await h.response[u]()}}return h.options.onResponse&&await callHooks(h,h.options.onResponse),!h.options.ignoreResponseError&&h.response.status>=400&&h.response.status<600?(h.options.onResponseError&&await callHooks(h,h.options.onResponseError),await i(h)):h.response},l=async function(f,d){return(await a(f,d))._data};return l.raw=a,l.native=(...c)=>e(...c),l.create=(c={},f={})=>createFetch({...n,...f,defaults:{...n.defaults,...f.defaults,...c}}),l}const _globalThis=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),fetch$1=_globalThis.fetch?(...n)=>_globalThis.fetch(...n):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),Headers=_globalThis.Headers,AbortController=_globalThis.AbortController,ofetch=createFetch({fetch:fetch$1,Headers,AbortController}),useLLM=defineStore("llm",()=>{async function n(r,i,a,l){return await streamText({baseURL:r.endsWith("/")?r:`${r}/`,apiKey:i,model:a,messages:l,streamOptions:{usage:!0}})}async function e(r,i){if(r==="")return[];try{return await listModels({baseURL:r.endsWith("/")?r:`${r}/`,apiKey:i})}catch(a){if(String(a).includes("Failed to construct 'URL': Invalid URL"))return[];throw a}}async function t(r,i,a,l){if(!a||!a.trim())throw new Error("Text is required");return await ofetch(`${r}/api/v1/llm/voice/elevenlabs`,{body:{...l,stream:!0,text:a},method:"POST",cache:"no-cache",responseType:"arrayBuffer",headers:{Authorization:`Bearer ${i}`}})}return{models:e,stream:n,streamSpeech:t}}),useSettings=defineStore("settings",()=>{const n=ref$1(),e=useLocalStorage("settings/credentials/openai-api-key",""),t=useLocalStorage("settings/credentials/openai-api-base-url",""),r=useLocalStorage("settings/credentials/elevenlabs-api-key",""),i=useLocalStorage("settings/language","en-US"),a=useLocalStorage("settings/stage/view/model-renderer","2d"),l=useLocalStorage("settings/llm/openai/model",{id:"openai/gpt-3.5-turbo",name:"OpenAI GPT3.5 Turbo"}),c=useLocalStorage("settings/audio/input","true"),f=computed(()=>{var h;return(h=n.value)==null?void 0:h.deviceId}),{audioInputs:d}=useDevicesList({constraints:{audio:!0},requestPermissions:!0});return watch(c,h=>{h==="false"&&(n.value=void 0),h==="true"&&(n.value=d.value[0])}),onMounted(()=>{c.value==="true"&&!n.value&&(n.value=d.value[0])}),watch(d,()=>{c.value==="true"&&!n.value&&(n.value=d.value[0])}),watch(i,h=>i18n.global.locale.value=h),{openAiApiKey:e,openAiApiBaseURL:t,openAiModel:l,elevenLabsApiKey:r,language:i,stageView:a,isAudioInputOn:c,selectedAudioDevice:n,selectedAudioDeviceId:f}}),closed="0px",_sfc_main$d=defineComponent({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(n){const e=n;function t(f){return{height:f.style.height,width:f.style.width,position:f.style.position,visibility:f.style.visibility,overflow:f.style.overflow,paddingTop:f.style.paddingTop,paddingBottom:f.style.paddingBottom,borderTopWidth:f.style.borderTopWidth,borderBottomWidth:f.style.borderBottomWidth,marginTop:f.style.marginTop,marginBottom:f.style.marginBottom}}function r(f,d){const{width:h}=getComputedStyle(f);f.style.width=h,f.style.position="absolute",f.style.visibility="hidden",f.style.height="";const{height:s}=getComputedStyle(f);return f.style.width=d.width,f.style.position=d.position,f.style.visibility=d.visibility,f.style.height=closed,f.style.overflow="hidden",d.height&&d.height!==closed?d.height:s}function i(f,d,h,s,o){const u=f.animate(s,o);f.style.height=d.height,u.onfinish=()=>{f.style.overflow=d.overflow,h()}}function a(f,d){return[{height:closed,opacity:e.opacityClosed,paddingTop:closed,paddingBottom:closed,borderTopWidth:closed,borderBottomWidth:closed,marginTop:closed,marginBottom:closed},{height:f,opacity:e.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}]}function l(f,d){const h=f,s=t(h),o=r(h,s),u=a(o,s),m={duration:e.duration,easing:e.easingEnter};i(h,s,d,u,m)}function c(f,d){const h=f,s=t(h),{height:o}=getComputedStyle(h);h.style.height=o,h.style.overflow="hidden";const u=a(o,s).reverse(),m={duration:e.duration,easing:e.easingLeave};i(h,s,d,u,m)}return(f,d)=>(openBlock(),createBlock(Transition,{css:!1,onEnter:l,onLeave:c},{default:withCtx(()=>[renderSlot(f.$slots,"default")]),_:3}))}}),_hoisted_1$8={flex:"~","gap-2":""},_hoisted_2$7={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_3$6=["checked","aria-checked"],_hoisted_4$5=["checked","aria-checked"],_hoisted_5$5={relative:""},_hoisted_6$4={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","h-fit":"","w-fit":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_7$3=["checked","aria-checked"],_hoisted_8$3={key:0,w:"120 <sm:[calc(100vw-16px)]",right:"0",bg:"zinc-100 dark:zinc-700",grid:"~ cols-[140px_1fr]",absolute:"","z-100":"","my-2":"","items-center":"","gap-1.5":"","rounded-lg":"","px-3":"","py-2":""},_hoisted_9$3={"text-sm":""},_hoisted_10$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_11$2=["placeholder"],_hoisted_12$2={"text-sm":""},_hoisted_13$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_14$2=["placeholder"],_hoisted_15$2={"text-sm":""},_hoisted_16$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_17$2=["placeholder"],_hoisted_18$2={"text-sm":""},_hoisted_19$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_20$2={"text-sm":""},_hoisted_21$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_22={disabled:"",class:"bg-white dark:bg-zinc-800"},_hoisted_23=["value"],_hoisted_24=["value"],_hoisted_25={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","h-fit":"","w-fit":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_26={"h-fit":"","cursor-pointer":"","rounded-md":"","px-2":"","py-2":""},_hoisted_27=["checked","aria-checked"],_hoisted_28={"select-none":""},_hoisted_29={key:0,"i-solar:sun-fog-bold-duotone":"",text:"lg hover:zinc-600 dark:hover:zinc-300",transition:"all ease-in-out duration-250"},_hoisted_30={key:1,"i-solar:moon-stars-bold-duotone":"",text:"lg hover:zinc-600 dark:hover:zinc-300",transition:"all ease-in-out duration-250"},_sfc_main$c=defineComponent({__name:"Settings",setup(n){const{t:e}=useI18n(),t=useSettings(),r=ref$1(!1),i=useDark({disableTransition:!1}),a=ref$1([]),{models:l}=useLLM(),{openAiModel:c,openAiApiBaseURL:f,openAiApiKey:d}=storeToRefs(t);function h(s){const o=s.target,u=a.value.find(m=>m.id===o.value);if(!u){c.value=void 0;return}c.value=u}return watch([f,d],async([s,o])=>{if(!s||!o){a.value=[];return}a.value=await l(s,o)}),onMounted(async()=>{!f.value||!d.value||(a.value=await l(f.value,d.value))}),(s,o)=>(openBlock(),createElementBlock("div",_hoisted_1$8,[createBaseVNode("fieldset",_hoisted_2$7,[createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([unref(t).stageView==="2d"?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),"rounded-md":"","px-4":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>unref(t).stageView=u),checked:unref(t).stageView==="2d","aria-checked":unref(t).stageView==="2d",name:"settings.stageView",type:"radio",role:"radio",value:"2d",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_3$6),[[vModelRadio,unref(t).stageView]]),createBaseVNode("div",{"select-none":"",class:normalizeClass([unref(t).stageView==="2d"?"font-semibold":""])}," 2D ",2)],2),createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([unref(t).stageView==="3d"?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),"rounded-md":"","px-4":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=u=>unref(t).stageView=u),checked:unref(t).stageView==="3d","aria-checked":unref(t).stageView==="3d",name:"stageView",type:"radio",role:"radio",value:"3d",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_4$5),[[vModelRadio,unref(t).stageView]]),createBaseVNode("div",{"select-none":"",class:normalizeClass([unref(t).stageView==="3d"?"font-semibold":""])}," 3D ",2)],2)]),createBaseVNode("div",_hoisted_5$5,[createBaseVNode("div",_hoisted_6$4,[createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([r.value?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),transition:"all ease-in-out duration-500","rounded-md":"","px-2":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[2]||(o[2]=u=>r.value=u),checked:r.value,"aria-checked":r.value,name:"stageView",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_7$3),[[vModelCheckbox,r.value]]),o[8]||(o[8]=createBaseVNode("div",{"select-none":""},[createBaseVNode("div",{"i-solar:settings-minimalistic-bold-duotone":"",text:"text-zinc-900 dark:text-zinc-800 lg"})],-1))],2)]),createVNode(_sfc_main$d,null,{default:withCtx(()=>[r.value?(openBlock(),createElementBlock("div",_hoisted_8$3,[createBaseVNode("div",_hoisted_9$3,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.openai-base-url.label")),1)]),createBaseVNode("div",_hoisted_10$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=u=>unref(t).openAiApiBaseURL=u),type:"text",placeholder:unref(e)("settings.openai-base-url.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_11$2),[[vModelText,unref(t).openAiApiBaseURL]])]),createBaseVNode("div",_hoisted_12$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.openai-api-key.label")),1)]),createBaseVNode("div",_hoisted_13$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=u=>unref(t).openAiApiKey=u),type:"text",placeholder:unref(e)("settings.openai-api-key.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_14$2),[[vModelText,unref(t).openAiApiKey]])]),createBaseVNode("div",_hoisted_15$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.elevenlabs-api-key.label")),1)]),createBaseVNode("div",_hoisted_16$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=u=>unref(t).elevenLabsApiKey=u),type:"text",placeholder:unref(e)("settings.elevenlabs-api-key.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_17$2),[[vModelText,unref(t).elevenLabsApiKey]])]),createBaseVNode("div",_hoisted_18$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.language")),1)]),createBaseVNode("div",_hoisted_19$2,[withDirectives(createBaseVNode("select",{"onUpdate:modelValue":o[6]||(o[6]=u=>unref(t).language=u),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},o[9]||(o[9]=[createBaseVNode("option",{value:"en-US"}," English ",-1),createBaseVNode("option",{value:"zh-CN"}," 简体中文 ",-1)]),512),[[vModelSelect,unref(t).language]])]),createBaseVNode("div",_hoisted_20$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.models")),1)]),createBaseVNode("div",_hoisted_21$2,[createBaseVNode("select",{bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":"",onChange:h},[createBaseVNode("option",_hoisted_22,toDisplayString(unref(e)("stage.select-a-model")),1),unref(t).openAiModel?(openBlock(),createElementBlock("option",{key:0,value:unref(t).openAiModel.id},toDisplayString("name"in unref(t).openAiModel?`${unref(t).openAiModel.name} (${unref(t).openAiModel.id})`:unref(t).openAiModel.id),9,_hoisted_23)):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(a.value,u=>(openBlock(),createElementBlock("option",{key:u.id,value:u.id},toDisplayString("name"in u?`${u.name} (${u.id})`:u.id),9,_hoisted_24))),128))],32)])])):createCommentVNode("",!0)]),_:1})]),createBaseVNode("div",null,[createBaseVNode("div",_hoisted_25,[createBaseVNode("label",_hoisted_26,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=u=>isRef(i)?i.value=u:null),checked:unref(i),"aria-checked":unref(i),name:"stageView",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_27),[[vModelCheckbox,unref(i)]]),createBaseVNode("div",_hoisted_28,[createVNode(Transition,{name:"slide-away",mode:"out-in"},{default:withCtx(()=>[unref(i)?(openBlock(),createElementBlock("div",_hoisted_29)):(openBlock(),createElementBlock("div",_hoisted_30))]),_:1})])])])])]))}}),Settings=_export_sfc(_sfc_main$c,[["__scopeId","data-v-8d6cb079"]]),_hoisted_1$7={flex:"~","mb-1":"","w-full":"","gap-2":""},_sfc_main$b=defineComponent({__name:"Header",setup(n){return(e,t)=>(openBlock(),createElementBlock("header",_hoisted_1$7,[t[0]||(t[0]=createBaseVNode("div",{flex:"~ 1","w-full":"","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":""},[createBaseVNode("div",{"i-solar:cat-outline":"",text:"[#ed869d]"}),createBaseVNode("div",{"font-cute":""},[createBaseVNode("span",null,"アイリ")])],-1)),createVNode(Settings)]))}});var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(n,e,t)=>{if(e&&typeof e.init=="function"&&typeof e.createSessionHandler=="function"){const r=backends[n];if(r===void 0)backends[n]={backend:e,priority:t};else{if(r.priority>t)return;if(r.priority===t&&r.backend!==e)throw new Error(`cannot register backend "${n}" using priority ${t}`)}if(t>=0){const i=backendsSortedByPriority.indexOf(n);i!==-1&&backendsSortedByPriority.splice(i,1);for(let a=0;a<backendsSortedByPriority.length;a++)if(backends[backendsSortedByPriority[a]].priority<=t){backendsSortedByPriority.splice(a,0,n);return}backendsSortedByPriority.push(n)}return}throw new TypeError("not a valid backend")},resolveBackend=async n=>{const e=n.length===0?backendsSortedByPriority:n,t=[];for(const r of e){const i=backends[r];if(i){if(i.initialized)return i.backend;if(i.aborted)continue;const a=!!i.initPromise;try{return a||(i.initPromise=i.backend.init()),await i.initPromise,i.initialized=!0,i.backend}catch(l){a||t.push({name:r,err:l}),i.aborted=!0}finally{delete i.initPromise}}}throw new Error(`no available backend found. ERR: ${t.map(r=>`[${r.name}] ${r.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);this.logLevelInternal=e}}get logLevel(){return this.logLevelInternal}}const env$1=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=n=>{let e=1;for(let t=0;t<n.length;t++){const r=n[t];if(typeof r!="number"||!Number.isSafeInteger(r))throw new TypeError(`dims[${t}] must be an integer, got: ${r}`);if(r<0)throw new RangeError(`dims[${t}] must be a non-negative integer, got: ${r}`);e*=r}return e};let Tensor$1=class jt{constructor(e,t,r){let i,a,l;if(typeof e=="string")if(i=e,l=r,e==="string"){if(!Array.isArray(t))throw new TypeError("A string tensor's data must be a string array.");a=t}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(e);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t))a=f.from(t);else if(t instanceof f)a=t;else throw new TypeError(`A ${i} tensor's data must be type of ${f}`)}else if(l=t,Array.isArray(e)){if(e.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof e[0];if(f==="string")i="string",a=e;else if(f==="boolean")i="bool",a=Uint8Array.from(e);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(e.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${e.constructor}.`);i=f,a=e}if(l===void 0)l=[a.length];else if(!Array.isArray(l))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(l);if(c!==a.length)throw new Error(`Tensor's size(${c}) does not match data length(${a.length}).`);this.dims=l,this.type=i,this.data=a,this.size=c}static bufferToTensor(e,t){if(e===void 0)throw new Error("Image buffer must be defined");if(t.height===void 0||t.width===void 0)throw new Error("Image height and width must be defined");const{height:r,width:i}=t,a=t.norm;let l,c;a===void 0||a.mean===void 0?l=255:l=a.mean,a===void 0||a.bias===void 0?c=0:c=a.bias;const f=t.bitmapFormat!==void 0?t.bitmapFormat:"RGBA",d=t.tensorFormat!==void 0&&t.tensorFormat!==void 0?t.tensorFormat:"RGB",h=r*i,s=d==="RGBA"?new Float32Array(h*4):new Float32Array(h*3);let o=4,u=0,m=1,g=2,y=3,v=0,_=h,b=h*2,w=-1;f==="RGB"&&(o=3,u=0,m=1,g=2,y=-1),d==="RGBA"?w=h*3:d==="RBG"?(v=0,b=h,_=h*2):d==="BGR"&&(b=0,_=h,v=h*2);for(let T=0;T<h;T++,u+=o,g+=o,m+=o,y+=o)s[v++]=(e[u]+c)/l,s[_++]=(e[m]+c)/l,s[b++]=(e[g]+c)/l,w!==-1&&y!==-1&&(s[w++]=(e[y]+c)/l);return d==="RGBA"?new jt("float32",s,[1,4,r,i]):new jt("float32",s,[1,3,r,i])}static async fromImage(e,t){const r=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,i=typeof ImageData<"u"&&e instanceof ImageData,a=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,l=typeof String<"u"&&(e instanceof String||typeof e=="string");let c,f={};if(r){const d=document.createElement("canvas"),h=d.getContext("2d");if(h!=null){let s=e.naturalHeight,o=e.naturalWidth;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(s=t.resizedHeight,o=t.resizedWidth),t!==void 0){if(f=t,t.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",t.height!==void 0&&t.height!==s)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=s,t.width!==void 0&&t.width!==o)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=o}else f.tensorFormat="RGBA",f.height=s,f.width=o;d.width=o,d.height=s,h.drawImage(e,0,0,o,s),c=h.getImageData(0,0,o,s).data}else throw new Error("Can not access image data")}else if(i){const d="RGBA";let h,s;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(h=t.resizedHeight,s=t.resizedWidth):(h=e.height,s=e.width),t!==void 0){if(f=t,t.bitmapFormat!==void 0&&t.bitmapFormat!==d)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=h,f.width=s,t!==void 0){const o=document.createElement("canvas");o.width=s,o.height=h;const u=o.getContext("2d");if(u!=null)u.putImageData(e,0,0),c=u.getImageData(0,0,s,h).data;else throw new Error("Can not access image data")}else c=e.data}else if(a){if(t===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(t.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const d=document.createElement("canvas").getContext("2d");if(d!=null){const h=e.height,s=e.width;if(d.drawImage(e,0,0,s,h),c=d.getImageData(0,0,s,h).data,t!==void 0){if(t.height!==void 0&&t.height!==h)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=h,t.width!==void 0&&t.width!==s)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=s}else f.height=h,f.width=s;return jt.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(l)return new Promise((d,h)=>{const s=document.createElement("canvas"),o=s.getContext("2d");if(!e||!o)return h();const u=new Image;u.crossOrigin="Anonymous",u.src=e,u.onload=()=>{s.width=u.width,s.height=u.height,o.drawImage(u,0,0,s.width,s.height);const m=o.getImageData(0,0,s.width,s.height);if(t!==void 0){if(t.height!==void 0&&t.height!==s.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=s.height,t.width!==void 0&&t.width!==s.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=s.width}else f.height=s.height,f.width=s.width;d(jt.bufferToTensor(m.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return jt.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(e){var t,r;const i=document.createElement("canvas").getContext("2d");let a;if(i!=null){const l=this.dims[3],c=this.dims[2],f=this.dims[1],d=e!==void 0&&e.format!==void 0?e.format:"RGB",h=e!==void 0&&((t=e.norm)===null||t===void 0?void 0:t.mean)!==void 0?e.norm.mean:255,s=e!==void 0&&((r=e.norm)===null||r===void 0?void 0:r.bias)!==void 0?e.norm.bias:0,o=c*l;if(e!==void 0){if(e.height!==void 0&&e.height!==c)throw new Error("Image output config height doesn't match tensor height");if(e.width!==void 0&&e.width!==l)throw new Error("Image output config width doesn't match tensor width");if(e.format!==void 0&&f===4&&e.format!=="RGBA"||f===3&&e.format!=="RGB"&&e.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const u=4;let m=0,g=1,y=2,v=3,_=0,b=o,w=o*2,x=-1;d==="RGBA"?(_=0,b=o,w=o*2,x=o*3):d==="RGB"?(_=0,b=o,w=o*2):d==="RBG"&&(_=0,w=o,b=o*2),a=i.createImageData(l,c);for(let T=0;T<c*l;m+=u,g+=u,y+=u,v+=u,T++)a.data[m]=(this.data[_++]-s)*h,a.data[g]=(this.data[b++]-s)*h,a.data[y]=(this.data[w++]-s)*h,a.data[v]=x===-1?255:(this.data[x++]-s)*h}else throw new Error("Can not access image data");return a}reshape(e){return new jt(this.type,this.data,e)}};const Tensor=Tensor$1;let InferenceSession$1=class kn{constructor(e){this.handler=e}async run(e,t,r){const i={};let a={};if(typeof e!="object"||e===null||e instanceof Tensor||Array.isArray(e))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let l=!0;if(typeof t=="object"){if(t===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(t instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(t)){if(t.length===0)throw new TypeError("'fetches' cannot be an empty array.");l=!1;for(const d of t){if(typeof d!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(d)===-1)throw new RangeError(`'fetches' contains invalid output name: ${d}.`);i[d]=null}if(typeof r=="object"&&r!==null)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else{let d=!1;const h=Object.getOwnPropertyNames(t);for(const s of this.outputNames)if(h.indexOf(s)!==-1){const o=t[s];(o===null||o instanceof Tensor)&&(d=!0,l=!1,i[s]=o)}if(d){if(typeof r=="object"&&r!==null)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else a=t}}else if(typeof t<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const d of this.inputNames)if(typeof e[d]>"u")throw new Error(`input '${d}' is missing in 'feeds'.`);if(l)for(const d of this.outputNames)i[d]=null;const c=await this.handler.run(e,i,a),f={};for(const d in c)Object.hasOwnProperty.call(c,d)&&(f[d]=new Tensor(c[d].type,c[d].data,c[d].dims));return f}static async create(e,t,r,i){let a,l={};if(typeof e=="string"){if(a=e,typeof t=="object"&&t!==null)l=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof Uint8Array){if(a=e,typeof t=="object"&&t!==null)l=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer){const s=e;let o=0,u=e.byteLength;if(typeof t=="object"&&t!==null)l=t;else if(typeof t=="number"){if(o=t,!Number.isSafeInteger(o))throw new RangeError("'byteOffset' must be an integer.");if(o<0||o>=s.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${s.byteLength}).`);if(u=e.byteLength-o,typeof r=="number"){if(u=r,!Number.isSafeInteger(u))throw new RangeError("'byteLength' must be an integer.");if(u<=0||o+u>s.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${s.byteLength-o}].`);if(typeof i=="object"&&i!==null)l=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else if(typeof r<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof t<"u")throw new TypeError("'options' must be an object.");a=new Uint8Array(s,o,u)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(l.executionProviders||[]).map(s=>typeof s=="string"?s:s.name),h=await(await resolveBackend(f)).createSessionHandler(a,l);return new kn(h)}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$1=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env:env$1,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(lib$1);/*!
4
  * ONNX Runtime Web v1.14.0
 
1
+ import{b as defineStore,e as ref$1,f as computed,w as watch,g as onMounted,i as i18n,d as defineComponent,o as openBlock,h as createBlock,j as withCtx,T as Transition,k as renderSlot,l as useI18n,s as storeToRefs,c as createElementBlock,m as createBaseVNode,p as normalizeClass,u as unref,q as withDirectives,v as vModelRadio,t as vModelCheckbox,a as createVNode,x as isRef,y as toDisplayString,z as vModelText,A as vModelSelect,B as createCommentVNode,F as Fragment,C as renderList,D as getAugmentedNamespace,E as defu,G as toRef,H as onUnmounted,I as getDefaultExportFromCjs,J as nextTick,K as resolveDirective,L as commonjsGlobal,M as BufferGeometry,N as InterleavedBuffer,O as InterleavedBufferAttribute,P as MathUtils,Q as Color,V as Vector3,S as ShaderMaterial,U as UniformsUtils,R as BackSide,W as Triangle,X as Euler,Y as Ray,Z as Plane,_ as me,$ as shallowRef,a0 as toRefs,a1 as TOUCH,a2 as Zr,a3 as Matrix4,a4 as PlaneGeometry,a5 as useSlots,a6 as useAttrs,a7 as render,a8 as watchEffect,a9 as DoubleSide,aa as Box3,ab as UniformsLib,ac as Vector2,ad as ShaderLib,ae as Vector4,af as Line3,ag as Sphere,ah as Mesh,ai as MeshBasicMaterial,aj as FramebufferTexture,ak as RawShaderMaterial,al as AdditiveBlending,am as Box2,an as UnsignedByteType,ao as REVISION,ap as PropertyBinding,aq as InterpolateLinear,ar as EventDispatcher,as as MOUSE,at as Quaternion,au as PerspectiveCamera,av as OrthographicCamera,aw as Spherical,ax as WebGLRenderTarget,ay as HalfFloatType,az as NoToneMapping,aA as BoxGeometry,aB as getCurrentScope,aC as onScopeDispose,aD as CompressedTexture,aE as Texture$1,aF as RGBAFormat,aG as BufferAttribute,aH as InterpolateDiscrete,aI as Scene,aJ as ShapePath,aK as Uniform,aL as WebGLRenderer,aM as NearestFilter,aN as NearestMipmapNearestFilter,aO as NearestMipmapLinearFilter,aP as LinearFilter,aQ as LinearMipmapNearestFilter,aR as LinearMipmapLinearFilter,aS as ClampToEdgeWrapping,aT as RepeatWrapping,aU as MirroredRepeatWrapping,aV as mergeModels,aW as useModel,aX as createTextVNode,n as normalizeStyle,aY as Object3D,aZ as AnimationClip,a_ as QuaternionKeyframeTrack,a$ as NumberKeyframeTrack,b0 as Matrix3,b1 as Skeleton,b2 as Group,b3 as LineBasicMaterial,b4 as LineSegments,b5 as ImageLoader,b6 as Material,b7 as AxesHelper,b8 as TangentSpaceNormalMap,b9 as DynamicDrawUsage,ba as Line,bb as SkinnedMesh,bc as GLBufferAttribute,bd as TrianglesDrawMode,be as TriangleFanDrawMode,bf as TriangleStripDrawMode,bg as Loader,bh as LoaderUtils,bi as FileLoader$1,bj as LinearSRGBColorSpace,bk as SpotLight,bl as PointLight,bm as DirectionalLight,bn as SRGBColorSpace,bo as MeshPhysicalMaterial,bp as InstancedMesh,bq as InstancedBufferAttribute,br as TextureLoader,bs as ImageBitmapLoader,bt as PointsMaterial,bu as MeshStandardMaterial,bv as LineLoop,bw as Points,bx as Bone,by as ColorManagement,bz as FrontSide,bA as VectorKeyframeTrack,bB as Interpolant,bC as AnimationMixer,bD as Hr}from"./index-D1kvczNl.js";import{a as useLocalStorage,b as useDevicesList,c as useDark,d as usePermission,t as tryOnMounted,e as useWebWorker,f as useElementBounding,g as useScroll,h as useBreakpoints,i as breakpointsTailwind,j as useWindowSize}from"./index-BUtQmW0A.js";import{_ as _export_sfc}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as _sfc_main$e}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-DYLULqjM.js";import{E as EMOTION_VALUES,a as EmotionSurpriseMotionName,b as EmotionSadMotionName,c as EmotionAngryMotionName,d as EmotionHappyMotionName,e as EmotionAwkwardMotionName,f as EmotionQuestionMotionName,g as EmotionThinkMotionName,u as useMessageContentQueue,h as useEmotionsMessageQueue,i as useDelayMessageQueue,l as llmInferenceEndToken,j as EMOTION_VRMExpressionName_value,k as EMOTION_EmotionMotionName_value}from"./queues-Bj9-D8li.js";import{u as useQueue}from"./queue-CHpXWY4T.js";const strCamelToSnake=n=>n.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),objCamelToSnake=n=>Object.fromEntries(Object.entries(n).map(([e,t])=>[strCamelToSnake(e),t])),clean=n=>Object.fromEntries(Object.entries(n).filter(([,e])=>e!==void 0)),requestBody=n=>JSON.stringify(objCamelToSnake(clean({...n,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),requestHeaders=(n,e)=>clean({Authorization:e?`Bearer ${e}`:void 0,...n}),listModels=async n=>await(n.fetch??globalThis.fetch)(new URL("models",n.baseURL),{headers:requestHeaders({"Content-Type":"application/json",...n.headers},n.apiKey),signal:n.abortSignal}).then(e=>e.json()).then(({data:e})=>e),chatCompletion=async n=>{var e;return await(n.fetch??globalThis.fetch)(new URL("chat/completions",n.baseURL),{body:requestBody({...n,tools:(e=n.tools)==null?void 0:e.map(t=>({function:t.function,type:"function"}))}),headers:requestHeaders({"Content-Type":"application/json",...n.headers},n.apiKey),method:"POST",signal:n.abortSignal})},dataHeaderPrefix="data: ",dataErrorPrefix='{"error":',streamText=async n=>await chatCompletion({...n,stream:!0}).then(e=>{if(!e.body)return Promise.reject(e);const t=new TextDecoder;let r,i,a="";const l=e.body.pipeThrough(new TransformStream({transform:(h,s)=>{a+=t.decode(h);const o=a.split(`
2
 
3
  `);a=o.pop()||"";for(const u of o){if(!u||!u.startsWith(dataHeaderPrefix))continue;if(u.startsWith(dataErrorPrefix)){s.error(new Error(`Error from server: ${u}`));continue}const m=u.slice(dataHeaderPrefix.length);if(m==="[DONE]"){s.terminate();continue}const g=JSON.parse(m);s.enqueue(g),g.choices[0].finish_reason&&(r=g.choices[0].finish_reason),g.usage&&(i=g.usage)}}})),[c,f]=l.tee(),d=f.pipeThrough(new TransformStream({transform:(h,s)=>s.enqueue(h.choices[0].delta.content)}));return{chunkStream:c,finishReason:r,textStream:d,usage:i}}),suspectProtoRx=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,suspectConstructorRx=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,JsonSigRx=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function jsonParseTransform(n,e){if(n==="__proto__"||n==="constructor"&&e&&typeof e=="object"&&"prototype"in e){warnKeyDropped(n);return}return e}function warnKeyDropped(n){console.warn(`[destr] Dropping "${n}" key to prevent prototype pollution.`)}function destr(n,e={}){if(typeof n!="string")return n;const t=n.trim();if(n[0]==='"'&&n.endsWith('"')&&!n.includes("\\"))return t.slice(1,-1);if(t.length<=9){const r=t.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!JsonSigRx.test(n)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return n}try{if(suspectProtoRx.test(n)||suspectConstructorRx.test(n)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(n,jsonParseTransform)}return JSON.parse(n)}catch(r){if(e.strict)throw r;return n}}const HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,PLUS_RE=/\+/g,ENC_CARET_RE=/%5e/gi,ENC_BACKTICK_RE=/%60/gi,ENC_PIPE_RE=/%7c/gi,ENC_SPACE_RE=/%20/gi;function encode(n){return encodeURI(""+n).replace(ENC_PIPE_RE,"|")}function encodeQueryValue(n){return encode(typeof n=="string"?n:JSON.stringify(n)).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CARET_RE,"^").replace(SLASH_RE,"%2F")}function encodeQueryKey(n){return encodeQueryValue(n).replace(EQUAL_RE,"%3D")}function decode$1(n=""){try{return decodeURIComponent(""+n)}catch{return""+n}}function decodeQueryKey(n){return decode$1(n.replace(PLUS_RE," "))}function decodeQueryValue(n){return decode$1(n.replace(PLUS_RE," "))}function parseQuery(n=""){const e={};n[0]==="?"&&(n=n.slice(1));for(const t of n.split("&")){const r=t.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const i=decodeQueryKey(r[1]);if(i==="__proto__"||i==="constructor")continue;const a=decodeQueryValue(r[2]||"");e[i]===void 0?e[i]=a:Array.isArray(e[i])?e[i].push(a):e[i]=[e[i],a]}return e}function encodeQueryItem(n,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(t=>`${encodeQueryKey(n)}=${encodeQueryValue(t)}`).join("&"):`${encodeQueryKey(n)}=${encodeQueryValue(e)}`:encodeQueryKey(n)}function stringifyQuery(n){return Object.keys(n).filter(e=>n[e]!==void 0).map(e=>encodeQueryItem(e,n[e])).filter(Boolean).join("&")}const PROTOCOL_STRICT_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,PROTOCOL_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,PROTOCOL_RELATIVE_REGEX=/^([/\\]\s*){2,}[^/\\]/,JOIN_LEADING_SLASH_RE=/^\.?\//;function hasProtocol(n,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?PROTOCOL_STRICT_REGEX.test(n):PROTOCOL_REGEX.test(n)||(e.acceptRelative?PROTOCOL_RELATIVE_REGEX.test(n):!1)}function hasTrailingSlash(n="",e){return n.endsWith("/")}function withoutTrailingSlash(n="",e){return(hasTrailingSlash(n)?n.slice(0,-1):n)||"/"}function withTrailingSlash(n="",e){return n.endsWith("/")?n:n+"/"}function withBase(n,e){if(isEmptyURL(e)||hasProtocol(n))return n;const t=withoutTrailingSlash(e);return n.startsWith(t)?n:joinURL(t,n)}function withQuery(n,e){const t=parseURL(n),r={...parseQuery(t.search),...e};return t.search=stringifyQuery(r),stringifyParsedURL(t)}function isEmptyURL(n){return!n||n==="/"}function isNonEmptyURL(n){return n&&n!=="/"}function joinURL(n,...e){let t=n||"";for(const r of e.filter(i=>isNonEmptyURL(i)))if(t){const i=r.replace(JOIN_LEADING_SLASH_RE,"");t=withTrailingSlash(t)+i}else t=r;return t}const protocolRelative=Symbol.for("ufo:protocolRelative");function parseURL(n="",e){const t=n.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(t){const[,s,o=""]=t;return{protocol:s.toLowerCase(),pathname:o,href:s+o,auth:"",host:"",search:"",hash:""}}if(!hasProtocol(n,{acceptRelative:!0}))return parsePath(n);const[,r="",i,a=""]=n.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,l="",c=""]=a.match(/([^#/?]*)(.*)?/)||[];r==="file:"&&(c=c.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:f,search:d,hash:h}=parsePath(c);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:l,pathname:f,search:d,hash:h,[protocolRelative]:!r}}function parsePath(n=""){const[e="",t="",r=""]=(n.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:t,hash:r}}function stringifyParsedURL(n){const e=n.pathname||"",t=n.search?(n.search.startsWith("?")?"":"?")+n.search:"",r=n.hash||"",i=n.auth?n.auth+"@":"",a=n.host||"";return(n.protocol||n[protocolRelative]?(n.protocol||"")+"//":"")+i+a+e+t+r}class FetchError extends Error{constructor(e,t){super(e,t),this.name="FetchError",t!=null&&t.cause&&!this.cause&&(this.cause=t.cause)}}function createFetchError(n){var f,d,h,s,o;const e=((f=n.error)==null?void 0:f.message)||((d=n.error)==null?void 0:d.toString())||"",t=((h=n.request)==null?void 0:h.method)||((s=n.options)==null?void 0:s.method)||"GET",r=((o=n.request)==null?void 0:o.url)||String(n.request)||"/",i=`[${t}] ${JSON.stringify(r)}`,a=n.response?`${n.response.status} ${n.response.statusText}`:"<no response>",l=`${i}: ${a}${e?` ${e}`:""}`,c=new FetchError(l,n.error?{cause:n.error}:void 0);for(const u of["request","options","response"])Object.defineProperty(c,u,{get(){return n[u]}});for(const[u,m]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(c,u,{get(){return n.response&&n.response[m]}});return c}const payloadMethods=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function isPayloadMethod(n="GET"){return payloadMethods.has(n.toUpperCase())}function isJSONSerializable(n){if(n===void 0)return!1;const e=typeof n;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}const textTypes=new Set(["image/svg","application/xml","application/xhtml","application/html"]),JSON_RE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function detectResponseType(n=""){if(!n)return"json";const e=n.split(";").shift()||"";return JSON_RE.test(e)?"json":textTypes.has(e)||e.startsWith("text/")?"text":"blob"}function resolveFetchOptions(n,e,t,r){const i=mergeHeaders((e==null?void 0:e.headers)??(n==null?void 0:n.headers),t==null?void 0:t.headers,r);let a;return(t!=null&&t.query||t!=null&&t.params||e!=null&&e.params||e!=null&&e.query)&&(a={...t==null?void 0:t.params,...t==null?void 0:t.query,...e==null?void 0:e.params,...e==null?void 0:e.query}),{...t,...e,query:a,params:a,headers:i}}function mergeHeaders(n,e,t){if(!e)return new t(n);const r=new t(e);if(n)for(const[i,a]of Symbol.iterator in n||Array.isArray(n)?n:new t(n))r.set(i,a);return r}async function callHooks(n,e){if(e)if(Array.isArray(e))for(const t of e)await t(n);else await e(n)}const retryStatusCodes=new Set([408,409,425,429,500,502,503,504]),nullBodyResponses=new Set([101,204,205,304]);function createFetch(n={}){const{fetch:e=globalThis.fetch,Headers:t=globalThis.Headers,AbortController:r=globalThis.AbortController}=n;async function i(c){const f=c.error&&c.error.name==="AbortError"&&!c.options.timeout||!1;if(c.options.retry!==!1&&!f){let h;typeof c.options.retry=="number"?h=c.options.retry:h=isPayloadMethod(c.options.method)?0:1;const s=c.response&&c.response.status||500;if(h>0&&(Array.isArray(c.options.retryStatusCodes)?c.options.retryStatusCodes.includes(s):retryStatusCodes.has(s))){const o=typeof c.options.retryDelay=="function"?c.options.retryDelay(c):c.options.retryDelay||0;return o>0&&await new Promise(u=>setTimeout(u,o)),a(c.request,{...c.options,retry:h-1})}}const d=createFetchError(c);throw Error.captureStackTrace&&Error.captureStackTrace(d,a),d}const a=async function(f,d={}){const h={request:f,options:resolveFetchOptions(f,d,n.defaults,t),response:void 0,error:void 0};h.options.method&&(h.options.method=h.options.method.toUpperCase()),h.options.onRequest&&await callHooks(h,h.options.onRequest),typeof h.request=="string"&&(h.options.baseURL&&(h.request=withBase(h.request,h.options.baseURL)),h.options.query&&(h.request=withQuery(h.request,h.options.query),delete h.options.query),"query"in h.options&&delete h.options.query,"params"in h.options&&delete h.options.params),h.options.body&&isPayloadMethod(h.options.method)&&(isJSONSerializable(h.options.body)?(h.options.body=typeof h.options.body=="string"?h.options.body:JSON.stringify(h.options.body),h.options.headers=new t(h.options.headers||{}),h.options.headers.has("content-type")||h.options.headers.set("content-type","application/json"),h.options.headers.has("accept")||h.options.headers.set("accept","application/json")):("pipeTo"in h.options.body&&typeof h.options.body.pipeTo=="function"||typeof h.options.body.pipe=="function")&&("duplex"in h.options||(h.options.duplex="half")));let s;if(!h.options.signal&&h.options.timeout){const u=new r;s=setTimeout(()=>{const m=new Error("[TimeoutError]: The operation was aborted due to timeout");m.name="TimeoutError",m.code=23,u.abort(m)},h.options.timeout),h.options.signal=u.signal}try{h.response=await e(h.request,h.options)}catch(u){return h.error=u,h.options.onRequestError&&await callHooks(h,h.options.onRequestError),await i(h)}finally{s&&clearTimeout(s)}if((h.response.body||h.response._bodyInit)&&!nullBodyResponses.has(h.response.status)&&h.options.method!=="HEAD"){const u=(h.options.parseResponse?"json":h.options.responseType)||detectResponseType(h.response.headers.get("content-type")||"");switch(u){case"json":{const m=await h.response.text(),g=h.options.parseResponse||destr;h.response._data=g(m);break}case"stream":{h.response._data=h.response.body||h.response._bodyInit;break}default:h.response._data=await h.response[u]()}}return h.options.onResponse&&await callHooks(h,h.options.onResponse),!h.options.ignoreResponseError&&h.response.status>=400&&h.response.status<600?(h.options.onResponseError&&await callHooks(h,h.options.onResponseError),await i(h)):h.response},l=async function(f,d){return(await a(f,d))._data};return l.raw=a,l.native=(...c)=>e(...c),l.create=(c={},f={})=>createFetch({...n,...f,defaults:{...n.defaults,...f.defaults,...c}}),l}const _globalThis=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),fetch$1=_globalThis.fetch?(...n)=>_globalThis.fetch(...n):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),Headers=_globalThis.Headers,AbortController=_globalThis.AbortController,ofetch=createFetch({fetch:fetch$1,Headers,AbortController}),useLLM=defineStore("llm",()=>{async function n(r,i,a,l){return await streamText({baseURL:r.endsWith("/")?r:`${r}/`,apiKey:i,model:a,messages:l,streamOptions:{usage:!0}})}async function e(r,i){if(r==="")return[];try{return await listModels({baseURL:r.endsWith("/")?r:`${r}/`,apiKey:i})}catch(a){if(String(a).includes("Failed to construct 'URL': Invalid URL"))return[];throw a}}async function t(r,i,a,l){if(!a||!a.trim())throw new Error("Text is required");return await ofetch(`${r}/api/v1/llm/voice/elevenlabs`,{body:{...l,stream:!0,text:a},method:"POST",cache:"no-cache",responseType:"arrayBuffer",headers:{Authorization:`Bearer ${i}`}})}return{models:e,stream:n,streamSpeech:t}}),useSettings=defineStore("settings",()=>{const n=ref$1(),e=useLocalStorage("settings/credentials/openai-api-key",""),t=useLocalStorage("settings/credentials/openai-api-base-url",""),r=useLocalStorage("settings/credentials/elevenlabs-api-key",""),i=useLocalStorage("settings/language","en-US"),a=useLocalStorage("settings/stage/view/model-renderer","2d"),l=useLocalStorage("settings/llm/openai/model",{id:"openai/gpt-3.5-turbo",name:"OpenAI GPT3.5 Turbo"}),c=useLocalStorage("settings/audio/input","true"),f=computed(()=>{var h;return(h=n.value)==null?void 0:h.deviceId}),{audioInputs:d}=useDevicesList({constraints:{audio:!0},requestPermissions:!0});return watch(c,h=>{h==="false"&&(n.value=void 0),h==="true"&&(n.value=d.value[0])}),onMounted(()=>{c.value==="true"&&!n.value&&(n.value=d.value[0])}),watch(d,()=>{c.value==="true"&&!n.value&&(n.value=d.value[0])}),watch(i,h=>i18n.global.locale.value=h),{openAiApiKey:e,openAiApiBaseURL:t,openAiModel:l,elevenLabsApiKey:r,language:i,stageView:a,isAudioInputOn:c,selectedAudioDevice:n,selectedAudioDeviceId:f}}),closed="0px",_sfc_main$d=defineComponent({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(n){const e=n;function t(f){return{height:f.style.height,width:f.style.width,position:f.style.position,visibility:f.style.visibility,overflow:f.style.overflow,paddingTop:f.style.paddingTop,paddingBottom:f.style.paddingBottom,borderTopWidth:f.style.borderTopWidth,borderBottomWidth:f.style.borderBottomWidth,marginTop:f.style.marginTop,marginBottom:f.style.marginBottom}}function r(f,d){const{width:h}=getComputedStyle(f);f.style.width=h,f.style.position="absolute",f.style.visibility="hidden",f.style.height="";const{height:s}=getComputedStyle(f);return f.style.width=d.width,f.style.position=d.position,f.style.visibility=d.visibility,f.style.height=closed,f.style.overflow="hidden",d.height&&d.height!==closed?d.height:s}function i(f,d,h,s,o){const u=f.animate(s,o);f.style.height=d.height,u.onfinish=()=>{f.style.overflow=d.overflow,h()}}function a(f,d){return[{height:closed,opacity:e.opacityClosed,paddingTop:closed,paddingBottom:closed,borderTopWidth:closed,borderBottomWidth:closed,marginTop:closed,marginBottom:closed},{height:f,opacity:e.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}]}function l(f,d){const h=f,s=t(h),o=r(h,s),u=a(o,s),m={duration:e.duration,easing:e.easingEnter};i(h,s,d,u,m)}function c(f,d){const h=f,s=t(h),{height:o}=getComputedStyle(h);h.style.height=o,h.style.overflow="hidden";const u=a(o,s).reverse(),m={duration:e.duration,easing:e.easingLeave};i(h,s,d,u,m)}return(f,d)=>(openBlock(),createBlock(Transition,{css:!1,onEnter:l,onLeave:c},{default:withCtx(()=>[renderSlot(f.$slots,"default")]),_:3}))}}),_hoisted_1$8={flex:"~","gap-2":""},_hoisted_2$7={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_3$6=["checked","aria-checked"],_hoisted_4$5=["checked","aria-checked"],_hoisted_5$5={relative:""},_hoisted_6$4={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","h-fit":"","w-fit":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_7$3=["checked","aria-checked"],_hoisted_8$3={key:0,w:"120 <sm:[calc(100vw-16px)]",right:"0",bg:"zinc-100 dark:zinc-700",grid:"~ cols-[140px_1fr]",absolute:"","z-100":"","my-2":"","items-center":"","gap-1.5":"","rounded-lg":"","px-3":"","py-2":""},_hoisted_9$3={"text-sm":""},_hoisted_10$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_11$2=["placeholder"],_hoisted_12$2={"text-sm":""},_hoisted_13$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_14$2=["placeholder"],_hoisted_15$2={"text-sm":""},_hoisted_16$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_17$2=["placeholder"],_hoisted_18$2={"text-sm":""},_hoisted_19$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_20$2={"text-sm":""},_hoisted_21$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_22={disabled:"",class:"bg-white dark:bg-zinc-800"},_hoisted_23=["value"],_hoisted_24=["value"],_hoisted_25={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","h-fit":"","w-fit":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_26={"h-fit":"","cursor-pointer":"","rounded-md":"","px-2":"","py-2":""},_hoisted_27=["checked","aria-checked"],_hoisted_28={"select-none":""},_hoisted_29={key:0,"i-solar:sun-fog-bold-duotone":"",text:"lg hover:zinc-600 dark:hover:zinc-300",transition:"all ease-in-out duration-250"},_hoisted_30={key:1,"i-solar:moon-stars-bold-duotone":"",text:"lg hover:zinc-600 dark:hover:zinc-300",transition:"all ease-in-out duration-250"},_sfc_main$c=defineComponent({__name:"Settings",setup(n){const{t:e}=useI18n(),t=useSettings(),r=ref$1(!1),i=useDark({disableTransition:!1}),a=ref$1([]),{models:l}=useLLM(),{openAiModel:c,openAiApiBaseURL:f,openAiApiKey:d}=storeToRefs(t);function h(s){const o=s.target,u=a.value.find(m=>m.id===o.value);if(!u){c.value=void 0;return}c.value=u}return watch([f,d],async([s,o])=>{if(!s||!o){a.value=[];return}a.value=await l(s,o)}),onMounted(async()=>{!f.value||!d.value||(a.value=await l(f.value,d.value))}),(s,o)=>(openBlock(),createElementBlock("div",_hoisted_1$8,[createBaseVNode("fieldset",_hoisted_2$7,[createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([unref(t).stageView==="2d"?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),"rounded-md":"","px-4":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>unref(t).stageView=u),checked:unref(t).stageView==="2d","aria-checked":unref(t).stageView==="2d",name:"settings.stageView",type:"radio",role:"radio",value:"2d",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_3$6),[[vModelRadio,unref(t).stageView]]),createBaseVNode("div",{"select-none":"",class:normalizeClass([unref(t).stageView==="2d"?"font-semibold":""])}," 2D ",2)],2),createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([unref(t).stageView==="3d"?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),"rounded-md":"","px-4":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=u=>unref(t).stageView=u),checked:unref(t).stageView==="3d","aria-checked":unref(t).stageView==="3d",name:"stageView",type:"radio",role:"radio",value:"3d",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_4$5),[[vModelRadio,unref(t).stageView]]),createBaseVNode("div",{"select-none":"",class:normalizeClass([unref(t).stageView==="3d"?"font-semibold":""])}," 3D ",2)],2)]),createBaseVNode("div",_hoisted_5$5,[createBaseVNode("div",_hoisted_6$4,[createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([r.value?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),transition:"all ease-in-out duration-500","rounded-md":"","px-2":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[2]||(o[2]=u=>r.value=u),checked:r.value,"aria-checked":r.value,name:"stageView",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_7$3),[[vModelCheckbox,r.value]]),o[8]||(o[8]=createBaseVNode("div",{"select-none":""},[createBaseVNode("div",{"i-solar:settings-minimalistic-bold-duotone":"",text:"text-zinc-900 dark:text-zinc-800 lg"})],-1))],2)]),createVNode(_sfc_main$d,null,{default:withCtx(()=>[r.value?(openBlock(),createElementBlock("div",_hoisted_8$3,[createBaseVNode("div",_hoisted_9$3,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.openai-base-url.label")),1)]),createBaseVNode("div",_hoisted_10$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=u=>unref(t).openAiApiBaseURL=u),type:"text",placeholder:unref(e)("settings.openai-base-url.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_11$2),[[vModelText,unref(t).openAiApiBaseURL]])]),createBaseVNode("div",_hoisted_12$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.openai-api-key.label")),1)]),createBaseVNode("div",_hoisted_13$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=u=>unref(t).openAiApiKey=u),type:"text",placeholder:unref(e)("settings.openai-api-key.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_14$2),[[vModelText,unref(t).openAiApiKey]])]),createBaseVNode("div",_hoisted_15$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.elevenlabs-api-key.label")),1)]),createBaseVNode("div",_hoisted_16$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=u=>unref(t).elevenLabsApiKey=u),type:"text",placeholder:unref(e)("settings.elevenlabs-api-key.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_17$2),[[vModelText,unref(t).elevenLabsApiKey]])]),createBaseVNode("div",_hoisted_18$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.language")),1)]),createBaseVNode("div",_hoisted_19$2,[withDirectives(createBaseVNode("select",{"onUpdate:modelValue":o[6]||(o[6]=u=>unref(t).language=u),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},o[9]||(o[9]=[createBaseVNode("option",{value:"en-US"}," English ",-1),createBaseVNode("option",{value:"zh-CN"}," 简体中文 ",-1)]),512),[[vModelSelect,unref(t).language]])]),createBaseVNode("div",_hoisted_20$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.models")),1)]),createBaseVNode("div",_hoisted_21$2,[createBaseVNode("select",{bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":"",onChange:h},[createBaseVNode("option",_hoisted_22,toDisplayString(unref(e)("stage.select-a-model")),1),unref(t).openAiModel?(openBlock(),createElementBlock("option",{key:0,value:unref(t).openAiModel.id},toDisplayString("name"in unref(t).openAiModel?`${unref(t).openAiModel.name} (${unref(t).openAiModel.id})`:unref(t).openAiModel.id),9,_hoisted_23)):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(a.value,u=>(openBlock(),createElementBlock("option",{key:u.id,value:u.id},toDisplayString("name"in u?`${u.name} (${u.id})`:u.id),9,_hoisted_24))),128))],32)])])):createCommentVNode("",!0)]),_:1})]),createBaseVNode("div",null,[createBaseVNode("div",_hoisted_25,[createBaseVNode("label",_hoisted_26,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=u=>isRef(i)?i.value=u:null),checked:unref(i),"aria-checked":unref(i),name:"stageView",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_27),[[vModelCheckbox,unref(i)]]),createBaseVNode("div",_hoisted_28,[createVNode(Transition,{name:"slide-away",mode:"out-in"},{default:withCtx(()=>[unref(i)?(openBlock(),createElementBlock("div",_hoisted_29)):(openBlock(),createElementBlock("div",_hoisted_30))]),_:1})])])])])]))}}),Settings=_export_sfc(_sfc_main$c,[["__scopeId","data-v-8d6cb079"]]),_hoisted_1$7={flex:"~","mb-1":"","w-full":"","gap-2":""},_sfc_main$b=defineComponent({__name:"Header",setup(n){return(e,t)=>(openBlock(),createElementBlock("header",_hoisted_1$7,[t[0]||(t[0]=createBaseVNode("div",{flex:"~ 1","w-full":"","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":""},[createBaseVNode("div",{"i-solar:cat-outline":"",text:"[#ed869d]"}),createBaseVNode("div",{"font-cute":""},[createBaseVNode("span",null,"アイリ")])],-1)),createVNode(Settings)]))}});var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(n,e,t)=>{if(e&&typeof e.init=="function"&&typeof e.createSessionHandler=="function"){const r=backends[n];if(r===void 0)backends[n]={backend:e,priority:t};else{if(r.priority>t)return;if(r.priority===t&&r.backend!==e)throw new Error(`cannot register backend "${n}" using priority ${t}`)}if(t>=0){const i=backendsSortedByPriority.indexOf(n);i!==-1&&backendsSortedByPriority.splice(i,1);for(let a=0;a<backendsSortedByPriority.length;a++)if(backends[backendsSortedByPriority[a]].priority<=t){backendsSortedByPriority.splice(a,0,n);return}backendsSortedByPriority.push(n)}return}throw new TypeError("not a valid backend")},resolveBackend=async n=>{const e=n.length===0?backendsSortedByPriority:n,t=[];for(const r of e){const i=backends[r];if(i){if(i.initialized)return i.backend;if(i.aborted)continue;const a=!!i.initPromise;try{return a||(i.initPromise=i.backend.init()),await i.initPromise,i.initialized=!0,i.backend}catch(l){a||t.push({name:r,err:l}),i.aborted=!0}finally{delete i.initPromise}}}throw new Error(`no available backend found. ERR: ${t.map(r=>`[${r.name}] ${r.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);this.logLevelInternal=e}}get logLevel(){return this.logLevelInternal}}const env$1=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=n=>{let e=1;for(let t=0;t<n.length;t++){const r=n[t];if(typeof r!="number"||!Number.isSafeInteger(r))throw new TypeError(`dims[${t}] must be an integer, got: ${r}`);if(r<0)throw new RangeError(`dims[${t}] must be a non-negative integer, got: ${r}`);e*=r}return e};let Tensor$1=class jt{constructor(e,t,r){let i,a,l;if(typeof e=="string")if(i=e,l=r,e==="string"){if(!Array.isArray(t))throw new TypeError("A string tensor's data must be a string array.");a=t}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(e);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t))a=f.from(t);else if(t instanceof f)a=t;else throw new TypeError(`A ${i} tensor's data must be type of ${f}`)}else if(l=t,Array.isArray(e)){if(e.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof e[0];if(f==="string")i="string",a=e;else if(f==="boolean")i="bool",a=Uint8Array.from(e);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(e.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${e.constructor}.`);i=f,a=e}if(l===void 0)l=[a.length];else if(!Array.isArray(l))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(l);if(c!==a.length)throw new Error(`Tensor's size(${c}) does not match data length(${a.length}).`);this.dims=l,this.type=i,this.data=a,this.size=c}static bufferToTensor(e,t){if(e===void 0)throw new Error("Image buffer must be defined");if(t.height===void 0||t.width===void 0)throw new Error("Image height and width must be defined");const{height:r,width:i}=t,a=t.norm;let l,c;a===void 0||a.mean===void 0?l=255:l=a.mean,a===void 0||a.bias===void 0?c=0:c=a.bias;const f=t.bitmapFormat!==void 0?t.bitmapFormat:"RGBA",d=t.tensorFormat!==void 0&&t.tensorFormat!==void 0?t.tensorFormat:"RGB",h=r*i,s=d==="RGBA"?new Float32Array(h*4):new Float32Array(h*3);let o=4,u=0,m=1,g=2,y=3,v=0,_=h,b=h*2,w=-1;f==="RGB"&&(o=3,u=0,m=1,g=2,y=-1),d==="RGBA"?w=h*3:d==="RBG"?(v=0,b=h,_=h*2):d==="BGR"&&(b=0,_=h,v=h*2);for(let T=0;T<h;T++,u+=o,g+=o,m+=o,y+=o)s[v++]=(e[u]+c)/l,s[_++]=(e[m]+c)/l,s[b++]=(e[g]+c)/l,w!==-1&&y!==-1&&(s[w++]=(e[y]+c)/l);return d==="RGBA"?new jt("float32",s,[1,4,r,i]):new jt("float32",s,[1,3,r,i])}static async fromImage(e,t){const r=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,i=typeof ImageData<"u"&&e instanceof ImageData,a=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,l=typeof String<"u"&&(e instanceof String||typeof e=="string");let c,f={};if(r){const d=document.createElement("canvas"),h=d.getContext("2d");if(h!=null){let s=e.naturalHeight,o=e.naturalWidth;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(s=t.resizedHeight,o=t.resizedWidth),t!==void 0){if(f=t,t.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",t.height!==void 0&&t.height!==s)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=s,t.width!==void 0&&t.width!==o)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=o}else f.tensorFormat="RGBA",f.height=s,f.width=o;d.width=o,d.height=s,h.drawImage(e,0,0,o,s),c=h.getImageData(0,0,o,s).data}else throw new Error("Can not access image data")}else if(i){const d="RGBA";let h,s;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(h=t.resizedHeight,s=t.resizedWidth):(h=e.height,s=e.width),t!==void 0){if(f=t,t.bitmapFormat!==void 0&&t.bitmapFormat!==d)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=h,f.width=s,t!==void 0){const o=document.createElement("canvas");o.width=s,o.height=h;const u=o.getContext("2d");if(u!=null)u.putImageData(e,0,0),c=u.getImageData(0,0,s,h).data;else throw new Error("Can not access image data")}else c=e.data}else if(a){if(t===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(t.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const d=document.createElement("canvas").getContext("2d");if(d!=null){const h=e.height,s=e.width;if(d.drawImage(e,0,0,s,h),c=d.getImageData(0,0,s,h).data,t!==void 0){if(t.height!==void 0&&t.height!==h)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=h,t.width!==void 0&&t.width!==s)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=s}else f.height=h,f.width=s;return jt.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(l)return new Promise((d,h)=>{const s=document.createElement("canvas"),o=s.getContext("2d");if(!e||!o)return h();const u=new Image;u.crossOrigin="Anonymous",u.src=e,u.onload=()=>{s.width=u.width,s.height=u.height,o.drawImage(u,0,0,s.width,s.height);const m=o.getImageData(0,0,s.width,s.height);if(t!==void 0){if(t.height!==void 0&&t.height!==s.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=s.height,t.width!==void 0&&t.width!==s.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=s.width}else f.height=s.height,f.width=s.width;d(jt.bufferToTensor(m.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return jt.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(e){var t,r;const i=document.createElement("canvas").getContext("2d");let a;if(i!=null){const l=this.dims[3],c=this.dims[2],f=this.dims[1],d=e!==void 0&&e.format!==void 0?e.format:"RGB",h=e!==void 0&&((t=e.norm)===null||t===void 0?void 0:t.mean)!==void 0?e.norm.mean:255,s=e!==void 0&&((r=e.norm)===null||r===void 0?void 0:r.bias)!==void 0?e.norm.bias:0,o=c*l;if(e!==void 0){if(e.height!==void 0&&e.height!==c)throw new Error("Image output config height doesn't match tensor height");if(e.width!==void 0&&e.width!==l)throw new Error("Image output config width doesn't match tensor width");if(e.format!==void 0&&f===4&&e.format!=="RGBA"||f===3&&e.format!=="RGB"&&e.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const u=4;let m=0,g=1,y=2,v=3,_=0,b=o,w=o*2,x=-1;d==="RGBA"?(_=0,b=o,w=o*2,x=o*3):d==="RGB"?(_=0,b=o,w=o*2):d==="RBG"&&(_=0,w=o,b=o*2),a=i.createImageData(l,c);for(let T=0;T<c*l;m+=u,g+=u,y+=u,v+=u,T++)a.data[m]=(this.data[_++]-s)*h,a.data[g]=(this.data[b++]-s)*h,a.data[y]=(this.data[w++]-s)*h,a.data[v]=x===-1?255:(this.data[x++]-s)*h}else throw new Error("Can not access image data");return a}reshape(e){return new jt(this.type,this.data,e)}};const Tensor=Tensor$1;let InferenceSession$1=class kn{constructor(e){this.handler=e}async run(e,t,r){const i={};let a={};if(typeof e!="object"||e===null||e instanceof Tensor||Array.isArray(e))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let l=!0;if(typeof t=="object"){if(t===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(t instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(t)){if(t.length===0)throw new TypeError("'fetches' cannot be an empty array.");l=!1;for(const d of t){if(typeof d!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(d)===-1)throw new RangeError(`'fetches' contains invalid output name: ${d}.`);i[d]=null}if(typeof r=="object"&&r!==null)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else{let d=!1;const h=Object.getOwnPropertyNames(t);for(const s of this.outputNames)if(h.indexOf(s)!==-1){const o=t[s];(o===null||o instanceof Tensor)&&(d=!0,l=!1,i[s]=o)}if(d){if(typeof r=="object"&&r!==null)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else a=t}}else if(typeof t<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const d of this.inputNames)if(typeof e[d]>"u")throw new Error(`input '${d}' is missing in 'feeds'.`);if(l)for(const d of this.outputNames)i[d]=null;const c=await this.handler.run(e,i,a),f={};for(const d in c)Object.hasOwnProperty.call(c,d)&&(f[d]=new Tensor(c[d].type,c[d].data,c[d].dims));return f}static async create(e,t,r,i){let a,l={};if(typeof e=="string"){if(a=e,typeof t=="object"&&t!==null)l=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof Uint8Array){if(a=e,typeof t=="object"&&t!==null)l=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer){const s=e;let o=0,u=e.byteLength;if(typeof t=="object"&&t!==null)l=t;else if(typeof t=="number"){if(o=t,!Number.isSafeInteger(o))throw new RangeError("'byteOffset' must be an integer.");if(o<0||o>=s.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${s.byteLength}).`);if(u=e.byteLength-o,typeof r=="number"){if(u=r,!Number.isSafeInteger(u))throw new RangeError("'byteLength' must be an integer.");if(u<=0||o+u>s.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${s.byteLength-o}].`);if(typeof i=="object"&&i!==null)l=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else if(typeof r<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof t<"u")throw new TypeError("'options' must be an object.");a=new Uint8Array(s,o,u)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(l.executionProviders||[]).map(s=>typeof s=="string"?s:s.name),h=await(await resolveBackend(f)).createSessionHandler(a,l);return new kn(h)}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$1=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env:env$1,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(lib$1);/*!
4
  * ONNX Runtime Web v1.14.0
assets/index-BUtQmW0A.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as Te,g as me,J as pe,e as b,bE as Z,aB as _e,aC as Ce,bF as ee,bG as he,bH as Oe,x as xe,G as We,bI as Ae,w as k,f as x,bJ as se,a8 as Ve,$ as K,bK as De}from"./index-D1kvczNl.js";function z(e){return _e()?(Ce(e),!0):!1}const Q=new WeakMap,Ne=(...e)=>{var t;const n=e[0],r=(t=ee())==null?void 0:t.proxy;if(r==null&&!he())throw new Error("injectLocal must be called in setup");return r&&Q.has(r)&&n in Q.get(r)?Q.get(r)[n]:Oe(...e)};function T(e){return typeof e=="function"?e():Te(e)}const Y=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Me=e=>e!=null,ke=Object.prototype.toString,Le=e=>ke.call(e)==="[object Object]",F=()=>{};function te(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const we=e=>e();function Re(e,t={}){let n,r,i=F;const o=s=>{clearTimeout(s),i(),i=F};return s=>{const c=T(e),u=T(t.maxWait);return n&&o(n),c<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(s())):new Promise((d,f)=>{i=t.rejectOnCancel?f:d,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,d(s())},u)),n=setTimeout(()=>{r&&o(r),r=null,d(s())},c)})}}function Fe(...e){let t=0,n,r=!0,i=F,o,a,s,c,u;!xe(e[0])&&typeof e[0]=="object"?{delay:a,trailing:s=!0,leading:c=!0,rejectOnCancel:u=!1}=e[0]:[a,s=!0,c=!0,u=!1]=e;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=F)};return m=>{const l=T(a),v=Date.now()-t,w=()=>o=m();return d(),l<=0?(t=Date.now(),w()):(v>l&&(c||!r)?(t=Date.now(),w()):s&&(o=new Promise((g,E)=>{i=u?E:g,n=setTimeout(()=>{t=Date.now(),r=!0,g(w()),d()},Math.max(0,l-v))})),!c&&!n&&(n=setTimeout(()=>r=!0,l)),r=!1,o)}}function je(e=we){const t=b(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:Z(t),pause:n,resume:r,eventFilter:i}}function Pe(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const r=t;t=void 0,r&&await r},n}function Ie(e,t){var n;if(typeof e=="number")return e+t;const r=((n=e.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",i=e.slice(r.length),o=Number.parseFloat(r)+t;return Number.isNaN(o)?e:o+i}function B(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function ze(e){return ee()}function He(...e){if(e.length!==1)return We(...e);const t=e[0];return typeof t=="function"?Z(Ae(()=>({get:t,set:F}))):b(t)}function ge(e,t=200,n={}){return te(Re(t,n),e)}function $e(e,t=200,n=!1,r=!0,i=!1){return te(Fe(t,n,r,i),e)}function Be(e,t,n={}){const{eventFilter:r=we,...i}=n;return k(e,te(r,t),i)}function Je(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:o,pause:a,resume:s,isActive:c}=je(r);return{stop:Be(e,t,{...i,eventFilter:o}),pause:a,resume:s,isActive:c}}function H(e,t=!0,n){ze()?me(e,n):t?e():pe(e)}function qe(e,t,n={}){const{immediate:r=!0}=n,i=b(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function s(){i.value=!1,a()}function c(...u){a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,e(...u)},T(t))}return r&&(i.value=!0,Y&&c()),z(s),{isPending:Z(i),start:c,stop:s}}const D=Y?window:void 0,ne=Y?window.navigator:void 0;function L(e){var t;const n=T(e);return(t=n==null?void 0:n.$el)!=null?t:n}function M(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=D):[t,n,r,i]=e,!t)return F;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(d=>d()),o.length=0},s=(d,f,m,l)=>(d.addEventListener(f,m,l),()=>d.removeEventListener(f,m,l)),c=k(()=>[L(t),T(i)],([d,f])=>{if(a(),!d)return;const m=Le(f)?{...f}:f;o.push(...n.flatMap(l=>r.map(v=>s(d,l,v,m))))},{immediate:!0,flush:"post"}),u=()=>{c(),a()};return z(u),u}function Ge(){const e=b(!1),t=ee();return t&&me(()=>{e.value=!0},t),e}function $(e){const t=Ge();return x(()=>(t.value,!!e()))}function ye(e,t,n={}){const{window:r=D,...i}=n;let o;const a=$(()=>r&&"MutationObserver"in r),s=()=>{o&&(o.disconnect(),o=void 0)},c=x(()=>{const m=T(e),l=(Array.isArray(m)?m:[m]).map(L).filter(Me);return new Set(l)}),u=k(()=>c.value,m=>{s(),a.value&&m.size&&(o=new MutationObserver(t),m.forEach(l=>o.observe(l,i)))},{immediate:!0,flush:"post"}),d=()=>o==null?void 0:o.takeRecords(),f=()=>{u(),s()};return z(f),{isSupported:a,stop:f,takeRecords:d}}const Ue=Symbol("vueuse-ssr-width");function be(){const e=he()?Ne(Ue,null):null;return typeof e=="number"?e:void 0}function I(e,t={}){const{window:n=D,ssrWidth:r=be()}=t,i=$(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),o=b(typeof r=="number");let a;const s=b(!1),c=f=>{s.value=f.matches},u=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",c):a.removeListener(c))},d=Ve(()=>{if(o.value){o.value=!i.value;const f=T(e).split(",");s.value=f.some(m=>{const l=m.includes("not all"),v=m.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),w=m.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(v||w);return v&&g&&(g=r>=B(v[1])),w&&g&&(g=r<=B(w[1])),l?!g:g});return}i.value&&(u(),a=n.matchMedia(T(e)),"addEventListener"in a?a.addEventListener("change",c):a.addListener(c),s.value=a.matches)});return z(()=>{d(),u(),a=void 0}),x(()=>s.value)}const ot={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function it(e,t={}){function n(l,v){let w=T(e[T(l)]);return v!=null&&(w=Ie(w,v)),typeof w=="number"&&(w=`${w}px`),w}const{window:r=D,strategy:i="min-width",ssrWidth:o=be()}=t,a=typeof o=="number",s=a?b(!1):{value:!0};a&&H(()=>s.value=!!r);function c(l,v){return!s.value&&a?l==="min"?o>=B(v):o<=B(v):r?r.matchMedia(`(${l}-width: ${v})`).matches:!1}const u=l=>I(()=>`(min-width: ${n(l)})`,t),d=l=>I(()=>`(max-width: ${n(l)})`,t),f=Object.keys(e).reduce((l,v)=>(Object.defineProperty(l,v,{get:()=>i==="min-width"?u(v):d(v),enumerable:!0,configurable:!0}),l),{});function m(){const l=Object.keys(e).map(v=>[v,f[v],B(n(v))]).sort((v,w)=>v[2]-w[2]);return x(()=>l.filter(([,v])=>v.value).map(([v])=>v))}return Object.assign(f,{greaterOrEqual:u,smallerOrEqual:d,greater(l){return I(()=>`(min-width: ${n(l,.1)})`,t)},smaller(l){return I(()=>`(max-width: ${n(l,-.1)})`,t)},between(l,v){return I(()=>`(min-width: ${n(l)}) and (max-width: ${n(v,-.1)})`,t)},isGreater(l){return c("min",n(l,.1))},isGreaterOrEqual(l){return c("min",n(l))},isSmaller(l){return c("max",n(l,-.1))},isSmallerOrEqual(l){return c("max",n(l))},isInBetween(l,v){return c("min",n(l))&&c("max",n(v,-.1))},current:m,active(){const l=m();return x(()=>l.value.length===0?"":l.value.at(i==="min-width"?-1:0))}})}function X(e,t={}){const{controls:n=!1,navigator:r=ne}=t,i=$(()=>r&&"permissions"in r),o=K(),a=typeof e=="string"?{name:e}:e,s=K(),c=()=>{var d,f;s.value=(f=(d=o.value)==null?void 0:d.state)!=null?f:"prompt"};M(o,"change",c);const u=Pe(async()=>{if(i.value){if(!o.value)try{o.value=await r.permissions.query(a)}catch{o.value=void 0}finally{c()}if(n)return De(o.value)}});return u(),n?{state:s,isSupported:i,query:u}:s}function at(e={}){const{navigator:t=ne,read:n=!1,source:r,copiedDuring:i=1500,legacy:o=!1}=e,a=$(()=>t&&"clipboard"in t),s=X("clipboard-read"),c=X("clipboard-write"),u=x(()=>a.value||o),d=b(""),f=b(!1),m=qe(()=>f.value=!1,i);function l(){a.value&&E(s.value)?t.clipboard.readText().then(p=>{d.value=p}):d.value=g()}u.value&&n&&M(["copy","cut"],l);async function v(p=T(r)){u.value&&p!=null&&(a.value&&E(c.value)?await t.clipboard.writeText(p):w(p),d.value=p,f.value=!0,m.start())}function w(p){const A=document.createElement("textarea");A.value=p??"",A.style.position="absolute",A.style.opacity="0",document.body.appendChild(A),A.select(),document.execCommand("copy"),A.remove()}function g(){var p,A,C;return(C=(A=(p=document==null?void 0:document.getSelection)==null?void 0:p.call(document))==null?void 0:A.toString())!=null?C:""}function E(p){return p==="granted"||p==="prompt"}return{isSupported:u,text:d,copied:f,copy:v}}const J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},q="__vueuse_ssr_handlers__",Ke=Ye();function Ye(){return q in J||(J[q]=J[q]||{}),J[q]}function Se(e,t){return Ke[e]||t}function Qe(e){return I("(prefers-color-scheme: dark)",e)}function Xe(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ze={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},ue="vueuse-storage";function Ee(e,t,n,r={}){var i;const{flush:o="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:f=D,eventFilter:m,onError:l=h=>{console.error(h)},initOnMounted:v}=r,w=(d?K:b)(typeof t=="function"?t():t);if(!n)try{n=Se("getDefaultStorage",()=>{var h;return(h=D)==null?void 0:h.localStorage})()}catch(h){l(h)}if(!n)return w;const g=T(t),E=Xe(g),p=(i=r.serializer)!=null?i:Ze[E],{pause:A,resume:C}=Je(w,()=>j(w.value),{flush:o,deep:a,eventFilter:m});f&&s&&H(()=>{n instanceof Storage?M(f,"storage",V):M(f,ue,O),v&&V()}),v||V();function N(h,S){if(f){const _={key:e,oldValue:h,newValue:S,storageArea:n};f.dispatchEvent(n instanceof Storage?new StorageEvent("storage",_):new CustomEvent(ue,{detail:_}))}}function j(h){try{const S=n.getItem(e);if(h==null)N(S,null),n.removeItem(e);else{const _=p.write(h);S!==_&&(n.setItem(e,_),N(S,_))}}catch(S){l(S)}}function y(h){const S=h?h.newValue:n.getItem(e);if(S==null)return c&&g!=null&&n.setItem(e,p.write(g)),g;if(!h&&u){const _=p.read(S);return typeof u=="function"?u(_,g):E==="object"&&!Array.isArray(_)?{...g,..._}:_}else return typeof S!="string"?S:p.read(S)}function V(h){if(!(h&&h.storageArea!==n)){if(h&&h.key==null){w.value=g;return}if(!(h&&h.key!==e)){A();try{(h==null?void 0:h.newValue)!==p.write(w.value)&&(w.value=y(h))}catch(S){l(S)}finally{h?pe(C):C()}}}}function O(h){V(h.detail)}return w}const et="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function tt(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:i=D,storage:o,storageKey:a="vueuse-color-scheme",listenToStorageChanges:s=!0,storageRef:c,emitAuto:u,disableTransition:d=!0}=e,f={auto:"",light:"light",dark:"dark",...e.modes||{}},m=Qe({window:i}),l=x(()=>m.value?"dark":"light"),v=c||(a==null?He(r):Ee(a,r,o,{window:i,listenToStorageChanges:s})),w=x(()=>v.value==="auto"?l.value:v.value),g=Se("updateHTMLAttrs",(C,N,j)=>{const y=typeof C=="string"?i==null?void 0:i.document.querySelector(C):L(C);if(!y)return;const V=new Set,O=new Set;let h=null;if(N==="class"){const _=j.split(/\s/g);Object.values(f).flatMap(W=>(W||"").split(/\s/g)).filter(Boolean).forEach(W=>{_.includes(W)?V.add(W):O.add(W)})}else h={key:N,value:j};if(V.size===0&&O.size===0&&h===null)return;let S;d&&(S=i.document.createElement("style"),S.appendChild(document.createTextNode(et)),i.document.head.appendChild(S));for(const _ of V)y.classList.add(_);for(const _ of O)y.classList.remove(_);h&&y.setAttribute(h.key,h.value),d&&(i.getComputedStyle(S).opacity,document.head.removeChild(S))});function E(C){var N;g(t,n,(N=f[C])!=null?N:C)}function p(C){e.onChanged?e.onChanged(C,E):E(C)}k(w,p,{flush:"post",immediate:!0}),H(()=>p(w.value));const A=x({get(){return u?v.value:w.value},set(C){v.value=C}});return Object.assign(A,{store:v,system:l,state:w})}function G(e,t,n={}){const{window:r=D,initialValue:i,observe:o=!1}=n,a=b(i),s=x(()=>{var u;return L(t)||((u=r==null?void 0:r.document)==null?void 0:u.documentElement)});function c(){var u;const d=T(e),f=T(s);if(f&&r&&d){const m=(u=r.getComputedStyle(f).getPropertyValue(d))==null?void 0:u.trim();a.value=m||i}}return o&&ye(s,c,{attributeFilter:["style","class"],window:r}),k([s,()=>T(e)],(u,d)=>{d[0]&&d[1]&&d[0].style.removeProperty(d[1]),c()},{immediate:!0}),k(a,u=>{var d;const f=T(e);(d=s.value)!=null&&d.style&&f&&(u==null?s.value.style.removeProperty(f):s.value.style.setProperty(f,u))}),a}function st(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=tt({...e,onChanged:(a,s)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,a==="dark",s,a):s(a)},modes:{dark:t,light:n}}),i=x(()=>r.system.value);return x({get(){return r.value==="dark"},set(a){const s=a?"dark":"light";i.value===s?r.value="auto":r.value=s}})}function ut(e={}){const{navigator:t=ne,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:i}=e,o=b([]),a=x(()=>o.value.filter(v=>v.kind==="videoinput")),s=x(()=>o.value.filter(v=>v.kind==="audioinput")),c=x(()=>o.value.filter(v=>v.kind==="audiooutput")),u=$(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),d=b(!1);let f;async function m(){u.value&&(o.value=await t.mediaDevices.enumerateDevices(),i==null||i(o.value),f&&(f.getTracks().forEach(v=>v.stop()),f=null))}async function l(){if(!u.value)return!1;if(d.value)return!0;const{state:v,query:w}=X("camera",{controls:!0});if(await w(),v.value!=="granted"){let g=!0;try{f=await t.mediaDevices.getUserMedia(r)}catch{f=null,g=!1}m(),d.value=g}else d.value=!0;return d.value}return u.value&&(n&&l(),M(t.mediaDevices,"devicechange",m),m()),{devices:o,ensurePermissions:l,permissionGranted:d,videoInputs:a,audioInputs:s,audioOutputs:c,isSupported:u}}function nt(e,t,n={}){const{window:r=D,...i}=n;let o;const a=$(()=>r&&"ResizeObserver"in r),s=()=>{o&&(o.disconnect(),o=void 0)},c=x(()=>{const f=T(e);return Array.isArray(f)?f.map(m=>L(m)):[L(f)]}),u=k(c,f=>{if(s(),a.value&&r){o=new ResizeObserver(t);for(const m of f)m&&o.observe(m,i)}},{immediate:!0,flush:"post"}),d=()=>{s(),u()};return z(d),{isSupported:a,stop:d}}function lt(e,t={}){const{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:o=!0,updateTiming:a="sync"}=t,s=b(0),c=b(0),u=b(0),d=b(0),f=b(0),m=b(0),l=b(0),v=b(0);function w(){const E=L(e);if(!E){n&&(s.value=0,c.value=0,u.value=0,d.value=0,f.value=0,m.value=0,l.value=0,v.value=0);return}const p=E.getBoundingClientRect();s.value=p.height,c.value=p.bottom,u.value=p.left,d.value=p.right,f.value=p.top,m.value=p.width,l.value=p.x,v.value=p.y}function g(){a==="sync"?w():a==="next-frame"&&requestAnimationFrame(()=>w())}return nt(e,g),k(()=>L(e),E=>!E&&g()),ye(e,g,{attributeFilter:["style","class"]}),i&&M("scroll",g,{capture:!0,passive:!0}),r&&M("resize",g,{passive:!0}),H(()=>{o&&g()}),{height:s,bottom:c,left:u,right:d,top:f,width:m,x:l,y:v,update:g}}const le=1;function ct(e,t={}){const{throttle:n=0,idle:r=200,onStop:i=F,onScroll:o=F,offset:a={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:c="auto",window:u=D,onError:d=y=>{console.error(y)}}=t,f=b(0),m=b(0),l=x({get(){return f.value},set(y){w(y,void 0)}}),v=x({get(){return m.value},set(y){w(void 0,y)}});function w(y,V){var O,h,S,_;if(!u)return;const W=T(e);if(!W)return;(S=W instanceof Document?u.document.body:W)==null||S.scrollTo({top:(O=T(V))!=null?O:v.value,left:(h=T(y))!=null?h:l.value,behavior:T(c)});const R=((_=W==null?void 0:W.document)==null?void 0:_.documentElement)||(W==null?void 0:W.documentElement)||W;l!=null&&(f.value=R.scrollLeft),v!=null&&(m.value=R.scrollTop)}const g=b(!1),E=se({left:!0,right:!1,top:!0,bottom:!1}),p=se({left:!1,right:!1,top:!1,bottom:!1}),A=y=>{g.value&&(g.value=!1,p.left=!1,p.right=!1,p.top=!1,p.bottom=!1,i(y))},C=ge(A,n+r),N=y=>{var V;if(!u)return;const O=((V=y==null?void 0:y.document)==null?void 0:V.documentElement)||(y==null?void 0:y.documentElement)||L(y),{display:h,flexDirection:S,direction:_}=getComputedStyle(O),W=_==="rtl"?-1:1,R=O.scrollLeft;p.left=R<f.value,p.right=R>f.value;const re=R*W<=(a.left||0),oe=R*W+O.clientWidth>=O.scrollWidth-(a.right||0)-le;h==="flex"&&S==="row-reverse"?(E.left=oe,E.right=re):(E.left=re,E.right=oe),f.value=R;let P=O.scrollTop;y===u.document&&!P&&(P=u.document.body.scrollTop),p.top=P<m.value,p.bottom=P>m.value;const ie=P<=(a.top||0),ae=P+O.clientHeight>=O.scrollHeight-(a.bottom||0)-le;h==="flex"&&S==="column-reverse"?(E.top=ae,E.bottom=ie):(E.top=ie,E.bottom=ae),m.value=P},j=y=>{var V;if(!u)return;const O=(V=y.target.documentElement)!=null?V:y.target;N(O),g.value=!0,C(y),o(y)};return M(e,"scroll",n?$e(j,n,!0,!1):j,s),H(()=>{try{const y=T(e);if(!y)return;N(y)}catch(y){d(y)}}),M(e,"scrollend",A,s),{x:l,y:v,isScrolling:g,arrivedState:E,directions:p,measure(){const y=T(e);u&&y&&N(y)}}}function ft(e,t,n={}){const{window:r=D}=n;return Ee(e,t,r==null?void 0:r.localStorage,n)}const ce="--vueuse-safe-area-top",fe="--vueuse-safe-area-right",de="--vueuse-safe-area-bottom",ve="--vueuse-safe-area-left";function dt(){const e=b(""),t=b(""),n=b(""),r=b("");if(Y){const o=G(ce),a=G(fe),s=G(de),c=G(ve);o.value="env(safe-area-inset-top, 0px)",a.value="env(safe-area-inset-right, 0px)",s.value="env(safe-area-inset-bottom, 0px)",c.value="env(safe-area-inset-left, 0px)",i(),M("resize",ge(i))}function i(){e.value=U(ce),t.value=U(fe),n.value=U(de),r.value=U(ve)}return{top:e,right:t,bottom:n,left:r,update:i}}function U(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function vt(e,t,n){const{window:r=D}={},i=b(null),o=K(),a=(...c)=>{o.value&&o.value.postMessage(...c)},s=function(){o.value&&o.value.terminate()};return r&&(o.value=new Worker(e,t),o.value.onmessage=c=>{i.value=c.data},z(()=>{o.value&&o.value.terminate()})),{data:i,post:a,terminate:s,worker:o}}function mt(e={}){const{window:t=D,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:a="inner"}=e,s=b(n),c=b(r),u=()=>{if(t)if(a==="outer")s.value=t.outerWidth,c.value=t.outerHeight;else if(a==="visual"&&t.visualViewport){const{width:d,height:f,scale:m}=t.visualViewport;s.value=Math.round(d*m),c.value=Math.round(f*m)}else o?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};if(u(),H(u),M("resize",u,{passive:!0}),t&&a==="visual"&&t.visualViewport&&M(t.visualViewport,"resize",u,{passive:!0}),i){const d=I("(orientation: portrait)");k(d,()=>u())}return{width:s,height:c}}export{ft as a,ut as b,st as c,X as d,vt as e,lt as f,ct as g,it as h,ot as i,mt as j,at as k,H as t,dt as u};
assets/{index-DUs41D0m.js → index-D1kvczNl.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/index-DM_lg1vq.js DELETED
@@ -1 +0,0 @@
1
- import{u as Te,g as me,J as pe,e as b,bF as Z,aC as _e,aD as Ce,bG as ee,bH as he,bI as Oe,x as xe,G as We,bJ as Ae,w as L,f as x,bK as se,a9 as De,a0 as K,bL as Ve}from"./index-DUs41D0m.js";function z(e){return _e()?(Ce(e),!0):!1}const Q=new WeakMap,Ne=(...e)=>{var t;const n=e[0],r=(t=ee())==null?void 0:t.proxy;if(r==null&&!he())throw new Error("injectLocal must be called in setup");return r&&Q.has(r)&&n in Q.get(r)?Q.get(r)[n]:Oe(...e)};function T(e){return typeof e=="function"?e():Te(e)}const Y=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Me=e=>e!=null,Le=Object.prototype.toString,ke=e=>Le.call(e)==="[object Object]",F=()=>{};function te(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const we=e=>e();function Re(e,t={}){let n,r,i=F;const o=s=>{clearTimeout(s),i(),i=F};return s=>{const c=T(e),u=T(t.maxWait);return n&&o(n),c<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(s())):new Promise((d,f)=>{i=t.rejectOnCancel?f:d,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,d(s())},u)),n=setTimeout(()=>{r&&o(r),r=null,d(s())},c)})}}function Fe(...e){let t=0,n,r=!0,i=F,o,a,s,c,u;!xe(e[0])&&typeof e[0]=="object"?{delay:a,trailing:s=!0,leading:c=!0,rejectOnCancel:u=!1}=e[0]:[a,s=!0,c=!0,u=!1]=e;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=F)};return m=>{const l=T(a),v=Date.now()-t,w=()=>o=m();return d(),l<=0?(t=Date.now(),w()):(v>l&&(c||!r)?(t=Date.now(),w()):s&&(o=new Promise((g,E)=>{i=u?E:g,n=setTimeout(()=>{t=Date.now(),r=!0,g(w()),d()},Math.max(0,l-v))})),!c&&!n&&(n=setTimeout(()=>r=!0,l)),r=!1,o)}}function je(e=we){const t=b(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:Z(t),pause:n,resume:r,eventFilter:i}}function Pe(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const r=t;t=void 0,r&&await r},n}function Ie(e,t){var n;if(typeof e=="number")return e+t;const r=((n=e.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",i=e.slice(r.length),o=Number.parseFloat(r)+t;return Number.isNaN(o)?e:o+i}function B(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function ze(e){return ee()}function He(...e){if(e.length!==1)return We(...e);const t=e[0];return typeof t=="function"?Z(Ae(()=>({get:t,set:F}))):b(t)}function ge(e,t=200,n={}){return te(Re(t,n),e)}function $e(e,t=200,n=!1,r=!0,i=!1){return te(Fe(t,n,r,i),e)}function Be(e,t,n={}){const{eventFilter:r=we,...i}=n;return L(e,te(r,t),i)}function Je(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:o,pause:a,resume:s,isActive:c}=je(r);return{stop:Be(e,t,{...i,eventFilter:o}),pause:a,resume:s,isActive:c}}function H(e,t=!0,n){ze()?me(e,n):t?e():pe(e)}function qe(e,t,n={}){const{immediate:r=!0}=n,i=b(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function s(){i.value=!1,a()}function c(...u){a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,e(...u)},T(t))}return r&&(i.value=!0,Y&&c()),z(s),{isPending:Z(i),start:c,stop:s}}const V=Y?window:void 0,ne=Y?window.navigator:void 0;function k(e){var t;const n=T(e);return(t=n==null?void 0:n.$el)!=null?t:n}function M(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=V):[t,n,r,i]=e,!t)return F;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(d=>d()),o.length=0},s=(d,f,m,l)=>(d.addEventListener(f,m,l),()=>d.removeEventListener(f,m,l)),c=L(()=>[k(t),T(i)],([d,f])=>{if(a(),!d)return;const m=ke(f)?{...f}:f;o.push(...n.flatMap(l=>r.map(v=>s(d,l,v,m))))},{immediate:!0,flush:"post"}),u=()=>{c(),a()};return z(u),u}function Ge(){const e=b(!1),t=ee();return t&&me(()=>{e.value=!0},t),e}function $(e){const t=Ge();return x(()=>(t.value,!!e()))}function ye(e,t,n={}){const{window:r=V,...i}=n;let o;const a=$(()=>r&&"MutationObserver"in r),s=()=>{o&&(o.disconnect(),o=void 0)},c=x(()=>{const m=T(e),l=(Array.isArray(m)?m:[m]).map(k).filter(Me);return new Set(l)}),u=L(()=>c.value,m=>{s(),a.value&&m.size&&(o=new MutationObserver(t),m.forEach(l=>o.observe(l,i)))},{immediate:!0,flush:"post"}),d=()=>o==null?void 0:o.takeRecords(),f=()=>{u(),s()};return z(f),{isSupported:a,stop:f,takeRecords:d}}const Ue=Symbol("vueuse-ssr-width");function be(){const e=he()?Ne(Ue,null):null;return typeof e=="number"?e:void 0}function I(e,t={}){const{window:n=V,ssrWidth:r=be()}=t,i=$(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),o=b(typeof r=="number");let a;const s=b(!1),c=f=>{s.value=f.matches},u=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",c):a.removeListener(c))},d=De(()=>{if(o.value){o.value=!i.value;const f=T(e).split(",");s.value=f.some(m=>{const l=m.includes("not all"),v=m.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),w=m.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(v||w);return v&&g&&(g=r>=B(v[1])),w&&g&&(g=r<=B(w[1])),l?!g:g});return}i.value&&(u(),a=n.matchMedia(T(e)),"addEventListener"in a?a.addEventListener("change",c):a.addListener(c),s.value=a.matches)});return z(()=>{d(),u(),a=void 0}),x(()=>s.value)}const ot={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function it(e,t={}){function n(l,v){let w=T(e[T(l)]);return v!=null&&(w=Ie(w,v)),typeof w=="number"&&(w=`${w}px`),w}const{window:r=V,strategy:i="min-width",ssrWidth:o=be()}=t,a=typeof o=="number",s=a?b(!1):{value:!0};a&&H(()=>s.value=!!r);function c(l,v){return!s.value&&a?l==="min"?o>=B(v):o<=B(v):r?r.matchMedia(`(${l}-width: ${v})`).matches:!1}const u=l=>I(()=>`(min-width: ${n(l)})`,t),d=l=>I(()=>`(max-width: ${n(l)})`,t),f=Object.keys(e).reduce((l,v)=>(Object.defineProperty(l,v,{get:()=>i==="min-width"?u(v):d(v),enumerable:!0,configurable:!0}),l),{});function m(){const l=Object.keys(e).map(v=>[v,f[v],B(n(v))]).sort((v,w)=>v[2]-w[2]);return x(()=>l.filter(([,v])=>v.value).map(([v])=>v))}return Object.assign(f,{greaterOrEqual:u,smallerOrEqual:d,greater(l){return I(()=>`(min-width: ${n(l,.1)})`,t)},smaller(l){return I(()=>`(max-width: ${n(l,-.1)})`,t)},between(l,v){return I(()=>`(min-width: ${n(l)}) and (max-width: ${n(v,-.1)})`,t)},isGreater(l){return c("min",n(l,.1))},isGreaterOrEqual(l){return c("min",n(l))},isSmaller(l){return c("max",n(l,-.1))},isSmallerOrEqual(l){return c("max",n(l))},isInBetween(l,v){return c("min",n(l))&&c("max",n(v,-.1))},current:m,active(){const l=m();return x(()=>l.value.length===0?"":l.value.at(i==="min-width"?-1:0))}})}function X(e,t={}){const{controls:n=!1,navigator:r=ne}=t,i=$(()=>r&&"permissions"in r),o=K(),a=typeof e=="string"?{name:e}:e,s=K(),c=()=>{var d,f;s.value=(f=(d=o.value)==null?void 0:d.state)!=null?f:"prompt"};M(o,"change",c);const u=Pe(async()=>{if(i.value){if(!o.value)try{o.value=await r.permissions.query(a)}catch{o.value=void 0}finally{c()}if(n)return Ve(o.value)}});return u(),n?{state:s,isSupported:i,query:u}:s}function at(e={}){const{navigator:t=ne,read:n=!1,source:r,copiedDuring:i=1500,legacy:o=!1}=e,a=$(()=>t&&"clipboard"in t),s=X("clipboard-read"),c=X("clipboard-write"),u=x(()=>a.value||o),d=b(""),f=b(!1),m=qe(()=>f.value=!1,i);function l(){a.value&&E(s.value)?t.clipboard.readText().then(p=>{d.value=p}):d.value=g()}u.value&&n&&M(["copy","cut"],l);async function v(p=T(r)){u.value&&p!=null&&(a.value&&E(c.value)?await t.clipboard.writeText(p):w(p),d.value=p,f.value=!0,m.start())}function w(p){const A=document.createElement("textarea");A.value=p??"",A.style.position="absolute",A.style.opacity="0",document.body.appendChild(A),A.select(),document.execCommand("copy"),A.remove()}function g(){var p,A,C;return(C=(A=(p=document==null?void 0:document.getSelection)==null?void 0:p.call(document))==null?void 0:A.toString())!=null?C:""}function E(p){return p==="granted"||p==="prompt"}return{isSupported:u,text:d,copied:f,copy:v}}const J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},q="__vueuse_ssr_handlers__",Ke=Ye();function Ye(){return q in J||(J[q]=J[q]||{}),J[q]}function Se(e,t){return Ke[e]||t}function Qe(e){return I("(prefers-color-scheme: dark)",e)}function Xe(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ze={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},ue="vueuse-storage";function Ee(e,t,n,r={}){var i;const{flush:o="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:f=V,eventFilter:m,onError:l=h=>{console.error(h)},initOnMounted:v}=r,w=(d?K:b)(typeof t=="function"?t():t);if(!n)try{n=Se("getDefaultStorage",()=>{var h;return(h=V)==null?void 0:h.localStorage})()}catch(h){l(h)}if(!n)return w;const g=T(t),E=Xe(g),p=(i=r.serializer)!=null?i:Ze[E],{pause:A,resume:C}=Je(w,()=>j(w.value),{flush:o,deep:a,eventFilter:m});f&&s&&H(()=>{n instanceof Storage?M(f,"storage",D):M(f,ue,O),v&&D()}),v||D();function N(h,S){if(f){const _={key:e,oldValue:h,newValue:S,storageArea:n};f.dispatchEvent(n instanceof Storage?new StorageEvent("storage",_):new CustomEvent(ue,{detail:_}))}}function j(h){try{const S=n.getItem(e);if(h==null)N(S,null),n.removeItem(e);else{const _=p.write(h);S!==_&&(n.setItem(e,_),N(S,_))}}catch(S){l(S)}}function y(h){const S=h?h.newValue:n.getItem(e);if(S==null)return c&&g!=null&&n.setItem(e,p.write(g)),g;if(!h&&u){const _=p.read(S);return typeof u=="function"?u(_,g):E==="object"&&!Array.isArray(_)?{...g,..._}:_}else return typeof S!="string"?S:p.read(S)}function D(h){if(!(h&&h.storageArea!==n)){if(h&&h.key==null){w.value=g;return}if(!(h&&h.key!==e)){A();try{(h==null?void 0:h.newValue)!==p.write(w.value)&&(w.value=y(h))}catch(S){l(S)}finally{h?pe(C):C()}}}}function O(h){D(h.detail)}return w}const et="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function tt(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:i=V,storage:o,storageKey:a="vueuse-color-scheme",listenToStorageChanges:s=!0,storageRef:c,emitAuto:u,disableTransition:d=!0}=e,f={auto:"",light:"light",dark:"dark",...e.modes||{}},m=Qe({window:i}),l=x(()=>m.value?"dark":"light"),v=c||(a==null?He(r):Ee(a,r,o,{window:i,listenToStorageChanges:s})),w=x(()=>v.value==="auto"?l.value:v.value),g=Se("updateHTMLAttrs",(C,N,j)=>{const y=typeof C=="string"?i==null?void 0:i.document.querySelector(C):k(C);if(!y)return;const D=new Set,O=new Set;let h=null;if(N==="class"){const _=j.split(/\s/g);Object.values(f).flatMap(W=>(W||"").split(/\s/g)).filter(Boolean).forEach(W=>{_.includes(W)?D.add(W):O.add(W)})}else h={key:N,value:j};if(D.size===0&&O.size===0&&h===null)return;let S;d&&(S=i.document.createElement("style"),S.appendChild(document.createTextNode(et)),i.document.head.appendChild(S));for(const _ of D)y.classList.add(_);for(const _ of O)y.classList.remove(_);h&&y.setAttribute(h.key,h.value),d&&(i.getComputedStyle(S).opacity,document.head.removeChild(S))});function E(C){var N;g(t,n,(N=f[C])!=null?N:C)}function p(C){e.onChanged?e.onChanged(C,E):E(C)}L(w,p,{flush:"post",immediate:!0}),H(()=>p(w.value));const A=x({get(){return u?v.value:w.value},set(C){v.value=C}});return Object.assign(A,{store:v,system:l,state:w})}function G(e,t,n={}){const{window:r=V,initialValue:i,observe:o=!1}=n,a=b(i),s=x(()=>{var u;return k(t)||((u=r==null?void 0:r.document)==null?void 0:u.documentElement)});function c(){var u;const d=T(e),f=T(s);if(f&&r&&d){const m=(u=r.getComputedStyle(f).getPropertyValue(d))==null?void 0:u.trim();a.value=m||i}}return o&&ye(s,c,{attributeFilter:["style","class"],window:r}),L([s,()=>T(e)],(u,d)=>{d[0]&&d[1]&&d[0].style.removeProperty(d[1]),c()},{immediate:!0}),L(a,u=>{var d;const f=T(e);(d=s.value)!=null&&d.style&&f&&(u==null?s.value.style.removeProperty(f):s.value.style.setProperty(f,u))}),a}function st(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=tt({...e,onChanged:(a,s)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,a==="dark",s,a):s(a)},modes:{dark:t,light:n}}),i=x(()=>r.system.value);return x({get(){return r.value==="dark"},set(a){const s=a?"dark":"light";i.value===s?r.value="auto":r.value=s}})}function ut(e={}){const{navigator:t=ne,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:i}=e,o=b([]),a=x(()=>o.value.filter(v=>v.kind==="videoinput")),s=x(()=>o.value.filter(v=>v.kind==="audioinput")),c=x(()=>o.value.filter(v=>v.kind==="audiooutput")),u=$(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),d=b(!1);let f;async function m(){u.value&&(o.value=await t.mediaDevices.enumerateDevices(),i==null||i(o.value),f&&(f.getTracks().forEach(v=>v.stop()),f=null))}async function l(){if(!u.value)return!1;if(d.value)return!0;const{state:v,query:w}=X("camera",{controls:!0});if(await w(),v.value!=="granted"){let g=!0;try{f=await t.mediaDevices.getUserMedia(r)}catch{f=null,g=!1}m(),d.value=g}else d.value=!0;return d.value}return u.value&&(n&&l(),M(t.mediaDevices,"devicechange",m),m()),{devices:o,ensurePermissions:l,permissionGranted:d,videoInputs:a,audioInputs:s,audioOutputs:c,isSupported:u}}function nt(e,t,n={}){const{window:r=V,...i}=n;let o;const a=$(()=>r&&"ResizeObserver"in r),s=()=>{o&&(o.disconnect(),o=void 0)},c=x(()=>{const f=T(e);return Array.isArray(f)?f.map(m=>k(m)):[k(f)]}),u=L(c,f=>{if(s(),a.value&&r){o=new ResizeObserver(t);for(const m of f)m&&o.observe(m,i)}},{immediate:!0,flush:"post"}),d=()=>{s(),u()};return z(d),{isSupported:a,stop:d}}function lt(e,t={}){const{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:o=!0,updateTiming:a="sync"}=t,s=b(0),c=b(0),u=b(0),d=b(0),f=b(0),m=b(0),l=b(0),v=b(0);function w(){const E=k(e);if(!E){n&&(s.value=0,c.value=0,u.value=0,d.value=0,f.value=0,m.value=0,l.value=0,v.value=0);return}const p=E.getBoundingClientRect();s.value=p.height,c.value=p.bottom,u.value=p.left,d.value=p.right,f.value=p.top,m.value=p.width,l.value=p.x,v.value=p.y}function g(){a==="sync"?w():a==="next-frame"&&requestAnimationFrame(()=>w())}return nt(e,g),L(()=>k(e),E=>!E&&g()),ye(e,g,{attributeFilter:["style","class"]}),i&&M("scroll",g,{capture:!0,passive:!0}),r&&M("resize",g,{passive:!0}),H(()=>{o&&g()}),{height:s,bottom:c,left:u,right:d,top:f,width:m,x:l,y:v,update:g}}const le=1;function ct(e,t={}){const{throttle:n=0,idle:r=200,onStop:i=F,onScroll:o=F,offset:a={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:c="auto",window:u=V,onError:d=y=>{console.error(y)}}=t,f=b(0),m=b(0),l=x({get(){return f.value},set(y){w(y,void 0)}}),v=x({get(){return m.value},set(y){w(void 0,y)}});function w(y,D){var O,h,S,_;if(!u)return;const W=T(e);if(!W)return;(S=W instanceof Document?u.document.body:W)==null||S.scrollTo({top:(O=T(D))!=null?O:v.value,left:(h=T(y))!=null?h:l.value,behavior:T(c)});const R=((_=W==null?void 0:W.document)==null?void 0:_.documentElement)||(W==null?void 0:W.documentElement)||W;l!=null&&(f.value=R.scrollLeft),v!=null&&(m.value=R.scrollTop)}const g=b(!1),E=se({left:!0,right:!1,top:!0,bottom:!1}),p=se({left:!1,right:!1,top:!1,bottom:!1}),A=y=>{g.value&&(g.value=!1,p.left=!1,p.right=!1,p.top=!1,p.bottom=!1,i(y))},C=ge(A,n+r),N=y=>{var D;if(!u)return;const O=((D=y==null?void 0:y.document)==null?void 0:D.documentElement)||(y==null?void 0:y.documentElement)||k(y),{display:h,flexDirection:S,direction:_}=getComputedStyle(O),W=_==="rtl"?-1:1,R=O.scrollLeft;p.left=R<f.value,p.right=R>f.value;const re=R*W<=(a.left||0),oe=R*W+O.clientWidth>=O.scrollWidth-(a.right||0)-le;h==="flex"&&S==="row-reverse"?(E.left=oe,E.right=re):(E.left=re,E.right=oe),f.value=R;let P=O.scrollTop;y===u.document&&!P&&(P=u.document.body.scrollTop),p.top=P<m.value,p.bottom=P>m.value;const ie=P<=(a.top||0),ae=P+O.clientHeight>=O.scrollHeight-(a.bottom||0)-le;h==="flex"&&S==="column-reverse"?(E.top=ae,E.bottom=ie):(E.top=ie,E.bottom=ae),m.value=P},j=y=>{var D;if(!u)return;const O=(D=y.target.documentElement)!=null?D:y.target;N(O),g.value=!0,C(y),o(y)};return M(e,"scroll",n?$e(j,n,!0,!1):j,s),H(()=>{try{const y=T(e);if(!y)return;N(y)}catch(y){d(y)}}),M(e,"scrollend",A,s),{x:l,y:v,isScrolling:g,arrivedState:E,directions:p,measure(){const y=T(e);u&&y&&N(y)}}}function ft(e,t,n={}){const{window:r=V}=n;return Ee(e,t,r==null?void 0:r.localStorage,n)}const ce="--vueuse-safe-area-top",fe="--vueuse-safe-area-right",de="--vueuse-safe-area-bottom",ve="--vueuse-safe-area-left";function dt(){const e=b(""),t=b(""),n=b(""),r=b("");if(Y){const o=G(ce),a=G(fe),s=G(de),c=G(ve);o.value="env(safe-area-inset-top, 0px)",a.value="env(safe-area-inset-right, 0px)",s.value="env(safe-area-inset-bottom, 0px)",c.value="env(safe-area-inset-left, 0px)",i(),M("resize",ge(i))}function i(){e.value=U(ce),t.value=U(fe),n.value=U(de),r.value=U(ve)}return{top:e,right:t,bottom:n,left:r,update:i}}function U(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function vt(e,t,n){const{window:r=V}={},i=b(null),o=K(),a=(...c)=>{o.value&&o.value.postMessage(...c)},s=function(){o.value&&o.value.terminate()};return r&&(o.value=new Worker(e,t),o.value.onmessage=c=>{i.value=c.data},z(()=>{o.value&&o.value.terminate()})),{data:i,post:a,terminate:s,worker:o}}function mt(e={}){const{window:t=V,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:a="inner"}=e,s=b(n),c=b(r),u=()=>{if(t)if(a==="outer")s.value=t.outerWidth,c.value=t.outerHeight;else if(a==="visual"&&t.visualViewport){const{width:d,height:f,scale:m}=t.visualViewport;s.value=Math.round(d*m),c.value=Math.round(f*m)}else o?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};if(u(),H(u),M("resize",u,{passive:!0}),t&&a==="visual"&&t.visualViewport&&M(t.visualViewport,"resize",u,{passive:!0}),i){const d=I("(orientation: portrait)");L(d,()=>u())}return{width:s,height:c}}export{ft as a,ut as b,st as c,X as d,vt as e,lt as f,ct as g,it as h,ot as i,mt as j,at as k,H as t,dt as u};
 
 
assets/{messages-BwJUtl2D.js → messages-VwLIldd7.js} RENAMED
@@ -1 +1 @@
1
- import{_ as p}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-BsQkxH6e.js";import{u as g}from"./queue-Br3KBcIu.js";import{u as _,l as v}from"./queues-CQnjJaMZ.js";import{d as x,e as t,o as l,c as u,m as e,a as k,y as c,F as b,C as h}from"./index-DUs41D0m.js";const z={flex:"","flex-col":"","gap-2":"","p-2":""},w={flex:"","flex-row":"","gap-2":""},y={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},S={"w-full":"",flex:"","flex-row":"","gap-4":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E=x({__name:"messages",setup(C){const s=t(""),d=t([]),a=t(!1),f=g({handlers:[async i=>{d.value.push(i.data)}]}),r=_(f);async function m(){a.value=!0,r.add(s.value),r.add(v),s.value="",a.value=!1}return(i,n)=>(l(),u("div",z,[e("div",w,[k(p,{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:m},null,8,["modelValue"]),e("button",y,c(a.value?"Processing...":"Send"),1)]),e("div",S,[e("div",V,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(l(!0),u(b,null,h(d.value,o=>(l(),u("div",{key:o},[e("div",null,c(o),1)]))),128))])])]))}});export{E as default};
 
1
+ import{_ as p}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-DYLULqjM.js";import{u as g}from"./queue-CHpXWY4T.js";import{u as _,l as v}from"./queues-Bj9-D8li.js";import{d as x,e as t,o as l,c as u,m as e,a as k,y as c,F as b,C as h}from"./index-D1kvczNl.js";const z={flex:"","flex-col":"","gap-2":"","p-2":""},w={flex:"","flex-row":"","gap-2":""},y={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},S={"w-full":"",flex:"","flex-row":"","gap-4":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E=x({__name:"messages",setup(C){const s=t(""),d=t([]),a=t(!1),f=g({handlers:[async i=>{d.value.push(i.data)}]}),r=_(f);async function m(){a.value=!0,r.add(s.value),r.add(v),s.value="",a.value=!1}return(i,n)=>(l(),u("div",z,[e("div",w,[k(p,{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:m},null,8,["modelValue"]),e("button",y,c(a.value?"Processing...":"Send"),1)]),e("div",S,[e("div",V,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(l(!0),u(b,null,h(d.value,o=>(l(),u("div",{key:o},[e("div",null,c(o),1)]))),128))])])]))}});export{E as default};
assets/{queue-CVmwtyqM.js → queue-BnSvqiQ1.js} RENAMED
@@ -1 +1 @@
1
- import{u as o}from"./queue-Br3KBcIu.js";import{d as v,e as h,g,o as k,c as w,m as I}from"./index-DUs41D0m.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)=>(k(),w("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default};
 
1
+ import{u as o}from"./queue-CHpXWY4T.js";import{d as v,e as h,g,o as k,c as w,m as I}from"./index-D1kvczNl.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)=>(k(),w("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default};
assets/{queue-Br3KBcIu.js → queue-CHpXWY4T.js} RENAMED
@@ -1 +1 @@
1
- import{e as l}from"./index-DUs41D0m.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-D1kvczNl.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};
assets/{queues-CQnjJaMZ.js → queues-Bj9-D8li.js} RENAMED
@@ -1 +1 @@
1
- import{u as i}from"./queue-Br3KBcIu.js";import{e as d}from"./index-DUs41D0m.js";var E=(n=>(n.Happy="<|EMOTE_HAPPY|>",n.Sad="<|EMOTE_SAD|>",n.Angry="<|EMOTE_ANGRY|>",n.Think="<|EMOTE_THINK|>",n.Surprise="<|EMOTE_SURPRISE|>",n.Awkward="<|EMOTE_AWKWARD|>",n.Question="<|EMOTE_QUESTION|>",n))(E||{});const r=Object.values(E),l="EmotionHappy",c="EmotionSad",m="EmotionAngry",M="EmotionAwkward",T="EmotionThink",f="EmotionSurprise",O="EmotionQuestion",p={"<|EMOTE_HAPPY|>":l,"<|EMOTE_SAD|>":c,"<|EMOTE_ANGRY|>":m,"<|EMOTE_THINK|>":T,"<|EMOTE_SURPRISE|>":f,"<|EMOTE_AWKWARD|>":M,"<|EMOTE_QUESTION|>":O},y={"<|EMOTE_HAPPY|>":"happy","<|EMOTE_SAD|>":"sad","<|EMOTE_ANGRY|>":"angry","<|EMOTE_THINK|>":void 0,"<|EMOTE_SURPRISE|>":"surprised","<|EMOTE_AWKWARD|>":void 0,"<|EMOTE_QUESTION|>":void 0},_="<|llm_inference_end|>";function S(n){function t(e){for(const a of r)if(e.includes(a))return{ok:!0,emotion:a};return{ok:!1,emotion:""}}return i({handlers:[async e=>{if(r.includes(e.data)){e.emit("emotion",e.data),await n.add(e.data);return}{const{ok:a,emotion:o}=t(e.data);a&&(e.emit("emotion",o),await n.add(o))}}]})}function k(){function n(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const a=/<\|DELAY:(\d+)\|>/i.exec(e),o=a==null?void 0:a[1];if(!o)return{ok:!1,delay:0};const s=Number.parseFloat(o);return s<=0||Number.isNaN(s)?{ok:!0,delay:0}:{ok:!0,delay:s}}function t(e){return new Promise(a=>setTimeout(a,e))}return i({handlers:[async e=>{const{ok:a,delay:o}=n(e.data);a&&(e.emit("delay",o),await t(o*1e3))}]})}function v(n){const t=d("");return i({handlers:[async e=>{if(e.data===_){const o=t.value.trim();o&&await n.add(o),t.value="";return}const a=/[.?!]/;for(t.value+=e.data;t.value;){const o=a.exec(t.value);if(!o||typeof o.index>"u")break;const s=t.value.slice(0,o.index+1),u=t.value.slice(o.index+1);await n.add(s),t.value=u}}]})}export{r as E,f as a,c as b,m as c,l as d,M as e,O as f,T as g,S as h,k as i,y as j,p as k,_ as l,v as u};
 
1
+ import{u as i}from"./queue-CHpXWY4T.js";import{e as d}from"./index-D1kvczNl.js";var E=(n=>(n.Happy="<|EMOTE_HAPPY|>",n.Sad="<|EMOTE_SAD|>",n.Angry="<|EMOTE_ANGRY|>",n.Think="<|EMOTE_THINK|>",n.Surprise="<|EMOTE_SURPRISE|>",n.Awkward="<|EMOTE_AWKWARD|>",n.Question="<|EMOTE_QUESTION|>",n))(E||{});const r=Object.values(E),l="EmotionHappy",c="EmotionSad",m="EmotionAngry",M="EmotionAwkward",T="EmotionThink",f="EmotionSurprise",O="EmotionQuestion",p={"<|EMOTE_HAPPY|>":l,"<|EMOTE_SAD|>":c,"<|EMOTE_ANGRY|>":m,"<|EMOTE_THINK|>":T,"<|EMOTE_SURPRISE|>":f,"<|EMOTE_AWKWARD|>":M,"<|EMOTE_QUESTION|>":O},y={"<|EMOTE_HAPPY|>":"happy","<|EMOTE_SAD|>":"sad","<|EMOTE_ANGRY|>":"angry","<|EMOTE_THINK|>":void 0,"<|EMOTE_SURPRISE|>":"surprised","<|EMOTE_AWKWARD|>":void 0,"<|EMOTE_QUESTION|>":void 0},_="<|llm_inference_end|>";function S(n){function t(e){for(const a of r)if(e.includes(a))return{ok:!0,emotion:a};return{ok:!1,emotion:""}}return i({handlers:[async e=>{if(r.includes(e.data)){e.emit("emotion",e.data),await n.add(e.data);return}{const{ok:a,emotion:o}=t(e.data);a&&(e.emit("emotion",o),await n.add(o))}}]})}function k(){function n(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const a=/<\|DELAY:(\d+)\|>/i.exec(e),o=a==null?void 0:a[1];if(!o)return{ok:!1,delay:0};const s=Number.parseFloat(o);return s<=0||Number.isNaN(s)?{ok:!0,delay:0}:{ok:!0,delay:s}}function t(e){return new Promise(a=>setTimeout(a,e))}return i({handlers:[async e=>{const{ok:a,delay:o}=n(e.data);a&&(e.emit("delay",o),await t(o*1e3))}]})}function v(n){const t=d("");return i({handlers:[async e=>{if(e.data===_){const o=t.value.trim();o&&await n.add(o),t.value="";return}const a=/[.?!]/;for(t.value+=e.data;t.value;){const o=a.exec(t.value);if(!o||typeof o.index>"u")break;const s=t.value.slice(0,o.index+1),u=t.value.slice(o.index+1);await n.add(s),t.value=u}}]})}export{r as E,f as a,c as b,m as c,l as d,M as e,O as f,T as g,S as h,k as i,y as j,p as k,_ as l,v as u};
assets/virtual_pwa-register-fM079nAB.js DELETED
@@ -1 +0,0 @@
1
- import{_ as u}from"./index-DUs41D0m.js";function f(c={}){const{immediate:o=!1,onNeedRefresh:w,onOfflineReady:a,onRegistered:r,onRegisteredSW:s,onRegisterError:t}=c;let i,n;const d=async(e=!0)=>{await n};async function l(){if("serviceWorker"in navigator){if(i=await u(async()=>{const{Workbox:e}=await import("./workbox-window.prod.es5-B9K5rw8f.js");return{Workbox:e}},[]).then(({Workbox:e})=>new e("/sw.js",{scope:"/",type:"classic"})).catch(e=>{t==null||t(e)}),!i)return;i.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),i.addEventListener("installed",e=>{e.isUpdate||a==null||a()}),i.register({immediate:o}).then(e=>{s?s("/sw.js",e):r==null||r(e)}).catch(e=>{t==null||t(e)})}}return n=l(),d}export{f as registerSW};
 
 
assets/workbox-window.prod.es5-B9K5rw8f.js DELETED
@@ -1,2 +0,0 @@
1
- try{self["workbox:window:7.2.0"]&&_()}catch{}function E(n,r){return new Promise(function(t){var i=new MessageChannel;i.port1.onmessage=function(c){t(c.data)},n.postMessage(r,[i.port2])})}function W(n){var r=function(t,i){if(typeof t!="object"||!t)return t;var c=t[Symbol.toPrimitive];if(c!==void 0){var h=c.call(t,i);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n,"string");return typeof r=="symbol"?r:r+""}function k(n,r){for(var t=0;t<r.length;t++){var i=r[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,W(i.key),i)}}function P(n,r){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},P(n,r)}function j(n,r){(r==null||r>n.length)&&(r=n.length);for(var t=0,i=new Array(r);t<r;t++)i[t]=n[t];return i}function L(n,r){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t)return(t=t.call(n)).next.bind(t);if(Array.isArray(n)||(t=function(c,h){if(c){if(typeof c=="string")return j(c,h);var l=Object.prototype.toString.call(c).slice(8,-1);return l==="Object"&&c.constructor&&(l=c.constructor.name),l==="Map"||l==="Set"?Array.from(c):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?j(c,h):void 0}}(n))||r){t&&(n=t);var i=0;return function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}try{self["workbox:core:7.2.0"]&&_()}catch{}var w=function(){var n=this;this.promise=new Promise(function(r,t){n.resolve=r,n.reject=t})};function b(n,r){var t=location.href;return new URL(n,t).href===new URL(r,t).href}var g=function(n,r){this.type=n,Object.assign(this,r)};function d(n,r,t){return t?r?r(n):n:(n&&n.then||(n=Promise.resolve(n)),r?n.then(r):n)}function O(){}var x={type:"SKIP_WAITING"};function S(n,r){return n&&n.then?n.then(O):Promise.resolve()}var U=function(n){function r(v,u){var e,o;return u===void 0&&(u={}),(e=n.call(this)||this).nn={},e.tn=0,e.rn=new w,e.en=new w,e.on=new w,e.un=0,e.an=new Set,e.cn=function(){var s=e.fn,a=s.installing;e.tn>0||!b(a.scriptURL,e.sn.toString())||performance.now()>e.un+6e4?(e.vn=a,s.removeEventListener("updatefound",e.cn)):(e.hn=a,e.an.add(a),e.rn.resolve(a)),++e.tn,a.addEventListener("statechange",e.ln)},e.ln=function(s){var a=e.fn,f=s.target,p=f.state,m=f===e.vn,y={sw:f,isExternal:m,originalEvent:s};!m&&e.mn&&(y.isUpdate=!0),e.dispatchEvent(new g(p,y)),p==="installed"?e.wn=self.setTimeout(function(){p==="installed"&&a.waiting===f&&e.dispatchEvent(new g("waiting",y))},200):p==="activating"&&(clearTimeout(e.wn),m||e.en.resolve(f))},e.yn=function(s){var a=e.hn,f=a!==navigator.serviceWorker.controller;e.dispatchEvent(new g("controlling",{isExternal:f,originalEvent:s,sw:a,isUpdate:e.mn})),f||e.on.resolve(a)},e.gn=(o=function(s){var a=s.data,f=s.ports,p=s.source;return d(e.getSW(),function(){e.an.has(p)&&e.dispatchEvent(new g("message",{data:a,originalEvent:s,ports:f,sw:p}))})},function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];try{return Promise.resolve(o.apply(this,s))}catch(f){return Promise.reject(f)}}),e.sn=v,e.nn=u,navigator.serviceWorker.addEventListener("message",e.gn),e}var t,i;i=n,(t=r).prototype=Object.create(i.prototype),t.prototype.constructor=t,P(t,i);var c,h,l=r.prototype;return l.register=function(v){var u=(v===void 0?{}:v).immediate,e=u!==void 0&&u;try{var o=this;return d(function(s,a){var f=s();return f&&f.then?f.then(a):a(f)}(function(){if(!e&&document.readyState!=="complete")return S(new Promise(function(s){return window.addEventListener("load",s)}))},function(){return o.mn=!!navigator.serviceWorker.controller,o.dn=o.pn(),d(o.bn(),function(s){o.fn=s,o.dn&&(o.hn=o.dn,o.en.resolve(o.dn),o.on.resolve(o.dn),o.dn.addEventListener("statechange",o.ln,{once:!0}));var a=o.fn.waiting;return a&&b(a.scriptURL,o.sn.toString())&&(o.hn=a,Promise.resolve().then(function(){o.dispatchEvent(new g("waiting",{sw:a,wasWaitingBeforeRegister:!0}))}).then(function(){})),o.hn&&(o.rn.resolve(o.hn),o.an.add(o.hn)),o.fn.addEventListener("updatefound",o.cn),navigator.serviceWorker.addEventListener("controllerchange",o.yn),o.fn})}))}catch(s){return Promise.reject(s)}},l.update=function(){try{return this.fn?d(S(this.fn.update())):d()}catch(v){return Promise.reject(v)}},l.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},l.messageSW=function(v){try{return d(this.getSW(),function(u){return E(u,v)})}catch(u){return Promise.reject(u)}},l.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&E(this.fn.waiting,x)},l.pn=function(){var v=navigator.serviceWorker.controller;return v&&b(v.scriptURL,this.sn.toString())?v:void 0},l.bn=function(){try{var v=this;return d(function(u,e){try{var o=u()}catch(s){return e(s)}return o&&o.then?o.then(void 0,e):o}(function(){return d(navigator.serviceWorker.register(v.sn,v.nn),function(u){return v.un=performance.now(),u})},function(u){throw u}))}catch(u){return Promise.reject(u)}},c=r,(h=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&k(c.prototype,h),Object.defineProperty(c,"prototype",{writable:!1}),c}(function(){function n(){this.Pn=new Map}var r=n.prototype;return r.addEventListener=function(t,i){this.jn(t).add(i)},r.removeEventListener=function(t,i){this.jn(t).delete(i)},r.dispatchEvent=function(t){t.target=this;for(var i,c=L(this.jn(t.type));!(i=c()).done;)(0,i.value)(t)},r.jn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},n}());export{U as Workbox,g as WorkboxEvent,E as messageSW};
 
 
 
index.html CHANGED
@@ -18,9 +18,9 @@
18
  })()
19
  </script>
20
  <script src="/assets/js/CubismSdkForWeb-5-r.1/Core/live2dcubismcore.min.js"></script>
21
- <script type="module" crossorigin src="/assets/index-DUs41D0m.js"></script>
22
  <link rel="stylesheet" crossorigin href="/assets/index-cBenT26x.css">
23
- <link rel="manifest" href="/manifest.webmanifest"></head>
24
  <body class="font-sans">
25
  <div id="app"></div>
26
  <noscript> This website requires JavaScript to function properly. Please enable JavaScript to continue. </noscript>
 
18
  })()
19
  </script>
20
  <script src="/assets/js/CubismSdkForWeb-5-r.1/Core/live2dcubismcore.min.js"></script>
21
+ <script type="module" crossorigin src="/assets/index-D1kvczNl.js"></script>
22
  <link rel="stylesheet" crossorigin href="/assets/index-cBenT26x.css">
23
+ </head>
24
  <body class="font-sans">
25
  <div id="app"></div>
26
  <noscript> This website requires JavaScript to function properly. Please enable JavaScript to continue. </noscript>
manifest.webmanifest DELETED
@@ -1 +0,0 @@
1
- {"name":"アイリ VTuber","short_name":"アイリ VTuber","start_url":"/","display":"standalone","background_color":"#ffffff","lang":"en","scope":"/","theme_color":"#ffffff","icons":[{"src":"/web-app-manifest-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/web-app-manifest-512x512.png","sizes":"512x512","type":"image/png"}]}
 
 
sw.js DELETED
@@ -1 +0,0 @@
1
- if(!self.define){let s,e={};const i=(i,l)=>(i=new URL(i+".js",l).href,e[i]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()})).then((()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s})));self.define=(l,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const t=s=>i(s,r),o={module:{uri:r},exports:u,require:t};e[r]=Promise.all(l.map((s=>o[s]||t(s)))).then((s=>(n(...s),u)))}}define(["./workbox-3aa584b4"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_plugin-vue_export-helper-DlAUqK2U.js",revision:null},{url:"assets/audio-CzkD1kaA.js",revision:null},{url:"assets/BasicTextarea.vue_vue_type_script_setup_true_lang-BsQkxH6e.js",revision:null},{url:"assets/default-D-XkYWdr.js",revision:null},{url:"assets/delays-Cs3vXPhv.js",revision:null},{url:"assets/emotions-BZn1vlkb.js",revision:null},{url:"assets/filter-message-CnF9NXbe.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-BXOqNX--.js",revision:null},{url:"assets/index-cBenT26x.css",revision:null},{url:"assets/index-Ckxf9bjh.js",revision:null},{url:"assets/index-DM_lg1vq.js",revision:null},{url:"assets/index-DUs41D0m.js",revision:null},{url:"assets/index-OsIiTUET.css",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.1/Core/live2dcubismcore.min.js",revision:null},{url:"assets/messages-BwJUtl2D.js",revision:null},{url:"assets/queue-Br3KBcIu.js",revision:null},{url:"assets/queue-CVmwtyqM.js",revision:null},{url:"assets/queues-CQnjJaMZ.js",revision:null},{url:"assets/virtual_pwa-register-fM079nAB.js",revision:null},{url:"assets/workbox-window.prod.es5-B9K5rw8f.js",revision:null},{url:"assets/worker-DSED444B.js",revision:null},{url:"index.html",revision:"61d65922345665554bd7454c5b73af67"},{url:"apple-touch-icon.png",revision:"6473365ea3079cdc68ab16bf2abfe2ac"},{url:"favicon.svg",revision:"695b4bb604513cb36826a1a13353de03"},{url:"web-app-manifest-192x192.png",revision:"fa648ffa96ad21d47fc9eceee474b736"},{url:"web-app-manifest-512x512.png",revision:"8b09a1dd8f45167335cdf0dc825cab09"},{url:"manifest.webmanifest",revision:"9d883d7771299c3f1d712cb5b7dd9d51"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
 
 
workbox-3aa584b4.js DELETED
@@ -1 +0,0 @@
1
- define(["exports"],(function(t){"use strict";try{self["workbox:core:7.2.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.2.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)o=new r(t,e,n);else if("function"==typeof t)o=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter((t=>t&&t.length>0)).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.2.0"]&&_()}catch(t){}function p(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class g{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let R;async function m(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===R){const t=new Response("");if("body"in t)try{new Response(t.body),R=!0}catch(t){R=!1}R=!1}return R}()?i.body:await i.blob();return new Response(c,o)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class q{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const U=new Set;try{self["workbox:strategies:7.2.0"]&&_()}catch(t){}function L(t){return"string"==typeof t?new Request(t):t}class b{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new q,this.g=[],this.R=[...t.plugins],this.m=new Map;for(const t of this.R)this.m.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=L(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=L(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=L(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.v(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of U)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=L(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.m.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.g.push(t),t}async doneWaiting(){let t;for(;t=this.g.shift();)await t}destroy(){this.p.resolve(null)}async v(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class C{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new b(this,{event:e,request:s,params:n}),r=this.q(i,s,e);return[r,this.U(r,i,s,e)]}async q(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this.L(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async U(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class E extends C{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this._=!1!==t.fallbackToNetwork,this.plugins.push(E.copyRedirectedCacheableResponsesPlugin)}async L(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.C(t,e):await this.O(t,e))}async O(t,e){let n;const i=e.params||{};if(!this._)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.N(),await e.cachePut(t,n.clone()))}return n}async C(t,e){this.N();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}N(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==E.copyRedirectedCacheableResponsesPlugin&&(n===E.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(E.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}E.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},E.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await m(t):t};class O{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.k=new Map,this.K=new Map,this.P=new Map,this.l=new E({cacheName:f(t),plugins:[...e,new g({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.T||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.T=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=p(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.k.has(i)&&this.k.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.k.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.P.has(t)&&this.P.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.P.set(t,n.integrity)}if(this.k.set(i,t),this.K.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return d(t,(async()=>{const e=new y;this.strategy.plugins.push(e);for(const[e,s]of this.k){const n=this.P.get(s),i=this.K.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return d(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.k.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.k}getCachedURLs(){return[...this.k.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.k.get(e.href)}getIntegrityForCacheKey(t){return this.P.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let x;const N=()=>(x||(x=new O),x);class k extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.W(t)),t),this.j=e,this.M=s}W({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.M)if(t.test(s))return!1;return!!this.j.some((t=>t.test(s)))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.createHandlerBoundToURL=function(t){return N().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){N().precache(t)}(t),function(t){const e=N();h(new k(e,t))}(e)},t.registerRoute=h}));