Commit
·
c45ea57
1
Parent(s):
880c86e
release: build 79d0afa7de8a0e1e23e41da2de39db487bd48757
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- assets/{Collapsable.vue_vue_type_script_setup_true_lang-BwUs5KAP.js → Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js} +1 -1
- assets/{FieldRange.vue_vue_type_script_setup_true_lang-CidO7hNV.js → FieldRange.vue_vue_type_script_setup_true_lang-BKorzfHV.js} +1 -1
- assets/{HeaderLink-CKXECLw8.js → HeaderLink-_N25PCvc.js} +1 -1
- assets/{IconStatusItem-Bk8kwnuj.js → IconStatusItem-Br2je_J5.js} +1 -1
- assets/{Model.vue_vue_type_script_setup_true_lang-D0jvs_gR.js → Model.vue_vue_type_script_setup_true_lang-Djpk3Ms6.js} +1 -1
- assets/{ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C0M9V8X1.js → ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js} +1 -1
- assets/{ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Yi_GUv2w.js → ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js} +1 -1
- assets/{ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D56LN6r4.js → ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js} +1 -1
- assets/{RadioCardDetailManySelect-B_P1InZn.js → RadioCardDetailManySelect-CCXGOLoc.js} +1 -1
- assets/{Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-DBRF19vp.js → Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js} +0 -0
- assets/{TransitionVertical.vue_vue_type_script_setup_true_lang-DIDtgUjA.js → TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js} +1 -1
- assets/{_...all_-Cvv-HOpo.js → _...all_-DOpDf6rk.js} +1 -1
- assets/{audio-DIUvs_x2.js → audio-bsyyLIUP.js} +1 -1
- assets/{cloudflare-workers-ai-DLB8yKU7.js → cloudflare-workers-ai-8XuDD2Cs.js} +1 -1
- assets/{consciousness-Di1cfvdt.js → consciousness-B3PnyIdr.js} +1 -1
- assets/{consciousness-BH9r76j8.js → consciousness-D6MPamQ3.js} +1 -1
- assets/{deepseek-nq_6ygPe.js → deepseek-DIGt7-bf.js} +1 -1
- assets/{default-DvgsfB8y.js → default-Bi_MiWMk.js} +1 -1
- assets/{default-node-DMAgm1mi.js → default-node-DLOWa9iW.js} +1 -1
- assets/{delays-CZG8W2jg.js → delays-D9R8ocDz.js} +1 -1
- assets/{elevenlabs-CR6JUm8z.js → elevenlabs-CNYJUyIo.js} +1 -1
- assets/{emotions-DSIP21BL.js → emotions-0f83nn0I.js} +1 -1
- assets/{filter-message-B5b-aNaT.js → filter-message-Ui1t0i_J.js} +1 -1
- assets/{fireworks-ai-BSOPI1Ia.js → fireworks-ai-CQedA_FH.js} +1 -1
- assets/{image-B29eoFqF.js → image-BcGESPTK.js} +1 -1
- assets/{index-CgbLDqR2.js → index-5hrBSqy_.js} +1 -1
- assets/{index-CnaoLkSu.css → index-6Z_G7V_d.css} +0 -0
- assets/{index-Cr3TWF8U.js → index-BOuFXUkz.js} +1 -1
- assets/{index-D2AVQ4HK.js → index-BUfvD8m2.js} +1 -1
- assets/{index-B_a4T69o.js → index-CCfJDiQ1.js} +1 -1
- assets/{index-CZ9ROQo_.js → index-CNfKN3A8.js} +1 -1
- assets/{index-CI-4TcWF.js → index-D4_kVMUC.js} +1 -1
- assets/{index-B9qfNJC9.js → index-DwDTqf6b.js} +1 -1
- assets/{index-DdKO3wSp.js → index-TGrV2Wj8.js} +3 -3
- assets/{index-A-leJNRw.js → index-Zq-keDdi.js} +1 -1
- assets/{messages-uwlcVulg.js → messages-CJSYeDor.js} +1 -1
- assets/{mistral-ai-D2wOpTqM.js → mistral-ai-CvqIPFR2.js} +1 -1
- assets/{moonshot-ai-BZrSFYvE.js → moonshot-ai-DCct7kvG.js} +1 -1
- assets/{novita-ai-CIm-m9hp.js → novita-ai-CLXzxp4w.js} +1 -1
- assets/{ollama-Dccp0BFp.js → ollama-BgPFZ05v.js} +1 -1
- assets/{openai-C6vHaTi8.js → openai-BnFpcOkR.js} +1 -1
- assets/{openrouter-ai-BipOG1Du.js → openrouter-ai-CneoFxfb.js} +1 -1
- assets/{providers-C0QEXqAJ.js → providers-By8PGLd2.js} +1 -1
- assets/{queue-CQtxggOE.js → queue-B_YcFivQ.js} +1 -1
- assets/{queue-BUYrQYsG.js → queue-CQ8jM4y0.js} +1 -1
- assets/{queues-CTLSCsGY.js → queues-BcuD6qtP.js} +1 -1
- assets/{speech-daB7xiBS.js → speech-C6ot8rjM.js} +1 -1
- assets/{speech-CUV2NmQo.js → speech-DnbCuq6W.js} +1 -1
- assets/{stage-DXwrfUxX.js → stage-CAI0RG-B.js} +1 -1
- assets/{together-ai-DzYtObxm.js → together-ai-DiO6-uuf.js} +1 -1
assets/{Collapsable.vue_vue_type_script_setup_true_lang-BwUs5KAP.js → Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";import{d as p,bN as m,bO as f,af as b,c,o as v,p as r,b as y,c3 as u,c4 as V,y as C,C as g,bQ as k,a as s,b_ as x,D as i}from"./index-TGrV2Wj8.js";const _={op50:""},w=p({__name:"Collapsable",props:m({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,e=f(o,"modelValue");b(()=>{t.default!=null&&(e.value=!!t.default)});function n(l){return e.value=l,l}return(l,a)=>(v(),c("div",null,[r(l.$slots,"trigger",u(V({visible:e.value,setVisible:n})),()=>[s("button",{sticky:"","top-0":"","z-10":"",flex:"","items-center":"","justify-between":"",px2:"",py1:"","text-sm":"","backdrop-blur-xl":"",onClick:a[0]||(a[0]=B=>e.value=!e.value)},[s("span",null,i(t.label??"Collapsable"),1),a[1]||(a[1]=x()),s("span",_,i(e.value?"▲":"▼"),1)])]),y(d,null,{default:C(()=>[e.value?r(l.$slots,"default",u(k({key:0},{visible:e.value,setVisible:n}))):g("",!0)]),_:3})]))}});export{w as _};
|
assets/{FieldRange.vue_vue_type_script_setup_true_lang-CidO7hNV.js → FieldRange.vue_vue_type_script_setup_true_lang-BKorzfHV.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{bx as j,d as f,bP as q,bQ as _,bR as A,bS as k,x as y,o as m,y as V,p as $,e as i,bT as I,bU as F,g as x,h,bV as C,bW as N,bX as T,w as P,c as w,by as L,E as D,bY as H,C as U,bZ as G,bM as K,bO as S,b as E,bN as M,a as p,D as g,m as W,A as z,bH as Q,bn as X}from"./index-DdKO3wSp.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-DBRF19vp.js";function O(t){return t?t.flatMap(e=>e.type===j?O(e.children):[e]):[]}const Y=f({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:a}){return()=>{var c,v;if(!a.default)return null;const n=O(a.default()),l=n.findIndex(d=>d.type!==q);if(l===-1)return n;const r=n[l];(c=r.props)==null||delete c.ref;const o=r.props?_(e,r.props):e;e.class&&((v=r.props)!=null&&v.class)&&delete r.props.class;const s=A(r,o);for(const d in o)d.startsWith("on")&&(s.props||(s.props={}),s.props[d]=o[d]);return n.length===1?s:(n[l]=s,n)}}}),B=f({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:a}){const n=t.asChild?"template":t.as;return typeof n=="string"&&["area","img","input"].includes(n)?()=>k(n,e):n!=="template"?()=>k(t.as,e,{default:a.default}):()=>k(Y,e,{default:a.default})}}),Z=f({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,a)=>(m(),y(i(B),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:V(()=>[$(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function J(t,e){const a=`${t}Context`,n=Symbol(a);return[o=>{const s=I(n,o);if(s||s===null)return s;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(F(n,o),o)]}function R(){const t=N(),e=x(),a=h(()=>{var o,s;return["#text","#comment"].includes((o=e.value)==null?void 0:o.$el.nodeName)?(s=e.value)==null?void 0:s.$el.nextElementSibling:C(e)}),n=Object.assign({},t.exposed),l={};for(const o in t.props)Object.defineProperty(l,o,{enumerable:!0,configurable:!0,get:()=>t.props[o]});if(Object.keys(n).length>0)for(const o in n)Object.defineProperty(l,o,{enumerable:!0,configurable:!0,get:()=>n[o]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(o){e.value=o,o&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:a}}function ee(){const t=x(),e=h(()=>{var a,n;return["#text","#comment"].includes((a=t.value)==null?void 0:a.$el.nodeName)?(n=t.value)==null?void 0:n.$el.nextElementSibling:C(t)});return{primitiveElement:t,currentElement:e}}function te(t){return h(()=>{var e;return T(t)?!!((e=C(t))!=null&&e.closest("form")):!0})}const ae=f({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:a,currentElement:n}=ee(),l=h(()=>e.checked??e.value);return P(l,(r,o)=>{if(!n.value)return;const s=n.value,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(d&&r!==o){const u=new Event("input",{bubbles:!0}),b=new Event("change",{bubbles:!0});d.call(s,r),s.dispatchEvent(u),s.dispatchEvent(b)}}),(r,o)=>(m(),y(Z,_({ref_key:"primitiveElement",ref:a},{...e,...r.$attrs},{as:"input"}),null,16))}}),ne=f({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,a=h(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((n,l)=>typeof n=="object"?Object.entries(n).map(([r,o])=>({name:`[${e.name}][${l}][${r}]`,value:o})):{name:`[${e.name}][${l}]`,value:n}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([n,l])=>({name:`[${e.name}][${n}]`,value:l})):[]);return(n,l)=>(m(!0),w(j,null,L(a.value,r=>(m(),y(ae,_({key:r.name,ref_for:!0},{...e,...n.$attrs},{name:r.name,value:r.value}),null,16,["name","value"]))),128))}}),[le,oe]=J("SwitchRoot"),re=f({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const a=t,n=e,{disabled:l}=D(a),r=H(a,"modelValue",n,{defaultValue:a.defaultValue,passive:a.modelValue===void 0});function o(){l.value||(r.value=!r.value)}const{forwardRef:s,currentElement:c}=R(),v=te(c),d=h(()=>{var u;return a.id&&c.value?(u=document.querySelector(`[for="${a.id}"]`))==null?void 0:u.innerText:void 0});return oe({modelValue:r,toggleCheck:o,disabled:l}),(u,b)=>(m(),y(i(B),_(u.$attrs,{id:u.id,ref:i(s),role:"switch",type:u.as==="button"?"button":void 0,value:u.value,"aria-label":u.$attrs["aria-label"]||d.value,"aria-checked":i(r),"aria-required":u.required,"data-state":i(r)?"checked":"unchecked","data-disabled":i(l)?"":void 0,"as-child":u.asChild,as:u.as,disabled:i(l),onClick:o,onKeydown:G(K(o,["prevent"]),["enter"])}),{default:V(()=>[$(u.$slots,"default",{modelValue:i(r)}),i(v)&&u.name?(m(),y(i(ne),{key:0,type:"checkbox",name:u.name,disabled:i(l),required:u.required,value:u.value,checked:!!i(r)},null,8,["name","disabled","required","value","checked"])):U("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),se=f({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=le();return R(),(a,n)=>{var l;return m(),y(i(B),{"data-state":(l=i(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":i(e).disabled.value?"":void 0,"as-child":a.asChild,as:a.as},{default:V(()=>[$(a.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),ue=f({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=S(t,"modelValue");return(a,n)=>(m(),y(i(re),{modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 dark:data-[state=checked]:primary-700 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:V(()=>[E(i(se),{"my-auto":"","size-6":"",flex:"","items-center":"","justify-center":"","translate-x":"0.5 data-[state=checked]:full","rounded-full":"","bg-white":"","text-xs":"","shadow-xl":"",transition:"transform duration-250 ease-in-out","will-change-transform":""})]),_:1},8,["modelValue"]))}}),ie={flex:"~ col gap-4"},de={flex:"~ row","items-center":"","gap-2":""},ce={flex:"1"},me={class:"flex items-center gap-1 text-sm font-medium"},fe={class:"text-xs text-neutral-500 dark:text-neutral-400"},Ce=f({__name:"FieldCheckbox",props:M({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=S(t,"modelValue");return(n,l)=>(m(),w("label",ie,[p("div",de,[p("div",ce,[p("div",me,g(e.label),1),p("div",fe,g(e.description),1)]),E(ue,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=r=>a.value=r)},null,8,["modelValue"])])]))}}),pe=["min","max","step"],he=f({__name:"Range",props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},emits:["update:modelValue"],setup(t,{emit:e}){const a=t,n=e,l=h(()=>a.min*1e4),r=h(()=>a.max*1e4),o=h(()=>a.step*1e4),s=x(),c=x(a.modelValue*1e4);P(c,d=>{n("update:modelValue",d/1e4),v()}),W(()=>{v()});function v(){s.value&&(s.value.style.setProperty("--value",s.value.value),s.value.style.setProperty("--min",s.value.min?s.value.min:a.min.toString()),s.value.style.setProperty("--max",s.value.max?s.value.max:a.max.toString()))}return(d,u)=>z((m(),w("input",{ref_key:"sliderRef",ref:s,"onUpdate:modelValue":u[0]||(u[0]=b=>c.value=b),type:"range",min:l.value,max:r.value,step:o.value,class:"data-gui-range slider-progress",onInput:u[1]||(u[1]=b=>{b.target.style.setProperty("--value",b.target.value)})},null,40,pe)),[[Q,c.value,void 0,{number:!0}]])}}),ve=X(he,[["__scopeId","data-v-8d439080"]]),be={flex:"~ col gap-4"},ye={flex:"~ row","items-center":"","gap-2":""},ge={flex:"1"},xe={class:"flex items-center gap-1 text-sm font-medium"},_e={class:"text-xs text-neutral-500 dark:text-neutral-400"},Ve={"font-mono":""},we={flex:"~ row","items-center":"","gap-2":""},Se=f({__name:"FieldRange",props:M({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=S(t,"modelValue");return(n,l)=>{var r;return m(),w("label",be,[p("div",ye,[p("div",ge,[p("div",xe,g(t.label),1),p("div",_e,g(t.description),1)]),p("span",Ve,g(((r=e.formatValue)==null?void 0:r.call(e,a.value))||a.value),1)]),p("div",we,[E(ve,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=o=>a.value=o),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{Se as _,Ce as a};
|
|
|
1 |
+
import{bx as j,d as f,bP as q,bQ as _,bR as A,bS as k,x as y,o as m,y as V,p as $,e as i,bT as I,bU as F,g as x,h,bV as C,bW as N,bX as T,w as P,c as w,by as L,E as D,bY as H,C as U,bZ as G,bM as K,bO as S,b as E,bN as M,a as p,D as g,m as W,A as z,bH as Q,bn as X}from"./index-TGrV2Wj8.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";function O(t){return t?t.flatMap(e=>e.type===j?O(e.children):[e]):[]}const Y=f({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:a}){return()=>{var c,v;if(!a.default)return null;const n=O(a.default()),l=n.findIndex(d=>d.type!==q);if(l===-1)return n;const r=n[l];(c=r.props)==null||delete c.ref;const o=r.props?_(e,r.props):e;e.class&&((v=r.props)!=null&&v.class)&&delete r.props.class;const s=A(r,o);for(const d in o)d.startsWith("on")&&(s.props||(s.props={}),s.props[d]=o[d]);return n.length===1?s:(n[l]=s,n)}}}),B=f({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:a}){const n=t.asChild?"template":t.as;return typeof n=="string"&&["area","img","input"].includes(n)?()=>k(n,e):n!=="template"?()=>k(t.as,e,{default:a.default}):()=>k(Y,e,{default:a.default})}}),Z=f({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,a)=>(m(),y(i(B),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:V(()=>[$(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function J(t,e){const a=`${t}Context`,n=Symbol(a);return[o=>{const s=I(n,o);if(s||s===null)return s;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(F(n,o),o)]}function R(){const t=N(),e=x(),a=h(()=>{var o,s;return["#text","#comment"].includes((o=e.value)==null?void 0:o.$el.nodeName)?(s=e.value)==null?void 0:s.$el.nextElementSibling:C(e)}),n=Object.assign({},t.exposed),l={};for(const o in t.props)Object.defineProperty(l,o,{enumerable:!0,configurable:!0,get:()=>t.props[o]});if(Object.keys(n).length>0)for(const o in n)Object.defineProperty(l,o,{enumerable:!0,configurable:!0,get:()=>n[o]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(o){e.value=o,o&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:a}}function ee(){const t=x(),e=h(()=>{var a,n;return["#text","#comment"].includes((a=t.value)==null?void 0:a.$el.nodeName)?(n=t.value)==null?void 0:n.$el.nextElementSibling:C(t)});return{primitiveElement:t,currentElement:e}}function te(t){return h(()=>{var e;return T(t)?!!((e=C(t))!=null&&e.closest("form")):!0})}const ae=f({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:a,currentElement:n}=ee(),l=h(()=>e.checked??e.value);return P(l,(r,o)=>{if(!n.value)return;const s=n.value,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(d&&r!==o){const u=new Event("input",{bubbles:!0}),b=new Event("change",{bubbles:!0});d.call(s,r),s.dispatchEvent(u),s.dispatchEvent(b)}}),(r,o)=>(m(),y(Z,_({ref_key:"primitiveElement",ref:a},{...e,...r.$attrs},{as:"input"}),null,16))}}),ne=f({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,a=h(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((n,l)=>typeof n=="object"?Object.entries(n).map(([r,o])=>({name:`[${e.name}][${l}][${r}]`,value:o})):{name:`[${e.name}][${l}]`,value:n}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([n,l])=>({name:`[${e.name}][${n}]`,value:l})):[]);return(n,l)=>(m(!0),w(j,null,L(a.value,r=>(m(),y(ae,_({key:r.name,ref_for:!0},{...e,...n.$attrs},{name:r.name,value:r.value}),null,16,["name","value"]))),128))}}),[le,oe]=J("SwitchRoot"),re=f({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const a=t,n=e,{disabled:l}=D(a),r=H(a,"modelValue",n,{defaultValue:a.defaultValue,passive:a.modelValue===void 0});function o(){l.value||(r.value=!r.value)}const{forwardRef:s,currentElement:c}=R(),v=te(c),d=h(()=>{var u;return a.id&&c.value?(u=document.querySelector(`[for="${a.id}"]`))==null?void 0:u.innerText:void 0});return oe({modelValue:r,toggleCheck:o,disabled:l}),(u,b)=>(m(),y(i(B),_(u.$attrs,{id:u.id,ref:i(s),role:"switch",type:u.as==="button"?"button":void 0,value:u.value,"aria-label":u.$attrs["aria-label"]||d.value,"aria-checked":i(r),"aria-required":u.required,"data-state":i(r)?"checked":"unchecked","data-disabled":i(l)?"":void 0,"as-child":u.asChild,as:u.as,disabled:i(l),onClick:o,onKeydown:G(K(o,["prevent"]),["enter"])}),{default:V(()=>[$(u.$slots,"default",{modelValue:i(r)}),i(v)&&u.name?(m(),y(i(ne),{key:0,type:"checkbox",name:u.name,disabled:i(l),required:u.required,value:u.value,checked:!!i(r)},null,8,["name","disabled","required","value","checked"])):U("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),se=f({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=le();return R(),(a,n)=>{var l;return m(),y(i(B),{"data-state":(l=i(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":i(e).disabled.value?"":void 0,"as-child":a.asChild,as:a.as},{default:V(()=>[$(a.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),ue=f({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=S(t,"modelValue");return(a,n)=>(m(),y(i(re),{modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:V(()=>[E(i(se),{"my-auto":"","size-6":"",flex:"","items-center":"","justify-center":"","translate-x":"0.5 data-[state=checked]:full","rounded-full":"","bg-white":"","text-xs":"","shadow-xl":"",transition:"transform duration-250 ease-in-out","will-change-transform":""})]),_:1},8,["modelValue"]))}}),ie={flex:"~ col gap-4"},de={flex:"~ row","items-center":"","gap-2":""},ce={flex:"1"},me={class:"flex items-center gap-1 text-sm font-medium"},fe={class:"text-xs text-neutral-500 dark:text-neutral-400"},Ce=f({__name:"FieldCheckbox",props:M({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=S(t,"modelValue");return(n,l)=>(m(),w("label",ie,[p("div",de,[p("div",ce,[p("div",me,g(e.label),1),p("div",fe,g(e.description),1)]),E(ue,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=r=>a.value=r)},null,8,["modelValue"])])]))}}),pe=["min","max","step"],he=f({__name:"Range",props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},emits:["update:modelValue"],setup(t,{emit:e}){const a=t,n=e,l=h(()=>a.min*1e4),r=h(()=>a.max*1e4),o=h(()=>a.step*1e4),s=x(),c=x(a.modelValue*1e4);P(c,d=>{n("update:modelValue",d/1e4),v()}),W(()=>{v()});function v(){s.value&&(s.value.style.setProperty("--value",s.value.value),s.value.style.setProperty("--min",s.value.min?s.value.min:a.min.toString()),s.value.style.setProperty("--max",s.value.max?s.value.max:a.max.toString()))}return(d,u)=>z((m(),w("input",{ref_key:"sliderRef",ref:s,"onUpdate:modelValue":u[0]||(u[0]=b=>c.value=b),type:"range",min:l.value,max:r.value,step:o.value,class:"data-gui-range slider-progress",onInput:u[1]||(u[1]=b=>{b.target.style.setProperty("--value",b.target.value)})},null,40,pe)),[[Q,c.value,void 0,{number:!0}]])}}),ve=X(he,[["__scopeId","data-v-8d439080"]]),be={flex:"~ col gap-4"},ye={flex:"~ row","items-center":"","gap-2":""},ge={flex:"1"},xe={class:"flex items-center gap-1 text-sm font-medium"},_e={class:"text-xs text-neutral-500 dark:text-neutral-400"},Ve={"font-mono":""},we={flex:"~ row","items-center":"","gap-2":""},Se=f({__name:"FieldRange",props:M({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=S(t,"modelValue");return(n,l)=>{var r;return m(),w("label",be,[p("div",ye,[p("div",ge,[p("div",xe,g(t.label),1),p("div",_e,g(t.description),1)]),p("span",Ve,g(((r=e.formatValue)==null?void 0:r.call(e,a.value))||a.value),1)]),p("div",we,[E(ve,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=o=>a.value=o),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{Se as _,Ce as a};
|
assets/{HeaderLink-CKXECLw8.js → HeaderLink-_N25PCvc.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as r,bC as c,x as l,e,bo as d,o as s,y as _,c as t,a,bn as i}from"./index-
|
|
|
1 |
+
import{d as r,bC as c,x as l,e,bo as d,o as s,y as _,c as t,a,bn as i}from"./index-TGrV2Wj8.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],x=r({__name:"HeaderLink",setup(g){const n=c();return(f,o)=>(s(),l(e(d),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:_(()=>[e(n)?(s(),t("img",{key:0,src:e(k),"h-8":"","w-8":"",class:"theme-colored"},null,8,u)):(s(),t("img",{key:1,src:e(p),"h-8":"","w-8":"",class:"theme-colored"},null,8,m)),o[0]||(o[0]=a("div",{"font-cute":""},[a("span",null,"アイリ")],-1))]),_:1}))}}),w=i(x,[["__scopeId","data-v-496b6cde"]]);export{w as H};
|
assets/{IconStatusItem-Bk8kwnuj.js → IconStatusItem-Br2je_J5.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as u,r as c,c as e,o as n,b as d,a as o,y as m,C as a,D as i,z as s,bn as _}from"./index-
|
|
|
1 |
+
import{d as u,r as c,c as e,o as n,b as d,a as o,y as m,C as a,D as i,z as s,bn as _}from"./index-TGrV2Wj8.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";const p={flex:"~ col",bg:"neutral-200/50 dark:neutral-700",border:"neutral-100 dark:neutral-700 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-status-item",transition:"all ease-in-out duration-400","w-full":"","cursor-pointer":"","of-hidden":"","rounded-xl":""},g={"z-1":"","flex-1":""},h={"text-lg":"","font-bold":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},k={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},f=["src"],x={"p-2":""},v={key:0,"size-3":"",bg:"green-500 dark:green-600","rounded-full":""},y={key:1,"size-3":"",bg:"neutral-400 dark:neutral-500","rounded-full":""},b=u({__name:"IconStatusItem",props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(r){const t=r;return(C,I)=>{const l=c("RouterLink");return n(),e("div",p,[d(l,{flex:"~ row",class:"menu-icon-status-item-link",bg:"neutral-50 dark:neutral-800",transition:"all ease-in-out duration-400",relative:"","h-full":"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",to:t.to},{default:m(()=>[o("div",g,[o("div",h,i(t.title),1),o("div",k,[o("span",null,i(t.description),1)])]),t.icon?(n(),e("div",{key:0,class:s(["menu-icon-status-item-icon",[t.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconColor?(n(),e("div",{key:1,class:s(["menu-icon-status-item-icon-color",[t.iconColor]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconImage?(n(),e("img",{key:2,src:t.iconImage,class:"menu-icon-status-item-icon-image",transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"","grayscale-100":""},null,8,f)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),B=_(b,[["__scopeId","data-v-883ae105"]]);export{B as I};
|
assets/{Model.vue_vue_type_script_setup_true_lang-D0jvs_gR.js → Model.vue_vue_type_script_setup_true_lang-Djpk3Ms6.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{o as F,T as Y,A as re,L as P,p as q,n as ue,r as se,D as de,I as ce,m as R,M as ve,q as T}from"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import{o as F,T as Y,A as re,L as P,p as q,n as ue,r as se,D as de,I as ce,m as R,M as ve,q as T}from"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as $,g as h,w as p,m as j,H as G,c as N,o as X,p as J,br as z,h as O,bC as pe,j as he,G as fe,s as me,v as ge,bJ as Me,bK as we,bx as ye,a as be,q as Se}from"./index-TGrV2Wj8.js";const ke=$({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:l}){const t=o,d=h(),e=h(),i=h();async function c(n){P.registerTicker(q),F.add(Y),e.value=new re({width:t.width,height:t.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),i.value=e.value.view,i.value.style.objectFit="contain",n.appendChild(e.value.view)}function y(){var n;e.value&&e.value.renderer.resize(t.width,t.height),(n=e.value)!=null&&n.view&&(e.value.view.width=t.width,e.value.view.height=t.height)}p([()=>t.width,()=>t.height],()=>y()),j(async()=>d.value&&await c(d.value)),G(()=>{var n;return(n=e.value)==null?void 0:n.destroy()});async function B(){return new Promise(g=>{if(!i.value||!e.value)return g(null);e.value.render(),i.value.toBlob(g)})}return l({captureFrame:B}),(n,g)=>(X(),N("div",{ref_key:"containerRef",ref:d,"h-full":"","w-full":""},[J(n.$slots,"default",{app:e.value})],512))}}),xe=o=>Math.max(0,Math.min(1,o||0)),C=o=>Math.round(xe(o)*255),Be=ue("rgb"),Ce=o=>{if(o===void 0)return;let l=C(o.r),t=C(o.g),d=C(o.b);return"#"+(1<<24|l<<16|t<<8|d).toString(16).slice(1)},Fe=o=>Ce(Be(o));function V(o,l,t){return(1-t)*o+t*l}function H(o,l){return o+Math.random()*(l-o)}function Pe(){let o=-1,l,t=-1;function d(e,i){(i>=o||i<t)&&(l=[H(-1,1),H(-1,.7)],t=i,o=i+se()/1e3,e.focusController.focus(l[0]*.5,l[1]*.5,!1)),e.focusController.update(i-t);const c=e.coreModel;c.setParameterValueById("ParamEyeBallX",V(c.getParameterValueById("ParamEyeBallX"),l[0],.3)),c.setParameterValueById("ParamEyeBallY",V(c.getParameterValueById("ParamEyeBallY"),l[1],.3))}return{update:d}}const _e=$({__name:"Model",props:{app:null,mouthOpenSize:{default:0},width:null,height:null,paused:{type:Boolean}},setup(o){const l=o,t=z(()=>l.app),d=z(()=>l.paused),e=h(),i=h(0),c=h(0),y=O(()=>Math.max(0,Math.min(100,l.mouthOpenSize))),B=pe(),n=he(Se),g=O(()=>n.between("sm","md").value||n.smaller("sm").value),K=Pe(),I=fe(new de({alpha:.2,blur:0,distance:20,rotation:45}));function U(){return e.value.internalModel.coreModel}function D(a){if(!a.value)return;let r=2.2;g.value&&(r=2.2);const f=l.height*.95/c.value*r,s=l.width*.95/i.value*r,m=Math.min(f,s);a.value.scale.set(m,m)}const{live2dModelFile:b,loadingLive2dModel:M,live2dCurrentMotion:W,availableLive2dMotions:Q,live2dLoadSource:S,live2dModelUrl:k,themeColorsHue:Z,themeColorsHueDynamic:_}=me(ge()),ee=h({group:"Idle",index:0});async function ae(){var L;if(!t.value)return;e.value&&(t.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new P;S.value==="file"?await T.setupLive2DModel(a,[b.value]):S.value==="url"&&await T.setupLive2DModel(a,k.value),e.value=a,t.value.stage.addChild(e.value),i.value=e.value.width,c.value=e.value.height,e.value.x=l.width/2,e.value.y=l.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),D(e),e.value.on("hit",v=>{e.value&&v.includes("body")&&e.value.motion("tap_body")});const r=e.value.internalModel,f=r.coreModel,s=r.motionManager;f.setParameterValueById("ParamMouthOpenY",y.value),Q.value=Object.entries(s.definitions).flatMap(([v,u])=>u?u.map((ie,ne)=>({motionName:v,motionIndex:ne,fileName:ie.File})):[]).filter(Boolean),s.groups.idle&&((L=s.motionGroups[s.groups.idle])==null||L.forEach(v=>{v._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const m=s.update;s.update=function(v,u){return m==null||m.call(this,v,u),s.state.currentGroup===s.groups.idle&&K.update(r,u),!0},s.on("motionStart",(v,u)=>{ee.value={group:v,index:u}}),b.value&&await R.setItem("live2dModel",b.value),M.value=!1}async function te(){if(!t.value)return;P.registerTicker(q),F.add(Y),F.add(ce);const a=await R.getItem("live2dModel");if(a){b.value=a,S.value="file",M.value=!0;return}if(k.value){S.value="url",M.value=!0;return}M.value=!1}async function le(a,r){await e.value.motion(a,r,ve.FORCE)}const oe=Me(()=>{e.value&&(e.value.x=l.width/2,e.value.y=l.height,D(e))},100),A=h(),w=h(0);function x(){if(e.value){const a=getComputedStyle(A.value).backgroundColor;I.value.color=Number(Fe(a).replace("#","0x")),e.value.filters=[I.value]}}p([()=>l.width,()=>l.height],()=>oe()),p(B,x,{immediate:!0}),p([e,Z],x);function E(){x(),w.value=requestAnimationFrame(E)}return p(_,()=>{_.value?w.value=requestAnimationFrame(E):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),p(y,a=>U().setParameterValueById("ParamMouthOpenY",a)),p(t,te),p(W,a=>le(a.group,a.index)),p(d,a=>{var r,f;a?(r=t.value)==null||r.stop():(f=t.value)==null||f.start()}),we(M,a=>{a&&ae()},{debounce:1e3}),j(x),G(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=t.value)==null||a.stage.removeChild(e.value))}),(a,r)=>(X(),N(ye,null,[be("div",{ref_key:"dropShadowColorComputer",ref:A,hidden:"",bg:"primary-400 dark:primary-500"},null,512),J(a.$slots,"default")],64))}});export{_e as _,ke as a,H as r};
|
assets/{ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C0M9V8X1.js → ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as u}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as u}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import{d as t,bN as i,bO as n,h as s,x as m,o as p}from"./index-TGrV2Wj8.js";const b=t({__name:"ProviderApiKeyInput",props:i({providerName:null,placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,o=n(e,"modelValue"),a=s(()=>l.description||`API Key for ${l.providerName}`);return(c,r)=>(p(),m(u,{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=d=>o.value=d),label:e.label||"API Key",description:a.value,placeholder:e.placeholder,required:e.required,type:"password"},null,8,["modelValue","label","description","placeholder","required"]))}});export{b as _};
|
assets/{ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Yi_GUv2w.js → ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import{d,g as m,x as u,o as c,y as n,a as e,p as f,D as _,z as v,bN as b,bO as g}from"./index-TGrV2Wj8.js";import{_ as V}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";const x=["onClick"],h={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},y={"mt-4":""},q=d({__name:"ProviderAdvancedSettings",props:{title:null,initialVisible:{type:Boolean}},setup(l){const a=m(l.initialVisible||!1);function r(){a.value=!a.value}return(o,i)=>(c(),u(p,{"w-full":""},{trigger:n(s=>[e("button",{transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:()=>s.setVisible(!s.visible)&&r()},[e("h2",h,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:v({"rotate-180":s.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,x)]),default:n(()=>[e("div",y,[f(o.$slots,"default")])]),_:3}))}}),w=d({__name:"ProviderBaseUrlInput",props:b({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=g(l,"modelValue");return(r,o)=>(c(),u(V,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i),label:t.label||"Base URL",description:t.description||"Custom base URL (optional)",placeholder:t.placeholder,required:t.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}});export{q as _,w as a};
|
assets/{ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D56LN6r4.js → ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d,bN as y,bO as b,A as p,c0 as k,o as a,c as o,h as g,a as t,b as h,b_ as _,C as x,D as i,z as v,p as c,bw as $,bx as V}from"./index-
|
|
|
1 |
+
import{d,bN as y,bO as b,A as p,c0 as k,o as a,c as o,h as g,a as t,b as h,b_ as _,C as x,D as i,z as v,p as c,bw as $,bx as V}from"./index-TGrV2Wj8.js";const w=["type"],C=d({__name:"Input",props:y({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=e,l=b(e,"modelValue");return(r,s)=>p((a(),o("input",{"onUpdate:modelValue":s[0]||(s[0]=u=>l.value=u),type:n.type||"text",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,8,w)),[[k,l.value]])}}),B={"max-w-full":""},N={flex:"~ col gap-4"},I={class:"flex items-center gap-1 text-sm font-medium"},D={key:0,class:"text-red-500"},R={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},L=d({__name:"FieldInput",props:{modelValue:null,label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,r=n,s=g({get:()=>l.modelValue,set:u=>r("update:modelValue",u)});return(u,m)=>(a(),o("div",B,[t("label",N,[t("div",null,[t("div",I,[_(i(e.label)+" ",1),e.required!==!1?(a(),o("span",D,"*")):x("",!0)]),t("div",R,i(e.description),1)]),h(C,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=f=>s.value=f),type:e.type,placeholder:e.placeholder,class:v(e.inputClass)},null,8,["modelValue","type","placeholder","class"])])]))}}),S={flex:"~ col gap-6"},F={flex:"~ row","items-center":"","justify-between":""},M={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},P={text:"neutral-400 dark:neutral-500"},O=d({__name:"ProviderBasicSettings",props:{title:null,description:null,onReset:{type:Function}},setup(e){return(n,l)=>(a(),o("div",S,[t("div",F,[t("div",null,[t("h2",M,i(e.title||"Basic"),1),t("div",P,[t("span",null,i(e.description||"Essential settings"),1)])]),e.onReset?(a(),o("button",{key:0,title:"Reset settings",flex:"","items-center":"","justify-center":"","rounded-full":"","p-2":"",transition:"all duration-250 ease-in-out",text:"neutral-500 dark:neutral-400",bg:"transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700",onClick:l[0]||(l[0]=(...r)=>e.onReset&&e.onReset(...r))},l[1]||(l[1]=[t("div",{"i-solar:refresh-bold-duotone":"","text-xl":""},null,-1)]))):x("",!0)]),c(n.$slots,"default")]))}}),q={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-6"},T=d({__name:"ProviderSettingsContainer",setup(e){return(n,l)=>(a(),o("div",q,[c(n.$slots,"default")]))}}),z={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},j={relative:""},E={"text-nowrap":"","text-3xl":"","font-semibold":""},U={text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},G=d({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){return(n,l)=>{const r=$("motion");return a(),o(V,null,[p((a(),o("div",z,[t("button",{onClick:l[0]||(l[0]=(...s)=>e.onBack&&e.onBack(...s))},l[1]||(l[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",j,[l[2]||(l[2]=t("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[t("span",{text:"neutral-300 dark:neutral-500","text-nowrap":""},"Provider")],-1)),t("div",E,i(e.providerName),1)])])),[[r]]),c(n.$slots,"default"),t("div",U,[t("div",{text:"40",class:v(e.providerIcon||e.providerIconColor)},null,2)])],64)}}});export{L as _,T as a,O as b,G as c,C as d};
|
assets/{RadioCardDetailManySelect-B_P1InZn.js → RadioCardDetailManySelect-CCXGOLoc.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as k,g as f,c as o,o as r,z as l,a as t,C as v,D as s,b as V,y as C,bM as y,bn as g,h as $,A as I,bH as R,bx as B,by as S,x as T}from"./index-DdKO3wSp.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-DBRF19vp.js";import{_ as z}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-DIDtgUjA.js";const D=["checked","name","value"],N={class:"relative mr-3 mt-0.5 flex-shrink-0"},E={class:"w-full flex flex-col gap-2"},P={class:"flex items-center"},L={key:0,class:"relative"},M=["title"],U={key:1,class:"mt-2"},j=["value","placeholder"],q=k({__name:"RadioCardDetail",props:{id:null,name:null,value:null,title:null,description:null,modelValue:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},emits:["update:modelValue","update:customInputValue"],setup(e,{emit:p}){const d=p,c=f(!1);function n(){c.value=!c.value}function m(x){const u=x.target;d("update:customInputValue",u.value)}return(x,u)=>(r(),o("label",{key:e.id,class:l(["form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]",[e.modelValue===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-700 hover:border-primary-500/30 dark:hover:border-primary-400/30",e.modelValue===e.value?"form_radio-card-detail-active":"",e.deprecated?"opacity-60":""]]),transition:"all duration-200 ease-in-out",border:"2 solid"},[t("input",{checked:e.modelValue===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0",onChange:u[0]||(u[0]=w=>x.$emit("update:modelValue",e.value))},null,40,D),t("div",N,[t("div",{class:l(["size-5 border-2 rounded-full transition-colors duration-200",[e.modelValue===e.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[t("div",{class:l(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[e.modelValue===e.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),t("div",E,[t("div",P,[t("span",{class:l(["line-clamp-1 font-medium",[e.modelValue===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},s(e.title),3)]),e.description?(r(),o("div",L,[V(z,null,{default:C(()=>[c.value?(r(),o("div",{key:1,class:l(["cursor-pointer text-xs",[e.modelValue===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:y(n,["prevent"])},s(e.description),3)):(r(),o("div",{key:0,class:l(["line-clamp-2 cursor-pointer text-xs",[e.modelValue===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:e.description,onClick:y(n,["prevent"])},s(e.description),11,M))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(r(),o("button",{key:0,class:"text-primary-500 dark:text-primary-600 mt-0.5 inline-flex items-center text-xs",onClick:y(n,["prevent"])},[t("span",null,s(c.value?"Show less":"Show more"),1),t("div",{class:l([{"rotate-180":c.value},"transition-transform duration-200"])},u[1]||(u[1]=[t("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):v("",!0)])):v("",!0),e.showCustomInput&&e.modelValue===e.value?(r(),o("div",U,[t("input",{value:e.customInputValue,type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:e.customInputPlaceholder,onInput:m},null,40,j)])):v("",!0)])],2))}}),A=g(q,[["__scopeId","data-v-8d277a49"]]),F=["checked","name","value"],H={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},Q=k({__name:"RadioCardSimple",props:{id:null,name:null,value:null,title:null,description:null,modelValue:null},emits:["update:modelValue"],setup(e){return(p,d)=>(r(),o("label",{key:e.id,border:"2px solid",class:l(["form_radio-card-simple relative",[e.modelValue===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-700 hover:border-primary-500/30 dark:hover:border-primary-400/30",e.modelValue===e.value?"form_radio-card-simple-active":""]]),transition:"all duration-200 ease-in-out",flex:"~ col",block:"","min-w-50":"","w-fit":"","cursor-pointer":"","items-start":"","rounded-xl":"","p-4":"","text-left":""},[t("input",{checked:e.modelValue===e.value,type:"radio",name:e.name,value:e.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100",onChange:d[0]||(d[0]=c=>p.$emit("update:modelValue",e.value))},null,40,F),d[1]||(d[1]=t("div",{class:"radio-circle absolute left-2 top-2 size-5 rounded-full",border:"2 solid neutral-300 dark:neutral-600",transition:"all duration-200 ease-in-out"},[t("div",{class:"radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2",transition:"all duration-200 ease-in-out",bg:"primary-500 dark:primary-400"})],-1)),t("div",H,[t("span",{class:l(["radio-item-name font-bold",[e.modelValue===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-500"]]),text:"md",transition:"all duration-200 ease-in-out"},s(e.title),3),e.description?(r(),o("span",{key:0,class:l(["radio-item-description",[e.modelValue===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},s(e.description),3)):v("",!0)]),d[2]||(d[2]=t("div",{class:"bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20",absolute:"","inset-0":"","z--1":"",style:{"background-size":"10px 10px","mask-image":"linear-gradient(165deg, white 30%, transparent 50%)"}},null,-1))],2))}}),oe=g(Q,[["__scopeId","data-v-7daf4ec0"]]),G={class:"radio-card-detail-many-select"},J={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},K=["placeholder"],O={class:"mt-4 space-y-2"},W={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},X={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},Y={class:"flex flex-col"},Z={class:"font-medium"},_={class:"text-sm text-amber-600 dark:text-amber-400"},ee={class:"relative"},te=k({__name:"RadioCardDetailManySelect",props:{items:null,modelValue:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search..."},searchNoResultsTitle:{default:"No results found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} results"},customInputPlaceholder:{default:"Enter custom value"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"}},emits:["update:modelValue","update:customValue"],setup(e,{emit:p}){const d=e,c=p,n=f(""),m=f(!1),x=f(""),u=$(()=>{if(!n.value)return d.items;const b=n.value.toLowerCase();return d.items.filter(a=>a.name.toLowerCase().includes(b)||a.description&&a.description.toLowerCase().includes(b))});function w(b){x.value=b,c("update:customValue",b)}return(b,a)=>(r(),o("div",G,[e.searchable?(r(),o("div",J,[a[4]||(a[4]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),I(t("input",{"onUpdate:modelValue":a[0]||(a[0]=i=>n.value=i),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:e.searchPlaceholder},null,8,K),[[R,n.value]])])):v("",!0),t("div",O,[n.value?(r(),o("div",W,s(e.searchResultsText.replace("{count}",u.value.length.toString()).replace("{total}",e.items.length.toString())),1)):v("",!0),n.value&&u.value.length===0?(r(),o("div",X,[a[5]||(a[5]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",Y,[t("span",Z,s(e.searchNoResultsTitle),1),t("span",_,s(e.searchNoResultsDescription.replace("{query}",n.value)),1)])])):v("",!0),t("div",ee,[t("div",{class:l(["scrollbar-hide grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto pb-4",[m.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(r(!0),o(B,null,S(u.value,i=>(r(),T(A,{id:i.id,key:i.id,value:i.id,title:i.name,description:i.description,deprecated:i.deprecated,"show-expand-collapse":!0,"expand-collapse-threshold":100,"show-custom-input":i.customizable,"custom-input-value":x.value,"custom-input-placeholder":e.customInputPlaceholder,"model-value":e.modelValue,name:"radio-card-detail-many-select",class:"scroll-snap-align-start","onUpdate:modelValue":a[1]||(a[1]=h=>c("update:modelValue",h)),"onUpdate:customInputValue":a[2]||(a[2]=h=>w(h))},null,8,["id","value","title","description","deprecated","show-custom-input","custom-input-value","custom-input-placeholder","model-value"]))),128))],2),t("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:l([m.value?"fixed bottom-4 left-1/2 translate-x--1/2 z-10 w-full px-9 max-w-screen-lg":"mt-0 w-full rounded-lg"])},[t("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:l([m.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:a[3]||(a[3]=i=>m.value=!m.value)},[t("span",null,s(m.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:l([m.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),de=g(te,[["__scopeId","data-v-d2822497"]]);export{de as R,oe as a};
|
|
|
1 |
+
import{d as k,g as f,c as o,o as r,z as l,a as t,C as v,D as s,b as V,y as C,bM as y,bn as g,h as $,A as I,bH as R,bx as B,by as S,x as T}from"./index-TGrV2Wj8.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{_ as z}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const D=["checked","name","value"],N={class:"relative mr-3 mt-0.5 flex-shrink-0"},E={class:"w-full flex flex-col gap-2"},P={class:"flex items-center"},L={key:0,class:"relative"},M=["title"],U={key:1,class:"mt-2"},j=["value","placeholder"],q=k({__name:"RadioCardDetail",props:{id:null,name:null,value:null,title:null,description:null,modelValue:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},emits:["update:modelValue","update:customInputValue"],setup(e,{emit:p}){const d=p,c=f(!1);function n(){c.value=!c.value}function m(x){const u=x.target;d("update:customInputValue",u.value)}return(x,u)=>(r(),o("label",{key:e.id,class:l(["form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]",[e.modelValue===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-700 hover:border-primary-500/30 dark:hover:border-primary-400/30",e.modelValue===e.value?"form_radio-card-detail-active":"",e.deprecated?"opacity-60":""]]),transition:"all duration-200 ease-in-out",border:"2 solid"},[t("input",{checked:e.modelValue===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0",onChange:u[0]||(u[0]=w=>x.$emit("update:modelValue",e.value))},null,40,D),t("div",N,[t("div",{class:l(["size-5 border-2 rounded-full transition-colors duration-200",[e.modelValue===e.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[t("div",{class:l(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[e.modelValue===e.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),t("div",E,[t("div",P,[t("span",{class:l(["line-clamp-1 font-medium",[e.modelValue===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},s(e.title),3)]),e.description?(r(),o("div",L,[V(z,null,{default:C(()=>[c.value?(r(),o("div",{key:1,class:l(["cursor-pointer text-xs",[e.modelValue===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:y(n,["prevent"])},s(e.description),3)):(r(),o("div",{key:0,class:l(["line-clamp-2 cursor-pointer text-xs",[e.modelValue===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:e.description,onClick:y(n,["prevent"])},s(e.description),11,M))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(r(),o("button",{key:0,class:"text-primary-500 dark:text-primary-600 mt-0.5 inline-flex items-center text-xs",onClick:y(n,["prevent"])},[t("span",null,s(c.value?"Show less":"Show more"),1),t("div",{class:l([{"rotate-180":c.value},"transition-transform duration-200"])},u[1]||(u[1]=[t("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):v("",!0)])):v("",!0),e.showCustomInput&&e.modelValue===e.value?(r(),o("div",U,[t("input",{value:e.customInputValue,type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:e.customInputPlaceholder,onInput:m},null,40,j)])):v("",!0)])],2))}}),A=g(q,[["__scopeId","data-v-8d277a49"]]),F=["checked","name","value"],H={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},Q=k({__name:"RadioCardSimple",props:{id:null,name:null,value:null,title:null,description:null,modelValue:null},emits:["update:modelValue"],setup(e){return(p,d)=>(r(),o("label",{key:e.id,border:"2px solid",class:l(["form_radio-card-simple relative",[e.modelValue===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-700 hover:border-primary-500/30 dark:hover:border-primary-400/30",e.modelValue===e.value?"form_radio-card-simple-active":""]]),transition:"all duration-200 ease-in-out",flex:"~ col",block:"","min-w-50":"","w-fit":"","cursor-pointer":"","items-start":"","rounded-xl":"","p-4":"","text-left":""},[t("input",{checked:e.modelValue===e.value,type:"radio",name:e.name,value:e.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100",onChange:d[0]||(d[0]=c=>p.$emit("update:modelValue",e.value))},null,40,F),d[1]||(d[1]=t("div",{class:"radio-circle absolute left-2 top-2 size-5 rounded-full",border:"2 solid neutral-300 dark:neutral-600",transition:"all duration-200 ease-in-out"},[t("div",{class:"radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2",transition:"all duration-200 ease-in-out",bg:"primary-500 dark:primary-400"})],-1)),t("div",H,[t("span",{class:l(["radio-item-name font-bold",[e.modelValue===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-500"]]),text:"md",transition:"all duration-200 ease-in-out"},s(e.title),3),e.description?(r(),o("span",{key:0,class:l(["radio-item-description",[e.modelValue===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},s(e.description),3)):v("",!0)]),d[2]||(d[2]=t("div",{class:"bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20",absolute:"","inset-0":"","z--1":"",style:{"background-size":"10px 10px","mask-image":"linear-gradient(165deg, white 30%, transparent 50%)"}},null,-1))],2))}}),oe=g(Q,[["__scopeId","data-v-7daf4ec0"]]),G={class:"radio-card-detail-many-select"},J={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},K=["placeholder"],O={class:"mt-4 space-y-2"},W={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},X={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},Y={class:"flex flex-col"},Z={class:"font-medium"},_={class:"text-sm text-amber-600 dark:text-amber-400"},ee={class:"relative"},te=k({__name:"RadioCardDetailManySelect",props:{items:null,modelValue:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search..."},searchNoResultsTitle:{default:"No results found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} results"},customInputPlaceholder:{default:"Enter custom value"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"}},emits:["update:modelValue","update:customValue"],setup(e,{emit:p}){const d=e,c=p,n=f(""),m=f(!1),x=f(""),u=$(()=>{if(!n.value)return d.items;const b=n.value.toLowerCase();return d.items.filter(a=>a.name.toLowerCase().includes(b)||a.description&&a.description.toLowerCase().includes(b))});function w(b){x.value=b,c("update:customValue",b)}return(b,a)=>(r(),o("div",G,[e.searchable?(r(),o("div",J,[a[4]||(a[4]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),I(t("input",{"onUpdate:modelValue":a[0]||(a[0]=i=>n.value=i),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:e.searchPlaceholder},null,8,K),[[R,n.value]])])):v("",!0),t("div",O,[n.value?(r(),o("div",W,s(e.searchResultsText.replace("{count}",u.value.length.toString()).replace("{total}",e.items.length.toString())),1)):v("",!0),n.value&&u.value.length===0?(r(),o("div",X,[a[5]||(a[5]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",Y,[t("span",Z,s(e.searchNoResultsTitle),1),t("span",_,s(e.searchNoResultsDescription.replace("{query}",n.value)),1)])])):v("",!0),t("div",ee,[t("div",{class:l(["scrollbar-hide grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto pb-4",[m.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(r(!0),o(B,null,S(u.value,i=>(r(),T(A,{id:i.id,key:i.id,value:i.id,title:i.name,description:i.description,deprecated:i.deprecated,"show-expand-collapse":!0,"expand-collapse-threshold":100,"show-custom-input":i.customizable,"custom-input-value":x.value,"custom-input-placeholder":e.customInputPlaceholder,"model-value":e.modelValue,name:"radio-card-detail-many-select",class:"scroll-snap-align-start","onUpdate:modelValue":a[1]||(a[1]=h=>c("update:modelValue",h)),"onUpdate:customInputValue":a[2]||(a[2]=h=>w(h))},null,8,["id","value","title","description","deprecated","show-custom-input","custom-input-value","custom-input-placeholder","model-value"]))),128))],2),t("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:l([m.value?"fixed bottom-4 left-1/2 translate-x--1/2 z-10 w-full px-9 max-w-screen-lg":"mt-0 w-full rounded-lg"])},[t("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:l([m.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:a[3]||(a[3]=i=>m.value=!m.value)},[t("span",null,s(m.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:l([m.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),de=g(te,[["__scopeId","data-v-d2822497"]]);export{de as R,oe as a};
|
assets/{Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-DBRF19vp.js → Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js}
RENAMED
The diff for this file is too large to render.
See raw diff
|
|
assets/{TransitionVertical.vue_vue_type_script_setup_true_lang-DIDtgUjA.js → TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as T,x as l,o as m,bB as B,y as b,p as v}from"./index-
|
|
|
1 |
+
import{d as T,x as l,o as m,bB as B,y as b,p as v}from"./index-TGrV2Wj8.js";const n="0px",W=T({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(c){const r=c;function p(o){return{height:o.style.height,width:o.style.width,position:o.style.position,visibility:o.style.visibility,overflow:o.style.overflow,paddingTop:o.style.paddingTop,paddingBottom:o.style.paddingBottom,borderTopWidth:o.style.borderTopWidth,borderBottomWidth:o.style.borderBottomWidth,marginTop:o.style.marginTop,marginBottom:o.style.marginBottom}}function y(o,t){const{width:i}=getComputedStyle(o);o.style.width=i,o.style.position="absolute",o.style.visibility="hidden",o.style.height="";const{height:s}=getComputedStyle(o);return o.style.width=t.width,o.style.position=t.position,o.style.visibility=t.visibility,o.style.height=n,o.style.overflow="hidden",t.height&&t.height!==n?t.height:s}function h(o,t,i,s,d){const e=o.animate(s,d);o.style.height=t.height,e.onfinish=()=>{o.style.overflow=t.overflow,i()}}function g(o,t){return[{height:n,opacity:r.opacityClosed,paddingTop:n,paddingBottom:n,borderTopWidth:n,borderBottomWidth:n,marginTop:n,marginBottom:n},{height:o,opacity:r.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function u(o,t){const i=o,s=p(i),d=y(i,s),e=g(d,s),a={duration:r.duration,easing:r.easingEnter};h(i,s,t,e,a)}function f(o,t){const i=o,s=p(i),{height:d}=getComputedStyle(i);i.style.height=d,i.style.overflow="hidden";const e=g(d,s).reverse(),a={duration:r.duration,easing:r.easingLeave};h(i,s,t,e,a)}return(o,t)=>(m(),l(B,{css:!1,onEnter:u,onLeave:f},{default:b(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _};
|
assets/{_...all_-Cvv-HOpo.js → _...all_-DOpDf6rk.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{bn as e,c as n,o as c}from"./index-
|
|
|
1 |
+
import{bn as e,c as n,o as c}from"./index-TGrV2Wj8.js";const o={};function _(t,r){return c(),n("div",null," 404 - Page not found ")}const s=e(o,[["render",_]]);export{s as default};
|
assets/{audio-DIUvs_x2.js → audio-bsyyLIUP.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as s,g as f,c as d,o as p,a as t}from"./index-
|
|
|
1 |
+
import{d as s,g as f,c as d,o as p,a as t}from"./index-TGrV2Wj8.js";const R=s({__name:"audio",setup(_){const a=f(),l=f();function u(o){var r,c,i;if(!o)return;const n=(c=(r=l.value)==null?void 0:r.files)==null?void 0:c[0];if(!n)return;const e=document.createElement("audio");(i=a.value)==null||i.appendChild(e),e.src=URL.createObjectURL(n),e.controls=!0,e.load(),e.play()}return(o,n)=>(p(),d("div",null,[t("div",null,[t("div",{ref_key:"containerRef",ref:a},null,512),t("input",{ref_key:"fileInputRef",ref:l,type:"file",onChange:u},null,544)])]))}});export{R as default};
|
assets/{cloudflare-workers-ai-DLB8yKU7.js → cloudflare-workers-ai-8XuDD2Cs.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as V,bN as w,bO as y,x as k,o as I,i as x,bE as M,s as $,h as m,m as q,w as K,y as f,b as c,e as l}from"./index-TGrV2Wj8.js";import{u as N}from"./providers-By8PGLd2.js";import{_ as P,a as z,b as A,c as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import{_ as C}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";const R=V({__name:"ProviderAccountIdInput",props:w({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const r=p,u=y(p,"modelValue");return(n,e)=>(I(),k(P,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=t=>u.value=t),label:r.label||"Account ID",description:r.description||"Account ID",placeholder:r.placeholder,required:r.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}}),a="cloudflare-workers-ai",T=V({__name:"cloudflare-workers-ai",setup(p){const{t:r}=x(),u=M(),n=N(),{providers:e}=$(n),t=m(()=>n.getProviderMetadata(a)),s=m({get:()=>{var o;return((o=e.value[a])==null?void 0:o.apiKey)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].apiKey=o}}),d=m({get:()=>{var o;return((o=e.value[a])==null?void 0:o.accountId)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].accountId=o}});q(()=>{var o,i;n.initializeProvider(a),s.value=((o=e.value[a])==null?void 0:o.apiKey)||"",d.value=((i=e.value[a])==null?void 0:i.accountId)||""}),K([s,d],()=>{e.value[a]={...e.value[a],apiKey:s.value,accountId:d.value}});function h(){var o;e.value[a]={...(o=t.value)==null?void 0:o.defaultOptions}}return(o,i)=>{var _,b;return I(),k(l(B),{"provider-name":(_=t.value)==null?void 0:_.localizedName,"provider-icon-color":(b=t.value)==null?void 0:b.iconColor,"on-back":()=>l(u).back()},{default:f(()=>[c(l(z),null,{default:f(()=>[c(l(A),{title:l(r)("settings.pages.providers.common.section.basic.title"),description:l(r)("settings.pages.providers.common.section.basic.description"),"on-reset":h},{default:f(()=>{var g;return[c(l(C),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=v=>s.value=v),"provider-name":(g=t.value)==null?void 0:g.localizedName,placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder")},null,8,["modelValue","provider-name","placeholder"]),c(l(R),{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=v=>d.value=v),label:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label"),description:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description"),placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder")},null,8,["modelValue","label","description","placeholder"])]}),_:1},8,["title","description"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{T as default};
|
assets/{consciousness-Di1cfvdt.js → consciousness-B3PnyIdr.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{f as C,bL as l,g as M,h as i,w as h}from"./index-
|
|
|
1 |
+
import{f as C,bL as l,g as M,h as i,w as h}from"./index-TGrV2Wj8.js";import{u as y}from"./providers-By8PGLd2.js";const A=C("consciousness",()=>{const s=y(),o=l("settings/consciousness/active-provider",""),a=l("settings/consciousness/active-model",""),n=l("settings/consciousness/active-custom-model",""),u=M({}),r=M(""),f=i(()=>{var e;return((e=s.getProviderMetadata(o.value))==null?void 0:e.capabilities.listModels)!==void 0}),c=i(()=>s.getModelsForProvider(o.value)),m=i(()=>s.isLoadingModels[o.value]||!1),g=i(()=>s.modelLoadError[o.value]||null),p=i(()=>{if(!r.value.trim())return c.value;const e=r.value.toLowerCase().trim();return c.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function P(e){o.value=e}function L(e){a.value=e}function w(e){n.value=e}function S(e){r.value=e}function d(){a.value="",n.value="",u.value={},r.value=""}async function v(e){var t;e&&((t=s.getProviderMetadata(o.value))==null?void 0:t.capabilities.listModels)!==void 0&&s.getModelsForProvider(e).length===0&&await s.fetchModelsForProvider(e)}return h(o,async e=>{await v(e),d()}),{activeProvider:o,activeModel:a,customModelName:n,expandedDescriptions:u,modelSearchQuery:r,supportsModelListing:f,providerModels:c,isLoadingActiveProviderModels:m,activeProviderModelError:g,filteredModels:p,setActiveProvider:P,setActiveModel:L,setCustomModelName:w,setModelSearchQuery:S,resetModelSelection:d,loadModelsForProvider:v}});export{A as u};
|
assets/{consciousness-BH9r76j8.js → consciousness-D6MPamQ3.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as L,s as b,i as U,bE as B,m as q,bw as z,c as r,o as i,A as h,a as e,e as s,D as n,C as f,bx as k,by as E,b as A,y as F,bo as Q,x as y,ad as u,bH as T}from"./index-
|
|
|
1 |
+
import{d as L,s as b,i as U,bE as B,m as q,bw as z,c as r,o as i,A as h,a as e,e as s,D as n,C as f,bx as k,by as E,b as A,y as F,bo as Q,x as y,ad as u,bH as T}from"./index-TGrV2Wj8.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{R as j,a as H}from"./RadioCardDetailManySelect-CCXGOLoc.js";import{u as I}from"./consciousness-B3PnyIdr.js";import{u as $}from"./providers-By8PGLd2.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const G={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},J={relative:""},K={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},O={text:"neutral-300 dark:neutral-500","text-nowrap":""},W={"text-nowrap":"","text-3xl":"","font-semibold":""},X={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},Y={flex:"~ col gap-4"},Z={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},ee={text:"neutral-400 dark:neutral-400"},se={"max-w-full":""},te={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},oe={key:1},ne={key:0},le={flex:"~ col gap-4"},ie={class:"text-lg md:text-2xl"},re={text:"neutral-400 dark:neutral-400"},de={key:0,class:"flex items-center justify-center py-4"},ae={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},ce={class:"flex flex-col"},ue={class:"font-medium"},pe={class:"text-sm text-red-600 dark:text-red-400"},me={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},xe={class:"flex flex-col"},ve={class:"font-medium"},ge={class:"text-sm text-amber-600 dark:text-amber-400"},_e={key:1},be={flex:"~ col gap-4"},he={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},fe={text:"neutral-400 dark:neutral-500"},ke={class:"bg-primary-50 border-primary-200 dark:bg-primary-900/20 dark:border-primary-800 flex items-center gap-3 border rounded-lg p-4"},ye={class:"flex flex-col"},we={class:"font-medium"},Me={class:"dark:text-primary-400 text-primary-600 text-sm"},Ce={class:"mt-2"},Ve={class:"mb-1 block text-sm font-medium"},Pe=["placeholder"],Se=L({__name:"consciousness",setup(Ne){const M=$(),m=I(),{availableProviders:C,availableProvidersMetadata:V}=b(M),{activeProvider:d,activeModel:a,customModelName:P,modelSearchQuery:c,supportsModelListing:x,providerModels:p,isLoadingActiveProviderModels:v,activeProviderModelError:g}=b(m),{t:o}=U(),S=B();q(async()=>{await m.loadModelsForProvider(d.value)});function N(_){P.value=_}return(_,t)=>{const R=z("motion");return i(),r(k,null,[h((i(),r("div",G,[e("button",{onClick:t[0]||(t[0]=l=>s(S).back())},t[5]||(t[5]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-xl":""},null,-1)])),e("h1",J,[e("div",K,[e("span",O,n(s(o)("settings.pages.modules.title")),1)]),e("div",W,n(s(o)("settings.pages.modules.consciousness.title")),1)])])),[[R]]),e("div",X,[e("div",null,[e("div",Y,[e("div",null,[e("h2",Z,n(s(o)("settings.pages.providers.title")),1),e("div",ee,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),e("div",se,[s(C).length>0?(i(),r("fieldset",te,[(i(!0),r(k,null,E(s(V),l=>(i(),y(s(H),{id:l.id,key:l.id,modelValue:s(d),"onUpdate:modelValue":t[1]||(t[1]=D=>u(d)?d.value=D:null),name:"provider",value:l.id,title:l.localizedName,description:l.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(i(),r("div",oe,[A(s(Q),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:F(()=>t[6]||(t[6]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])])]),s(d)&&s(x)?(i(),r("div",ne,[e("div",le,[e("div",null,[e("h2",ie,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",re,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s(v)?(i(),r("div",de,[t[7]||(t[7]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):s(g)?(i(),r("div",ae,[t[8]||(t[8]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",ce,[e("span",ue,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",pe,n(s(g)),1)])])):s(p).length===0&&!s(v)?(i(),r("div",me,[t[9]||(t[9]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",xe,[e("span",ve,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",ge,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):s(p).length>0?(i(),y(s(j),{key:3,modelValue:s(a),"onUpdate:modelValue":t[2]||(t[2]=l=>u(a)?a.value=l:null),"search-query":s(c),"onUpdate:searchQuery":t[3]||(t[3]=l=>u(c)?c.value=l:null),items:s(p),searchable:!0,"search-placeholder":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:s(c)}),"search-results-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":N},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):f("",!0)])])):s(d)&&!s(x)?(i(),r("div",_e,[e("div",be,[e("div",null,[e("h2",he,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",fe,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e("div",ke,[t[10]||(t[10]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",ye,[e("span",we,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),e("span",Me,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),e("div",Ce,[e("label",Ve,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),h(e("input",{"onUpdate:modelValue":t[4]||(t[4]=l=>u(a)?a.value=l:null),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900",placeholder:s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,Pe),[[T,s(a)]])])])])):f("",!0)]),t[11]||(t[11]=e("div",{text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[e("div",{text:"40","i-lucide:ghost":""})],-1))],64)}}});typeof w=="function"&&w(Se);export{Se as default};
|
assets/{deepseek-nq_6ygPe.js → deepseek-DIGt7-bf.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as k,i as U,bE as V,s as y,h as m,m as $,w as K,x as h,o as x,y as d,b as r,e as t}from"./index-TGrV2Wj8.js";import{u as w}from"./providers-By8PGLd2.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";import{a as N,b as P,c as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const a="deepseek",D=k({__name:"deepseek",setup(S){const{t:p}=U(),_=V(),c=w(),{providers:o}=y(c),n=m(()=>c.getProviderMetadata(a)),l=m({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),i=m({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;c.initializeProvider(a),l.value=((e=o.value[a])==null?void 0:e.apiKey)||"",i.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),K([l,i],()=>{o.value[a]={...o.value[a],apiKey:l.value,baseUrl:i.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var v,f;return x(),h(t(R),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:d(()=>[r(t(N),null,{default:d(()=>[r(t(P),{title:t(p)("settings.pages.providers.common.section.basic.title"),description:t(p)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:d(()=>{var u;return[r(t(M),{modelValue:l.value,"onUpdate:modelValue":s[0]||(s[0]=g=>l.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(z),{title:t(p)("settings.pages.providers.common.section.advanced.title")},{default:d(()=>[r(t(C),{modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=u=>i.value=u),placeholder:"https://api.deepseek.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{D as default};
|
assets/{default-DvgsfB8y.js → default-Bi_MiWMk.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as n,u as r,c,a,b as t,e,n as i,R as m,o as l}from"./index-
|
|
|
1 |
+
import{d as n,u as r,c,a,b as t,e,n as i,R as m,o as l}from"./index-TGrV2Wj8.js";import{H as x}from"./HeaderLink-_N25PCvc.js";const f={"mb-4":"","w-full":"","gap-2":"",class:"px-0 py-1 md:px-3 md:py-3"},_={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col gap-4","mx-auto":"","max-w-screen-lg":""},$=n({__name:"default",setup(u){const{top:o,right:p,bottom:s,left:d}=r();return(g,y)=>(l(),c("div",{"p-2":"",style:i({paddingTop:`${e(o)}px`,paddingRight:`${e(p)}px`,paddingBottom:`${e(s)}px`,paddingLeft:`${e(d)}px`})},[a("div",f,[t(x)]),a("div",_,[t(e(m))])],4))}});export{$ as default};
|
assets/{default-node-DMAgm1mi.js → default-node-DLOWa9iW.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{cp as t}from"./index-
|
|
|
1 |
+
import{cp as t}from"./index-TGrV2Wj8.js";async function s(){const{createRequire:a}=await t(async()=>{const{createRequire:o}=await import("./__vite-browser-external-FmFgRqLi.js");return{createRequire:o}},[]),{dirname:n,resolve:e}=await t(async()=>{const{dirname:o,resolve:c}=await import("./__vite-browser-external-FmFgRqLi.js");return{dirname:o,resolve:c}},[]),d=a(import.meta.url),r=n(d.resolve("@duckdb/duckdb-wasm"));return{mvp:{mainModule:e(r,"./duckdb-mvp.wasm"),mainWorker:e(r,"./duckdb-node-mvp.worker.cjs")},eh:{mainModule:e(r,"./duckdb-eh.wasm"),mainWorker:e(r,"./duckdb-node-eh.worker.cjs")}}}export{s as getBundles};
|
assets/{delays-CZG8W2jg.js → delays-D9R8ocDz.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{b as v,_,l as b}from"./queues-
|
|
|
1 |
+
import{b as v,_,l as b}from"./queues-BcuD6qtP.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import"./index-BUfvD8m2.js";import{d as k,g as d,c as s,o as l,a as e,b as y,e as x,D as i,bx as f,by as p}from"./index-TGrV2Wj8.js";import"./queue-B_YcFivQ.js";const z={flex:"","flex-col":"","gap-2":"","p-2":""},w={flex:"","flex-row":"","gap-2":""},h={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},D={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=k({__name:"delays",setup(E){const t=d(""),m=d([]),c=d([]),r=d(!1),u=v();u.onHandlerEvent("delay",a=>{c.value.push(a)});function g(){r.value=!0;const a=t.value.split("");for(const n of a)u.add(n);u.add(b),t.value="",r.value=!1}return(a,n)=>(l(),s("div",z,[e("div",w,[y(x(_),{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:g},null,8,["modelValue"]),e("button",h,i(r.value?"Processing...":"Send"),1)]),e("div",M,[e("div",V,[n[1]||(n[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(l(!0),s(f,null,p(m.value,o=>(l(),s("div",{key:o},[e("div",null,i(o),1)]))),128))]),e("div",D,[n[2]||(n[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(l(!0),s(f,null,p(c.value,o=>(l(),s("div",{key:o},[e("div",null,i(o)+"s",1)]))),128))])])]))}});export{N as default};
|
assets/{elevenlabs-CR6JUm8z.js → elevenlabs-CNYJUyIo.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as E,c as g,o as c,p as Q,n as D,bn as W,g as S,br as N,m as Z,H as ee,a as i,x as te,y as F,b as v,i as oe,bE as ie,s as re,h as x,w as ne,e as a,D as m,A,C,bH as ue,bx as Y,by as G,bI as J,z as de}from"./index-DdKO3wSp.js";import{_ as P,a as ve}from"./FieldRange.vue_vue_type_script_setup_true_lang-CidO7hNV.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-DBRF19vp.js";import{u as pe}from"./providers-C0QEXqAJ.js";import{u as ce,v as me}from"./speech-daB7xiBS.js";import{_ as fe,a as ge}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Yi_GUv2w.js";import{_ as be}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C0M9V8X1.js";import{a as _e,b as ye,c as xe}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D56LN6r4.js";import{g as Se}from"./index-B_a4T69o.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BwUs5KAP.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DIDtgUjA.js";const ke=E({__name:"Volumed",props:{perspective:null,transform:null},setup(b){return(r,f)=>(c(),g("div",{class:"volumed",style:D({perspective:`${b.perspective}px`,transform:b.transform})},[Q(r.$slots,"default",{},void 0,!0)],4))}}),Ve=W(ke,[["__scopeId","data-v-568551bc"]]),he=E({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(b,{expose:r}){const f=b,u=S(1),_=S(0);let e=0;const k=N(()=>f.friction),V=N(()=>f.baseSpeed),p=N(()=>f.momentumFactor);function w(n){e||(e=n);const d=n-e;e=n,u.value=V.value+(u.value-V.value)*k.value,_.value+=u.value*d,requestAnimationFrame(w)}function y(n){const d=Math.sqrt(n.movementX**2+n.movementY**2);u.value+=d*p.value}return Z(()=>{window.addEventListener("mousemove",y),requestAnimationFrame(w)}),ee(()=>{window.removeEventListener("mousemove",y)}),r({momentum:u,currentValue:_}),(n,d)=>Q(n.$slots,"default",{momentum:u.value,currentValue:_.value})}}),we=E({__name:"TestDummyMarkerFlat",props:{size:null},setup(b){return(r,f)=>(c(),g("div",{class:"test-dummy-flat",style:D({width:`${b.size}px`,height:`${b.size}px`})},f[0]||(f[0]=[i("div",{class:"marker"},null,-1)]),4))}}),Ue=W(we,[["__scopeId","data-v-b4ef37ac"]]),Be=E({__name:"TestDummyMarker",setup(b){return(r,f)=>(c(),te(he,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:F(({currentValue:u})=>[v(Ve,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:F(()=>[v(Ue,{size:24,style:D({transform:`rotate(${u}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}}),Me={flex:"~ col md:row gap-6"},$e={flex:"~ col gap-6"},Te={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},Le={flex:"~ col gap-4"},Fe={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Re={"w-full":"","rounded-xl":""},ze={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Ee={class:"inline-flex items-center gap-4"},Oe={flex:"~ col gap-4"},Ce=["placeholder"],Pe={flex:"~ col gap-6"},Ie={grid:"~ cols-2 gap-4"},Ne={class:"flex items-center gap-1 text-sm font-medium"},Ae={class:"text-xs text-neutral-500 dark:text-neutral-400"},De=["value"],Ke={grid:"~ cols-2 gap-4"},qe={class:"flex items-center gap-1 text-sm font-medium"},je={class:"text-xs text-neutral-500 dark:text-neutral-400"},He=["value"],Xe={flex:"~ row","gap-4":""},Ye=["disabled"],Ge={flex:"~ row","items-center":"","gap-2":""},Je={key:0,class:"mt-2 text-sm text-red-500"},Qe={key:1,class:"mt-2 text-sm text-red-500"},We=["src"],l="elevenlabs",dt=E({__name:"elevenlabs",setup(b){const{t:r}=oe(),f=ie(),u=pe(),_=ce(),{providers:e}=re(u),k=S("Hello! This is a test of the ElevenLabs voice synthesis."),V=S(!1),p=S(""),w=S(""),y=S(null),n=x(()=>u.getProviderMetadata(l)),d=x({get:()=>{var s;return((s=e.value[l])==null?void 0:s.apiKey)||""},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].apiKey=s}}),R=x({get:()=>{var s,t,h;return((s=e.value[l])==null?void 0:s.baseUrl)||((h=(t=n.value)==null?void 0:t.defaultOptions)==null?void 0:h.baseUrl)||""},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].baseUrl=s}}),B=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.similarityBoost)??.75},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].voiceSettings.similarityBoost=s}}),M=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.stability)??.5},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].voiceSettings.stability=s}}),$=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.speed)??1},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].voiceSettings.speed=s}}),T=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.style)??0},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].style=s}}),L=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.useSpeakerBoost)!==!1},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].voiceSettings.useSpeakerBoost=s}}),K=S(_.selectedLanguage),I=S(_.voiceName),le=x(()=>_.availableVoicesForLanguage);Z(()=>{var s,t,h,z,o,U,O,j,H,X;u.initializeProvider(l),d.value=((s=e.value[l])==null?void 0:s.apiKey)||"",R.value=((t=e.value[l])==null?void 0:t.baseUrl)||((z=(h=n.value)==null?void 0:h.defaultOptions)==null?void 0:z.baseUrl)||"",(o=e.value[l])!=null&&o.voiceSettings&&(B.value=((U=e.value[l].voiceSettings)==null?void 0:U.similarityBoost)??.75,M.value=((O=e.value[l].voiceSettings)==null?void 0:O.stability)??.5,$.value=((j=e.value[l].voiceSettings)==null?void 0:j.speed)??1,T.value=((H=e.value[l].voiceSettings)==null?void 0:H.style)??0,L.value=((X=e.value[l].voiceSettings)==null?void 0:X.useSpeakerBoost)!==!1),u.configuredProviders[l]&&_.loadVoicesForProvider(l)}),ne([d,R,B,M,$,T,L],()=>{var s,t;e.value[l]={...e.value[l],apiKey:d.value,baseUrl:R.value||((t=(s=n.value)==null?void 0:s.defaultOptions)==null?void 0:t.baseUrl)||"",voiceSettings:{similarityBoost:B.value,stability:M.value,speed:$.value,style:T.value,useSpeakerBoost:L.value}}});async function se(){if(!k.value.trim())return;const s=u.getProviderInstance(l);if(!s){console.error("Failed to initialize speech provider");return}V.value=!0,w.value="";try{p.value&&q();const t=await Se({...s.speech("eleven_multilingual_v2",{voiceSettings:{stability:M.value,similarityBoost:B.value,speed:$.value,style:T.value,useSpeakerBoost:L.value}}),input:k.value,voice:me[I.value]});p.value=URL.createObjectURL(new Blob([t])),setTimeout(()=>{y.value&&y.value.play()},100)}catch(t){console.error("Error generating speech:",t),w.value=t instanceof Error?t.message:"An unknown error occurred"}finally{V.value=!1}}function q(){y.value&&(y.value.pause(),y.value.currentTime=0),p.value&&(URL.revokeObjectURL(p.value),p.value="")}ee(()=>{p.value&&URL.revokeObjectURL(p.value)});function ae(){var s;e.value[l]={...(s=n.value)==null?void 0:s.defaultOptions}}return(s,t)=>{var h,z;return c(),te(a(xe),{"provider-name":(h=n.value)==null?void 0:h.localizedName,"provider-icon":(z=n.value)==null?void 0:z.icon,"on-back":()=>a(f).back()},{default:F(()=>[i("div",Me,[v(a(_e),{class:"w-full md:w-[40%]"},{default:F(()=>[v(a(ye),{title:a(r)("settings.pages.providers.common.section.basic.title"),description:a(r)("settings.pages.providers.common.section.basic.description"),"on-reset":ae},{default:F(()=>{var o;return[v(a(be),{modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=U=>d.value=U),"provider-name":(o=n.value)==null?void 0:o.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),i("div",$e,[i("h2",Te,m(a(r)("settings.pages.providers.common.section.voice.title")),1),i("div",Le,[v(a(P),{modelValue:B.value,"onUpdate:modelValue":t[1]||(t[1]=o=>B.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),v(a(P),{modelValue:M.value,"onUpdate:modelValue":t[2]||(t[2]=o=>M.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),v(a(P),{modelValue:$.value,"onUpdate:modelValue":t[3]||(t[3]=o=>$.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.speed.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.speed.description"),min:.7,max:1.2,step:.01},null,8,["modelValue","label","description"]),v(a(P),{modelValue:T.value,"onUpdate:modelValue":t[4]||(t[4]=o=>T.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),v(a(ve),{modelValue:L.value,"onUpdate:modelValue":t[5]||(t[5]=o=>L.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])])]),v(a(fe),{title:a(r)("settings.pages.providers.common.section.advanced.title")},{default:F(()=>{var o,U;return[v(a(ge),{modelValue:R.value,"onUpdate:modelValue":t[6]||(t[6]=O=>R.value=O),placeholder:((U=(o=n.value)==null?void 0:o.defaultOptions)==null?void 0:U.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title"])]),_:1}),i("div",Fe,[i("div",Re,[i("h2",ze,[i("div",Ee,[v(a(Be)),i("div",null,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),i("div",Oe,[A(i("textarea",{"onUpdate:modelValue":t[7]||(t[7]=o=>k.value=o),placeholder:a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,Ce),[[ue,k.value]]),i("div",Pe,[i("label",Ie,[i("div",null,[i("div",Ne,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.label")),1),i("div",Ae,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.description")),1)]),A(i("select",{"onUpdate:modelValue":t[8]||(t[8]=o=>K.value=o),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(c(!0),g(Y,null,G(a(_).availableLanguages,o=>(c(),g("option",{key:o,value:o},m(o),9,De))),128))],512),[[J,K.value]])]),i("label",Ke,[i("div",null,[i("div",qe,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),i("div",je,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),A(i("select",{"onUpdate:modelValue":t[9]||(t[9]=o=>I.value=o),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(c(!0),g(Y,null,G(le.value,o=>(c(),g("option",{key:o.id,value:o.name},m(o.name),9,He))),128))],512),[[J,I.value]])])]),i("div",Xe,[i("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:V.value||!k.value.trim()||!d.value,class:de({"opacity-50 cursor-not-allowed":V.value||!k.value.trim()||!d.value}),bg:"neutral-700 dark:neutral-300",onClick:se},[i("div",Ge,[t[10]||(t[10]=i("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),i("span",null,m(V.value?a(r)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):a(r)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Ye),p.value?(c(),g("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:q},t[11]||(t[11]=[i("div",{flex:"~ row","items-center":"","gap-2":""},[i("div",{"i-solar:stop-circle-bold-duotone":""}),i("span",null,"Stop")],-1)]))):C("",!0)]),d.value?C("",!0):(c(),g("div",Je,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),w.value?(c(),g("div",Qe,m(w.value),1)):C("",!0),p.value?(c(),g("audio",{key:2,ref_key:"audioPlayer",ref:y,src:p.value,controls:"",class:"mt-2 w-full"},null,8,We)):C("",!0)])])])])]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{dt as default};
|
|
|
1 |
+
import{d as E,c as g,o as c,p as Q,n as D,bn as W,g as S,br as N,m as Z,H as ee,a as i,x as te,y as F,b as v,i as oe,bE as ie,s as re,h as x,w as ne,e as a,D as m,A,C,bH as ue,bx as Y,by as G,bI as J,z as de}from"./index-TGrV2Wj8.js";import{_ as P,a as ve}from"./FieldRange.vue_vue_type_script_setup_true_lang-BKorzfHV.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{u as pe}from"./providers-By8PGLd2.js";import{u as ce,v as me}from"./speech-C6ot8rjM.js";import{_ as fe,a as ge}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import{_ as be}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";import{a as _e,b as ye,c as xe}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import{g as Se}from"./index-CCfJDiQ1.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const ke=E({__name:"Volumed",props:{perspective:null,transform:null},setup(b){return(r,f)=>(c(),g("div",{class:"volumed",style:D({perspective:`${b.perspective}px`,transform:b.transform})},[Q(r.$slots,"default",{},void 0,!0)],4))}}),Ve=W(ke,[["__scopeId","data-v-568551bc"]]),he=E({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(b,{expose:r}){const f=b,u=S(1),_=S(0);let e=0;const k=N(()=>f.friction),V=N(()=>f.baseSpeed),p=N(()=>f.momentumFactor);function w(n){e||(e=n);const d=n-e;e=n,u.value=V.value+(u.value-V.value)*k.value,_.value+=u.value*d,requestAnimationFrame(w)}function y(n){const d=Math.sqrt(n.movementX**2+n.movementY**2);u.value+=d*p.value}return Z(()=>{window.addEventListener("mousemove",y),requestAnimationFrame(w)}),ee(()=>{window.removeEventListener("mousemove",y)}),r({momentum:u,currentValue:_}),(n,d)=>Q(n.$slots,"default",{momentum:u.value,currentValue:_.value})}}),we=E({__name:"TestDummyMarkerFlat",props:{size:null},setup(b){return(r,f)=>(c(),g("div",{class:"test-dummy-flat",style:D({width:`${b.size}px`,height:`${b.size}px`})},f[0]||(f[0]=[i("div",{class:"marker"},null,-1)]),4))}}),Ue=W(we,[["__scopeId","data-v-b4ef37ac"]]),Be=E({__name:"TestDummyMarker",setup(b){return(r,f)=>(c(),te(he,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:F(({currentValue:u})=>[v(Ve,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:F(()=>[v(Ue,{size:24,style:D({transform:`rotate(${u}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}}),Me={flex:"~ col md:row gap-6"},$e={flex:"~ col gap-6"},Te={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},Le={flex:"~ col gap-4"},Fe={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Re={"w-full":"","rounded-xl":""},ze={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Ee={class:"inline-flex items-center gap-4"},Oe={flex:"~ col gap-4"},Ce=["placeholder"],Pe={flex:"~ col gap-6"},Ie={grid:"~ cols-2 gap-4"},Ne={class:"flex items-center gap-1 text-sm font-medium"},Ae={class:"text-xs text-neutral-500 dark:text-neutral-400"},De=["value"],Ke={grid:"~ cols-2 gap-4"},qe={class:"flex items-center gap-1 text-sm font-medium"},je={class:"text-xs text-neutral-500 dark:text-neutral-400"},He=["value"],Xe={flex:"~ row","gap-4":""},Ye=["disabled"],Ge={flex:"~ row","items-center":"","gap-2":""},Je={key:0,class:"mt-2 text-sm text-red-500"},Qe={key:1,class:"mt-2 text-sm text-red-500"},We=["src"],l="elevenlabs",dt=E({__name:"elevenlabs",setup(b){const{t:r}=oe(),f=ie(),u=pe(),_=ce(),{providers:e}=re(u),k=S("Hello! This is a test of the ElevenLabs voice synthesis."),V=S(!1),p=S(""),w=S(""),y=S(null),n=x(()=>u.getProviderMetadata(l)),d=x({get:()=>{var s;return((s=e.value[l])==null?void 0:s.apiKey)||""},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].apiKey=s}}),R=x({get:()=>{var s,t,h;return((s=e.value[l])==null?void 0:s.baseUrl)||((h=(t=n.value)==null?void 0:t.defaultOptions)==null?void 0:h.baseUrl)||""},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].baseUrl=s}}),B=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.similarityBoost)??.75},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].voiceSettings.similarityBoost=s}}),M=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.stability)??.5},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].voiceSettings.stability=s}}),$=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.speed)??1},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].voiceSettings.speed=s}}),T=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.style)??0},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].style=s}}),L=x({get:()=>{var s,t;return((t=(s=e.value[l])==null?void 0:s.voiceSettings)==null?void 0:t.useSpeakerBoost)!==!1},set:s=>{e.value[l]||(e.value[l]={}),e.value[l].voiceSettings||(e.value[l].voiceSettings={}),e.value[l].voiceSettings.useSpeakerBoost=s}}),K=S(_.selectedLanguage),I=S(_.voiceName),le=x(()=>_.availableVoicesForLanguage);Z(()=>{var s,t,h,z,o,U,O,j,H,X;u.initializeProvider(l),d.value=((s=e.value[l])==null?void 0:s.apiKey)||"",R.value=((t=e.value[l])==null?void 0:t.baseUrl)||((z=(h=n.value)==null?void 0:h.defaultOptions)==null?void 0:z.baseUrl)||"",(o=e.value[l])!=null&&o.voiceSettings&&(B.value=((U=e.value[l].voiceSettings)==null?void 0:U.similarityBoost)??.75,M.value=((O=e.value[l].voiceSettings)==null?void 0:O.stability)??.5,$.value=((j=e.value[l].voiceSettings)==null?void 0:j.speed)??1,T.value=((H=e.value[l].voiceSettings)==null?void 0:H.style)??0,L.value=((X=e.value[l].voiceSettings)==null?void 0:X.useSpeakerBoost)!==!1),u.configuredProviders[l]&&_.loadVoicesForProvider(l)}),ne([d,R,B,M,$,T,L],()=>{var s,t;e.value[l]={...e.value[l],apiKey:d.value,baseUrl:R.value||((t=(s=n.value)==null?void 0:s.defaultOptions)==null?void 0:t.baseUrl)||"",voiceSettings:{similarityBoost:B.value,stability:M.value,speed:$.value,style:T.value,useSpeakerBoost:L.value}}});async function se(){if(!k.value.trim())return;const s=u.getProviderInstance(l);if(!s){console.error("Failed to initialize speech provider");return}V.value=!0,w.value="";try{p.value&&q();const t=await Se({...s.speech("eleven_multilingual_v2",{voiceSettings:{stability:M.value,similarityBoost:B.value,speed:$.value,style:T.value,useSpeakerBoost:L.value}}),input:k.value,voice:me[I.value]});p.value=URL.createObjectURL(new Blob([t])),setTimeout(()=>{y.value&&y.value.play()},100)}catch(t){console.error("Error generating speech:",t),w.value=t instanceof Error?t.message:"An unknown error occurred"}finally{V.value=!1}}function q(){y.value&&(y.value.pause(),y.value.currentTime=0),p.value&&(URL.revokeObjectURL(p.value),p.value="")}ee(()=>{p.value&&URL.revokeObjectURL(p.value)});function ae(){var s;e.value[l]={...(s=n.value)==null?void 0:s.defaultOptions}}return(s,t)=>{var h,z;return c(),te(a(xe),{"provider-name":(h=n.value)==null?void 0:h.localizedName,"provider-icon":(z=n.value)==null?void 0:z.icon,"on-back":()=>a(f).back()},{default:F(()=>[i("div",Me,[v(a(_e),{class:"w-full md:w-[40%]"},{default:F(()=>[v(a(ye),{title:a(r)("settings.pages.providers.common.section.basic.title"),description:a(r)("settings.pages.providers.common.section.basic.description"),"on-reset":ae},{default:F(()=>{var o;return[v(a(be),{modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=U=>d.value=U),"provider-name":(o=n.value)==null?void 0:o.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),i("div",$e,[i("h2",Te,m(a(r)("settings.pages.providers.common.section.voice.title")),1),i("div",Le,[v(a(P),{modelValue:B.value,"onUpdate:modelValue":t[1]||(t[1]=o=>B.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),v(a(P),{modelValue:M.value,"onUpdate:modelValue":t[2]||(t[2]=o=>M.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),v(a(P),{modelValue:$.value,"onUpdate:modelValue":t[3]||(t[3]=o=>$.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.speed.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.speed.description"),min:.7,max:1.2,step:.01},null,8,["modelValue","label","description"]),v(a(P),{modelValue:T.value,"onUpdate:modelValue":t[4]||(t[4]=o=>T.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),v(a(ve),{modelValue:L.value,"onUpdate:modelValue":t[5]||(t[5]=o=>L.value=o),label:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:a(r)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])])]),v(a(fe),{title:a(r)("settings.pages.providers.common.section.advanced.title")},{default:F(()=>{var o,U;return[v(a(ge),{modelValue:R.value,"onUpdate:modelValue":t[6]||(t[6]=O=>R.value=O),placeholder:((U=(o=n.value)==null?void 0:o.defaultOptions)==null?void 0:U.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title"])]),_:1}),i("div",Fe,[i("div",Re,[i("h2",ze,[i("div",Ee,[v(a(Be)),i("div",null,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),i("div",Oe,[A(i("textarea",{"onUpdate:modelValue":t[7]||(t[7]=o=>k.value=o),placeholder:a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,Ce),[[ue,k.value]]),i("div",Pe,[i("label",Ie,[i("div",null,[i("div",Ne,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.label")),1),i("div",Ae,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.description")),1)]),A(i("select",{"onUpdate:modelValue":t[8]||(t[8]=o=>K.value=o),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(c(!0),g(Y,null,G(a(_).availableLanguages,o=>(c(),g("option",{key:o,value:o},m(o),9,De))),128))],512),[[J,K.value]])]),i("label",Ke,[i("div",null,[i("div",qe,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),i("div",je,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),A(i("select",{"onUpdate:modelValue":t[9]||(t[9]=o=>I.value=o),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(c(!0),g(Y,null,G(le.value,o=>(c(),g("option",{key:o.id,value:o.name},m(o.name),9,He))),128))],512),[[J,I.value]])])]),i("div",Xe,[i("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:V.value||!k.value.trim()||!d.value,class:de({"opacity-50 cursor-not-allowed":V.value||!k.value.trim()||!d.value}),bg:"neutral-700 dark:neutral-300",onClick:se},[i("div",Ge,[t[10]||(t[10]=i("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),i("span",null,m(V.value?a(r)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):a(r)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Ye),p.value?(c(),g("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:q},t[11]||(t[11]=[i("div",{flex:"~ row","items-center":"","gap-2":""},[i("div",{"i-solar:stop-circle-bold-duotone":""}),i("span",null,"Stop")],-1)]))):C("",!0)]),d.value?C("",!0):(c(),g("div",Je,m(a(r)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),w.value?(c(),g("div",Qe,m(w.value),1)):C("",!0),p.value?(c(),g("audio",{key:2,ref_key:"audioPlayer",ref:y,src:p.value,controls:"",class:"mt-2 w-full"},null,8,We)):C("",!0)])])])])]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{dt as default};
|
assets/{emotions-DSIP21BL.js → emotions-0f83nn0I.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{a as _,_ as b,l as k}from"./queues-
|
|
|
1 |
+
import{a as _,_ as b,l as k}from"./queues-BcuD6qtP.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{u as x}from"./queue-B_YcFivQ.js";import{d as z,g as u,c as s,o as t,a as e,b as h,e as w,D as i,bx as f,by as m}from"./index-TGrV2Wj8.js";const y={flex:"","flex-col":"","gap-2":"","p-2":""},M={flex:"","flex-row":"","gap-2":""},V={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},E={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=z({__name:"emotions",setup(B){const l=u(""),p=u([]),r=u([]),d=u(!1),g=x({handlers:[async a=>{r.value.push(a.data)}]}),c=_(g);function v(){d.value=!0;const a=l.value.split("");for(const o of a)c.add(o);c.add(k),l.value="",d.value=!1}return(a,o)=>(t(),s("div",y,[e("div",M,[h(w(b),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",V,i(d.value?"Processing...":"Send"),1)]),e("div",E,[e("div",Q,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,m(p.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))]),e("div",S,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,m(r.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))])])]))}});export{N as default};
|
assets/{filter-message-B5b-aNaT.js → filter-message-Ui1t0i_J.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as g,g as u,r as m,c as v,o as _,a as s,b as x,D as d}from"./index-
|
|
|
1 |
+
import{d as g,g as u,r as m,c as v,o as _,a as s,b as x,D as d}from"./index-TGrV2Wj8.js";const b={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},k={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},w={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},V=g({__name:"filter-message",setup(z){const o=u(""),c=u(!1),i=u({content:""});async function f(r){return new Promise(e=>setTimeout(e,r))}async function p(){c.value=!0;const r=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let l="literal",t="";for(const a of r){await f(50);let n=l;a==="<"?n="special":a===">"&&(n="literal"),l==="literal"&&n==="special"&&(i.value.content+=t,t=""),l==="special"&&n==="literal"&&(t=""),l==="literal"&&n==="literal"&&(i.value.content+=a,t=""),l=n}t&&(i.value.content+=t),o.value="",c.value=!1}return(r,e)=>{const l=m("BasicTextarea");return _(),v("div",b,[s("div",S,[x(l,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",k,d(c.value?"Processing...":"Send"),1)]),s("div",w,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(i.value.content),1)])])}}});export{V as default};
|
assets/{fireworks-ai-BSOPI1Ia.js → fireworks-ai-CQedA_FH.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as k,i as w,bE as U,s as V,h as c,m as y,w as $,x as K,o as h,y as d,b as l,e as t}from"./index-TGrV2Wj8.js";import{u as x}from"./providers-By8PGLd2.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";import{a as P,b as R,c as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const a="fireworks-ai",D=k({__name:"fireworks-ai",setup(B){const{t:p}=w(),_=U(),v=x(),{providers:o}=V(v),n=c(()=>v.getProviderMetadata(a)),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});y(()=>{var e,s;v.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),$([i,r],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var m,f;return h(),K(t(S),{"provider-name":(m=n.value)==null?void 0:m.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:d(()=>[l(t(P),null,{default:d(()=>[l(t(R),{title:t(p)("settings.pages.providers.common.section.basic.title"),description:t(p)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:d(()=>{var u;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(p)("settings.pages.providers.common.section.advanced.title")},{default:d(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=u=>r.value=u),placeholder:"https://api.fireworks.ai/inference/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{D as default};
|
assets/{image-B29eoFqF.js → image-BcGESPTK.js}
RENAMED
@@ -1,2 +1,2 @@
|
|
1 |
-
import{d as _,g as c,bD as y,c as d,o as u,a,C as x,D as b,e as v,bn as w}from"./index-
|
2 |
`,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>v(g)())}," Copy Data URL ")])):x("",!0)]))}}),B=w(R,[["__scopeId","data-v-7edd53e6"]]);export{B as default};
|
|
|
1 |
+
import{d as _,g as c,bD as y,c as d,o as u,a,C as x,D as b,e as v,bn as w}from"./index-TGrV2Wj8.js";const C={bg:"neutral-100",flex:"~ col","items-center":"","justify-center":"","rounded-lg":"","px-4":"","py-3":""},h={key:0},D=["src"],U={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},R=_({__name:"image",setup(k){const p=c(),n=c(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,i;e(((i=(l=s.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=s=>{o(s)},t.readAsDataURL(r)})}async function f(r){var t;const o=(t=r.target.files)==null?void 0:t[0];if(o){p.value=o;const s=await m(o);n.value=s}}return(r,e)=>(u(),d("div",null,[a("label",C,[a("input",{type:"file",accept:"image/*",hidden:"",onChange:f},null,32),e[1]||(e[1]=a("span",null,"Upload Image",-1))]),n.value?(u(),d("div",h,[a("img",{src:n.value,alt:"Uploaded Image","w-100":""},null,8,D),a("pre",U," "+b(n.value)+`
|
2 |
`,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>v(g)())}," Copy Data URL ")])):x("",!0)]))}}),B=w(R,[["__scopeId","data-v-7edd53e6"]]);export{B as default};
|
assets/{index-CgbLDqR2.js → index-5hrBSqy_.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
var Ma=Object.defineProperty;var Sa=(t,e,n)=>e in t?Ma(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ri=(t,e,n)=>Sa(t,typeof e!="symbol"?e+"":e,n);import{E as Ia,V as Ra,a as Ca,c as Na,r as La,b as Pr,d as Pa,e as Ci,f as Oa,g as Da,h as Fa,s as za,i as Ba,j as Ua}from"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
2 |
`),e].join(`
|
3 |
|
4 |
`)}}var fu=async t=>{var e;return(t.fetch??globalThis.fetch)(Wl("chat/completions",t.baseURL),{body:Ql({...t,tools:(e=t.tools)==null?void 0:e.map(n=>({function:n.function,type:"function"}))}),headers:Xl({"Content-Type":"application/json",...t.headers},t.apiKey),method:"POST",signal:t.abortSignal}).then(Zl)},du=({finishReason:t,maxSteps:e,stepsLength:n,toolCallsLength:r})=>{if(n===0)return"initial";if(n<e){if(r>0&&t==="tool_calls")return"tool-result";if(!["error","length"].includes(t))return"continue"}return"done"},pu=t=>typeof t=="string"||Array.isArray(t)&&t.every(e=>!!(typeof e=="object"&&"type"in e&&["audio","image","text"].includes(e.type)))?t:JSON.stringify(t),hu=async({abortSignal:t,messages:e,toolCall:n,tools:r})=>{const i=r==null?void 0:r.find(a=>a.function.name===n.function.name);if(!i){const a=r==null?void 0:r.map(u=>u.function.name),l=a==null||a.length===0?"No tools are available.":`Available tools: ${a.join(", ")}.`;throw new Error(`Model tried to call unavailable tool '${n.function.name}. ${l}.`)}const o=JSON.parse(n.function.arguments),s=pu(await i.execute(o,{abortSignal:t,messages:e,toolCallId:n.id}));return{parsedArgs:o,result:s,toolName:n.function.name}},ar=class extends Error{constructor(e,n){super(e);Ri(this,"response");this.name="XSAIError",this.response=n}},ji="data:",mu=t=>{if(!t||!t.startsWith(ji))return[void 0,!1];const e=t.slice(ji.length),n=e.startsWith(" ")?e.slice(1):e;if(n==="[DONE]")return[void 0,!0];if(n.startsWith("{")&&n.includes('"error":'))throw new Error(`Error from server: ${n}`);return[JSON.parse(n),!1]},gu=async t=>{let e,n,r;const i=new ReadableStream({start(p){e=p}}),o=new ReadableStream({start(p){n=p}}),s=new ReadableStream({start(p){r=p}}),a=t.maxSteps??1,l=new TextDecoder,u=[],c=async p=>{var I,A,R;const d={choices:[],finishReason:"error",messages:structuredClone(p.messages),stepType:"initial",toolCalls:[],toolResults:[]},b={};let x="",v=!0;const T=(P,h)=>{if(P.endedToolCallIDs.has(h))return;const M=d.choices[P.index].message.tool_calls[h];try{M.function.parsed_arguments=JSON.parse(M.function.arguments)}catch(y){P.toolCallErrors[h]=y}P.endedToolCallIDs.add(h),P.currentToolID=null};if(await fu({...p,stream:!0}).then(async P=>P.body.pipeThrough(new TransformStream({transform:async(h,M)=>{const y=l.decode(h,{stream:!0});x+=y;const g=x.split(`
|
|
|
1 |
+
var Ma=Object.defineProperty;var Sa=(t,e,n)=>e in t?Ma(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ri=(t,e,n)=>Sa(t,typeof e!="symbol"?e+"":e,n);import{E as Ia,V as Ra,a as Ca,c as Na,r as La,b as Pr,d as Pa,e as Ci,f as Oa,g as Da,h as Fa,s as za,i as Ba,j as Ua}from"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{f as qn,g as X,h as Ue,i as Dt,t as ja,d as Fe,j as Va,k as Ha,l as ti,w as je,m as dn,c as ie,o as ee,p as gn,q as Ga,s as rt,v as pn,x as Xt,y as Be,b as Te,a as O,z as Ct,A as At,B as ni,C as it,D as he,e as H,M as gt,T as kt,E as ri,F as Yn,G as Jo,Z as Fn,H as Ft,I as $a,V as se,S as Ni,Q as zn,O as $t,J as Pe,P as _t,K as qa,L as es,N as hn,U as ii,W as ze,X as ts,Y as ns,_ as oi,$ as yn,a0 as Ya,a1 as si,a2 as Ka,a3 as rs,a4 as yt,a5 as ai,a6 as Et,a7 as Wa,a8 as is,a9 as Ot,aa as os,ab as Xa,ac as Qa,ad as Za,ae as Ja,af as ss,ag as Kn,ah as el,ai as tl,aj as nl,ak as Pt,al as rl,am as il,an as ol,ao as sl,ap as tr,aq as Bn,ar as Or,as as Nt,at as as,au as Dr,av as Ht,aw as Li,ax as Lt,ay as Gt,az as nr,aA as al,aB as ll,aC as ul,aD as cl,aE as ls,aF as us,aG as Un,aH as cs,aI as li,aJ as jn,aK as fs,aL as fl,n as Fr,aM as dl,aN as zr,aO as ds,aP as pl,aQ as un,aR as ps,aS as ct,aT as xt,aU as mn,aV as hl,aW as ml,aX as gl,aY as yl,aZ as xl,a_ as ui,a$ as vl,b0 as bl,b1 as wl,b2 as rr,b3 as Tl,b4 as hs,b5 as kl,b6 as Al,b7 as _l,b8 as El,b9 as Ml,ba as ir,bb as Sl,bc as Il,bd as Rl,be as Pi,bf as Oi,bg as Di,bh as Fi,bi as Cl,bj as Nl,bk as Ll,bl as Pl,bm as Ol,bn as Wn,bo as Dl,bp as ms,bq as Fl,br as zl,bs as Bl,bt as Ul,bu as gs,bv as Vn,bw as ys,bx as ci,by as fi,bz as jl,bA as or,bB as Vl,bC as Hl}from"./index-TGrV2Wj8.js";import{g as Gl}from"./index-CCfJDiQ1.js";import{u as sr}from"./queue-B_YcFivQ.js";import{u as $l,a as ql,b as Yl,l as Kl,_ as xs}from"./queues-BcuD6qtP.js";import{r as Wl,a as Xl,b as Ql,c as Zl,l as Jl,u as di}from"./providers-By8PGLd2.js";import{u as eu}from"./speech-C6ot8rjM.js";import{_ as tu,a as nu,r as rn}from"./Model.vue_vue_type_script_setup_true_lang-Djpk3Ms6.js";import{_ as pi}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";import{_ as zi}from"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import{H as ru}from"./HeaderLink-_N25PCvc.js";import{u as vs}from"./consciousness-B3PnyIdr.js";import{d as Bi}from"./index-BUfvD8m2.js";import{b as Ui}from"./route-block-B_A1xBdJ.js";async function*iu(t,e){const n=t.getReader();try{for(;;){const{done:r,value:i}=await n.read();if(r)return;yield e(i)}}finally{n.releaseLock()}}function ou(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let i=0;i<700;i+=80)n.push(e[i]);return e.map(i=>i**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/e.length/100}function su(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let u=0;u<700;u+=80)n.push(e[u]);const r=e.map(u=>u**1.5),i=Math.min(...r),s=Math.max(...r)-i;let a;return s===0?a=r.map(()=>0):a=r.map(u=>(u-i)/s),a.reduce((u,c)=>u+c,0)/e.length}function au(t,e="linear"){switch(e){case"linear":return ou(t);case"minmax":return su(t)}}const bs=qn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:au})),lu=qn("SpeakingStore",()=>{const n=X(0),r=X(!1),i=Ue(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function An(t,e,n){return e+n<0||e+n>=t.length-1?"":t[e+n]}function uu(t){let e="literal",n="";return{async consume(r){var i,o,s;for(let a=0;a<r.length;a++){let l=r[a],u=e;l==="<"&&An(r,a,1)==="|"?(l+=An(r,a,1),u="special",a++):l==="|"&&An(r,a,1)===">"?(l+=An(r,a,1),u="literal",a++):l==="<"?u="special":l===">"&&(u="literal"),e==="literal"&&u==="special"?n!==""&&(await((i=t.onLiteral)==null?void 0:i.call(t,n)),n=""):e==="special"&&u==="literal"&&n!==""&&(n+=l,await((o=t.onSpecial)==null?void 0:o.call(t,n)),n=""),e==="literal"&&u==="literal"?(await((s=t.onLiteral)==null?void 0:s.call(t,l)),n=""):e==="special"&&u==="literal"?n="":n+=l,e=u}},async end(){var r,i;n!==""&&(e==="literal"?await((r=t.onLiteral)==null?void 0:r.call(t,n)):n.endsWith("|>")&&await((i=t.onSpecial)==null?void 0:i.call(t,n)))}}}function cu(t,e){return{role:"system",content:[t,Ia.map(n=>`- ${n}`).join(`
|
2 |
`),e].join(`
|
3 |
|
4 |
`)}}var fu=async t=>{var e;return(t.fetch??globalThis.fetch)(Wl("chat/completions",t.baseURL),{body:Ql({...t,tools:(e=t.tools)==null?void 0:e.map(n=>({function:n.function,type:"function"}))}),headers:Xl({"Content-Type":"application/json",...t.headers},t.apiKey),method:"POST",signal:t.abortSignal}).then(Zl)},du=({finishReason:t,maxSteps:e,stepsLength:n,toolCallsLength:r})=>{if(n===0)return"initial";if(n<e){if(r>0&&t==="tool_calls")return"tool-result";if(!["error","length"].includes(t))return"continue"}return"done"},pu=t=>typeof t=="string"||Array.isArray(t)&&t.every(e=>!!(typeof e=="object"&&"type"in e&&["audio","image","text"].includes(e.type)))?t:JSON.stringify(t),hu=async({abortSignal:t,messages:e,toolCall:n,tools:r})=>{const i=r==null?void 0:r.find(a=>a.function.name===n.function.name);if(!i){const a=r==null?void 0:r.map(u=>u.function.name),l=a==null||a.length===0?"No tools are available.":`Available tools: ${a.join(", ")}.`;throw new Error(`Model tried to call unavailable tool '${n.function.name}. ${l}.`)}const o=JSON.parse(n.function.arguments),s=pu(await i.execute(o,{abortSignal:t,messages:e,toolCallId:n.id}));return{parsedArgs:o,result:s,toolName:n.function.name}},ar=class extends Error{constructor(e,n){super(e);Ri(this,"response");this.name="XSAIError",this.response=n}},ji="data:",mu=t=>{if(!t||!t.startsWith(ji))return[void 0,!1];const e=t.slice(ji.length),n=e.startsWith(" ")?e.slice(1):e;if(n==="[DONE]")return[void 0,!0];if(n.startsWith("{")&&n.includes('"error":'))throw new Error(`Error from server: ${n}`);return[JSON.parse(n),!1]},gu=async t=>{let e,n,r;const i=new ReadableStream({start(p){e=p}}),o=new ReadableStream({start(p){n=p}}),s=new ReadableStream({start(p){r=p}}),a=t.maxSteps??1,l=new TextDecoder,u=[],c=async p=>{var I,A,R;const d={choices:[],finishReason:"error",messages:structuredClone(p.messages),stepType:"initial",toolCalls:[],toolResults:[]},b={};let x="",v=!0;const T=(P,h)=>{if(P.endedToolCallIDs.has(h))return;const M=d.choices[P.index].message.tool_calls[h];try{M.function.parsed_arguments=JSON.parse(M.function.arguments)}catch(y){P.toolCallErrors[h]=y}P.endedToolCallIDs.add(h),P.currentToolID=null};if(await fu({...p,stream:!0}).then(async P=>P.body.pipeThrough(new TransformStream({transform:async(h,M)=>{const y=l.decode(h,{stream:!0});x+=y;const g=x.split(`
|
assets/{index-CnaoLkSu.css → index-6Z_G7V_d.css}
RENAMED
The diff for this file is too large to render.
See raw diff
|
|
assets/{index-Cr3TWF8U.js → index-BOuFXUkz.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as lt,a as ut}from"./Model.vue_vue_type_script_setup_true_lang-D0jvs_gR.js";import{d as ot,i as st,bF as ct,v as ht,s as dt,g as T,w as gt,bG as mt,c as V,o as D,b as R,e as w,y as P,a as h,C as ft,D as I,A as J,bH as bt,bx as H,by as A,n as _t,z as K,bI as vt,bE as pt,l as wt,bw as xt}from"./index-DdKO3wSp.js";import{_ as tt}from"./Collapsable.vue_vue_type_script_setup_true_lang-BwUs5KAP.js";import{k as et,l as kt,m as yt,n as Ct,J as Mt}from"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-DBRF19vp.js";import{b as it}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DIDtgUjA.js";class Lt{constructor(t,e){this.pixels=t,this.opts=e;const{sigBits:i}=e,o=(g,y,f)=>(g<<2*i)+(y<<i)+f;this.getColorIndex=o;const n=8-i,a=1<<3*i,s=new Uint32Array(a);let l,u,c,_,v,p,m,x,k,N;l=c=v=0,u=_=p=Number.MAX_VALUE;const b=t.length/4;let d=0;for(;d<b;){const g=d*4;if(d++,m=t[g+0],x=t[g+1],k=t[g+2],N=t[g+3],N===0)continue;m=m>>n,x=x>>n,k=k>>n;const y=o(m,x,k);s[y]===void 0&&(s[y]=0),s[y]+=1,m>l&&(l=m),m<u&&(u=m),x>c&&(c=x),x<_&&(_=x),k>v&&(v=k),k<p&&(p=k)}this._colorCount=s.reduce((g,y)=>y>0?g+1:g,0),this.hist=s,this.rmax=l,this.rmin=u,this.gmax=c,this.gmin=_,this.bmax=v,this.bmin=p}get colorCount(){return this._colorCount}}class zt{scaleDown(t){const e=this.getWidth(),i=this.getHeight();let o=1;if(t.maxDimension>0){const n=Math.max(e,i);n>t.maxDimension&&(o=t.maxDimension/n)}else o=1/t.quality;o<1&&this.resize(e*o,i*o,o)}}function Vt(r,t){var e;if(t.length>0){const i=r.data,o=i.length/4;let n,a,s,l,u;for(let c=0;c<o;c++){n=c*4,a=i[n+0],s=i[n+1],l=i[n+2],u=i[n+3];for(let _=0;_<t.length;_++)if(!((e=t[_])!=null&&e.call(t,a,s,l,u))){i[n+3]=0;break}}}return r}function Dt(r){const t=new URL(r,location.href);return t.protocol===location.protocol&&t.host===location.host&&t.port===location.port}function St(r,t){const e=new URL(r),i=new URL(t);return e.protocol===i.protocol&&e.hostname===i.hostname&&e.port===i.port}class Nt extends zt{_getCanvas(){if(!this._canvas)throw new Error("Canvas is not initialized");return this._canvas}_getContext(){if(!this._context)throw new Error("Context is not initialized");return this._context}_getWidth(){if(!this._width)throw new Error("Width is not initialized");return this._width}_getHeight(){if(!this._height)throw new Error("Height is not initialized");return this._height}_initCanvas(){const t=this.image;if(!t)throw new Error("Image is not initialized");const e=this._canvas=document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new ReferenceError("Failed to create canvas context");this._context=i,e.className="@vibrant/canvas",e.style.display="none",this._width=e.width=t.width,this._height=e.height=t.height,i.drawImage(t,0,0),document.body.appendChild(e)}load(t){let e,i;if(typeof t=="string")e=document.createElement("img"),i=t,!Dt(i)&&!St(window.location.href,i)&&(e.crossOrigin="anonymous"),e.src=i;else if(t instanceof HTMLImageElement)e=t,i=t.src;else return Promise.reject(new Error("Cannot load buffer as an image in browser"));return this.image=e,new Promise((o,n)=>{const a=()=>{this._initCanvas(),o(this)};e.complete?a():(e.onload=a,e.onerror=s=>n(new Error(`Fail to load image: ${i}`)))})}clear(){this._getContext().clearRect(0,0,this._getWidth(),this._getHeight())}update(t){this._getContext().putImageData(t,0,0)}getWidth(){return this._getWidth()}getHeight(){return this._getHeight()}resize(t,e,i){if(!this.image)throw new Error("Image is not initialized");this._width=this._getCanvas().width=t,this._height=this._getCanvas().height=e,this._getContext().scale(i,i),this._getContext().drawImage(this.image,0,0)}getPixelCount(){return this._getWidth()*this._getHeight()}getImageData(){return this._getContext().getImageData(0,0,this._getWidth(),this._getHeight())}remove(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)}}function $(r,...t){return t.forEach(e=>{if(e){for(const i in e)if(e.hasOwnProperty(i)){const o=e[i];Array.isArray(o)?r[i]=o.slice(0):typeof o=="object"?(r[i]||(r[i]={}),$(r[i],o)):r[i]=o}}}),r}function Et(r,t){const{colorCount:e,quantizer:i,generators:o,filters:n}=r,a={colorCount:e},s=typeof i=="string"?{name:i,options:{}}:i;return s.options=$({},a,s.options),$({},{quantizer:s,generators:o,filters:n},t)}class It{constructor(t,e={}){this._src=t,this._opts=$({},O.DefaultOpts,e)}maxColorCount(t){return this._opts.colorCount=t,this}maxDimension(t){return this._opts.maxDimension=t,this}addFilter(t){return this._opts.filters?this._opts.filters.push(t):this._opts.filters=[t],this}removeFilter(t){if(this._opts.filters){const e=this._opts.filters.indexOf(t);e>0&&this._opts.filters.splice(e)}return this}clearFilters(){return this._opts.filters=[],this}quality(t){return this._opts.quality=t,this}useImageClass(t){return this._opts.ImageClass=t,this}useGenerator(t,e){return this._opts.generators||(this._opts.generators=[]),this._opts.generators.push(e?{name:t,options:e}:t),this}useQuantizer(t,e){return this._opts.quantizer=e?{name:t,options:e}:t,this}build(){return new O(this._src,this._opts)}getPalette(){return this.build().getPalette()}}class B{constructor(t){this.pipeline=t,this._map={}}names(){return Object.keys(this._map)}has(t){return!!this._map[t]}get(t){return this._map[t]}register(t,e){return this._map[t]=e,this.pipeline}}class Ot{constructor(){this.filter=new B(this),this.quantizer=new B(this),this.generator=new B(this)}_buildProcessTasks({filters:t,quantizer:e,generators:i}){return i.length===1&&i[0]==="*"&&(i=this.generator.names()),{filters:t.map(n=>o(this.filter,n)),quantizer:o(this.quantizer,e),generators:i.map(n=>o(this.generator,n))};function o(n,a){let s,l;return typeof a=="string"?s=a:(s=a.name,l=a.options),{name:s,fn:n.get(s),options:l}}}async process(t,e){const{filters:i,quantizer:o,generators:n}=this._buildProcessTasks(e),a=await this._filterColors(i,t),s=await this._generateColors(o,a),l=await this._generatePalettes(n,s);return{colors:s,palettes:l}}_filterColors(t,e){return Promise.resolve(Vt(e,t.map(({fn:i})=>i)))}_generateColors(t,e){return Promise.resolve(t.fn(e.data,t.options))}async _generatePalettes(t,e){const i=await Promise.all(t.map(({fn:o,options:n})=>Promise.resolve(o(e,n))));return Promise.resolve(i.reduce((o,n,a)=>(o[t[a].name]=n,o),{}))}}function Ft(r,t,e){return"#"+((1<<24)+(r<<16)+(t<<8)+e).toString(16).slice(1,7)}function jt(r,t,e){r/=255,t/=255,e/=255;const i=Math.max(r,t,e),o=Math.min(r,t,e);let n=0,a=0;const s=(i+o)/2;if(i!==o){const l=i-o;switch(a=s>.5?l/(2-i-o):l/(i+o),i){case r:n=(t-e)/l+(t<e?6:0);break;case t:n=(e-r)/l+2;break;case e:n=(r-t)/l+4;break}n/=6}return[n,a,s]}function E(r,t,e){let i,o,n;function a(s,l,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?s+(l-s)*6*u:u<1/2?l:u<2/3?s+(l-s)*(2/3-u)*6:s}if(t===0)i=o=n=e;else{const s=e<.5?e*(1+t):e+t-e*t,l=2*e-s;i=a(l,s,r+1/3),o=a(l,s,r),n=a(l,s,r-1/3)}return[i*255,o*255,n*255]}class S{static applyFilters(t,e){return e.length>0?t.filter(({r:i,g:o,b:n})=>{var a;for(let s=0;s<e.length;s++)if(!((a=e[s])!=null&&a.call(e,i,o,n,255)))return!1;return!0}):t}static clone(t){return new S(t._rgb,t._population)}get r(){return this._rgb[0]}get g(){return this._rgb[1]}get b(){return this._rgb[2]}get rgb(){return this._rgb}get hsl(){if(!this._hsl){const[t,e,i]=this._rgb;this._hsl=jt(t,e,i)}return this._hsl}get hex(){if(!this._hex){const[t,e,i]=this._rgb;this._hex=Ft(t,e,i)}return this._hex}get population(){return this._population}toJSON(){return{rgb:this.rgb,population:this.population}}getYiq(){if(!this._yiq){const t=this._rgb;this._yiq=(t[0]*299+t[1]*587+t[2]*114)/1e3}return this._yiq}get titleTextColor(){return this._titleTextColor||(this._titleTextColor=this.getYiq()<200?"#fff":"#000"),this._titleTextColor}get bodyTextColor(){return this._bodyTextColor||(this._bodyTextColor=this.getYiq()<150?"#fff":"#000"),this._bodyTextColor}constructor(t,e){this._rgb=t,this._population=e}}const at=class G{constructor(t,e){this._src=t,this.opts=$({},G.DefaultOpts,e)}static use(t){this._pipeline=t}static from(t){return new It(t)}get result(){return this._result}_process(t,e){t.scaleDown(this.opts);const i=Et(this.opts,e);return G._pipeline.process(t.getImageData(),i)}async getPalette(){const t=new this.opts.ImageClass;try{const e=await t.load(this._src),i=await this._process(e,{generators:["default"]});this._result=i;const o=i.palettes.default;if(!o)throw new Error("Something went wrong and a palette was not found, please file a bug against our GitHub repo: https://github.com/vibrant-Colors/node-vibrant/");return t.remove(),o}catch(e){return t.remove(),Promise.reject(e)}}async getPalettes(){const t=new this.opts.ImageClass;try{const e=await t.load(this._src),i=await this._process(e,{generators:["*"]});this._result=i;const o=i.palettes;return t.remove(),o}catch(e){return t.remove(),Promise.reject(e)}}};at.DefaultOpts={colorCount:64,quality:5,filters:[]};let O=at;O.DefaultOpts.quantizer="mmcq";O.DefaultOpts.generators=["default"];O.DefaultOpts.filters=["default"];O.DefaultOpts.ImageClass=Nt;const Q=5,W=8-Q;class q{constructor(t,e,i,o,n,a,s){this.histogram=s,this._volume=-1,this._avg=null,this._count=-1,this.dimension={r1:t,r2:e,g1:i,g2:o,b1:n,b2:a}}static build(t){const e=new Lt(t,{sigBits:Q}),{rmin:i,rmax:o,gmin:n,gmax:a,bmin:s,bmax:l}=e;return new q(i,o,n,a,s,l,e)}invalidate(){this._volume=this._count=-1,this._avg=null}volume(){if(this._volume<0){const{r1:t,r2:e,g1:i,g2:o,b1:n,b2:a}=this.dimension;this._volume=(e-t+1)*(o-i+1)*(a-n+1)}return this._volume}count(){if(this._count<0){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:o,g1:n,g2:a,b1:s,b2:l}=this.dimension;let u=0;for(let c=i;c<=o;c++)for(let _=n;_<=a;_++)for(let v=s;v<=l;v++){const p=e(c,_,v);t[p]&&(u+=t[p])}this._count=u}return this._count}clone(){const{histogram:t}=this,{r1:e,r2:i,g1:o,g2:n,b1:a,b2:s}=this.dimension;return new q(e,i,o,n,a,s,t)}avg(){if(!this._avg){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:o,g1:n,g2:a,b1:s,b2:l}=this.dimension;let u=0;const c=1<<8-Q;let _,v,p;_=v=p=0;for(let m=i;m<=o;m++)for(let x=n;x<=a;x++)for(let k=s;k<=l;k++){const N=e(m,x,k),b=t[N];b&&(u+=b,_+=b*(m+.5)*c,v+=b*(x+.5)*c,p+=b*(k+.5)*c)}u?this._avg=[~~(_/u),~~(v/u),~~(p/u)]:this._avg=[~~(c*(i+o+1)/2),~~(c*(n+a+1)/2),~~(c*(s+l+1)/2)]}return this._avg}contains(t){let[e,i,o]=t;const{r1:n,r2:a,g1:s,g2:l,b1:u,b2:c}=this.dimension;return e>>=W,i>>=W,o>>=W,e>=n&&e<=a&&i>=s&&i<=l&&o>=u&&o<=c}split(){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:o,g1:n,g2:a,b1:s,b2:l}=this.dimension,u=this.count();if(!u)return[];if(u===1)return[this.clone()];const c=o-i+1,_=a-n+1,v=l-s+1,p=Math.max(c,_,v);let m=null,x,k;x=k=0;let N=null;if(p===c){N="r",m=new Uint32Array(o+1);for(let f=i;f<=o;f++){x=0;for(let C=n;C<=a;C++)for(let M=s;M<=l;M++){const z=e(f,C,M);t[z]&&(x+=t[z])}k+=x,m[f]=k}}else if(p===_){N="g",m=new Uint32Array(a+1);for(let f=n;f<=a;f++){x=0;for(let C=i;C<=o;C++)for(let M=s;M<=l;M++){const z=e(C,f,M);t[z]&&(x+=t[z])}k+=x,m[f]=k}}else{N="b",m=new Uint32Array(l+1);for(let f=s;f<=l;f++){x=0;for(let C=i;C<=o;C++)for(let M=n;M<=a;M++){const z=e(C,M,f);t[z]&&(x+=t[z])}k+=x,m[f]=k}}let b=-1;const d=new Uint32Array(m.length);for(let f=0;f<m.length;f++){const C=m[f];C&&(b<0&&C>k/2&&(b=f),d[f]=k-C)}const g=this;function y(f){const C=f+"1",M=f+"2",z=g.dimension[C];let L=g.dimension[M];const F=g.clone(),j=g.clone(),Y=b-z,Z=L-b;for(Y<=Z?(L=Math.min(L-1,~~(b+Z/2)),L=Math.max(0,L)):(L=Math.max(z,~~(b-1-Y/2)),L=Math.min(g.dimension[M],L));!m[L];)L++;let X=d[L];for(;!X&&m[L-1];)X=d[--L];return F.dimension[M]=L,j.dimension[C]=L+1,[F,j]}return y(N)}}class nt{_sort(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)}constructor(t){this._comparator=t,this.contents=[],this._sorted=!1}push(t){this.contents.push(t),this._sorted=!1}peek(t){return this._sort(),t=typeof t=="number"?t:this.contents.length-1,this.contents[t]}pop(){return this._sort(),this.contents.pop()}size(){return this.contents.length}map(t){return this._sort(),this.contents.map(t)}}const Ut=.75;function rt(r,t){let e=r.size();for(;r.size()<t;){const i=r.pop();if(i&&i.count()>0){const[o,n]=i.split();if(!o||(r.push(o),n&&n.count()>0&&r.push(n),r.size()===e))break;e=r.size()}else break}}const Pt=(r,t)=>{if(r.length===0||t.colorCount<2||t.colorCount>256)throw new Error("Wrong MMCQ parameters");const e=q.build(r);e.histogram.colorCount;const i=new nt((n,a)=>n.count()-a.count());i.push(e),rt(i,Ut*t.colorCount);const o=new nt((n,a)=>n.count()*n.volume()-a.count()*a.volume());return o.contents=i.contents,rt(o,t.colorCount-o.size()),Rt(o)};function Rt(r){const t=[];for(;r.size();){const e=r.pop(),i=e.avg();t.push(new S(i,e.count()))}return t}const $t={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};function Tt(r){let t=0;return r.forEach(e=>{t=Math.max(t,e.population)}),t}function Ht(r,t){return r.Vibrant===t||r.DarkVibrant===t||r.LightVibrant===t||r.Muted===t||r.DarkMuted===t||r.LightMuted===t}function qt(r,t,e,i,o,n,a){function s(...u){let c=0,_=0;for(let v=0;v<u.length;v+=2){const p=u[v],m=u[v+1];!p||!m||(c+=p*m,_+=m)}return c/_}function l(u,c){return 1-Math.abs(u-c)}return s(l(r,t),a.weightSaturation,l(e,i),a.weightLuma,o/n,a.weightPopulation)}function U(r,t,e,i,o,n,a,s,l,u){let c=null,_=0;return t.forEach(v=>{const[,p,m]=v.hsl;if(p>=s&&p<=l&&m>=o&&m<=n&&!Ht(r,v)){const x=qt(p,a,m,i,v.population,e,u);(c===null||x>_)&&(c=v,_=x)}}),c}function At(r,t,e){const i={Vibrant:null,DarkVibrant:null,LightVibrant:null,Muted:null,DarkMuted:null,LightMuted:null};return i.Vibrant=U(i,r,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.LightVibrant=U(i,r,t,e.targetLightLuma,e.minLightLuma,1,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.DarkVibrant=U(i,r,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.Muted=U(i,r,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.LightMuted=U(i,r,t,e.targetLightLuma,e.minLightLuma,1,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.DarkMuted=U(i,r,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i}function Bt(r,t,e){if(!r.Vibrant&&!r.DarkVibrant&&!r.LightVibrant){if(!r.DarkVibrant&&r.DarkMuted){let[i,o,n]=r.DarkMuted.hsl;n=e.targetDarkLuma,r.DarkVibrant=new S(E(i,o,n),0)}if(!r.LightVibrant&&r.LightMuted){let[i,o,n]=r.LightMuted.hsl;n=e.targetDarkLuma,r.DarkVibrant=new S(E(i,o,n),0)}}if(!r.Vibrant&&r.DarkVibrant){let[i,o,n]=r.DarkVibrant.hsl;n=e.targetNormalLuma,r.Vibrant=new S(E(i,o,n),0)}else if(!r.Vibrant&&r.LightVibrant){let[i,o,n]=r.LightVibrant.hsl;n=e.targetNormalLuma,r.Vibrant=new S(E(i,o,n),0)}if(!r.DarkVibrant&&r.Vibrant){let[i,o,n]=r.Vibrant.hsl;n=e.targetDarkLuma,r.DarkVibrant=new S(E(i,o,n),0)}if(!r.LightVibrant&&r.Vibrant){let[i,o,n]=r.Vibrant.hsl;n=e.targetLightLuma,r.LightVibrant=new S(E(i,o,n),0)}if(!r.Muted&&r.Vibrant){let[i,o,n]=r.Vibrant.hsl;n=e.targetMutesSaturation,r.Muted=new S(E(i,o,n),0)}if(!r.DarkMuted&&r.DarkVibrant){let[i,o,n]=r.DarkVibrant.hsl;n=e.targetMutesSaturation,r.DarkMuted=new S(E(i,o,n),0)}if(!r.LightMuted&&r.LightVibrant){let[i,o,n]=r.LightVibrant.hsl;n=e.targetMutesSaturation,r.LightMuted=new S(E(i,o,n),0)}}const Wt=(r,t)=>{t=Object.assign({},$t,t);const e=Tt(r),i=At(r,e,t);return Bt(i,e,t),i},Jt=new Ot().filter.register("default",(r,t,e,i)=>i>=125&&!(r>250&&t>250&&e>250)).quantizer.register("mmcq",Pt).generator.register("default",Wt);O.use(Jt);const Gt=["onClick"],Qt={flex:"~ row 1","items-center":"","gap-1.5":""},Yt={"p-4":""},Zt={class:"space-y-4"},Xt={class:"flex items-center justify-between"},Kt={class:"flex items-center gap-1 text-sm font-medium"},te=["disabled","placeholder"],ee=["disabled"],ie={class:"flex items-center justify-between"},ne={class:"flex items-center gap-1 text-sm font-medium"},re=["disabled"],oe={key:0,flex:"","gap-2":""},se=["onClick"],ae=["onClick"],le={"p-4":""},ue={key:0,class:"space-y-4"},ce={class:"flex items-center gap-1 text-sm font-medium"},he={flex:"","gap-2":""},de=["onUpdate:modelValue"],ge=["disabled","onClick"],me=["disabled"],fe=["href","download"],be=["disabled"],_e={key:1},ve=ot({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(r,{emit:t}){const e=t,{t:i}=st(),o=ct({accept:"application/zip"}),n=ht(),{live2dModelFile:a,live2dMotionMap:s,live2dLoadSource:l,loadingLive2dModel:u,availableLive2dMotions:c,live2dModelUrl:_,themeColorsHue:v}=dt(n),p=T(_.value);o.onChange(b=>{b&&b.length>0&&(s.value={},a.value=b[0],l.value="file",u.value=!0)}),gt(()=>n.loadingLive2dModel,b=>{b||l.value==="file"&&c.value.forEach(d=>{d.motionName in et?s.value[d.fileName]=d.motionName:s.value[d.fileName]=kt})});async function m(b,d){if(!Object.keys(d).length)return b;const y=await new Mt().loadAsync(b),f=Object.keys(y.files).find(F=>F.endsWith("model3.json"));if(!f)throw new Error("model3.json not found");const C=await y.file(f).async("string"),M=JSON.parse(C),z={};Object.entries(d).forEach(([F,j])=>{if(z[j]){z[j].push({File:F});return}z[j]=[{File:F}]}),M.FileReferences.Motions=z,y.file(f,JSON.stringify(M,null,2));const L=await y.generateAsync({type:"blob"});return new File([L],b.name,{type:b.type,lastModified:b.lastModified})}async function x(){const b=await yt.getItem("live2dModel");if(!b)return;const d=await m(b,s.value);a.value=d,l.value="file",u.value=!0}const k=mt(a);function N(b){var d;v.value=((d=Ct("oklch")(b))==null?void 0:d.h)??0}return(b,d)=>(D(),V("div",null,[R(w(tt),{"w-full":"",default:!0},{trigger:P(g=>[h("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:y=>g.setVisible(!g.visible)},[h("div",Qt,[d[4]||(d[4]=h("div",{"i-solar:magic-stick-3-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"},null,-1)),h("div",null,I(w(i)("settings.live2d.change-model.title")),1)]),h("div",{transform:"",transition:"transform duration-250",class:K({"rotate-180":g.visible})},d[5]||(d[5]=[h("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,Gt)]),default:P(()=>[h("div",Yt,[h("div",Zt,[h("div",Xt,[h("div",null,[h("div",Kt,I(w(i)("settings.live2d.change-model.from-url")),1)]),h("div",null,[J(h("input",{"onUpdate:modelValue":d[0]||(d[0]=g=>p.value=g),disabled:w(n).loadingLive2dModel,type:"text",rounded:"",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:w(i)("settings.live2d.change-model.from-url-placeholder")},null,8,te),[[bt,p.value]]),h("button",{disabled:w(n).loadingLive2dModel,bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","ml-2":"",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:d[1]||(d[1]=g=>_.value=p.value)},I(w(i)("settings.live2d.change-model.from-url-confirm")),9,ee)])]),h("div",ie,[h("div",null,[h("div",ne,I(w(i)("settings.live2d.change-model.from-file")),1)]),h("button",{disabled:w(n).loadingLive2dModel,rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:d[2]||(d[2]=g=>w(o).open())},I(w(i)("settings.live2d.change-model.from-file-select")),9,re)]),h("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700","w-full":"",transition:"all ease-in-out duration-250",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:d[3]||(d[3]=g=>e("extractColorsFromModel"))}," Extract colors from model "),r.palette?(D(),V("div",oe,[(D(!0),V(H,null,A(r.palette,g=>(D(),V("div",{key:g,class:"flex items-center gap-1",onClick:y=>N(g)},[h("div",{"size-6":"","rounded-full":"",style:_t({backgroundColor:g})},null,4)],8,se))),128))])):ft("",!0)])])]),_:1}),R(w(tt),{"mt-4":"","w-full":"",default:!0},{trigger:P(g=>[h("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:y=>g.setVisible(!g.visible)},[d[7]||(d[7]=h("div",{flex:"~ row 1","items-center":"","gap-1.5":""},[h("div",{"i-solar:face-scan-circle-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"}),h("div",null," Edit motion map ")],-1)),h("div",{transform:"",transition:"transform duration-250",class:K({"rotate-180":g.visible})},d[6]||(d[6]=[h("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,ae)]),default:P(()=>{var g;return[h("div",le,[w(n).live2dLoadSource==="file"?(D(),V("div",ue,[(D(!0),V(H,null,A(w(n).availableLive2dMotions,y=>(D(),V("div",{key:y.fileName,class:"flex items-center justify-between"},[h("div",ce,I(y.fileName),1),h("div",he,[J(h("select",{"onUpdate:modelValue":f=>w(n).live2dMotionMap[y.fileName]=f},[(D(!0),V(H,null,A(Object.keys(w(et)),f=>(D(),V("option",{key:f},I(f),1))),128))],8,de),[[vt,w(n).live2dMotionMap[y.fileName]]]),h("button",{disabled:w(n).loadingLive2dModel,rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:f=>w(n).live2dCurrentMotion={group:y.motionName,index:y.motionIndex}}," Play ",8,ge)])]))),128)),h("button",{disabled:w(n).loadingLive2dModel,"w-full":"",rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250",onClick:x}," Save and patch ",8,me),h("a",{"mt-2":"",block:"",href:w(k),download:`${(g=w(n).live2dModelFile)==null?void 0:g.name}-motion-edited.zip`},[h("button",{disabled:w(n).loadingLive2dModel,"w-full":"",rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250"}," Export ",8,be)],8,fe)])):(D(),V("div",_e," Not available for URL model "))])]}),_:1})]))}}),pe={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},we={relative:""},xe={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},ke={text:"neutral-300 dark:neutral-500","text-nowrap":""},ye={"text-nowrap":"","text-3xl":"","font-semibold":""},Ce={flex:""},Me=ot({__name:"index",setup(r){const{t}=st(),e=pt(),i=T(),o=T(),{width:n,height:a}=wt(i),s=T([]);async function l(){if(!o.value)return;const u=await o.value.captureFrame();if(!u){console.error("No frame captured");return}const c=URL.createObjectURL(u),v=await new O(c).getPalette();s.value=Object.values(v).map(p=>p==null?void 0:p.hex).filter(p=>typeof p=="string"),URL.revokeObjectURL(c)}return(u,c)=>{const _=xt("motion");return D(),V(H,null,[J((D(),V("div",pe,[h("button",{onClick:c[0]||(c[0]=v=>w(e).back())},c[1]||(c[1]=[h("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),h("h1",we,[h("div",xe,[h("span",ke,I(w(t)("settings.title")),1)]),h("div",ye,I(w(t)("settings.pages.models.title")),1)])])),[[_]]),h("div",Ce,[h("div",{ref_key:"live2dContainerRef",ref:i,w:"50%",h:"80vh"},[R(ut,{ref_key:"live2dCanvasRef",ref:o,width:w(n),height:w(a)},{default:P(({app:v})=>[R(lt,{app:v,"mouth-open-size":0,width:w(n),height:w(a),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),R(ve,{w:"50%",h:"80vh",palette:s.value,onExtractColorsFromModel:l},null,8,["palette"])]),c[2]||(c[2]=h("div",{text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[h("div",{text:"40","i-lucide:person-standing":""})],-1))],64)}}});typeof it=="function"&&it(Me);export{Me as default};
|
|
|
1 |
+
import{_ as lt,a as ut}from"./Model.vue_vue_type_script_setup_true_lang-Djpk3Ms6.js";import{d as ot,i as st,bF as ct,v as ht,s as dt,g as T,w as gt,bG as mt,c as V,o as D,b as R,e as w,y as P,a as h,C as ft,D as I,A as J,bH as bt,bx as H,by as A,n as _t,z as K,bI as vt,bE as pt,l as wt,bw as xt}from"./index-TGrV2Wj8.js";import{_ as tt}from"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import{k as et,l as kt,m as yt,n as Ct,J as Mt}from"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{b as it}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";class Lt{constructor(t,e){this.pixels=t,this.opts=e;const{sigBits:i}=e,o=(g,y,f)=>(g<<2*i)+(y<<i)+f;this.getColorIndex=o;const n=8-i,a=1<<3*i,s=new Uint32Array(a);let l,u,c,_,v,p,m,x,k,N;l=c=v=0,u=_=p=Number.MAX_VALUE;const b=t.length/4;let d=0;for(;d<b;){const g=d*4;if(d++,m=t[g+0],x=t[g+1],k=t[g+2],N=t[g+3],N===0)continue;m=m>>n,x=x>>n,k=k>>n;const y=o(m,x,k);s[y]===void 0&&(s[y]=0),s[y]+=1,m>l&&(l=m),m<u&&(u=m),x>c&&(c=x),x<_&&(_=x),k>v&&(v=k),k<p&&(p=k)}this._colorCount=s.reduce((g,y)=>y>0?g+1:g,0),this.hist=s,this.rmax=l,this.rmin=u,this.gmax=c,this.gmin=_,this.bmax=v,this.bmin=p}get colorCount(){return this._colorCount}}class zt{scaleDown(t){const e=this.getWidth(),i=this.getHeight();let o=1;if(t.maxDimension>0){const n=Math.max(e,i);n>t.maxDimension&&(o=t.maxDimension/n)}else o=1/t.quality;o<1&&this.resize(e*o,i*o,o)}}function Vt(r,t){var e;if(t.length>0){const i=r.data,o=i.length/4;let n,a,s,l,u;for(let c=0;c<o;c++){n=c*4,a=i[n+0],s=i[n+1],l=i[n+2],u=i[n+3];for(let _=0;_<t.length;_++)if(!((e=t[_])!=null&&e.call(t,a,s,l,u))){i[n+3]=0;break}}}return r}function Dt(r){const t=new URL(r,location.href);return t.protocol===location.protocol&&t.host===location.host&&t.port===location.port}function St(r,t){const e=new URL(r),i=new URL(t);return e.protocol===i.protocol&&e.hostname===i.hostname&&e.port===i.port}class Nt extends zt{_getCanvas(){if(!this._canvas)throw new Error("Canvas is not initialized");return this._canvas}_getContext(){if(!this._context)throw new Error("Context is not initialized");return this._context}_getWidth(){if(!this._width)throw new Error("Width is not initialized");return this._width}_getHeight(){if(!this._height)throw new Error("Height is not initialized");return this._height}_initCanvas(){const t=this.image;if(!t)throw new Error("Image is not initialized");const e=this._canvas=document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new ReferenceError("Failed to create canvas context");this._context=i,e.className="@vibrant/canvas",e.style.display="none",this._width=e.width=t.width,this._height=e.height=t.height,i.drawImage(t,0,0),document.body.appendChild(e)}load(t){let e,i;if(typeof t=="string")e=document.createElement("img"),i=t,!Dt(i)&&!St(window.location.href,i)&&(e.crossOrigin="anonymous"),e.src=i;else if(t instanceof HTMLImageElement)e=t,i=t.src;else return Promise.reject(new Error("Cannot load buffer as an image in browser"));return this.image=e,new Promise((o,n)=>{const a=()=>{this._initCanvas(),o(this)};e.complete?a():(e.onload=a,e.onerror=s=>n(new Error(`Fail to load image: ${i}`)))})}clear(){this._getContext().clearRect(0,0,this._getWidth(),this._getHeight())}update(t){this._getContext().putImageData(t,0,0)}getWidth(){return this._getWidth()}getHeight(){return this._getHeight()}resize(t,e,i){if(!this.image)throw new Error("Image is not initialized");this._width=this._getCanvas().width=t,this._height=this._getCanvas().height=e,this._getContext().scale(i,i),this._getContext().drawImage(this.image,0,0)}getPixelCount(){return this._getWidth()*this._getHeight()}getImageData(){return this._getContext().getImageData(0,0,this._getWidth(),this._getHeight())}remove(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)}}function $(r,...t){return t.forEach(e=>{if(e){for(const i in e)if(e.hasOwnProperty(i)){const o=e[i];Array.isArray(o)?r[i]=o.slice(0):typeof o=="object"?(r[i]||(r[i]={}),$(r[i],o)):r[i]=o}}}),r}function Et(r,t){const{colorCount:e,quantizer:i,generators:o,filters:n}=r,a={colorCount:e},s=typeof i=="string"?{name:i,options:{}}:i;return s.options=$({},a,s.options),$({},{quantizer:s,generators:o,filters:n},t)}class It{constructor(t,e={}){this._src=t,this._opts=$({},O.DefaultOpts,e)}maxColorCount(t){return this._opts.colorCount=t,this}maxDimension(t){return this._opts.maxDimension=t,this}addFilter(t){return this._opts.filters?this._opts.filters.push(t):this._opts.filters=[t],this}removeFilter(t){if(this._opts.filters){const e=this._opts.filters.indexOf(t);e>0&&this._opts.filters.splice(e)}return this}clearFilters(){return this._opts.filters=[],this}quality(t){return this._opts.quality=t,this}useImageClass(t){return this._opts.ImageClass=t,this}useGenerator(t,e){return this._opts.generators||(this._opts.generators=[]),this._opts.generators.push(e?{name:t,options:e}:t),this}useQuantizer(t,e){return this._opts.quantizer=e?{name:t,options:e}:t,this}build(){return new O(this._src,this._opts)}getPalette(){return this.build().getPalette()}}class B{constructor(t){this.pipeline=t,this._map={}}names(){return Object.keys(this._map)}has(t){return!!this._map[t]}get(t){return this._map[t]}register(t,e){return this._map[t]=e,this.pipeline}}class Ot{constructor(){this.filter=new B(this),this.quantizer=new B(this),this.generator=new B(this)}_buildProcessTasks({filters:t,quantizer:e,generators:i}){return i.length===1&&i[0]==="*"&&(i=this.generator.names()),{filters:t.map(n=>o(this.filter,n)),quantizer:o(this.quantizer,e),generators:i.map(n=>o(this.generator,n))};function o(n,a){let s,l;return typeof a=="string"?s=a:(s=a.name,l=a.options),{name:s,fn:n.get(s),options:l}}}async process(t,e){const{filters:i,quantizer:o,generators:n}=this._buildProcessTasks(e),a=await this._filterColors(i,t),s=await this._generateColors(o,a),l=await this._generatePalettes(n,s);return{colors:s,palettes:l}}_filterColors(t,e){return Promise.resolve(Vt(e,t.map(({fn:i})=>i)))}_generateColors(t,e){return Promise.resolve(t.fn(e.data,t.options))}async _generatePalettes(t,e){const i=await Promise.all(t.map(({fn:o,options:n})=>Promise.resolve(o(e,n))));return Promise.resolve(i.reduce((o,n,a)=>(o[t[a].name]=n,o),{}))}}function Ft(r,t,e){return"#"+((1<<24)+(r<<16)+(t<<8)+e).toString(16).slice(1,7)}function jt(r,t,e){r/=255,t/=255,e/=255;const i=Math.max(r,t,e),o=Math.min(r,t,e);let n=0,a=0;const s=(i+o)/2;if(i!==o){const l=i-o;switch(a=s>.5?l/(2-i-o):l/(i+o),i){case r:n=(t-e)/l+(t<e?6:0);break;case t:n=(e-r)/l+2;break;case e:n=(r-t)/l+4;break}n/=6}return[n,a,s]}function E(r,t,e){let i,o,n;function a(s,l,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?s+(l-s)*6*u:u<1/2?l:u<2/3?s+(l-s)*(2/3-u)*6:s}if(t===0)i=o=n=e;else{const s=e<.5?e*(1+t):e+t-e*t,l=2*e-s;i=a(l,s,r+1/3),o=a(l,s,r),n=a(l,s,r-1/3)}return[i*255,o*255,n*255]}class S{static applyFilters(t,e){return e.length>0?t.filter(({r:i,g:o,b:n})=>{var a;for(let s=0;s<e.length;s++)if(!((a=e[s])!=null&&a.call(e,i,o,n,255)))return!1;return!0}):t}static clone(t){return new S(t._rgb,t._population)}get r(){return this._rgb[0]}get g(){return this._rgb[1]}get b(){return this._rgb[2]}get rgb(){return this._rgb}get hsl(){if(!this._hsl){const[t,e,i]=this._rgb;this._hsl=jt(t,e,i)}return this._hsl}get hex(){if(!this._hex){const[t,e,i]=this._rgb;this._hex=Ft(t,e,i)}return this._hex}get population(){return this._population}toJSON(){return{rgb:this.rgb,population:this.population}}getYiq(){if(!this._yiq){const t=this._rgb;this._yiq=(t[0]*299+t[1]*587+t[2]*114)/1e3}return this._yiq}get titleTextColor(){return this._titleTextColor||(this._titleTextColor=this.getYiq()<200?"#fff":"#000"),this._titleTextColor}get bodyTextColor(){return this._bodyTextColor||(this._bodyTextColor=this.getYiq()<150?"#fff":"#000"),this._bodyTextColor}constructor(t,e){this._rgb=t,this._population=e}}const at=class G{constructor(t,e){this._src=t,this.opts=$({},G.DefaultOpts,e)}static use(t){this._pipeline=t}static from(t){return new It(t)}get result(){return this._result}_process(t,e){t.scaleDown(this.opts);const i=Et(this.opts,e);return G._pipeline.process(t.getImageData(),i)}async getPalette(){const t=new this.opts.ImageClass;try{const e=await t.load(this._src),i=await this._process(e,{generators:["default"]});this._result=i;const o=i.palettes.default;if(!o)throw new Error("Something went wrong and a palette was not found, please file a bug against our GitHub repo: https://github.com/vibrant-Colors/node-vibrant/");return t.remove(),o}catch(e){return t.remove(),Promise.reject(e)}}async getPalettes(){const t=new this.opts.ImageClass;try{const e=await t.load(this._src),i=await this._process(e,{generators:["*"]});this._result=i;const o=i.palettes;return t.remove(),o}catch(e){return t.remove(),Promise.reject(e)}}};at.DefaultOpts={colorCount:64,quality:5,filters:[]};let O=at;O.DefaultOpts.quantizer="mmcq";O.DefaultOpts.generators=["default"];O.DefaultOpts.filters=["default"];O.DefaultOpts.ImageClass=Nt;const Q=5,W=8-Q;class q{constructor(t,e,i,o,n,a,s){this.histogram=s,this._volume=-1,this._avg=null,this._count=-1,this.dimension={r1:t,r2:e,g1:i,g2:o,b1:n,b2:a}}static build(t){const e=new Lt(t,{sigBits:Q}),{rmin:i,rmax:o,gmin:n,gmax:a,bmin:s,bmax:l}=e;return new q(i,o,n,a,s,l,e)}invalidate(){this._volume=this._count=-1,this._avg=null}volume(){if(this._volume<0){const{r1:t,r2:e,g1:i,g2:o,b1:n,b2:a}=this.dimension;this._volume=(e-t+1)*(o-i+1)*(a-n+1)}return this._volume}count(){if(this._count<0){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:o,g1:n,g2:a,b1:s,b2:l}=this.dimension;let u=0;for(let c=i;c<=o;c++)for(let _=n;_<=a;_++)for(let v=s;v<=l;v++){const p=e(c,_,v);t[p]&&(u+=t[p])}this._count=u}return this._count}clone(){const{histogram:t}=this,{r1:e,r2:i,g1:o,g2:n,b1:a,b2:s}=this.dimension;return new q(e,i,o,n,a,s,t)}avg(){if(!this._avg){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:o,g1:n,g2:a,b1:s,b2:l}=this.dimension;let u=0;const c=1<<8-Q;let _,v,p;_=v=p=0;for(let m=i;m<=o;m++)for(let x=n;x<=a;x++)for(let k=s;k<=l;k++){const N=e(m,x,k),b=t[N];b&&(u+=b,_+=b*(m+.5)*c,v+=b*(x+.5)*c,p+=b*(k+.5)*c)}u?this._avg=[~~(_/u),~~(v/u),~~(p/u)]:this._avg=[~~(c*(i+o+1)/2),~~(c*(n+a+1)/2),~~(c*(s+l+1)/2)]}return this._avg}contains(t){let[e,i,o]=t;const{r1:n,r2:a,g1:s,g2:l,b1:u,b2:c}=this.dimension;return e>>=W,i>>=W,o>>=W,e>=n&&e<=a&&i>=s&&i<=l&&o>=u&&o<=c}split(){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:o,g1:n,g2:a,b1:s,b2:l}=this.dimension,u=this.count();if(!u)return[];if(u===1)return[this.clone()];const c=o-i+1,_=a-n+1,v=l-s+1,p=Math.max(c,_,v);let m=null,x,k;x=k=0;let N=null;if(p===c){N="r",m=new Uint32Array(o+1);for(let f=i;f<=o;f++){x=0;for(let C=n;C<=a;C++)for(let M=s;M<=l;M++){const z=e(f,C,M);t[z]&&(x+=t[z])}k+=x,m[f]=k}}else if(p===_){N="g",m=new Uint32Array(a+1);for(let f=n;f<=a;f++){x=0;for(let C=i;C<=o;C++)for(let M=s;M<=l;M++){const z=e(C,f,M);t[z]&&(x+=t[z])}k+=x,m[f]=k}}else{N="b",m=new Uint32Array(l+1);for(let f=s;f<=l;f++){x=0;for(let C=i;C<=o;C++)for(let M=n;M<=a;M++){const z=e(C,M,f);t[z]&&(x+=t[z])}k+=x,m[f]=k}}let b=-1;const d=new Uint32Array(m.length);for(let f=0;f<m.length;f++){const C=m[f];C&&(b<0&&C>k/2&&(b=f),d[f]=k-C)}const g=this;function y(f){const C=f+"1",M=f+"2",z=g.dimension[C];let L=g.dimension[M];const F=g.clone(),j=g.clone(),Y=b-z,Z=L-b;for(Y<=Z?(L=Math.min(L-1,~~(b+Z/2)),L=Math.max(0,L)):(L=Math.max(z,~~(b-1-Y/2)),L=Math.min(g.dimension[M],L));!m[L];)L++;let X=d[L];for(;!X&&m[L-1];)X=d[--L];return F.dimension[M]=L,j.dimension[C]=L+1,[F,j]}return y(N)}}class nt{_sort(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)}constructor(t){this._comparator=t,this.contents=[],this._sorted=!1}push(t){this.contents.push(t),this._sorted=!1}peek(t){return this._sort(),t=typeof t=="number"?t:this.contents.length-1,this.contents[t]}pop(){return this._sort(),this.contents.pop()}size(){return this.contents.length}map(t){return this._sort(),this.contents.map(t)}}const Ut=.75;function rt(r,t){let e=r.size();for(;r.size()<t;){const i=r.pop();if(i&&i.count()>0){const[o,n]=i.split();if(!o||(r.push(o),n&&n.count()>0&&r.push(n),r.size()===e))break;e=r.size()}else break}}const Pt=(r,t)=>{if(r.length===0||t.colorCount<2||t.colorCount>256)throw new Error("Wrong MMCQ parameters");const e=q.build(r);e.histogram.colorCount;const i=new nt((n,a)=>n.count()-a.count());i.push(e),rt(i,Ut*t.colorCount);const o=new nt((n,a)=>n.count()*n.volume()-a.count()*a.volume());return o.contents=i.contents,rt(o,t.colorCount-o.size()),Rt(o)};function Rt(r){const t=[];for(;r.size();){const e=r.pop(),i=e.avg();t.push(new S(i,e.count()))}return t}const $t={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};function Tt(r){let t=0;return r.forEach(e=>{t=Math.max(t,e.population)}),t}function Ht(r,t){return r.Vibrant===t||r.DarkVibrant===t||r.LightVibrant===t||r.Muted===t||r.DarkMuted===t||r.LightMuted===t}function qt(r,t,e,i,o,n,a){function s(...u){let c=0,_=0;for(let v=0;v<u.length;v+=2){const p=u[v],m=u[v+1];!p||!m||(c+=p*m,_+=m)}return c/_}function l(u,c){return 1-Math.abs(u-c)}return s(l(r,t),a.weightSaturation,l(e,i),a.weightLuma,o/n,a.weightPopulation)}function U(r,t,e,i,o,n,a,s,l,u){let c=null,_=0;return t.forEach(v=>{const[,p,m]=v.hsl;if(p>=s&&p<=l&&m>=o&&m<=n&&!Ht(r,v)){const x=qt(p,a,m,i,v.population,e,u);(c===null||x>_)&&(c=v,_=x)}}),c}function At(r,t,e){const i={Vibrant:null,DarkVibrant:null,LightVibrant:null,Muted:null,DarkMuted:null,LightMuted:null};return i.Vibrant=U(i,r,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.LightVibrant=U(i,r,t,e.targetLightLuma,e.minLightLuma,1,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.DarkVibrant=U(i,r,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.Muted=U(i,r,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.LightMuted=U(i,r,t,e.targetLightLuma,e.minLightLuma,1,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.DarkMuted=U(i,r,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i}function Bt(r,t,e){if(!r.Vibrant&&!r.DarkVibrant&&!r.LightVibrant){if(!r.DarkVibrant&&r.DarkMuted){let[i,o,n]=r.DarkMuted.hsl;n=e.targetDarkLuma,r.DarkVibrant=new S(E(i,o,n),0)}if(!r.LightVibrant&&r.LightMuted){let[i,o,n]=r.LightMuted.hsl;n=e.targetDarkLuma,r.DarkVibrant=new S(E(i,o,n),0)}}if(!r.Vibrant&&r.DarkVibrant){let[i,o,n]=r.DarkVibrant.hsl;n=e.targetNormalLuma,r.Vibrant=new S(E(i,o,n),0)}else if(!r.Vibrant&&r.LightVibrant){let[i,o,n]=r.LightVibrant.hsl;n=e.targetNormalLuma,r.Vibrant=new S(E(i,o,n),0)}if(!r.DarkVibrant&&r.Vibrant){let[i,o,n]=r.Vibrant.hsl;n=e.targetDarkLuma,r.DarkVibrant=new S(E(i,o,n),0)}if(!r.LightVibrant&&r.Vibrant){let[i,o,n]=r.Vibrant.hsl;n=e.targetLightLuma,r.LightVibrant=new S(E(i,o,n),0)}if(!r.Muted&&r.Vibrant){let[i,o,n]=r.Vibrant.hsl;n=e.targetMutesSaturation,r.Muted=new S(E(i,o,n),0)}if(!r.DarkMuted&&r.DarkVibrant){let[i,o,n]=r.DarkVibrant.hsl;n=e.targetMutesSaturation,r.DarkMuted=new S(E(i,o,n),0)}if(!r.LightMuted&&r.LightVibrant){let[i,o,n]=r.LightVibrant.hsl;n=e.targetMutesSaturation,r.LightMuted=new S(E(i,o,n),0)}}const Wt=(r,t)=>{t=Object.assign({},$t,t);const e=Tt(r),i=At(r,e,t);return Bt(i,e,t),i},Jt=new Ot().filter.register("default",(r,t,e,i)=>i>=125&&!(r>250&&t>250&&e>250)).quantizer.register("mmcq",Pt).generator.register("default",Wt);O.use(Jt);const Gt=["onClick"],Qt={flex:"~ row 1","items-center":"","gap-1.5":""},Yt={"p-4":""},Zt={class:"space-y-4"},Xt={class:"flex items-center justify-between"},Kt={class:"flex items-center gap-1 text-sm font-medium"},te=["disabled","placeholder"],ee=["disabled"],ie={class:"flex items-center justify-between"},ne={class:"flex items-center gap-1 text-sm font-medium"},re=["disabled"],oe={key:0,flex:"","gap-2":""},se=["onClick"],ae=["onClick"],le={"p-4":""},ue={key:0,class:"space-y-4"},ce={class:"flex items-center gap-1 text-sm font-medium"},he={flex:"","gap-2":""},de=["onUpdate:modelValue"],ge=["disabled","onClick"],me=["disabled"],fe=["href","download"],be=["disabled"],_e={key:1},ve=ot({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(r,{emit:t}){const e=t,{t:i}=st(),o=ct({accept:"application/zip"}),n=ht(),{live2dModelFile:a,live2dMotionMap:s,live2dLoadSource:l,loadingLive2dModel:u,availableLive2dMotions:c,live2dModelUrl:_,themeColorsHue:v}=dt(n),p=T(_.value);o.onChange(b=>{b&&b.length>0&&(s.value={},a.value=b[0],l.value="file",u.value=!0)}),gt(()=>n.loadingLive2dModel,b=>{b||l.value==="file"&&c.value.forEach(d=>{d.motionName in et?s.value[d.fileName]=d.motionName:s.value[d.fileName]=kt})});async function m(b,d){if(!Object.keys(d).length)return b;const y=await new Mt().loadAsync(b),f=Object.keys(y.files).find(F=>F.endsWith("model3.json"));if(!f)throw new Error("model3.json not found");const C=await y.file(f).async("string"),M=JSON.parse(C),z={};Object.entries(d).forEach(([F,j])=>{if(z[j]){z[j].push({File:F});return}z[j]=[{File:F}]}),M.FileReferences.Motions=z,y.file(f,JSON.stringify(M,null,2));const L=await y.generateAsync({type:"blob"});return new File([L],b.name,{type:b.type,lastModified:b.lastModified})}async function x(){const b=await yt.getItem("live2dModel");if(!b)return;const d=await m(b,s.value);a.value=d,l.value="file",u.value=!0}const k=mt(a);function N(b){var d;v.value=((d=Ct("oklch")(b))==null?void 0:d.h)??0}return(b,d)=>(D(),V("div",null,[R(w(tt),{"w-full":"",default:!0},{trigger:P(g=>[h("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:y=>g.setVisible(!g.visible)},[h("div",Qt,[d[4]||(d[4]=h("div",{"i-solar:magic-stick-3-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"},null,-1)),h("div",null,I(w(i)("settings.live2d.change-model.title")),1)]),h("div",{transform:"",transition:"transform duration-250",class:K({"rotate-180":g.visible})},d[5]||(d[5]=[h("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,Gt)]),default:P(()=>[h("div",Yt,[h("div",Zt,[h("div",Xt,[h("div",null,[h("div",Kt,I(w(i)("settings.live2d.change-model.from-url")),1)]),h("div",null,[J(h("input",{"onUpdate:modelValue":d[0]||(d[0]=g=>p.value=g),disabled:w(n).loadingLive2dModel,type:"text",rounded:"",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out","px-2":"","py-1":"","text-sm":"","outline-none":"",placeholder:w(i)("settings.live2d.change-model.from-url-placeholder")},null,8,te),[[bt,p.value]]),h("button",{disabled:w(n).loadingLive2dModel,bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","ml-2":"",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:d[1]||(d[1]=g=>_.value=p.value)},I(w(i)("settings.live2d.change-model.from-url-confirm")),9,ee)])]),h("div",ie,[h("div",null,[h("div",ne,I(w(i)("settings.live2d.change-model.from-file")),1)]),h("button",{disabled:w(n).loadingLive2dModel,rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:d[2]||(d[2]=g=>w(o).open())},I(w(i)("settings.live2d.change-model.from-file-select")),9,re)]),h("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700","w-full":"",transition:"all ease-in-out duration-250",rounded:"","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:d[3]||(d[3]=g=>e("extractColorsFromModel"))}," Extract colors from model "),r.palette?(D(),V("div",oe,[(D(!0),V(H,null,A(r.palette,g=>(D(),V("div",{key:g,class:"flex items-center gap-1",onClick:y=>N(g)},[h("div",{"size-6":"","rounded-full":"",style:_t({backgroundColor:g})},null,4)],8,se))),128))])):ft("",!0)])])]),_:1}),R(w(tt),{"mt-4":"","w-full":"",default:!0},{trigger:P(g=>[h("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:y=>g.setVisible(!g.visible)},[d[7]||(d[7]=h("div",{flex:"~ row 1","items-center":"","gap-1.5":""},[h("div",{"i-solar:face-scan-circle-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"}),h("div",null," Edit motion map ")],-1)),h("div",{transform:"",transition:"transform duration-250",class:K({"rotate-180":g.visible})},d[6]||(d[6]=[h("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,ae)]),default:P(()=>{var g;return[h("div",le,[w(n).live2dLoadSource==="file"?(D(),V("div",ue,[(D(!0),V(H,null,A(w(n).availableLive2dMotions,y=>(D(),V("div",{key:y.fileName,class:"flex items-center justify-between"},[h("div",ce,I(y.fileName),1),h("div",he,[J(h("select",{"onUpdate:modelValue":f=>w(n).live2dMotionMap[y.fileName]=f},[(D(!0),V(H,null,A(Object.keys(w(et)),f=>(D(),V("option",{key:f},I(f),1))),128))],8,de),[[vt,w(n).live2dMotionMap[y.fileName]]]),h("button",{disabled:w(n).loadingLive2dModel,rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","px-2":"","py-1":"","text-sm":"","outline-none":"",onClick:f=>w(n).live2dCurrentMotion={group:y.motionName,index:y.motionIndex}}," Play ",8,ge)])]))),128)),h("button",{disabled:w(n).loadingLive2dModel,"w-full":"",rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250",onClick:x}," Save and patch ",8,me),h("a",{"mt-2":"",block:"",href:w(k),download:`${(g=w(n).live2dModelFile)==null?void 0:g.name}-motion-edited.zip`},[h("button",{disabled:w(n).loadingLive2dModel,"w-full":"",rounded:"",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250"}," Export ",8,be)],8,fe)])):(D(),V("div",_e," Not available for URL model "))])]}),_:1})]))}}),pe={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},we={relative:""},xe={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},ke={text:"neutral-300 dark:neutral-500","text-nowrap":""},ye={"text-nowrap":"","text-3xl":"","font-semibold":""},Ce={flex:""},Me=ot({__name:"index",setup(r){const{t}=st(),e=pt(),i=T(),o=T(),{width:n,height:a}=wt(i),s=T([]);async function l(){if(!o.value)return;const u=await o.value.captureFrame();if(!u){console.error("No frame captured");return}const c=URL.createObjectURL(u),v=await new O(c).getPalette();s.value=Object.values(v).map(p=>p==null?void 0:p.hex).filter(p=>typeof p=="string"),URL.revokeObjectURL(c)}return(u,c)=>{const _=xt("motion");return D(),V(H,null,[J((D(),V("div",pe,[h("button",{onClick:c[0]||(c[0]=v=>w(e).back())},c[1]||(c[1]=[h("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),h("h1",we,[h("div",xe,[h("span",ke,I(w(t)("settings.title")),1)]),h("div",ye,I(w(t)("settings.pages.models.title")),1)])])),[[_]]),h("div",Ce,[h("div",{ref_key:"live2dContainerRef",ref:i,w:"50%",h:"80vh"},[R(ut,{ref_key:"live2dCanvasRef",ref:o,width:w(n),height:w(a)},{default:P(({app:v})=>[R(lt,{app:v,"mouth-open-size":0,width:w(n),height:w(a),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),R(ve,{w:"50%",h:"80vh",palette:s.value,onExtractColorsFromModel:l},null,8,["palette"])]),c[2]||(c[2]=h("div",{text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[h("div",{text:"40","i-lucide:person-standing":""})],-1))],64)}}});typeof it=="function"&&it(Me);export{Me as default};
|
assets/{index-D2AVQ4HK.js → index-BUfvD8m2.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
import{cg as getAugmentedNamespace}from"./index-DdKO3wSp.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h<backendsSortedByPriority.length;h++)if(backends[backendsSortedByPriority[h]].priority<=b){backendsSortedByPriority.splice(h,0,D);return}backendsSortedByPriority.push(D)}return}throw new TypeError("not a valid backend")},resolveBackend=async D=>{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b<D.length;b++){const g=D[b];if(typeof g!="number"||!Number.isSafeInteger(g))throw new TypeError(`dims[${b}] must be an integer, got: ${g}`);if(g<0)throw new RangeError(`dims[${b}] must be a non-negative integer, got: ${g}`);u*=g}return u};let Tensor$1=class at{constructor(u,b,g){let p,h,o;if(typeof u=="string")if(p=u,o=g,u==="string"){if(!Array.isArray(b))throw new TypeError("A string tensor's data must be a string array.");h=b}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(u);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${u}.`);if(Array.isArray(b))h=f.from(b);else if(b instanceof f)h=b;else throw new TypeError(`A ${p} tensor's data must be type of ${f}`)}else if(o=b,Array.isArray(u)){if(u.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof u[0];if(f==="string")p="string",h=u;else if(f==="boolean")p="bool",h=Uint8Array.from(u);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(u.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${u.constructor}.`);p=f,h=u}if(o===void 0)o=[h.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(o);if(c!==h.length)throw new Error(`Tensor's size(${c}) does not match data length(${h.length}).`);this.dims=o,this.type=p,this.data=h,this.size=c}static bufferToTensor(u,b){if(u===void 0)throw new Error("Image buffer must be defined");if(b.height===void 0||b.width===void 0)throw new Error("Image height and width must be defined");const{height:g,width:p}=b,h=b.norm;let o,c;h===void 0||h.mean===void 0?o=255:o=h.mean,h===void 0||h.bias===void 0?c=0:c=h.bias;const f=b.bitmapFormat!==void 0?b.bitmapFormat:"RGBA",s=b.tensorFormat!==void 0&&b.tensorFormat!==void 0?b.tensorFormat:"RGB",i=g*p,t=s==="RGBA"?new Float32Array(i*4):new Float32Array(i*3);let e=4,n=0,r=1,a=2,l=3,d=0,m=i,y=i*2,v=-1;f==="RGB"&&(e=3,n=0,r=1,a=2,l=-1),s==="RGBA"?v=i*3:s==="RBG"?(d=0,y=i,m=i*2):s==="BGR"&&(y=0,m=i,d=i*2);for(let T=0;T<i;T++,n+=e,a+=e,r+=e,l+=e)t[d++]=(u[n]+c)/o,t[m++]=(u[r]+c)/o,t[y++]=(u[a]+c)/o,v!==-1&&l!==-1&&(t[v++]=(u[l]+c)/o);return s==="RGBA"?new at("float32",t,[1,4,g,p]):new at("float32",t,[1,3,g,p])}static async fromImage(u,b){const g=typeof HTMLImageElement<"u"&&u instanceof HTMLImageElement,p=typeof ImageData<"u"&&u instanceof ImageData,h=typeof ImageBitmap<"u"&&u instanceof ImageBitmap,o=typeof String<"u"&&(u instanceof String||typeof u=="string");let c,f={};if(g){const s=document.createElement("canvas"),i=s.getContext("2d");if(i!=null){let t=u.naturalHeight,e=u.naturalWidth;if(b!==void 0&&b.resizedHeight!==void 0&&b.resizedWidth!==void 0&&(t=b.resizedHeight,e=b.resizedWidth),b!==void 0){if(f=b,b.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",b.height!==void 0&&b.height!==t)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=t,b.width!==void 0&&b.width!==e)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=e}else f.tensorFormat="RGBA",f.height=t,f.width=e;s.width=e,s.height=t,i.drawImage(u,0,0,e,t),c=i.getImageData(0,0,e,t).data}else throw new Error("Can not access image data")}else if(p){const s="RGBA";let i,t;if(b!==void 0&&b.resizedWidth!==void 0&&b.resizedHeight!==void 0?(i=b.resizedHeight,t=b.resizedWidth):(i=u.height,t=u.width),b!==void 0){if(f=b,b.bitmapFormat!==void 0&&b.bitmapFormat!==s)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=i,f.width=t,b!==void 0){const e=document.createElement("canvas");e.width=t,e.height=i;const n=e.getContext("2d");if(n!=null)n.putImageData(u,0,0),c=n.getImageData(0,0,t,i).data;else throw new Error("Can not access image data")}else c=u.data}else if(h){if(b===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(b.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const s=document.createElement("canvas").getContext("2d");if(s!=null){const i=u.height,t=u.width;if(s.drawImage(u,0,0,t,i),c=s.getImageData(0,0,t,i).data,b!==void 0){if(b.height!==void 0&&b.height!==i)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=i,b.width!==void 0&&b.width!==t)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t}else f.height=i,f.width=t;return at.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(o)return new Promise((s,i)=>{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T<c*o;r+=n,a+=n,l+=n,d+=n,T++)h.data[r]=(this.data[m++]-t)*i,h.data[a]=(this.data[y++]-t)*i,h.data[l]=(this.data[v++]-t)*i,h.data[d]=_===-1?255:(this.data[_++]-t)*i}else throw new Error("Can not access image data");return h}reshape(u){return new at(this.type,this.data,u)}};const Tensor=Tensor$1;let InferenceSession$1=class cn{constructor(u){this.handler=u}async run(u,b,g){const p={};let h={};if(typeof u!="object"||u===null||u instanceof Tensor||Array.isArray(u))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let o=!0;if(typeof b=="object"){if(b===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(b instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(b)){if(b.length===0)throw new TypeError("'fetches' cannot be an empty array.");o=!1;for(const s of b){if(typeof s!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(s)===-1)throw new RangeError(`'fetches' contains invalid output name: ${s}.`);p[s]=null}if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else{let s=!1;const i=Object.getOwnPropertyNames(b);for(const t of this.outputNames)if(i.indexOf(t)!==-1){const e=b[t];(e===null||e instanceof Tensor)&&(s=!0,o=!1,p[t]=e)}if(s){if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else h=b}}else if(typeof b<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const s of this.inputNames)if(typeof u[s]>"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*!
|
2 |
* ONNX Runtime Web v1.14.0
|
3 |
* Copyright (c) Microsoft Corporation. All rights reserved.
|
4 |
* Licensed under the MIT License.
|
|
|
1 |
+
import{cg as getAugmentedNamespace}from"./index-TGrV2Wj8.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h<backendsSortedByPriority.length;h++)if(backends[backendsSortedByPriority[h]].priority<=b){backendsSortedByPriority.splice(h,0,D);return}backendsSortedByPriority.push(D)}return}throw new TypeError("not a valid backend")},resolveBackend=async D=>{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b<D.length;b++){const g=D[b];if(typeof g!="number"||!Number.isSafeInteger(g))throw new TypeError(`dims[${b}] must be an integer, got: ${g}`);if(g<0)throw new RangeError(`dims[${b}] must be a non-negative integer, got: ${g}`);u*=g}return u};let Tensor$1=class at{constructor(u,b,g){let p,h,o;if(typeof u=="string")if(p=u,o=g,u==="string"){if(!Array.isArray(b))throw new TypeError("A string tensor's data must be a string array.");h=b}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(u);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${u}.`);if(Array.isArray(b))h=f.from(b);else if(b instanceof f)h=b;else throw new TypeError(`A ${p} tensor's data must be type of ${f}`)}else if(o=b,Array.isArray(u)){if(u.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof u[0];if(f==="string")p="string",h=u;else if(f==="boolean")p="bool",h=Uint8Array.from(u);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(u.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${u.constructor}.`);p=f,h=u}if(o===void 0)o=[h.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(o);if(c!==h.length)throw new Error(`Tensor's size(${c}) does not match data length(${h.length}).`);this.dims=o,this.type=p,this.data=h,this.size=c}static bufferToTensor(u,b){if(u===void 0)throw new Error("Image buffer must be defined");if(b.height===void 0||b.width===void 0)throw new Error("Image height and width must be defined");const{height:g,width:p}=b,h=b.norm;let o,c;h===void 0||h.mean===void 0?o=255:o=h.mean,h===void 0||h.bias===void 0?c=0:c=h.bias;const f=b.bitmapFormat!==void 0?b.bitmapFormat:"RGBA",s=b.tensorFormat!==void 0&&b.tensorFormat!==void 0?b.tensorFormat:"RGB",i=g*p,t=s==="RGBA"?new Float32Array(i*4):new Float32Array(i*3);let e=4,n=0,r=1,a=2,l=3,d=0,m=i,y=i*2,v=-1;f==="RGB"&&(e=3,n=0,r=1,a=2,l=-1),s==="RGBA"?v=i*3:s==="RBG"?(d=0,y=i,m=i*2):s==="BGR"&&(y=0,m=i,d=i*2);for(let T=0;T<i;T++,n+=e,a+=e,r+=e,l+=e)t[d++]=(u[n]+c)/o,t[m++]=(u[r]+c)/o,t[y++]=(u[a]+c)/o,v!==-1&&l!==-1&&(t[v++]=(u[l]+c)/o);return s==="RGBA"?new at("float32",t,[1,4,g,p]):new at("float32",t,[1,3,g,p])}static async fromImage(u,b){const g=typeof HTMLImageElement<"u"&&u instanceof HTMLImageElement,p=typeof ImageData<"u"&&u instanceof ImageData,h=typeof ImageBitmap<"u"&&u instanceof ImageBitmap,o=typeof String<"u"&&(u instanceof String||typeof u=="string");let c,f={};if(g){const s=document.createElement("canvas"),i=s.getContext("2d");if(i!=null){let t=u.naturalHeight,e=u.naturalWidth;if(b!==void 0&&b.resizedHeight!==void 0&&b.resizedWidth!==void 0&&(t=b.resizedHeight,e=b.resizedWidth),b!==void 0){if(f=b,b.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",b.height!==void 0&&b.height!==t)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=t,b.width!==void 0&&b.width!==e)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=e}else f.tensorFormat="RGBA",f.height=t,f.width=e;s.width=e,s.height=t,i.drawImage(u,0,0,e,t),c=i.getImageData(0,0,e,t).data}else throw new Error("Can not access image data")}else if(p){const s="RGBA";let i,t;if(b!==void 0&&b.resizedWidth!==void 0&&b.resizedHeight!==void 0?(i=b.resizedHeight,t=b.resizedWidth):(i=u.height,t=u.width),b!==void 0){if(f=b,b.bitmapFormat!==void 0&&b.bitmapFormat!==s)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=i,f.width=t,b!==void 0){const e=document.createElement("canvas");e.width=t,e.height=i;const n=e.getContext("2d");if(n!=null)n.putImageData(u,0,0),c=n.getImageData(0,0,t,i).data;else throw new Error("Can not access image data")}else c=u.data}else if(h){if(b===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(b.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const s=document.createElement("canvas").getContext("2d");if(s!=null){const i=u.height,t=u.width;if(s.drawImage(u,0,0,t,i),c=s.getImageData(0,0,t,i).data,b!==void 0){if(b.height!==void 0&&b.height!==i)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=i,b.width!==void 0&&b.width!==t)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t}else f.height=i,f.width=t;return at.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(o)return new Promise((s,i)=>{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T<c*o;r+=n,a+=n,l+=n,d+=n,T++)h.data[r]=(this.data[m++]-t)*i,h.data[a]=(this.data[y++]-t)*i,h.data[l]=(this.data[v++]-t)*i,h.data[d]=_===-1?255:(this.data[_++]-t)*i}else throw new Error("Can not access image data");return h}reshape(u){return new at(this.type,this.data,u)}};const Tensor=Tensor$1;let InferenceSession$1=class cn{constructor(u){this.handler=u}async run(u,b,g){const p={};let h={};if(typeof u!="object"||u===null||u instanceof Tensor||Array.isArray(u))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let o=!0;if(typeof b=="object"){if(b===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(b instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(b)){if(b.length===0)throw new TypeError("'fetches' cannot be an empty array.");o=!1;for(const s of b){if(typeof s!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(s)===-1)throw new RangeError(`'fetches' contains invalid output name: ${s}.`);p[s]=null}if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else{let s=!1;const i=Object.getOwnPropertyNames(b);for(const t of this.outputNames)if(i.indexOf(t)!==-1){const e=b[t];(e===null||e instanceof Tensor)&&(s=!0,o=!1,p[t]=e)}if(s){if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else h=b}}else if(typeof b<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const s of this.inputNames)if(typeof u[s]>"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*!
|
2 |
* ONNX Runtime Web v1.14.0
|
3 |
* Copyright (c) Microsoft Corporation. All rights reserved.
|
4 |
* Licensed under the MIT License.
|
assets/{index-B_a4T69o.js → index-CCfJDiQ1.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{r,a as s,b as h,c as t}from"./providers-
|
|
|
1 |
+
import{r,a as s,b as h,c as t}from"./providers-By8PGLd2.js";var d=async e=>(e.fetch??globalThis.fetch)(r("audio/speech",e.baseURL),{body:h(e),headers:s({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(t).then(async a=>a.arrayBuffer());export{d as g};
|
assets/{index-CZ9ROQo_.js → index-CNfKN3A8.js}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
import{h as O,g as P,G as wt,w as X,ah as Ct,ai as At,c1 as me,e as g,d as S,E as Ot,p as $,x as H,o as k,y as T,m as $e,b as V,bQ as ce,c2 as Kt,c3 as Et,c4 as Dt,c5 as Xt,bW as ye,c6 as Pt,bT as qt,bv as Le,c7 as at,bS as _e,af as ee,C as Jt,c8 as Qt,ab as Zt,bP as Tt,b_ as _t,D as U,bM as en,c as ue,n as Me,bR as tn,br as nn,c9 as kt,ca as on,cb as rn,cc as sn,b$ as ln,H as an,bx as ke,a as x,cd as cn,ce as un,bU as dn,i as fn,bE as pn,v as mn,bw as vn,A as Ve,z as De,bH as hn,B as gn,by as ct,cf as yn}from"./index-DdKO3wSp.js";import{_ as ut}from"./Collapsable.vue_vue_type_script_setup_true_lang-BwUs5KAP.js";import{n as dt}from"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-DBRF19vp.js";import{b as ft}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DIDtgUjA.js";const bn=["top","right","bottom","left"],se=Math.min,W=Math.max,Be=Math.round,Pe=Math.floor,q=e=>({x:e,y:e}),xn={left:"right",right:"left",bottom:"top",top:"bottom"},wn={start:"end",end:"start"};function Ue(e,t,n){return W(e,se(t,n))}function te(e,t){return typeof e=="function"?e(t):e}function ne(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function Je(e){return e==="x"?"y":"x"}function Qe(e){return e==="y"?"height":"width"}function le(e){return["top","bottom"].includes(ne(e))?"y":"x"}function Ze(e){return Je(le(e))}function Cn(e,t,n){n===void 0&&(n=!1);const o=be(e),i=Ze(e),r=Qe(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Re(s)),[s,Re(s)]}function An(e){const t=Re(e);return[Ge(e),t,Ge(t)]}function Ge(e){return e.replace(/start|end/g,t=>wn[t])}function On(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:s;default:return[]}}function En(e,t,n,o){const i=be(e);let r=On(ne(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(Ge)))),r}function Re(e){return e.replace(/left|right|bottom|top/g,t=>xn[t])}function Dn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Bt(e){return typeof e!="number"?Dn(e):{top:e,right:e,bottom:e,left:e}}function Se(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function pt(e,t,n){let{reference:o,floating:i}=e;const r=le(t),s=Ze(t),l=Qe(s),d=ne(t),c=r==="y",a=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let f;switch(d){case"top":f={x:a,y:o.y-i.height};break;case"bottom":f={x:a,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(be(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1);break}return f}const Pn=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:a,y:u}=pt(c,o,d),p=o,f={},m=0;for(let y=0;y<l.length;y++){const{name:v,fn:h}=l[y],{x:w,y:b,data:A,reset:C}=await h({x:a,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});a=w??a,u=b??u,f={...f,[v]:{...f[v],...A}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:a,y:u}=pt(c,p,d)),y=-1)}return{x:a,y:u,placement:p,strategy:i,middlewareData:f}};async function we(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:d}=e,{boundary:c="clippingAncestors",rootBoundary:a="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=te(t,e),m=Bt(f),v=l[p?u==="floating"?"reference":"floating":u],h=Se(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:a,strategy:d})),w=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),A=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},C=Se(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:b,strategy:d}):w);return{top:(h.top-C.top+m.top)/A.y,bottom:(C.bottom-h.bottom+m.bottom)/A.y,left:(h.left-C.left+m.left)/A.x,right:(C.right-h.right+m.right)/A.x}}const Tn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:l,middlewareData:d}=t,{element:c,padding:a=0}=te(e,t)||{};if(c==null)return{};const u=Bt(a),p={x:n,y:o},f=Ze(i),m=Qe(f),y=await s.getDimensions(c),v=f==="y",h=v?"top":"left",w=v?"bottom":"right",b=v?"clientHeight":"clientWidth",A=r.reference[m]+r.reference[f]-p[f]-r.floating[m],C=p[f]-r.reference[f],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let E=_?_[b]:0;(!E||!await(s.isElement==null?void 0:s.isElement(_)))&&(E=l.floating[b]||r.floating[m]);const B=A/2-C/2,L=E/2-y[m]/2-1,D=se(u[h],L),j=se(u[w],L),M=D,F=E-y[m]-j,R=E/2-y[m]/2+B,oe=Ue(M,R,F),N=!d.arrow&&be(i)!=null&&R!==oe&&r.reference[m]/2-(R<M?D:j)-y[m]/2<0,K=N?R<M?R-M:R-F:0;return{[f]:p[f]+K,data:{[f]:oe,centerOffset:R-oe-K,...N&&{alignmentOffset:K}},reset:N}}}),_n=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:d,elements:c}=t,{mainAxis:a=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...v}=te(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const h=ne(i),w=le(l),b=ne(l)===l,A=await(d.isRTL==null?void 0:d.isRTL(c.floating)),C=p||(b||!y?[Re(l)]:An(l)),_=m!=="none";!p&&_&&C.push(...En(l,y,m,A));const E=[l,...C],B=await we(t,v),L=[];let D=((o=r.flip)==null?void 0:o.overflows)||[];if(a&&L.push(B[h]),u){const R=Cn(i,s,A);L.push(B[R[0]],B[R[1]])}if(D=[...D,{placement:i,overflows:L}],!L.every(R=>R<=0)){var j,M;const R=(((j=r.flip)==null?void 0:j.index)||0)+1,oe=E[R];if(oe)return{data:{index:R,overflows:D},reset:{placement:oe}};let N=(M=D.filter(K=>K.overflows[0]<=0).sort((K,ie)=>K.overflows[1]-ie.overflows[1])[0])==null?void 0:M.placement;if(!N)switch(f){case"bestFit":{var F;const K=(F=D.filter(ie=>{if(_){const re=le(ie.placement);return re===w||re==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(re=>re>0).reduce((re,Yt)=>re+Yt,0)]).sort((ie,re)=>ie[1]-re[1])[0])==null?void 0:F[0];K&&(N=K);break}case"initialPlacement":N=l;break}if(i!==N)return{reset:{placement:N}}}return{}}}};function mt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vt(e){return bn.some(t=>e[t]>=0)}const kn=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=te(e,t);switch(o){case"referenceHidden":{const r=await we(t,{...i,elementContext:"reference"}),s=mt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:vt(s)}}}case"escaped":{const r=await we(t,{...i,altBoundary:!0}),s=mt(r,n.floating);return{data:{escapedOffsets:s,escaped:vt(s)}}}default:return{}}}}};async function Bn(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=ne(n),l=be(n),d=le(n)==="y",c=["left","top"].includes(s)?-1:1,a=r&&d?-1:1,u=te(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof m=="number"&&(f=l==="end"?m*-1:m),d?{x:f*a,y:p*c}:{x:p*c,y:f*a}}const Rn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=t,d=await Bn(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:s}}}}},Sn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:h,y:w}=v;return{x:h,y:w}}},...d}=te(e,t),c={x:n,y:o},a=await we(t,d),u=le(ne(i)),p=Je(u);let f=c[p],m=c[u];if(r){const v=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=f+a[v],b=f-a[h];f=Ue(w,f,b)}if(s){const v=u==="y"?"top":"left",h=u==="y"?"bottom":"right",w=m+a[v],b=m-a[h];m=Ue(w,m,b)}const y=l.fn({...t,[p]:f,[u]:m});return{...y,data:{x:y.x-n,y:y.y-o,enabled:{[p]:r,[u]:s}}}}}},$n=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:l=0,mainAxis:d=!0,crossAxis:c=!0}=te(e,t),a={x:n,y:o},u=le(i),p=Je(u);let f=a[p],m=a[u];const y=te(l,t),v=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(d){const b=p==="y"?"height":"width",A=r.reference[p]-r.floating[b]+v.mainAxis,C=r.reference[p]+r.reference[b]-v.mainAxis;f<A?f=A:f>C&&(f=C)}if(c){var h,w;const b=p==="y"?"width":"height",A=["top","left"].includes(ne(i)),C=r.reference[u]-r.floating[b]+(A&&((h=s.offset)==null?void 0:h[u])||0)+(A?0:v.crossAxis),_=r.reference[u]+r.reference[b]+(A?0:((w=s.offset)==null?void 0:w[u])||0)-(A?v.crossAxis:0);m<C?m=C:m>_&&(m=_)}return{[p]:f,[u]:m}}}},Ln=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:s,elements:l}=t,{apply:d=()=>{},...c}=te(e,t),a=await we(t,c),u=ne(i),p=be(i),f=le(i)==="y",{width:m,height:y}=r.floating;let v,h;u==="top"||u==="bottom"?(v=u,h=p===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(h=u,v=p==="end"?"top":"bottom");const w=y-a.top-a.bottom,b=m-a.left-a.right,A=se(y-a[v],w),C=se(m-a[h],b),_=!t.middlewareData.shift;let E=A,B=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(B=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=w),_&&!p){const D=W(a.left,0),j=W(a.right,0),M=W(a.top,0),F=W(a.bottom,0);f?B=m-2*(D!==0||j!==0?D+j:W(a.left,a.right)):E=y-2*(M!==0||F!==0?M+F:W(a.top,a.bottom))}await d({...t,availableWidth:B,availableHeight:E});const L=await s.getDimensions(l.floating);return m!==L.width||y!==L.height?{reset:{rects:!0}}:{}}}};function Ne(){return typeof window<"u"}function pe(e){return et(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Q(e){var t;return(t=(et(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function et(e){return Ne()?e instanceof Node||e instanceof z(e).Node:!1}function G(e){return Ne()?e instanceof Element||e instanceof z(e).Element:!1}function J(e){return Ne()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ht(e){return!Ne()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}function Ae(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function Mn(e){return["table","td","th"].includes(pe(e))}function He(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function tt(e){const t=nt(),n=G(e)?Y(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Nn(e){let t=ae(e);for(;J(t)&&!ge(t);){if(tt(t))return t;if(He(t))return null;t=ae(t)}return null}function nt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ge(e){return["html","body","#document"].includes(pe(e))}function Y(e){return z(e).getComputedStyle(e)}function Fe(e){return G(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ae(e){if(pe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ht(e)&&e.host||Q(e);return ht(t)?t.host:t}function Rt(e){const t=ae(e);return ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&Ae(t)?t:Rt(t)}function Ce(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Rt(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),s=z(i);if(r){const l=Ye(s);return t.concat(s,s.visualViewport||[],Ae(i)?i:[],l&&n?Ce(l):[])}return t.concat(i,Ce(i,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function St(e){const t=Y(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=J(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,l=Be(n)!==r||Be(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function ot(e){return G(e)?e:e.contextElement}function he(e){const t=ot(e);if(!J(t))return q(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=St(t);let s=(r?Be(n.width):n.width)/o,l=(r?Be(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Hn=q(0);function $t(e){const t=z(e);return!nt()||!t.visualViewport?Hn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function fe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=ot(e);let s=q(1);t&&(o?G(o)&&(s=he(o)):s=he(e));const l=Fn(r,n,o)?$t(r):q(0);let d=(i.left+l.x)/s.x,c=(i.top+l.y)/s.y,a=i.width/s.x,u=i.height/s.y;if(r){const p=z(r),f=o&&G(o)?z(o):o;let m=p,y=Ye(m);for(;y&&o&&f!==m;){const v=he(y),h=y.getBoundingClientRect(),w=Y(y),b=h.left+(y.clientLeft+parseFloat(w.paddingLeft))*v.x,A=h.top+(y.clientTop+parseFloat(w.paddingTop))*v.y;d*=v.x,c*=v.y,a*=v.x,u*=v.y,d+=b,c+=A,m=z(y),y=Ye(m)}}return Se({width:a,height:u,x:d,y:c})}function it(e,t){const n=Fe(e).scrollLeft;return t?t.left+n:fe(Q(e)).left+n}function Lt(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=o.left+t.scrollLeft-(n?0:it(e,o)),r=o.top+t.scrollTop;return{x:i,y:r}}function Wn(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",s=Q(o),l=t?He(t.floating):!1;if(o===s||l&&r)return n;let d={scrollLeft:0,scrollTop:0},c=q(1);const a=q(0),u=J(o);if((u||!u&&!r)&&((pe(o)!=="body"||Ae(s))&&(d=Fe(o)),J(o))){const f=fe(o);c=he(o),a.x=f.x+o.clientLeft,a.y=f.y+o.clientTop}const p=s&&!u&&!r?Lt(s,d,!0):q(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+a.x+p.x,y:n.y*c.y-d.scrollTop*c.y+a.y+p.y}}function zn(e){return Array.from(e.getClientRects())}function In(e){const t=Q(e),n=Fe(e),o=e.ownerDocument.body,i=W(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=W(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+it(e);const l=-n.scrollTop;return Y(o).direction==="rtl"&&(s+=W(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:l}}function Vn(e,t){const n=z(e),o=Q(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,d=0;if(i){r=i.width,s=i.height;const c=nt();(!c||c&&t==="fixed")&&(l=i.offsetLeft,d=i.offsetTop)}return{width:r,height:s,x:l,y:d}}function jn(e,t){const n=fe(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=J(e)?he(e):q(1),s=e.clientWidth*r.x,l=e.clientHeight*r.y,d=i*r.x,c=o*r.y;return{width:s,height:l,x:d,y:c}}function gt(e,t,n){let o;if(t==="viewport")o=Vn(e,n);else if(t==="document")o=In(Q(e));else if(G(t))o=jn(t,n);else{const i=$t(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Se(o)}function Mt(e,t){const n=ae(e);return n===t||!G(n)||ge(n)?!1:Y(n).position==="fixed"||Mt(n,t)}function Un(e,t){const n=t.get(e);if(n)return n;let o=Ce(e,[],!1).filter(l=>G(l)&&pe(l)!=="body"),i=null;const r=Y(e).position==="fixed";let s=r?ae(e):e;for(;G(s)&&!ge(s);){const l=Y(s),d=tt(s);!d&&l.position==="fixed"&&(i=null),(r?!d&&!i:!d&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ae(s)&&!d&&Mt(e,s))?o=o.filter(a=>a!==s):i=l,s=ae(s)}return t.set(e,o),o}function Gn(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?He(t)?[]:Un(t,this._c):[].concat(n),o],l=s[0],d=s.reduce((c,a)=>{const u=gt(t,a,i);return c.top=W(u.top,c.top),c.right=se(u.right,c.right),c.bottom=se(u.bottom,c.bottom),c.left=W(u.left,c.left),c},gt(t,l,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Yn(e){const{width:t,height:n}=St(e);return{width:t,height:n}}function Kn(e,t,n){const o=J(t),i=Q(t),r=n==="fixed",s=fe(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const d=q(0);if(o||!o&&!r)if((pe(t)!=="body"||Ae(i))&&(l=Fe(t)),o){const p=fe(t,!0,r,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else i&&(d.x=it(i));const c=i&&!o&&!r?Lt(i,l):q(0),a=s.left+l.scrollLeft-d.x-c.x,u=s.top+l.scrollTop-d.y-c.y;return{x:a,y:u,width:s.width,height:s.height}}function je(e){return Y(e).position==="static"}function yt(e,t){if(!J(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Q(e)===n&&(n=n.ownerDocument.body),n}function Nt(e,t){const n=z(e);if(He(e))return n;if(!J(e)){let i=ae(e);for(;i&&!ge(i);){if(G(i)&&!je(i))return i;i=ae(i)}return n}let o=yt(e,t);for(;o&&Mn(o)&&je(o);)o=yt(o,t);return o&&ge(o)&&je(o)&&!tt(o)?n:o||Nn(e)||n}const Xn=async function(e){const t=this.getOffsetParent||Nt,n=this.getDimensions,o=await n(e.floating);return{reference:Kn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function qn(e){return Y(e).direction==="rtl"}const Jn={convertOffsetParentRelativeRectToViewportRelativeRect:Wn,getDocumentElement:Q,getClippingRect:Gn,getOffsetParent:Nt,getElementRects:Xn,getClientRects:zn,getDimensions:Yn,getScale:he,isElement:G,isRTL:qn};function Ht(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Qn(e,t){let n=null,o;const i=Q(e);function r(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),r();const c=e.getBoundingClientRect(),{left:a,top:u,width:p,height:f}=c;if(l||t(),!p||!f)return;const m=Pe(u),y=Pe(i.clientWidth-(a+p)),v=Pe(i.clientHeight-(u+f)),h=Pe(a),b={rootMargin:-m+"px "+-y+"px "+-v+"px "+-h+"px",threshold:W(0,se(1,d))||1};let A=!0;function C(_){const E=_[0].intersectionRatio;if(E!==d){if(!A)return s();E?s(!1,E):o=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!Ht(c,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(C,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,b)}n.observe(e)}return s(!0),r}function Zn(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=ot(e),a=i||r?[...c?Ce(c):[],...Ce(t)]:[];a.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});const u=c&&l?Qn(c,n):null;let p=-1,f=null;s&&(f=new ResizeObserver(h=>{let[w]=h;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!d&&f.observe(c),f.observe(t));let m,y=d?fe(e):null;d&&v();function v(){const h=fe(e);y&&!Ht(y,h)&&n(),y=h,m=requestAnimationFrame(v)}return n(),()=>{var h;a.forEach(w=>{i&&w.removeEventListener("scroll",n),r&&w.removeEventListener("resize",n)}),u==null||u(),(h=f)==null||h.disconnect(),f=null,d&&cancelAnimationFrame(m)}}const eo=Rn,to=Sn,bt=_n,no=Ln,oo=kn,io=Tn,ro=$n,so=(e,t,n)=>{const o=new Map,i={platform:Jn,...n},r={...i.platform,_c:o};return Pn(e,t,{...i,platform:r})};function lo(e){return e!=null&&typeof e=="object"&&"$el"in e}function Ke(e){if(lo(e)){const t=e.$el;return et(t)&&pe(t)==="#comment"?null:t}return e}function ve(e){return typeof e=="function"?e():g(e)}function ao(e){return{name:"arrow",options:e,fn(t){const n=Ke(ve(e.element));return n==null?{}:io({element:n,padding:e.padding}).fn(t)}}}function Ft(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xt(e,t){const n=Ft(e);return Math.round(t*n)/n}function co(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=O(()=>{var E;return(E=ve(n.open))!=null?E:!0}),r=O(()=>ve(n.middleware)),s=O(()=>{var E;return(E=ve(n.placement))!=null?E:"bottom"}),l=O(()=>{var E;return(E=ve(n.strategy))!=null?E:"absolute"}),d=O(()=>{var E;return(E=ve(n.transform))!=null?E:!0}),c=O(()=>Ke(e.value)),a=O(()=>Ke(t.value)),u=P(0),p=P(0),f=P(l.value),m=P(s.value),y=wt({}),v=P(!1),h=O(()=>{const E={position:f.value,left:"0",top:"0"};if(!a.value)return E;const B=xt(a.value,u.value),L=xt(a.value,p.value);return d.value?{...E,transform:"translate("+B+"px, "+L+"px)",...Ft(a.value)>=1.5&&{willChange:"transform"}}:{position:f.value,left:B+"px",top:L+"px"}});let w;function b(){if(c.value==null||a.value==null)return;const E=i.value;so(c.value,a.value,{middleware:r.value,placement:s.value,strategy:l.value}).then(B=>{u.value=B.x,p.value=B.y,f.value=B.strategy,m.value=B.placement,y.value=B.middlewareData,v.value=E!==!1})}function A(){typeof w=="function"&&(w(),w=void 0)}function C(){if(A(),o===void 0){b();return}if(c.value!=null&&a.value!=null){w=o(c.value,a.value,b);return}}function _(){i.value||(v.value=!1)}return X([r,s,l,i],b,{flush:"sync"}),X([c,a],C,{flush:"sync"}),X(i,_,{flush:"sync"}),Ct()&&At(A),{x:me(u),y:me(p),strategy:me(f),placement:me(m),middlewareData:me(y),isPositioned:me(v),floatingStyles:h,update:b}}function Oe(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,o=Symbol(n);return[i=>{const r=qt(o,i);if(r||r===null)return r;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},i=>(dn(o,i),i)]}function Wt(e,t,n){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),o.dispatchEvent(i)}function uo(e,t){var n;const o=wt();return ee(()=>{o.value=e()},{...t,flush:(n=void 0)!=null?n:"sync"}),Pt(o)}function We(e){return Ct()?(At(e),!0):!1}function fo(){const e=new Set,t=n=>{e.delete(n)};return{on:n=>{e.add(n);const o=()=>t(n);return We(o),{off:o}},off:t,trigger:(...n)=>Promise.all(Array.from(e).map(o=>o(...n)))}}function po(e){let t=!1,n;const o=un(!0);return(...i)=>(t||(n=o.run(()=>e(...i)),t=!0),n)}function de(e){return typeof e=="function"?e():g(e)}const Ee=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const mo=e=>typeof e<"u",vo=Object.prototype.toString,ho=e=>vo.call(e)==="[object Object]",go=()=>{};function yo(e,t=1e4){return cn((n,o)=>{let i=de(e),r;const s=()=>setTimeout(()=>{i=de(e),o()},de(t));return We(()=>{clearTimeout(r)}),{get(){return n(),i},set(l){i=l,o(),clearTimeout(r),r=s()}}})}function zt(e,t,n={}){const{immediate:o=!0}=n,i=P(!1);let r=null;function s(){r&&(clearTimeout(r),r=null)}function l(){i.value=!1,s()}function d(...c){s(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,e(...c)},de(t))}return o&&(i.value=!0,Ee&&d()),We(l),{isPending:Pt(i),start:d,stop:l}}function ze(e){var t;const n=de(e);return(t=n==null?void 0:n.$el)!=null?t:n}const rt=Ee?window:void 0;function Xe(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=rt):[t,n,o,i]=e,!t)return go;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],s=()=>{r.forEach(a=>a()),r.length=0},l=(a,u,p,f)=>(a.addEventListener(u,p,f),()=>a.removeEventListener(u,p,f)),d=X(()=>[ze(t),de(i)],([a,u])=>{if(s(),!a)return;const p=ho(u)?{...u}:u;r.push(...n.flatMap(f=>o.map(m=>l(a,f,m,p))))},{immediate:!0,flush:"post"}),c=()=>{d(),s()};return We(c),c}function bo(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function xo(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=rt,eventName:r="keydown",passive:s=!1,dedupe:l=!1}=o,d=bo(t);return Xe(i,r,c=>{c.repeat&&de(l)||d(c)&&n(c)},s)}function wo(){const e=P(!1),t=ye();return t&&$e(()=>{e.value=!0},t),e}function Co(e){return JSON.parse(JSON.stringify(e))}function Ao(e,t,n,o={}){var i,r,s;const{clone:l=!1,passive:d=!1,eventName:c,deep:a=!1,defaultValue:u,shouldEmit:p}=o,f=ye(),m=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((s=(r=f==null?void 0:f.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(f==null?void 0:f.proxy));let y=c;y=y||`update:${t.toString()}`;const v=b=>l?typeof l=="function"?l(b):Co(b):b,h=()=>mo(e[t])?v(e[t]):u,w=b=>{p?p(b)&&m(y,b):m(y,b)};if(d){const b=h(),A=P(b);let C=!1;return X(()=>e[t],_=>{C||(C=!0,A.value=v(_),Le(()=>C=!1))}),X(A,_=>{!C&&(_!==e[t]||a)&&w(_)},{deep:a}),A}else return O({get(){return h()},set(b){w(b)}})}function st(e){return e?e.flatMap(t=>t.type===ke?st(t.children):[t]):[]}const[Oo,Ui]=Oe("ConfigProvider");function Eo(e){const t=ye(),n=t==null?void 0:t.type.emits,o={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(i=>{o[on(kt(i))]=(...r)=>e(i,...r)}),o}function It(e){const t=ye(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((i,r)=>{const s=(t==null?void 0:t.type.props[r]).default;return s!==void 0&&(i[r]=s),i},{}),o=nn(e);return O(()=>{const i={},r=(t==null?void 0:t.vnode.props)??{};return Object.keys(r).forEach(s=>{i[kt(s)]=r[s]}),Object.keys({...n,...i}).reduce((s,l)=>(o.value[l]!==void 0&&(s[l]=o.value[l]),s),{})})}function Do(e,t){const n=It(e),o=t?Eo(t):{};return O(()=>({...n.value,...o}))}function I(){const e=ye(),t=P(),n=O(()=>{var s,l;return["#text","#comment"].includes((s=t.value)==null?void 0:s.$el.nodeName)?(l=t.value)==null?void 0:l.$el.nextElementSibling:ze(t)}),o=Object.assign({},e.exposed),i={};for(const s in e.props)Object.defineProperty(i,s,{enumerable:!0,configurable:!0,get:()=>e.props[s]});if(Object.keys(o).length>0)for(const s in o)Object.defineProperty(i,s,{enumerable:!0,configurable:!0,get:()=>o[s]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function r(s){t.value=s,s&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>s instanceof Element?s:s.$el}),e.exposed=i)}return{forwardRef:r,currentRef:t,currentElement:n}}function Po(e,t){const n=yo(!1,300),o=P(null),i=fo();function r(){o.value=null,n.value=!1}function s(l,d){const c=l.currentTarget,a={x:l.clientX,y:l.clientY},u=To(a,c.getBoundingClientRect()),p=_o(a,u),f=ko(d.getBoundingClientRect()),m=Ro([...p,...f]);o.value=m,n.value=!0}return ee(l=>{if(e.value&&t.value){const d=a=>s(a,t.value),c=a=>s(a,e.value);e.value.addEventListener("pointerleave",d),t.value.addEventListener("pointerleave",c),l(()=>{var a,u;(a=e.value)==null||a.removeEventListener("pointerleave",d),(u=t.value)==null||u.removeEventListener("pointerleave",c)})}}),ee(l=>{var d;if(o.value){const c=a=>{var u,p;if(!o.value)return;const f=a.target,m={x:a.clientX,y:a.clientY},y=((u=e.value)==null?void 0:u.contains(f))||((p=t.value)==null?void 0:p.contains(f)),v=!Bo(m,o.value),h=!!f.closest("[data-grace-area-trigger]");y?r():(v||h)&&(r(),i.trigger())};(d=e.value)==null||d.ownerDocument.addEventListener("pointermove",c),l(()=>{var a;return(a=e.value)==null?void 0:a.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function To(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function _o(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function ko(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function Bo(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,s=t.length-1;r<t.length;s=r++){const l=t[r].x,d=t[r].y,c=t[s].x,a=t[s].y;d>o!=a>o&&n<(c-l)*(o-d)/(a-d)+l&&(i=!i)}return i}function Ro(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),So(t)}function So(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const r=t[t.length-1],s=t[t.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],s=n[n.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}let $o=0;function Lo(e,t="radix"){const n=Oo({useId:void 0});return at?`${t}-${at()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++$o}`}function Mo(e){const t=P(),n=O(()=>{var i;return((i=t.value)==null?void 0:i.width)??0}),o=O(()=>{var i;return((i=t.value)==null?void 0:i.height)??0});return $e(()=>{const i=ze(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let d,c;if("borderBoxSize"in l){const a=l.borderBoxSize,u=Array.isArray(a)?a[0]:a;d=u.inlineSize,c=u.blockSize}else d=i.offsetWidth,c=i.offsetHeight;t.value={width:d,height:c}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}function No(e,t){const n=P(e);function o(i){return t[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=o(i)}}}const Ho=S({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o,i;if(!n.default)return null;const r=st(n.default()),s=r.findIndex(a=>a.type!==Tt);if(s===-1)return r;const l=r[s];(o=l.props)==null||delete o.ref;const d=l.props?ce(t,l.props):t;t.class&&(i=l.props)!=null&&i.class&&delete l.props.class;const c=tn(l,d);for(const a in d)a.startsWith("on")&&(c.props||(c.props={}),c.props[a]=d[a]);return r.length===1?c:(r[s]=c,r)}}}),xe=S({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>_e(o,t):o!=="template"?()=>_e(e.as,t,{default:n.default}):()=>_e(Ho,t,{default:n.default})}});function Fo(e,t){var n;const o=P({}),i=P("none"),r=P(e),s=e.value?"mounted":"unmounted";let l;const d=((n=t.value)==null?void 0:n.ownerDocument.defaultView)??rt,{state:c,dispatch:a}=No(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=v=>{var h;if(Ee){const w=new CustomEvent(v,{bubbles:!1,cancelable:!1});(h=t.value)==null||h.dispatchEvent(w)}};X(e,async(v,h)=>{var w;const b=h!==v;if(await Le(),b){const A=i.value,C=Te(t.value);v?(a("MOUNT"),u("enter"),C==="none"&&u("after-enter")):C==="none"||((w=o.value)==null?void 0:w.display)==="none"?(a("UNMOUNT"),u("leave"),u("after-leave")):h&&A!==C?(a("ANIMATION_OUT"),u("leave")):(a("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=v=>{const h=Te(t.value),w=h.includes(v.animationName),b=c.value==="mounted"?"enter":"leave";if(v.target===t.value&&w&&(u(`after-${b}`),a("ANIMATION_END"),!r.value)){const A=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",l=d==null?void 0:d.setTimeout(()=>{var C;((C=t.value)==null?void 0:C.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=A)})}v.target===t.value&&h==="none"&&a("ANIMATION_END")},f=v=>{v.target===t.value&&(i.value=Te(t.value))},m=X(t,(v,h)=>{v?(o.value=getComputedStyle(v),v.addEventListener("animationstart",f),v.addEventListener("animationcancel",p),v.addEventListener("animationend",p)):(a("ANIMATION_END"),l!==void 0&&(d==null||d.clearTimeout(l)),h==null||h.removeEventListener("animationstart",f),h==null||h.removeEventListener("animationcancel",p),h==null||h.removeEventListener("animationend",p))},{immediate:!0}),y=X(c,()=>{const v=Te(t.value);i.value=c.value==="mounted"?v:"none"});return an(()=>{m(),y()}),{isPresent:O(()=>["mounted","unmountSuspended"].includes(c.value))}}function Te(e){return e&&getComputedStyle(e).animationName||"none"}const Wo=S({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var o;const{present:i,forceMount:r}=Ot(e),s=P(),{isPresent:l}=Fo(i,s);n({present:l});let d=t.default({present:l});d=st(d||[]);const c=ye();if(d&&(d==null?void 0:d.length)>1){const a=(o=c==null?void 0:c.parent)!=null&&o.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${a}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(u=>` - ${u}`).join(`
|
2 |
`)].join(`
|
3 |
`))}return()=>r.value||i.value||l.value?_e(t.default({present:l})[0],{ref:a=>{const u=ze(a);return typeof(u==null?void 0:u.hasAttribute)>"u"||(u!=null&&u.hasAttribute("data-radix-popper-content-wrapper")?s.value=u.firstElementChild:s.value=u),u}}):null}}),zo=S({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=wo();return(n,o)=>g(t)||n.forceMount?(k(),H(Qt,{key:0,to:n.to,disabled:n.disabled},[$(n.$slots,"default")],8,["to","disabled"])):Jt("",!0)}}),Io="dismissableLayer.pointerDownOutside",Vo="dismissableLayer.focusOutside";function Vt(e,t){const n=t.closest("[data-dismissable-layer]"),o=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),i=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&o===n||i.indexOf(o)<i.indexOf(n))}function jo(e,t){var n;const o=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=P(!1),r=P(()=>{});return ee(s=>{if(!Ee)return;const l=async c=>{const a=c.target;if(t!=null&&t.value){if(Vt(t.value,a)){i.value=!1;return}if(c.target&&!i.value){let u=function(){Wt(Io,e,p)};const p={originalEvent:c};c.pointerType==="touch"?(o.removeEventListener("click",r.value),r.value=u,o.addEventListener("click",r.value,{once:!0})):u()}else o.removeEventListener("click",r.value);i.value=!1}},d=window.setTimeout(()=>{o.addEventListener("pointerdown",l)},0);s(()=>{window.clearTimeout(d),o.removeEventListener("pointerdown",l),o.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>i.value=!0}}function Uo(e,t){var n;const o=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=P(!1);return ee(r=>{if(!Ee)return;const s=async l=>{t!=null&&t.value&&(await Le(),!(!t.value||Vt(t.value,l.target))&&l.target&&!i.value&&Wt(Vo,e,{originalEvent:l}))};o.addEventListener("focusin",s),r(()=>o.removeEventListener("focusin",s))}),{onFocusCapture:()=>i.value=!0,onBlurCapture:()=>i.value=!1}}const Z=ln({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Go=S({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,o=t,{forwardRef:i,currentElement:r}=I(),s=O(()=>{var m;return((m=r.value)==null?void 0:m.ownerDocument)??globalThis.document}),l=O(()=>Z.layersRoot),d=O(()=>r.value?Array.from(l.value).indexOf(r.value):-1),c=O(()=>Z.layersWithOutsidePointerEventsDisabled.size>0),a=O(()=>{const m=Array.from(l.value),[y]=[...Z.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(y);return d.value>=v}),u=jo(async m=>{const y=[...Z.branches].some(v=>v==null?void 0:v.contains(m.target));!a.value||y||(o("pointerDownOutside",m),o("interactOutside",m),await Le(),m.defaultPrevented||o("dismiss"))},r),p=Uo(m=>{[...Z.branches].some(y=>y==null?void 0:y.contains(m.target))||(o("focusOutside",m),o("interactOutside",m),m.defaultPrevented||o("dismiss"))},r);xo("Escape",m=>{d.value===l.value.size-1&&(o("escapeKeyDown",m),m.defaultPrevented||o("dismiss"))});let f;return ee(m=>{r.value&&(n.disableOutsidePointerEvents&&(Z.layersWithOutsidePointerEventsDisabled.size===0&&(f=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents="none"),Z.layersWithOutsidePointerEventsDisabled.add(r.value)),l.value.add(r.value),m(()=>{n.disableOutsidePointerEvents&&Z.layersWithOutsidePointerEventsDisabled.size===1&&(s.value.body.style.pointerEvents=f)}))}),ee(m=>{m(()=>{r.value&&(l.value.delete(r.value),Z.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(m,y)=>(k(),H(g(xe),{ref:g(i),"as-child":m.asChild,as:m.as,"data-dismissable-layer":"",style:Me({pointerEvents:c.value?a.value?"auto":"none":void 0}),onFocusCapture:g(p).onFocusCapture,onBlurCapture:g(p).onBlurCapture,onPointerdownCapture:g(u).onPointerDownCapture},{default:T(()=>[$(m.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}});po(()=>P([]));const[jt,Yo]=Oe("PopperRoot"),Ko=S({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=P();return Yo({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>$(n.$slots,"default")}}),Xo=S({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,{forwardRef:n,currentElement:o}=I(),i=jt();return ee(()=>{i.onAnchorChange(t.element??o.value)}),(r,s)=>(k(),H(g(xe),{ref:g(n),as:r.as,"as-child":r.asChild},{default:T(()=>[$(r.$slots,"default")]),_:3},8,["as","as-child"]))}});function qo(e){return e!==null}function Jo(e){return{name:"transformOrigin",options:e,fn(t){var n,o,i;const{placement:r,rects:s,middlewareData:l}=t,d=((n=l.arrow)==null?void 0:n.centerOffset)!==0,c=d?0:e.arrowWidth,a=d?0:e.arrowHeight,[u,p]=qe(r),f={start:"0%",center:"50%",end:"100%"}[p],m=(((o=l.arrow)==null?void 0:o.x)??0)+c/2,y=(((i=l.arrow)==null?void 0:i.y)??0)+a/2;let v="",h="";return u==="bottom"?(v=d?f:`${m}px`,h=`${-a}px`):u==="top"?(v=d?f:`${m}px`,h=`${s.floating.height+a}px`):u==="right"?(v=`${-a}px`,h=d?f:`${y}px`):u==="left"&&(v=`${s.floating.width+a}px`,h=d?f:`${y}px`),{data:{x:v,y:h}}}}}function qe(e){const[t,n="center"]=e.split("-");return[t,n]}const Qo={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[Zo,ei]=Oe("PopperContent"),ti=S({inheritAttrs:!1,__name:"PopperContent",props:rn({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...Qo}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,i=jt(),{forwardRef:r,currentElement:s}=I(),l=P(),d=P(),{width:c,height:a}=Mo(d),u=O(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),p=O(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),f=O(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),m=O(()=>({padding:p.value,boundary:f.value.filter(qo),altBoundary:f.value.length>0})),y=uo(()=>[eo({mainAxis:n.sideOffset+a.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&bt({...m.value}),n.avoidCollisions&&to({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?ro():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&bt({...m.value}),no({...m.value,apply:({elements:D,rects:j,availableWidth:M,availableHeight:F})=>{const{width:R,height:oe}=j.reference,N=D.floating.style;N.setProperty("--radix-popper-available-width",`${M}px`),N.setProperty("--radix-popper-available-height",`${F}px`),N.setProperty("--radix-popper-anchor-width",`${R}px`),N.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),d.value&&ao({element:d.value,padding:n.arrowPadding}),Jo({arrowWidth:c.value,arrowHeight:a.value}),n.hideWhenDetached&&oo({strategy:"referenceHidden",...m.value})]),{floatingStyles:v,placement:h,isPositioned:w,middlewareData:b}=co(i.anchor,l,{strategy:"fixed",placement:u,whileElementsMounted:(...D)=>Zn(...D,{animationFrame:n.updatePositionStrategy==="always"}),middleware:y}),A=O(()=>qe(h.value)[0]),C=O(()=>qe(h.value)[1]);sn(()=>{w.value&&o("placed")});const _=O(()=>{var D;return((D=b.value.arrow)==null?void 0:D.centerOffset)!==0}),E=P("");ee(()=>{s.value&&(E.value=window.getComputedStyle(s.value).zIndex)});const B=O(()=>{var D;return((D=b.value.arrow)==null?void 0:D.x)??0}),L=O(()=>{var D;return((D=b.value.arrow)==null?void 0:D.y)??0});return ei({placedSide:A,onArrowChange:D=>d.value=D,arrowX:B,arrowY:L,shouldHideArrow:_}),(D,j)=>{var M,F,R;return k(),ue("div",{ref_key:"floatingRef",ref:l,"data-radix-popper-content-wrapper":"",style:Me({...g(v),transform:g(w)?g(v).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:E.value,"--radix-popper-transform-origin":[(M=g(b).transformOrigin)==null?void 0:M.x,(F=g(b).transformOrigin)==null?void 0:F.y].join(" "),...((R=g(b).hide)==null?void 0:R.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[V(g(xe),ce({ref:g(r)},D.$attrs,{"as-child":n.asChild,as:D.as,"data-side":A.value,"data-align":C.value,style:{animation:g(w)?void 0:"none"}}),{default:T(()=>[$(D.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),ni=x("polygon",{points:"0,0 30,0 15,10"},null,-1),oi=S({__name:"Arrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const t=e;return I(),(n,o)=>(k(),H(g(xe),ce(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 30 10",preserveAspectRatio:n.asChild?void 0:"none"}),{default:T(()=>[$(n.$slots,"default",{},()=>[ni])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),ii={top:"bottom",right:"left",bottom:"top",left:"right"},ri=S({inheritAttrs:!1,__name:"PopperArrow",props:{width:{},height:{},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const{forwardRef:t}=I(),n=Zo(),o=O(()=>ii[n.placedSide.value]);return(i,r)=>{var s,l,d,c;return k(),ue("span",{ref:a=>{g(n).onArrowChange(a)},style:Me({position:"absolute",left:(s=g(n).arrowX)!=null&&s.value?`${(l=g(n).arrowX)==null?void 0:l.value}px`:void 0,top:(d=g(n).arrowY)!=null&&d.value?`${(c=g(n).arrowY)==null?void 0:c.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[g(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[g(n).placedSide.value],visibility:g(n).shouldHideArrow.value?"hidden":void 0})},[V(oi,ce(i.$attrs,{ref:g(t),style:{display:"block"},as:i.as,"as-child":i.asChild,width:i.width,height:i.height}),{default:T(()=>[$(i.$slots,"default")]),_:3},16,["as","as-child","width","height"])],4)}}}),si=S({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return I(),(t,n)=>(k(),H(g(xe),{as:t.as,"as-child":t.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:T(()=>[$(t.$slots,"default")]),_:3},8,["as","as-child"]))}});function li(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}li();const Ut="tooltip.open",[lt,ai]=Oe("TooltipProvider"),ci=S({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(e){const t=e,{delayDuration:n,skipDelayDuration:o,disableHoverableContent:i,disableClosingTrigger:r,ignoreNonKeyboardFocus:s,disabled:l}=Ot(t);I();const d=P(!0),c=P(!1),{start:a,stop:u}=zt(()=>{d.value=!0},o,{immediate:!1});return ai({isOpenDelayed:d,delayDuration:n,onOpen(){u(),d.value=!1},onClose(){a()},isPointerInTransitRef:c,disableHoverableContent:i,disableClosingTrigger:r,disabled:l,ignoreNonKeyboardFocus:s}),(p,f)=>$(p.$slots,"default")}}),[Ie,ui]=Oe("TooltipRoot"),di=S({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=t;I();const i=lt(),r=O(()=>n.disableHoverableContent??i.disableHoverableContent.value),s=O(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),l=O(()=>n.disabled??i.disabled.value),d=O(()=>n.delayDuration??i.delayDuration.value),c=O(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),a=Ao(n,"open",o,{defaultValue:n.defaultOpen,passive:n.open===void 0});X(a,b=>{i.onClose&&(b?(i.onOpen(),document.dispatchEvent(new CustomEvent(Ut))):i.onClose())});const u=P(!1),p=P(),f=O(()=>a.value?u.value?"delayed-open":"instant-open":"closed"),{start:m,stop:y}=zt(()=>{u.value=!0,a.value=!0},d,{immediate:!1});function v(){y(),u.value=!1,a.value=!0}function h(){y(),a.value=!1}function w(){m()}return ui({contentId:"",open:a,stateAttribute:f,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){i.isOpenDelayed.value?w():v()},onTriggerLeave(){r.value?h():y()},onOpen:v,onClose:h,disableHoverableContent:r,disableClosingTrigger:s,disabled:l,ignoreNonKeyboardFocus:c}),(b,A)=>(k(),H(g(Ko),null,{default:T(()=>[$(b.$slots,"default",{open:g(a)})]),_:3}))}}),fi=S({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Ie(),o=lt();n.contentId||(n.contentId=Lo(void 0,"radix-vue-tooltip-content"));const{forwardRef:i,currentElement:r}=I(),s=P(!1),l=P(!1),d=O(()=>n.disabled.value?{}:{click:y,focus:f,pointermove:u,pointerleave:p,pointerdown:a,blur:m});$e(()=>{n.onTriggerChange(r.value)});function c(){setTimeout(()=>{s.value=!1},1)}function a(){s.value=!0,document.addEventListener("pointerup",c,{once:!0})}function u(v){v.pointerType!=="touch"&&!l.value&&!o.isPointerInTransitRef.value&&(n.onTriggerEnter(),l.value=!0)}function p(){n.onTriggerLeave(),l.value=!1}function f(v){var h,w;s.value||n.ignoreNonKeyboardFocus.value&&!((w=(h=v.target).matches)!=null&&w.call(h,":focus-visible"))||n.onOpen()}function m(){n.onClose()}function y(){n.disableClosingTrigger.value||n.onClose()}return(v,h)=>(k(),H(g(Xo),{"as-child":""},{default:T(()=>[V(g(xe),ce({ref:g(i),"aria-describedby":g(n).open.value?g(n).contentId:void 0,"data-state":g(n).stateAttribute.value,as:v.as,"as-child":t.asChild,"data-grace-area-trigger":""},Kt(d.value)),{default:T(()=>[$(v.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),Gt=S({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Ie(),{forwardRef:r}=I(),s=Zt(),l=O(()=>{var a;return(a=s.default)==null?void 0:a.call(s)}),d=O(()=>{var a;if(n.ariaLabel)return n.ariaLabel;let u="";function p(f){typeof f.children=="string"&&f.type!==Tt?u+=f.children:Array.isArray(f.children)&&f.children.forEach(m=>p(m))}return(a=l.value)==null||a.forEach(f=>p(f)),u}),c=O(()=>{const{ariaLabel:a,...u}=n;return u});return $e(()=>{Xe(window,"scroll",a=>{const u=a.target;u!=null&&u.contains(i.trigger.value)&&i.onClose()}),Xe(window,Ut,i.onClose)}),(a,u)=>(k(),H(g(Go),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:u[0]||(u[0]=p=>o("escapeKeyDown",p)),onPointerDownOutside:u[1]||(u[1]=p=>{var f;g(i).disableClosingTrigger.value&&(f=g(i).trigger.value)!=null&&f.contains(p.target)&&p.preventDefault(),o("pointerDownOutside",p)}),onFocusOutside:u[2]||(u[2]=en(()=>{},["prevent"])),onDismiss:u[3]||(u[3]=p=>g(i).onClose())},{default:T(()=>[V(g(ti),ce({ref:g(r),"data-state":g(i).stateAttribute.value},{...a.$attrs,...c.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:T(()=>[$(a.$slots,"default"),V(g(si),{id:g(i).contentId,role:"tooltip"},{default:T(()=>[_t(U(d.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),pi=S({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(e){const t=It(e),{forwardRef:n,currentElement:o}=I(),{trigger:i,onClose:r}=Ie(),s=lt(),{isPointerInTransit:l,onPointerExit:d}=Po(i,o);return s.isPointerInTransitRef=l,d(()=>{r()}),(c,a)=>(k(),H(Gt,ce({ref:g(n)},g(t)),{default:T(()=>[$(c.$slots,"default")]),_:3},16))}}),mi=S({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Ie(),r=Do(n,o),{forwardRef:s}=I();return(l,d)=>(k(),H(g(Wo),{present:l.forceMount||g(i).open.value},{default:T(()=>[(k(),H(Xt(g(i).disableHoverableContent.value?Gt:pi),ce({ref:g(s)},g(r)),{default:T(()=>[$(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),vi=S({__name:"TooltipArrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const t=e;return I(),(n,o)=>(k(),H(g(ri),Et(Dt(t)),{default:T(()=>[$(n.$slots,"default")]),_:3},16))}}),hi=S({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,o)=>(k(),H(g(zo),Et(Dt(t)),{default:T(()=>[$(n.$slots,"default")]),_:3},16))}}),gi={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},yi={relative:""},bi={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},xi={text:"neutral-300 dark:neutral-500","text-nowrap":""},wi={"text-nowrap":"","text-3xl":"","font-semibold":""},Ci={"flex-col":""},Ai=["onClick"],Oi={flex:"~ row 1","items-center":"","gap-1.5":""},Ei={"p-4":""},Di={class:"mb-2 text-sm font-medium"},Pi={flex:"~ col gap-4"},Ti=["disabled"],_i={"mt-4":"",class:"flex items-center justify-end gap-4"},ki={class:"relative inline-flex cursor-pointer items-center"},Bi={class:"ml-2 text-sm font-medium"},Ri=["onClick"],Si={flex:"~ row 1","items-center":"","gap-1.5":""},$i={"p-4":"",flex:"~ col gap-4"},Li={"text-base":"","font-medium":""},Mi={text:"sm neutral-500"},Ni={flex:"~ row","gap-2":""},Hi=["onClick"],Fi=S({__name:"index",setup(e){const{t}=fn(),n=pn(),o=mn(),i=O(()=>[{name:t("settings.pages.themes.sections.section.theme-presets.preset.morandi.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.morandi.description"),colors:[{hex:"#A5978B",name:"Taupe"},{hex:"#D8CAAF",name:"Beige"},{hex:"#B8B4A7",name:"Ash Grey"},{hex:"#C4BCB1",name:"Light Taupe"},{hex:"#E5DED8",name:"Ivory"},{hex:"#9A8F7D",name:"Olive Grey"},{hex:"#BEB5A7",name:"Sand"},{hex:"#C9C0B6",name:"Warm Grey"}]},{name:t("settings.pages.themes.sections.section.theme-presets.preset.monet.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.monet.description"),colors:[{hex:"#7A9EAF",name:"Sky Blue"},{hex:"#B8C7CC",name:"Mist"},{hex:"#D4B79C",name:"Sand"},{hex:"#8B9D77",name:"Moss Green"},{hex:"#C7D5CB",name:"Water Lily"},{hex:"#E6D0B1",name:"Wheat"},{hex:"#94A7B1",name:"Slate Blue"},{hex:"#B4C8C3",name:"Sage"}]},{name:t("settings.pages.themes.sections.section.theme-presets.preset.japanese.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.japanese.description"),colors:[{hex:"#D9B48F",name:"Tan"},{hex:"#B5917A",name:"Warm Taupe"},{hex:"#8C7A6B",name:"Umber"},{hex:"#A17F5F",name:"Coffee"},{hex:"#B98C46",name:"Bronze"},{hex:"#C7A252",name:"Gold"},{hex:"#DAB300",name:"Mustard"},{hex:"#D19826",name:"Amber"}]},{name:t("settings.pages.themes.sections.section.theme-presets.preset.nordic.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.nordic.description"),colors:[{hex:"#9BA7B0",name:"Nordic Blue"},{hex:"#C1CBD4",name:"Ice"},{hex:"#A5ADB6",name:"Fjord"},{hex:"#8B959E",name:"Steel"},{hex:"#D4DCE4",name:"Glacier"},{hex:"#7F8A94",name:"Slate"},{hex:"#B3BCC6",name:"Cloud"},{hex:"#98A4AE",name:"Stone"}]},{name:t("settings.pages.themes.sections.section.theme-presets.preset.chinese.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.chinese.description"),colors:[{hex:"#E4C6D0",name:"霞光红 (Rosy Dawn)"},{hex:"#A61B29",name:"枣红 (Chinese Red)"},{hex:"#5D513C",name:"黄栌 (Smoky Brown)"},{hex:"#789262",name:"竹青 (Bamboo Green)"},{hex:"#1C0D1A",name:"乌梅紫 (Dark Purple)"},{hex:"#F7C242",name:"缃色 (Golden Yellow)"},{hex:"#62A9DD",name:"青冥 (Azure Blue)"},{hex:"#8C4B3C",name:"赭石 (Ochre)"}]}]);function r(){o.themeColorsHue=yn,o.themeColorsHueDynamic=!1}function s(d){const c=dt("oklch")(d);if(!c)return;const{h:a}=c;a&&(o.themeColorsHue=a,o.themeColorsHueDynamic=!1)}function l(d){if(o.themeColorsHueDynamic)return!1;const c=dt("oklch")(d);if(!c||!c.h)return!1;const a=Math.abs(c.h-o.themeColorsHue);return a<.01||a>359.99}return(d,c)=>{const a=vn("motion");return k(),ue(ke,null,[Ve((k(),ue("div",gi,[x("button",{onClick:c[0]||(c[0]=u=>g(n).back())},c[3]||(c[3]=[x("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),x("h1",yi,[x("div",bi,[x("span",xi,U(g(t)("settings.title")),1)]),x("div",wi,U(g(t)("settings.pages.themes.title")),1)])])),[[a]]),x("div",Ci,[V(g(ut),{"mt-4":"","w-full":"",default:!0},{trigger:T(u=>[x("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:p=>u.setVisible(!u.visible)},[x("div",Oi,[c[4]||(c[4]=x("div",{"i-solar:pallete-2-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"},null,-1)),x("div",null,U(g(t)("settings.pages.themes.sections.section.custom-color.title")),1)]),x("div",{transform:"",transition:"transform duration-250",class:De({"rotate-180":u.visible})},c[5]||(c[5]=[x("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,Ai)]),default:T(()=>[x("div",Ei,[x("div",Di,U(g(t)("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),x("div",Pi,[Ve(x("input",{"onUpdate:modelValue":c[1]||(c[1]=u=>g(o).themeColorsHue=u),type:"range",min:"0",max:"360",step:"0.01",class:De(["theme-hue-slider h-10 w-full",{"opacity-25 cursor-not-allowed":g(o).themeColorsHueDynamic}]),disabled:g(o).themeColorsHueDynamic},null,10,Ti),[[hn,g(o).themeColorsHue]]),c[6]||(c[6]=x("div",{"h-10":"","w-full":"",flex:"","overflow-hidden":"","rounded-lg":""},[x("div",{bg:"primary-50",class:"primary-color-bar","text-black":""}," 50 "),x("div",{bg:"primary-100",class:"primary-color-bar","text-black":""}," 100 "),x("div",{bg:"primary-200",class:"primary-color-bar","text-black":""}," 200 "),x("div",{bg:"primary-300",class:"primary-color-bar","text-black":""}," 300 "),x("div",{bg:"primary-400",class:"primary-color-bar","text-black":""}," 400 "),x("div",{bg:"primary-500",class:"primary-color-bar","text-black":""}," 500 "),x("div",{bg:"primary-600",class:"primary-color-bar","text-white":""}," 600 "),x("div",{bg:"primary-700",class:"primary-color-bar","text-white":""}," 700 "),x("div",{bg:"primary-800",class:"primary-color-bar","text-white":""}," 800 "),x("div",{bg:"primary-900",class:"primary-color-bar","text-white":""}," 900 "),x("div",{bg:"primary-950",class:"primary-color-bar","text-white":""}," 950 ")],-1)),c[7]||(c[7]=x("div",{"h-10":"","w-full":"",flex:"","overflow-hidden":"","rounded-lg":"",class:"transparency-grid"},[x("div",{bg:"primary-500/5",class:"primary-color-bar","text-black":""}," 500/5 "),x("div",{bg:"primary-500/10",class:"primary-color-bar","text-black":""}," 500/10 "),x("div",{bg:"primary-500/20",class:"primary-color-bar","text-black":""}," 500/20 "),x("div",{bg:"primary-500/30",class:"primary-color-bar","text-black":""}," 500/30 "),x("div",{bg:"primary-500/40",class:"primary-color-bar","text-black":""}," 500/40 "),x("div",{bg:"primary-500/50",class:"primary-color-bar","text-black":""}," 500/50 "),x("div",{bg:"primary-500/60",class:"primary-color-bar","text-black":""}," 500/60 "),x("div",{bg:"primary-500/70",class:"primary-color-bar","text-black":""}," 500/70 "),x("div",{bg:"primary-500/80",class:"primary-color-bar","text-black":""}," 500/80 "),x("div",{bg:"primary-500/90",class:"primary-color-bar","text-black":""}," 500/90 "),x("div",{bg:"primary-500",class:"primary-color-bar","text-black":""}," 500 ")],-1))]),x("div",_i,[x("label",ki,[Ve(x("input",{"onUpdate:modelValue":c[2]||(c[2]=u=>g(o).themeColorsHueDynamic=u),type:"checkbox",class:"peer sr-only"},null,512),[[gn,g(o).themeColorsHueDynamic]]),c[8]||(c[8]=x("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),x("span",Bi,U(g(t)("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)]),x("button",{class:"rounded-md bg-neutral-100 px-3 py-1.5 text-sm transition-colors dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700",onClick:r},U(g(t)("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.reset.label")),1)])])]),_:1}),V(g(ut),{"mt-4":"","w-full":"",default:!0},{trigger:T(u=>[x("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:p=>u.setVisible(!u.visible)},[x("div",Si,[c[9]||(c[9]=x("div",{"i-solar:magic-stick-2-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"},null,-1)),x("div",null,U(g(t)("settings.pages.themes.sections.section.theme-presets.title")),1)]),x("div",{transform:"",transition:"transform duration-250",class:De({"rotate-180":u.visible})},c[10]||(c[10]=[x("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,Ri)]),default:T(()=>[x("div",$i,[(k(!0),ue(ke,null,ct(i.value,u=>(k(),ue("div",{key:u.name,flex:"~ row",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","cursor-pointer":"","items-center":"","justify-between":"","gap-4":"","rounded-lg":"","px-4":"","py-3":""},[x("div",null,[x("div",Li,U(u.name),1),x("div",Mi,U(u.description),1)]),x("div",Ni,[(k(!0),ue(ke,null,ct(u.colors,p=>(k(),H(g(ci),{key:p.hex},{default:T(()=>[V(g(di),null,{default:T(()=>[V(g(fi),null,{default:T(()=>[x("div",{style:Me({backgroundColor:p.hex}),class:De(["size-6 cursor-pointer rounded-full transition-all duration-250 ease-in-out",[l(p.hex)?"scale-150 z-10 mx-1":"hover:scale-110"]]),onClick:f=>s(p.hex)},null,14,Hi)]),_:2},1024),V(g(hi),null,{default:T(()=>[V(g(mi),{class:"rounded-lg bg-white px-3 py-1.5 text-sm shadow-md dark:bg-neutral-800"},{default:T(()=>[_t(U(p.name)+" ",1),V(g(vi),{class:"fill-white dark:fill-neutral-800"})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])]))),128))])]),_:1})]),c[11]||(c[11]=x("div",{text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[x("div",{text:"40","i-lucide:paintbrush":""})],-1))],64)}}});typeof ft=="function"&&ft(Fi);export{Fi as default};
|
|
|
1 |
+
import{h as O,g as P,G as wt,w as X,ah as Ct,ai as At,c1 as me,e as g,d as S,E as Ot,p as $,x as H,o as k,y as T,m as $e,b as V,bQ as ce,c2 as Kt,c3 as Et,c4 as Dt,c5 as Xt,bW as ye,c6 as Pt,bT as qt,bv as Le,c7 as at,bS as _e,af as ee,C as Jt,c8 as Qt,ab as Zt,bP as Tt,b_ as _t,D as U,bM as en,c as ue,n as Me,bR as tn,br as nn,c9 as kt,ca as on,cb as rn,cc as sn,b$ as ln,H as an,bx as ke,a as x,cd as cn,ce as un,bU as dn,i as fn,bE as pn,v as mn,bw as vn,A as Ve,z as De,bH as hn,B as gn,by as ct,cf as yn}from"./index-TGrV2Wj8.js";import{_ as ut}from"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import{n as dt}from"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{b as ft}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const bn=["top","right","bottom","left"],se=Math.min,W=Math.max,Be=Math.round,Pe=Math.floor,q=e=>({x:e,y:e}),xn={left:"right",right:"left",bottom:"top",top:"bottom"},wn={start:"end",end:"start"};function Ue(e,t,n){return W(e,se(t,n))}function te(e,t){return typeof e=="function"?e(t):e}function ne(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function Je(e){return e==="x"?"y":"x"}function Qe(e){return e==="y"?"height":"width"}function le(e){return["top","bottom"].includes(ne(e))?"y":"x"}function Ze(e){return Je(le(e))}function Cn(e,t,n){n===void 0&&(n=!1);const o=be(e),i=Ze(e),r=Qe(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Re(s)),[s,Re(s)]}function An(e){const t=Re(e);return[Ge(e),t,Ge(t)]}function Ge(e){return e.replace(/start|end/g,t=>wn[t])}function On(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:s;default:return[]}}function En(e,t,n,o){const i=be(e);let r=On(ne(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(Ge)))),r}function Re(e){return e.replace(/left|right|bottom|top/g,t=>xn[t])}function Dn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Bt(e){return typeof e!="number"?Dn(e):{top:e,right:e,bottom:e,left:e}}function Se(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function pt(e,t,n){let{reference:o,floating:i}=e;const r=le(t),s=Ze(t),l=Qe(s),d=ne(t),c=r==="y",a=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let f;switch(d){case"top":f={x:a,y:o.y-i.height};break;case"bottom":f={x:a,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(be(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1);break}return f}const Pn=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:a,y:u}=pt(c,o,d),p=o,f={},m=0;for(let y=0;y<l.length;y++){const{name:v,fn:h}=l[y],{x:w,y:b,data:A,reset:C}=await h({x:a,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});a=w??a,u=b??u,f={...f,[v]:{...f[v],...A}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:a,y:u}=pt(c,p,d)),y=-1)}return{x:a,y:u,placement:p,strategy:i,middlewareData:f}};async function we(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:d}=e,{boundary:c="clippingAncestors",rootBoundary:a="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=te(t,e),m=Bt(f),v=l[p?u==="floating"?"reference":"floating":u],h=Se(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:a,strategy:d})),w=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),A=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},C=Se(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:b,strategy:d}):w);return{top:(h.top-C.top+m.top)/A.y,bottom:(C.bottom-h.bottom+m.bottom)/A.y,left:(h.left-C.left+m.left)/A.x,right:(C.right-h.right+m.right)/A.x}}const Tn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:l,middlewareData:d}=t,{element:c,padding:a=0}=te(e,t)||{};if(c==null)return{};const u=Bt(a),p={x:n,y:o},f=Ze(i),m=Qe(f),y=await s.getDimensions(c),v=f==="y",h=v?"top":"left",w=v?"bottom":"right",b=v?"clientHeight":"clientWidth",A=r.reference[m]+r.reference[f]-p[f]-r.floating[m],C=p[f]-r.reference[f],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let E=_?_[b]:0;(!E||!await(s.isElement==null?void 0:s.isElement(_)))&&(E=l.floating[b]||r.floating[m]);const B=A/2-C/2,L=E/2-y[m]/2-1,D=se(u[h],L),j=se(u[w],L),M=D,F=E-y[m]-j,R=E/2-y[m]/2+B,oe=Ue(M,R,F),N=!d.arrow&&be(i)!=null&&R!==oe&&r.reference[m]/2-(R<M?D:j)-y[m]/2<0,K=N?R<M?R-M:R-F:0;return{[f]:p[f]+K,data:{[f]:oe,centerOffset:R-oe-K,...N&&{alignmentOffset:K}},reset:N}}}),_n=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:d,elements:c}=t,{mainAxis:a=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...v}=te(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const h=ne(i),w=le(l),b=ne(l)===l,A=await(d.isRTL==null?void 0:d.isRTL(c.floating)),C=p||(b||!y?[Re(l)]:An(l)),_=m!=="none";!p&&_&&C.push(...En(l,y,m,A));const E=[l,...C],B=await we(t,v),L=[];let D=((o=r.flip)==null?void 0:o.overflows)||[];if(a&&L.push(B[h]),u){const R=Cn(i,s,A);L.push(B[R[0]],B[R[1]])}if(D=[...D,{placement:i,overflows:L}],!L.every(R=>R<=0)){var j,M;const R=(((j=r.flip)==null?void 0:j.index)||0)+1,oe=E[R];if(oe)return{data:{index:R,overflows:D},reset:{placement:oe}};let N=(M=D.filter(K=>K.overflows[0]<=0).sort((K,ie)=>K.overflows[1]-ie.overflows[1])[0])==null?void 0:M.placement;if(!N)switch(f){case"bestFit":{var F;const K=(F=D.filter(ie=>{if(_){const re=le(ie.placement);return re===w||re==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(re=>re>0).reduce((re,Yt)=>re+Yt,0)]).sort((ie,re)=>ie[1]-re[1])[0])==null?void 0:F[0];K&&(N=K);break}case"initialPlacement":N=l;break}if(i!==N)return{reset:{placement:N}}}return{}}}};function mt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vt(e){return bn.some(t=>e[t]>=0)}const kn=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=te(e,t);switch(o){case"referenceHidden":{const r=await we(t,{...i,elementContext:"reference"}),s=mt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:vt(s)}}}case"escaped":{const r=await we(t,{...i,altBoundary:!0}),s=mt(r,n.floating);return{data:{escapedOffsets:s,escaped:vt(s)}}}default:return{}}}}};async function Bn(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=ne(n),l=be(n),d=le(n)==="y",c=["left","top"].includes(s)?-1:1,a=r&&d?-1:1,u=te(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof m=="number"&&(f=l==="end"?m*-1:m),d?{x:f*a,y:p*c}:{x:p*c,y:f*a}}const Rn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=t,d=await Bn(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:s}}}}},Sn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:h,y:w}=v;return{x:h,y:w}}},...d}=te(e,t),c={x:n,y:o},a=await we(t,d),u=le(ne(i)),p=Je(u);let f=c[p],m=c[u];if(r){const v=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=f+a[v],b=f-a[h];f=Ue(w,f,b)}if(s){const v=u==="y"?"top":"left",h=u==="y"?"bottom":"right",w=m+a[v],b=m-a[h];m=Ue(w,m,b)}const y=l.fn({...t,[p]:f,[u]:m});return{...y,data:{x:y.x-n,y:y.y-o,enabled:{[p]:r,[u]:s}}}}}},$n=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:l=0,mainAxis:d=!0,crossAxis:c=!0}=te(e,t),a={x:n,y:o},u=le(i),p=Je(u);let f=a[p],m=a[u];const y=te(l,t),v=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(d){const b=p==="y"?"height":"width",A=r.reference[p]-r.floating[b]+v.mainAxis,C=r.reference[p]+r.reference[b]-v.mainAxis;f<A?f=A:f>C&&(f=C)}if(c){var h,w;const b=p==="y"?"width":"height",A=["top","left"].includes(ne(i)),C=r.reference[u]-r.floating[b]+(A&&((h=s.offset)==null?void 0:h[u])||0)+(A?0:v.crossAxis),_=r.reference[u]+r.reference[b]+(A?0:((w=s.offset)==null?void 0:w[u])||0)-(A?v.crossAxis:0);m<C?m=C:m>_&&(m=_)}return{[p]:f,[u]:m}}}},Ln=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:s,elements:l}=t,{apply:d=()=>{},...c}=te(e,t),a=await we(t,c),u=ne(i),p=be(i),f=le(i)==="y",{width:m,height:y}=r.floating;let v,h;u==="top"||u==="bottom"?(v=u,h=p===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(h=u,v=p==="end"?"top":"bottom");const w=y-a.top-a.bottom,b=m-a.left-a.right,A=se(y-a[v],w),C=se(m-a[h],b),_=!t.middlewareData.shift;let E=A,B=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(B=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=w),_&&!p){const D=W(a.left,0),j=W(a.right,0),M=W(a.top,0),F=W(a.bottom,0);f?B=m-2*(D!==0||j!==0?D+j:W(a.left,a.right)):E=y-2*(M!==0||F!==0?M+F:W(a.top,a.bottom))}await d({...t,availableWidth:B,availableHeight:E});const L=await s.getDimensions(l.floating);return m!==L.width||y!==L.height?{reset:{rects:!0}}:{}}}};function Ne(){return typeof window<"u"}function pe(e){return et(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Q(e){var t;return(t=(et(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function et(e){return Ne()?e instanceof Node||e instanceof z(e).Node:!1}function G(e){return Ne()?e instanceof Element||e instanceof z(e).Element:!1}function J(e){return Ne()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ht(e){return!Ne()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}function Ae(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function Mn(e){return["table","td","th"].includes(pe(e))}function He(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function tt(e){const t=nt(),n=G(e)?Y(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Nn(e){let t=ae(e);for(;J(t)&&!ge(t);){if(tt(t))return t;if(He(t))return null;t=ae(t)}return null}function nt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ge(e){return["html","body","#document"].includes(pe(e))}function Y(e){return z(e).getComputedStyle(e)}function Fe(e){return G(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ae(e){if(pe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ht(e)&&e.host||Q(e);return ht(t)?t.host:t}function Rt(e){const t=ae(e);return ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&Ae(t)?t:Rt(t)}function Ce(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Rt(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),s=z(i);if(r){const l=Ye(s);return t.concat(s,s.visualViewport||[],Ae(i)?i:[],l&&n?Ce(l):[])}return t.concat(i,Ce(i,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function St(e){const t=Y(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=J(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,l=Be(n)!==r||Be(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function ot(e){return G(e)?e:e.contextElement}function he(e){const t=ot(e);if(!J(t))return q(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=St(t);let s=(r?Be(n.width):n.width)/o,l=(r?Be(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Hn=q(0);function $t(e){const t=z(e);return!nt()||!t.visualViewport?Hn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function fe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=ot(e);let s=q(1);t&&(o?G(o)&&(s=he(o)):s=he(e));const l=Fn(r,n,o)?$t(r):q(0);let d=(i.left+l.x)/s.x,c=(i.top+l.y)/s.y,a=i.width/s.x,u=i.height/s.y;if(r){const p=z(r),f=o&&G(o)?z(o):o;let m=p,y=Ye(m);for(;y&&o&&f!==m;){const v=he(y),h=y.getBoundingClientRect(),w=Y(y),b=h.left+(y.clientLeft+parseFloat(w.paddingLeft))*v.x,A=h.top+(y.clientTop+parseFloat(w.paddingTop))*v.y;d*=v.x,c*=v.y,a*=v.x,u*=v.y,d+=b,c+=A,m=z(y),y=Ye(m)}}return Se({width:a,height:u,x:d,y:c})}function it(e,t){const n=Fe(e).scrollLeft;return t?t.left+n:fe(Q(e)).left+n}function Lt(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=o.left+t.scrollLeft-(n?0:it(e,o)),r=o.top+t.scrollTop;return{x:i,y:r}}function Wn(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",s=Q(o),l=t?He(t.floating):!1;if(o===s||l&&r)return n;let d={scrollLeft:0,scrollTop:0},c=q(1);const a=q(0),u=J(o);if((u||!u&&!r)&&((pe(o)!=="body"||Ae(s))&&(d=Fe(o)),J(o))){const f=fe(o);c=he(o),a.x=f.x+o.clientLeft,a.y=f.y+o.clientTop}const p=s&&!u&&!r?Lt(s,d,!0):q(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+a.x+p.x,y:n.y*c.y-d.scrollTop*c.y+a.y+p.y}}function zn(e){return Array.from(e.getClientRects())}function In(e){const t=Q(e),n=Fe(e),o=e.ownerDocument.body,i=W(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=W(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+it(e);const l=-n.scrollTop;return Y(o).direction==="rtl"&&(s+=W(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:l}}function Vn(e,t){const n=z(e),o=Q(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,d=0;if(i){r=i.width,s=i.height;const c=nt();(!c||c&&t==="fixed")&&(l=i.offsetLeft,d=i.offsetTop)}return{width:r,height:s,x:l,y:d}}function jn(e,t){const n=fe(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=J(e)?he(e):q(1),s=e.clientWidth*r.x,l=e.clientHeight*r.y,d=i*r.x,c=o*r.y;return{width:s,height:l,x:d,y:c}}function gt(e,t,n){let o;if(t==="viewport")o=Vn(e,n);else if(t==="document")o=In(Q(e));else if(G(t))o=jn(t,n);else{const i=$t(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Se(o)}function Mt(e,t){const n=ae(e);return n===t||!G(n)||ge(n)?!1:Y(n).position==="fixed"||Mt(n,t)}function Un(e,t){const n=t.get(e);if(n)return n;let o=Ce(e,[],!1).filter(l=>G(l)&&pe(l)!=="body"),i=null;const r=Y(e).position==="fixed";let s=r?ae(e):e;for(;G(s)&&!ge(s);){const l=Y(s),d=tt(s);!d&&l.position==="fixed"&&(i=null),(r?!d&&!i:!d&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ae(s)&&!d&&Mt(e,s))?o=o.filter(a=>a!==s):i=l,s=ae(s)}return t.set(e,o),o}function Gn(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?He(t)?[]:Un(t,this._c):[].concat(n),o],l=s[0],d=s.reduce((c,a)=>{const u=gt(t,a,i);return c.top=W(u.top,c.top),c.right=se(u.right,c.right),c.bottom=se(u.bottom,c.bottom),c.left=W(u.left,c.left),c},gt(t,l,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Yn(e){const{width:t,height:n}=St(e);return{width:t,height:n}}function Kn(e,t,n){const o=J(t),i=Q(t),r=n==="fixed",s=fe(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const d=q(0);if(o||!o&&!r)if((pe(t)!=="body"||Ae(i))&&(l=Fe(t)),o){const p=fe(t,!0,r,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else i&&(d.x=it(i));const c=i&&!o&&!r?Lt(i,l):q(0),a=s.left+l.scrollLeft-d.x-c.x,u=s.top+l.scrollTop-d.y-c.y;return{x:a,y:u,width:s.width,height:s.height}}function je(e){return Y(e).position==="static"}function yt(e,t){if(!J(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Q(e)===n&&(n=n.ownerDocument.body),n}function Nt(e,t){const n=z(e);if(He(e))return n;if(!J(e)){let i=ae(e);for(;i&&!ge(i);){if(G(i)&&!je(i))return i;i=ae(i)}return n}let o=yt(e,t);for(;o&&Mn(o)&&je(o);)o=yt(o,t);return o&&ge(o)&&je(o)&&!tt(o)?n:o||Nn(e)||n}const Xn=async function(e){const t=this.getOffsetParent||Nt,n=this.getDimensions,o=await n(e.floating);return{reference:Kn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function qn(e){return Y(e).direction==="rtl"}const Jn={convertOffsetParentRelativeRectToViewportRelativeRect:Wn,getDocumentElement:Q,getClippingRect:Gn,getOffsetParent:Nt,getElementRects:Xn,getClientRects:zn,getDimensions:Yn,getScale:he,isElement:G,isRTL:qn};function Ht(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Qn(e,t){let n=null,o;const i=Q(e);function r(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),r();const c=e.getBoundingClientRect(),{left:a,top:u,width:p,height:f}=c;if(l||t(),!p||!f)return;const m=Pe(u),y=Pe(i.clientWidth-(a+p)),v=Pe(i.clientHeight-(u+f)),h=Pe(a),b={rootMargin:-m+"px "+-y+"px "+-v+"px "+-h+"px",threshold:W(0,se(1,d))||1};let A=!0;function C(_){const E=_[0].intersectionRatio;if(E!==d){if(!A)return s();E?s(!1,E):o=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!Ht(c,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(C,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,b)}n.observe(e)}return s(!0),r}function Zn(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=ot(e),a=i||r?[...c?Ce(c):[],...Ce(t)]:[];a.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});const u=c&&l?Qn(c,n):null;let p=-1,f=null;s&&(f=new ResizeObserver(h=>{let[w]=h;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!d&&f.observe(c),f.observe(t));let m,y=d?fe(e):null;d&&v();function v(){const h=fe(e);y&&!Ht(y,h)&&n(),y=h,m=requestAnimationFrame(v)}return n(),()=>{var h;a.forEach(w=>{i&&w.removeEventListener("scroll",n),r&&w.removeEventListener("resize",n)}),u==null||u(),(h=f)==null||h.disconnect(),f=null,d&&cancelAnimationFrame(m)}}const eo=Rn,to=Sn,bt=_n,no=Ln,oo=kn,io=Tn,ro=$n,so=(e,t,n)=>{const o=new Map,i={platform:Jn,...n},r={...i.platform,_c:o};return Pn(e,t,{...i,platform:r})};function lo(e){return e!=null&&typeof e=="object"&&"$el"in e}function Ke(e){if(lo(e)){const t=e.$el;return et(t)&&pe(t)==="#comment"?null:t}return e}function ve(e){return typeof e=="function"?e():g(e)}function ao(e){return{name:"arrow",options:e,fn(t){const n=Ke(ve(e.element));return n==null?{}:io({element:n,padding:e.padding}).fn(t)}}}function Ft(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xt(e,t){const n=Ft(e);return Math.round(t*n)/n}function co(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=O(()=>{var E;return(E=ve(n.open))!=null?E:!0}),r=O(()=>ve(n.middleware)),s=O(()=>{var E;return(E=ve(n.placement))!=null?E:"bottom"}),l=O(()=>{var E;return(E=ve(n.strategy))!=null?E:"absolute"}),d=O(()=>{var E;return(E=ve(n.transform))!=null?E:!0}),c=O(()=>Ke(e.value)),a=O(()=>Ke(t.value)),u=P(0),p=P(0),f=P(l.value),m=P(s.value),y=wt({}),v=P(!1),h=O(()=>{const E={position:f.value,left:"0",top:"0"};if(!a.value)return E;const B=xt(a.value,u.value),L=xt(a.value,p.value);return d.value?{...E,transform:"translate("+B+"px, "+L+"px)",...Ft(a.value)>=1.5&&{willChange:"transform"}}:{position:f.value,left:B+"px",top:L+"px"}});let w;function b(){if(c.value==null||a.value==null)return;const E=i.value;so(c.value,a.value,{middleware:r.value,placement:s.value,strategy:l.value}).then(B=>{u.value=B.x,p.value=B.y,f.value=B.strategy,m.value=B.placement,y.value=B.middlewareData,v.value=E!==!1})}function A(){typeof w=="function"&&(w(),w=void 0)}function C(){if(A(),o===void 0){b();return}if(c.value!=null&&a.value!=null){w=o(c.value,a.value,b);return}}function _(){i.value||(v.value=!1)}return X([r,s,l,i],b,{flush:"sync"}),X([c,a],C,{flush:"sync"}),X(i,_,{flush:"sync"}),Ct()&&At(A),{x:me(u),y:me(p),strategy:me(f),placement:me(m),middlewareData:me(y),isPositioned:me(v),floatingStyles:h,update:b}}function Oe(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,o=Symbol(n);return[i=>{const r=qt(o,i);if(r||r===null)return r;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},i=>(dn(o,i),i)]}function Wt(e,t,n){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),o.dispatchEvent(i)}function uo(e,t){var n;const o=wt();return ee(()=>{o.value=e()},{...t,flush:(n=void 0)!=null?n:"sync"}),Pt(o)}function We(e){return Ct()?(At(e),!0):!1}function fo(){const e=new Set,t=n=>{e.delete(n)};return{on:n=>{e.add(n);const o=()=>t(n);return We(o),{off:o}},off:t,trigger:(...n)=>Promise.all(Array.from(e).map(o=>o(...n)))}}function po(e){let t=!1,n;const o=un(!0);return(...i)=>(t||(n=o.run(()=>e(...i)),t=!0),n)}function de(e){return typeof e=="function"?e():g(e)}const Ee=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const mo=e=>typeof e<"u",vo=Object.prototype.toString,ho=e=>vo.call(e)==="[object Object]",go=()=>{};function yo(e,t=1e4){return cn((n,o)=>{let i=de(e),r;const s=()=>setTimeout(()=>{i=de(e),o()},de(t));return We(()=>{clearTimeout(r)}),{get(){return n(),i},set(l){i=l,o(),clearTimeout(r),r=s()}}})}function zt(e,t,n={}){const{immediate:o=!0}=n,i=P(!1);let r=null;function s(){r&&(clearTimeout(r),r=null)}function l(){i.value=!1,s()}function d(...c){s(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,e(...c)},de(t))}return o&&(i.value=!0,Ee&&d()),We(l),{isPending:Pt(i),start:d,stop:l}}function ze(e){var t;const n=de(e);return(t=n==null?void 0:n.$el)!=null?t:n}const rt=Ee?window:void 0;function Xe(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=rt):[t,n,o,i]=e,!t)return go;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],s=()=>{r.forEach(a=>a()),r.length=0},l=(a,u,p,f)=>(a.addEventListener(u,p,f),()=>a.removeEventListener(u,p,f)),d=X(()=>[ze(t),de(i)],([a,u])=>{if(s(),!a)return;const p=ho(u)?{...u}:u;r.push(...n.flatMap(f=>o.map(m=>l(a,f,m,p))))},{immediate:!0,flush:"post"}),c=()=>{d(),s()};return We(c),c}function bo(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function xo(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=rt,eventName:r="keydown",passive:s=!1,dedupe:l=!1}=o,d=bo(t);return Xe(i,r,c=>{c.repeat&&de(l)||d(c)&&n(c)},s)}function wo(){const e=P(!1),t=ye();return t&&$e(()=>{e.value=!0},t),e}function Co(e){return JSON.parse(JSON.stringify(e))}function Ao(e,t,n,o={}){var i,r,s;const{clone:l=!1,passive:d=!1,eventName:c,deep:a=!1,defaultValue:u,shouldEmit:p}=o,f=ye(),m=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((s=(r=f==null?void 0:f.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(f==null?void 0:f.proxy));let y=c;y=y||`update:${t.toString()}`;const v=b=>l?typeof l=="function"?l(b):Co(b):b,h=()=>mo(e[t])?v(e[t]):u,w=b=>{p?p(b)&&m(y,b):m(y,b)};if(d){const b=h(),A=P(b);let C=!1;return X(()=>e[t],_=>{C||(C=!0,A.value=v(_),Le(()=>C=!1))}),X(A,_=>{!C&&(_!==e[t]||a)&&w(_)},{deep:a}),A}else return O({get(){return h()},set(b){w(b)}})}function st(e){return e?e.flatMap(t=>t.type===ke?st(t.children):[t]):[]}const[Oo,Ui]=Oe("ConfigProvider");function Eo(e){const t=ye(),n=t==null?void 0:t.type.emits,o={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(i=>{o[on(kt(i))]=(...r)=>e(i,...r)}),o}function It(e){const t=ye(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((i,r)=>{const s=(t==null?void 0:t.type.props[r]).default;return s!==void 0&&(i[r]=s),i},{}),o=nn(e);return O(()=>{const i={},r=(t==null?void 0:t.vnode.props)??{};return Object.keys(r).forEach(s=>{i[kt(s)]=r[s]}),Object.keys({...n,...i}).reduce((s,l)=>(o.value[l]!==void 0&&(s[l]=o.value[l]),s),{})})}function Do(e,t){const n=It(e),o=t?Eo(t):{};return O(()=>({...n.value,...o}))}function I(){const e=ye(),t=P(),n=O(()=>{var s,l;return["#text","#comment"].includes((s=t.value)==null?void 0:s.$el.nodeName)?(l=t.value)==null?void 0:l.$el.nextElementSibling:ze(t)}),o=Object.assign({},e.exposed),i={};for(const s in e.props)Object.defineProperty(i,s,{enumerable:!0,configurable:!0,get:()=>e.props[s]});if(Object.keys(o).length>0)for(const s in o)Object.defineProperty(i,s,{enumerable:!0,configurable:!0,get:()=>o[s]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function r(s){t.value=s,s&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>s instanceof Element?s:s.$el}),e.exposed=i)}return{forwardRef:r,currentRef:t,currentElement:n}}function Po(e,t){const n=yo(!1,300),o=P(null),i=fo();function r(){o.value=null,n.value=!1}function s(l,d){const c=l.currentTarget,a={x:l.clientX,y:l.clientY},u=To(a,c.getBoundingClientRect()),p=_o(a,u),f=ko(d.getBoundingClientRect()),m=Ro([...p,...f]);o.value=m,n.value=!0}return ee(l=>{if(e.value&&t.value){const d=a=>s(a,t.value),c=a=>s(a,e.value);e.value.addEventListener("pointerleave",d),t.value.addEventListener("pointerleave",c),l(()=>{var a,u;(a=e.value)==null||a.removeEventListener("pointerleave",d),(u=t.value)==null||u.removeEventListener("pointerleave",c)})}}),ee(l=>{var d;if(o.value){const c=a=>{var u,p;if(!o.value)return;const f=a.target,m={x:a.clientX,y:a.clientY},y=((u=e.value)==null?void 0:u.contains(f))||((p=t.value)==null?void 0:p.contains(f)),v=!Bo(m,o.value),h=!!f.closest("[data-grace-area-trigger]");y?r():(v||h)&&(r(),i.trigger())};(d=e.value)==null||d.ownerDocument.addEventListener("pointermove",c),l(()=>{var a;return(a=e.value)==null?void 0:a.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function To(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function _o(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function ko(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function Bo(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,s=t.length-1;r<t.length;s=r++){const l=t[r].x,d=t[r].y,c=t[s].x,a=t[s].y;d>o!=a>o&&n<(c-l)*(o-d)/(a-d)+l&&(i=!i)}return i}function Ro(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),So(t)}function So(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const r=t[t.length-1],s=t[t.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],s=n[n.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}let $o=0;function Lo(e,t="radix"){const n=Oo({useId:void 0});return at?`${t}-${at()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++$o}`}function Mo(e){const t=P(),n=O(()=>{var i;return((i=t.value)==null?void 0:i.width)??0}),o=O(()=>{var i;return((i=t.value)==null?void 0:i.height)??0});return $e(()=>{const i=ze(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let d,c;if("borderBoxSize"in l){const a=l.borderBoxSize,u=Array.isArray(a)?a[0]:a;d=u.inlineSize,c=u.blockSize}else d=i.offsetWidth,c=i.offsetHeight;t.value={width:d,height:c}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}function No(e,t){const n=P(e);function o(i){return t[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=o(i)}}}const Ho=S({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o,i;if(!n.default)return null;const r=st(n.default()),s=r.findIndex(a=>a.type!==Tt);if(s===-1)return r;const l=r[s];(o=l.props)==null||delete o.ref;const d=l.props?ce(t,l.props):t;t.class&&(i=l.props)!=null&&i.class&&delete l.props.class;const c=tn(l,d);for(const a in d)a.startsWith("on")&&(c.props||(c.props={}),c.props[a]=d[a]);return r.length===1?c:(r[s]=c,r)}}}),xe=S({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>_e(o,t):o!=="template"?()=>_e(e.as,t,{default:n.default}):()=>_e(Ho,t,{default:n.default})}});function Fo(e,t){var n;const o=P({}),i=P("none"),r=P(e),s=e.value?"mounted":"unmounted";let l;const d=((n=t.value)==null?void 0:n.ownerDocument.defaultView)??rt,{state:c,dispatch:a}=No(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=v=>{var h;if(Ee){const w=new CustomEvent(v,{bubbles:!1,cancelable:!1});(h=t.value)==null||h.dispatchEvent(w)}};X(e,async(v,h)=>{var w;const b=h!==v;if(await Le(),b){const A=i.value,C=Te(t.value);v?(a("MOUNT"),u("enter"),C==="none"&&u("after-enter")):C==="none"||((w=o.value)==null?void 0:w.display)==="none"?(a("UNMOUNT"),u("leave"),u("after-leave")):h&&A!==C?(a("ANIMATION_OUT"),u("leave")):(a("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=v=>{const h=Te(t.value),w=h.includes(v.animationName),b=c.value==="mounted"?"enter":"leave";if(v.target===t.value&&w&&(u(`after-${b}`),a("ANIMATION_END"),!r.value)){const A=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",l=d==null?void 0:d.setTimeout(()=>{var C;((C=t.value)==null?void 0:C.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=A)})}v.target===t.value&&h==="none"&&a("ANIMATION_END")},f=v=>{v.target===t.value&&(i.value=Te(t.value))},m=X(t,(v,h)=>{v?(o.value=getComputedStyle(v),v.addEventListener("animationstart",f),v.addEventListener("animationcancel",p),v.addEventListener("animationend",p)):(a("ANIMATION_END"),l!==void 0&&(d==null||d.clearTimeout(l)),h==null||h.removeEventListener("animationstart",f),h==null||h.removeEventListener("animationcancel",p),h==null||h.removeEventListener("animationend",p))},{immediate:!0}),y=X(c,()=>{const v=Te(t.value);i.value=c.value==="mounted"?v:"none"});return an(()=>{m(),y()}),{isPresent:O(()=>["mounted","unmountSuspended"].includes(c.value))}}function Te(e){return e&&getComputedStyle(e).animationName||"none"}const Wo=S({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var o;const{present:i,forceMount:r}=Ot(e),s=P(),{isPresent:l}=Fo(i,s);n({present:l});let d=t.default({present:l});d=st(d||[]);const c=ye();if(d&&(d==null?void 0:d.length)>1){const a=(o=c==null?void 0:c.parent)!=null&&o.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${a}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(u=>` - ${u}`).join(`
|
2 |
`)].join(`
|
3 |
`))}return()=>r.value||i.value||l.value?_e(t.default({present:l})[0],{ref:a=>{const u=ze(a);return typeof(u==null?void 0:u.hasAttribute)>"u"||(u!=null&&u.hasAttribute("data-radix-popper-content-wrapper")?s.value=u.firstElementChild:s.value=u),u}}):null}}),zo=S({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=wo();return(n,o)=>g(t)||n.forceMount?(k(),H(Qt,{key:0,to:n.to,disabled:n.disabled},[$(n.$slots,"default")],8,["to","disabled"])):Jt("",!0)}}),Io="dismissableLayer.pointerDownOutside",Vo="dismissableLayer.focusOutside";function Vt(e,t){const n=t.closest("[data-dismissable-layer]"),o=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),i=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&o===n||i.indexOf(o)<i.indexOf(n))}function jo(e,t){var n;const o=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=P(!1),r=P(()=>{});return ee(s=>{if(!Ee)return;const l=async c=>{const a=c.target;if(t!=null&&t.value){if(Vt(t.value,a)){i.value=!1;return}if(c.target&&!i.value){let u=function(){Wt(Io,e,p)};const p={originalEvent:c};c.pointerType==="touch"?(o.removeEventListener("click",r.value),r.value=u,o.addEventListener("click",r.value,{once:!0})):u()}else o.removeEventListener("click",r.value);i.value=!1}},d=window.setTimeout(()=>{o.addEventListener("pointerdown",l)},0);s(()=>{window.clearTimeout(d),o.removeEventListener("pointerdown",l),o.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>i.value=!0}}function Uo(e,t){var n;const o=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=P(!1);return ee(r=>{if(!Ee)return;const s=async l=>{t!=null&&t.value&&(await Le(),!(!t.value||Vt(t.value,l.target))&&l.target&&!i.value&&Wt(Vo,e,{originalEvent:l}))};o.addEventListener("focusin",s),r(()=>o.removeEventListener("focusin",s))}),{onFocusCapture:()=>i.value=!0,onBlurCapture:()=>i.value=!1}}const Z=ln({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Go=S({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,o=t,{forwardRef:i,currentElement:r}=I(),s=O(()=>{var m;return((m=r.value)==null?void 0:m.ownerDocument)??globalThis.document}),l=O(()=>Z.layersRoot),d=O(()=>r.value?Array.from(l.value).indexOf(r.value):-1),c=O(()=>Z.layersWithOutsidePointerEventsDisabled.size>0),a=O(()=>{const m=Array.from(l.value),[y]=[...Z.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(y);return d.value>=v}),u=jo(async m=>{const y=[...Z.branches].some(v=>v==null?void 0:v.contains(m.target));!a.value||y||(o("pointerDownOutside",m),o("interactOutside",m),await Le(),m.defaultPrevented||o("dismiss"))},r),p=Uo(m=>{[...Z.branches].some(y=>y==null?void 0:y.contains(m.target))||(o("focusOutside",m),o("interactOutside",m),m.defaultPrevented||o("dismiss"))},r);xo("Escape",m=>{d.value===l.value.size-1&&(o("escapeKeyDown",m),m.defaultPrevented||o("dismiss"))});let f;return ee(m=>{r.value&&(n.disableOutsidePointerEvents&&(Z.layersWithOutsidePointerEventsDisabled.size===0&&(f=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents="none"),Z.layersWithOutsidePointerEventsDisabled.add(r.value)),l.value.add(r.value),m(()=>{n.disableOutsidePointerEvents&&Z.layersWithOutsidePointerEventsDisabled.size===1&&(s.value.body.style.pointerEvents=f)}))}),ee(m=>{m(()=>{r.value&&(l.value.delete(r.value),Z.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(m,y)=>(k(),H(g(xe),{ref:g(i),"as-child":m.asChild,as:m.as,"data-dismissable-layer":"",style:Me({pointerEvents:c.value?a.value?"auto":"none":void 0}),onFocusCapture:g(p).onFocusCapture,onBlurCapture:g(p).onBlurCapture,onPointerdownCapture:g(u).onPointerDownCapture},{default:T(()=>[$(m.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}});po(()=>P([]));const[jt,Yo]=Oe("PopperRoot"),Ko=S({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=P();return Yo({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>$(n.$slots,"default")}}),Xo=S({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,{forwardRef:n,currentElement:o}=I(),i=jt();return ee(()=>{i.onAnchorChange(t.element??o.value)}),(r,s)=>(k(),H(g(xe),{ref:g(n),as:r.as,"as-child":r.asChild},{default:T(()=>[$(r.$slots,"default")]),_:3},8,["as","as-child"]))}});function qo(e){return e!==null}function Jo(e){return{name:"transformOrigin",options:e,fn(t){var n,o,i;const{placement:r,rects:s,middlewareData:l}=t,d=((n=l.arrow)==null?void 0:n.centerOffset)!==0,c=d?0:e.arrowWidth,a=d?0:e.arrowHeight,[u,p]=qe(r),f={start:"0%",center:"50%",end:"100%"}[p],m=(((o=l.arrow)==null?void 0:o.x)??0)+c/2,y=(((i=l.arrow)==null?void 0:i.y)??0)+a/2;let v="",h="";return u==="bottom"?(v=d?f:`${m}px`,h=`${-a}px`):u==="top"?(v=d?f:`${m}px`,h=`${s.floating.height+a}px`):u==="right"?(v=`${-a}px`,h=d?f:`${y}px`):u==="left"&&(v=`${s.floating.width+a}px`,h=d?f:`${y}px`),{data:{x:v,y:h}}}}}function qe(e){const[t,n="center"]=e.split("-");return[t,n]}const Qo={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[Zo,ei]=Oe("PopperContent"),ti=S({inheritAttrs:!1,__name:"PopperContent",props:rn({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...Qo}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,i=jt(),{forwardRef:r,currentElement:s}=I(),l=P(),d=P(),{width:c,height:a}=Mo(d),u=O(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),p=O(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),f=O(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),m=O(()=>({padding:p.value,boundary:f.value.filter(qo),altBoundary:f.value.length>0})),y=uo(()=>[eo({mainAxis:n.sideOffset+a.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&bt({...m.value}),n.avoidCollisions&&to({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?ro():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&bt({...m.value}),no({...m.value,apply:({elements:D,rects:j,availableWidth:M,availableHeight:F})=>{const{width:R,height:oe}=j.reference,N=D.floating.style;N.setProperty("--radix-popper-available-width",`${M}px`),N.setProperty("--radix-popper-available-height",`${F}px`),N.setProperty("--radix-popper-anchor-width",`${R}px`),N.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),d.value&&ao({element:d.value,padding:n.arrowPadding}),Jo({arrowWidth:c.value,arrowHeight:a.value}),n.hideWhenDetached&&oo({strategy:"referenceHidden",...m.value})]),{floatingStyles:v,placement:h,isPositioned:w,middlewareData:b}=co(i.anchor,l,{strategy:"fixed",placement:u,whileElementsMounted:(...D)=>Zn(...D,{animationFrame:n.updatePositionStrategy==="always"}),middleware:y}),A=O(()=>qe(h.value)[0]),C=O(()=>qe(h.value)[1]);sn(()=>{w.value&&o("placed")});const _=O(()=>{var D;return((D=b.value.arrow)==null?void 0:D.centerOffset)!==0}),E=P("");ee(()=>{s.value&&(E.value=window.getComputedStyle(s.value).zIndex)});const B=O(()=>{var D;return((D=b.value.arrow)==null?void 0:D.x)??0}),L=O(()=>{var D;return((D=b.value.arrow)==null?void 0:D.y)??0});return ei({placedSide:A,onArrowChange:D=>d.value=D,arrowX:B,arrowY:L,shouldHideArrow:_}),(D,j)=>{var M,F,R;return k(),ue("div",{ref_key:"floatingRef",ref:l,"data-radix-popper-content-wrapper":"",style:Me({...g(v),transform:g(w)?g(v).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:E.value,"--radix-popper-transform-origin":[(M=g(b).transformOrigin)==null?void 0:M.x,(F=g(b).transformOrigin)==null?void 0:F.y].join(" "),...((R=g(b).hide)==null?void 0:R.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[V(g(xe),ce({ref:g(r)},D.$attrs,{"as-child":n.asChild,as:D.as,"data-side":A.value,"data-align":C.value,style:{animation:g(w)?void 0:"none"}}),{default:T(()=>[$(D.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),ni=x("polygon",{points:"0,0 30,0 15,10"},null,-1),oi=S({__name:"Arrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const t=e;return I(),(n,o)=>(k(),H(g(xe),ce(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 30 10",preserveAspectRatio:n.asChild?void 0:"none"}),{default:T(()=>[$(n.$slots,"default",{},()=>[ni])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),ii={top:"bottom",right:"left",bottom:"top",left:"right"},ri=S({inheritAttrs:!1,__name:"PopperArrow",props:{width:{},height:{},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const{forwardRef:t}=I(),n=Zo(),o=O(()=>ii[n.placedSide.value]);return(i,r)=>{var s,l,d,c;return k(),ue("span",{ref:a=>{g(n).onArrowChange(a)},style:Me({position:"absolute",left:(s=g(n).arrowX)!=null&&s.value?`${(l=g(n).arrowX)==null?void 0:l.value}px`:void 0,top:(d=g(n).arrowY)!=null&&d.value?`${(c=g(n).arrowY)==null?void 0:c.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[g(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[g(n).placedSide.value],visibility:g(n).shouldHideArrow.value?"hidden":void 0})},[V(oi,ce(i.$attrs,{ref:g(t),style:{display:"block"},as:i.as,"as-child":i.asChild,width:i.width,height:i.height}),{default:T(()=>[$(i.$slots,"default")]),_:3},16,["as","as-child","width","height"])],4)}}}),si=S({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return I(),(t,n)=>(k(),H(g(xe),{as:t.as,"as-child":t.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:T(()=>[$(t.$slots,"default")]),_:3},8,["as","as-child"]))}});function li(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}li();const Ut="tooltip.open",[lt,ai]=Oe("TooltipProvider"),ci=S({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(e){const t=e,{delayDuration:n,skipDelayDuration:o,disableHoverableContent:i,disableClosingTrigger:r,ignoreNonKeyboardFocus:s,disabled:l}=Ot(t);I();const d=P(!0),c=P(!1),{start:a,stop:u}=zt(()=>{d.value=!0},o,{immediate:!1});return ai({isOpenDelayed:d,delayDuration:n,onOpen(){u(),d.value=!1},onClose(){a()},isPointerInTransitRef:c,disableHoverableContent:i,disableClosingTrigger:r,disabled:l,ignoreNonKeyboardFocus:s}),(p,f)=>$(p.$slots,"default")}}),[Ie,ui]=Oe("TooltipRoot"),di=S({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=t;I();const i=lt(),r=O(()=>n.disableHoverableContent??i.disableHoverableContent.value),s=O(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),l=O(()=>n.disabled??i.disabled.value),d=O(()=>n.delayDuration??i.delayDuration.value),c=O(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),a=Ao(n,"open",o,{defaultValue:n.defaultOpen,passive:n.open===void 0});X(a,b=>{i.onClose&&(b?(i.onOpen(),document.dispatchEvent(new CustomEvent(Ut))):i.onClose())});const u=P(!1),p=P(),f=O(()=>a.value?u.value?"delayed-open":"instant-open":"closed"),{start:m,stop:y}=zt(()=>{u.value=!0,a.value=!0},d,{immediate:!1});function v(){y(),u.value=!1,a.value=!0}function h(){y(),a.value=!1}function w(){m()}return ui({contentId:"",open:a,stateAttribute:f,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){i.isOpenDelayed.value?w():v()},onTriggerLeave(){r.value?h():y()},onOpen:v,onClose:h,disableHoverableContent:r,disableClosingTrigger:s,disabled:l,ignoreNonKeyboardFocus:c}),(b,A)=>(k(),H(g(Ko),null,{default:T(()=>[$(b.$slots,"default",{open:g(a)})]),_:3}))}}),fi=S({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Ie(),o=lt();n.contentId||(n.contentId=Lo(void 0,"radix-vue-tooltip-content"));const{forwardRef:i,currentElement:r}=I(),s=P(!1),l=P(!1),d=O(()=>n.disabled.value?{}:{click:y,focus:f,pointermove:u,pointerleave:p,pointerdown:a,blur:m});$e(()=>{n.onTriggerChange(r.value)});function c(){setTimeout(()=>{s.value=!1},1)}function a(){s.value=!0,document.addEventListener("pointerup",c,{once:!0})}function u(v){v.pointerType!=="touch"&&!l.value&&!o.isPointerInTransitRef.value&&(n.onTriggerEnter(),l.value=!0)}function p(){n.onTriggerLeave(),l.value=!1}function f(v){var h,w;s.value||n.ignoreNonKeyboardFocus.value&&!((w=(h=v.target).matches)!=null&&w.call(h,":focus-visible"))||n.onOpen()}function m(){n.onClose()}function y(){n.disableClosingTrigger.value||n.onClose()}return(v,h)=>(k(),H(g(Xo),{"as-child":""},{default:T(()=>[V(g(xe),ce({ref:g(i),"aria-describedby":g(n).open.value?g(n).contentId:void 0,"data-state":g(n).stateAttribute.value,as:v.as,"as-child":t.asChild,"data-grace-area-trigger":""},Kt(d.value)),{default:T(()=>[$(v.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),Gt=S({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Ie(),{forwardRef:r}=I(),s=Zt(),l=O(()=>{var a;return(a=s.default)==null?void 0:a.call(s)}),d=O(()=>{var a;if(n.ariaLabel)return n.ariaLabel;let u="";function p(f){typeof f.children=="string"&&f.type!==Tt?u+=f.children:Array.isArray(f.children)&&f.children.forEach(m=>p(m))}return(a=l.value)==null||a.forEach(f=>p(f)),u}),c=O(()=>{const{ariaLabel:a,...u}=n;return u});return $e(()=>{Xe(window,"scroll",a=>{const u=a.target;u!=null&&u.contains(i.trigger.value)&&i.onClose()}),Xe(window,Ut,i.onClose)}),(a,u)=>(k(),H(g(Go),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:u[0]||(u[0]=p=>o("escapeKeyDown",p)),onPointerDownOutside:u[1]||(u[1]=p=>{var f;g(i).disableClosingTrigger.value&&(f=g(i).trigger.value)!=null&&f.contains(p.target)&&p.preventDefault(),o("pointerDownOutside",p)}),onFocusOutside:u[2]||(u[2]=en(()=>{},["prevent"])),onDismiss:u[3]||(u[3]=p=>g(i).onClose())},{default:T(()=>[V(g(ti),ce({ref:g(r),"data-state":g(i).stateAttribute.value},{...a.$attrs,...c.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:T(()=>[$(a.$slots,"default"),V(g(si),{id:g(i).contentId,role:"tooltip"},{default:T(()=>[_t(U(d.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),pi=S({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(e){const t=It(e),{forwardRef:n,currentElement:o}=I(),{trigger:i,onClose:r}=Ie(),s=lt(),{isPointerInTransit:l,onPointerExit:d}=Po(i,o);return s.isPointerInTransitRef=l,d(()=>{r()}),(c,a)=>(k(),H(Gt,ce({ref:g(n)},g(t)),{default:T(()=>[$(c.$slots,"default")]),_:3},16))}}),mi=S({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Ie(),r=Do(n,o),{forwardRef:s}=I();return(l,d)=>(k(),H(g(Wo),{present:l.forceMount||g(i).open.value},{default:T(()=>[(k(),H(Xt(g(i).disableHoverableContent.value?Gt:pi),ce({ref:g(s)},g(r)),{default:T(()=>[$(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),vi=S({__name:"TooltipArrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const t=e;return I(),(n,o)=>(k(),H(g(ri),Et(Dt(t)),{default:T(()=>[$(n.$slots,"default")]),_:3},16))}}),hi=S({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,o)=>(k(),H(g(zo),Et(Dt(t)),{default:T(()=>[$(n.$slots,"default")]),_:3},16))}}),gi={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},yi={relative:""},bi={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},xi={text:"neutral-300 dark:neutral-500","text-nowrap":""},wi={"text-nowrap":"","text-3xl":"","font-semibold":""},Ci={"flex-col":""},Ai=["onClick"],Oi={flex:"~ row 1","items-center":"","gap-1.5":""},Ei={"p-4":""},Di={class:"mb-2 text-sm font-medium"},Pi={flex:"~ col gap-4"},Ti=["disabled"],_i={"mt-4":"",class:"flex items-center justify-end gap-4"},ki={class:"relative inline-flex cursor-pointer items-center"},Bi={class:"ml-2 text-sm font-medium"},Ri=["onClick"],Si={flex:"~ row 1","items-center":"","gap-1.5":""},$i={"p-4":"",flex:"~ col gap-4"},Li={"text-base":"","font-medium":""},Mi={text:"sm neutral-500"},Ni={flex:"~ row","gap-2":""},Hi=["onClick"],Fi=S({__name:"index",setup(e){const{t}=fn(),n=pn(),o=mn(),i=O(()=>[{name:t("settings.pages.themes.sections.section.theme-presets.preset.morandi.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.morandi.description"),colors:[{hex:"#A5978B",name:"Taupe"},{hex:"#D8CAAF",name:"Beige"},{hex:"#B8B4A7",name:"Ash Grey"},{hex:"#C4BCB1",name:"Light Taupe"},{hex:"#E5DED8",name:"Ivory"},{hex:"#9A8F7D",name:"Olive Grey"},{hex:"#BEB5A7",name:"Sand"},{hex:"#C9C0B6",name:"Warm Grey"}]},{name:t("settings.pages.themes.sections.section.theme-presets.preset.monet.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.monet.description"),colors:[{hex:"#7A9EAF",name:"Sky Blue"},{hex:"#B8C7CC",name:"Mist"},{hex:"#D4B79C",name:"Sand"},{hex:"#8B9D77",name:"Moss Green"},{hex:"#C7D5CB",name:"Water Lily"},{hex:"#E6D0B1",name:"Wheat"},{hex:"#94A7B1",name:"Slate Blue"},{hex:"#B4C8C3",name:"Sage"}]},{name:t("settings.pages.themes.sections.section.theme-presets.preset.japanese.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.japanese.description"),colors:[{hex:"#D9B48F",name:"Tan"},{hex:"#B5917A",name:"Warm Taupe"},{hex:"#8C7A6B",name:"Umber"},{hex:"#A17F5F",name:"Coffee"},{hex:"#B98C46",name:"Bronze"},{hex:"#C7A252",name:"Gold"},{hex:"#DAB300",name:"Mustard"},{hex:"#D19826",name:"Amber"}]},{name:t("settings.pages.themes.sections.section.theme-presets.preset.nordic.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.nordic.description"),colors:[{hex:"#9BA7B0",name:"Nordic Blue"},{hex:"#C1CBD4",name:"Ice"},{hex:"#A5ADB6",name:"Fjord"},{hex:"#8B959E",name:"Steel"},{hex:"#D4DCE4",name:"Glacier"},{hex:"#7F8A94",name:"Slate"},{hex:"#B3BCC6",name:"Cloud"},{hex:"#98A4AE",name:"Stone"}]},{name:t("settings.pages.themes.sections.section.theme-presets.preset.chinese.title"),description:t("settings.pages.themes.sections.section.theme-presets.preset.chinese.description"),colors:[{hex:"#E4C6D0",name:"霞光红 (Rosy Dawn)"},{hex:"#A61B29",name:"枣红 (Chinese Red)"},{hex:"#5D513C",name:"黄栌 (Smoky Brown)"},{hex:"#789262",name:"竹青 (Bamboo Green)"},{hex:"#1C0D1A",name:"乌梅紫 (Dark Purple)"},{hex:"#F7C242",name:"缃色 (Golden Yellow)"},{hex:"#62A9DD",name:"青冥 (Azure Blue)"},{hex:"#8C4B3C",name:"赭石 (Ochre)"}]}]);function r(){o.themeColorsHue=yn,o.themeColorsHueDynamic=!1}function s(d){const c=dt("oklch")(d);if(!c)return;const{h:a}=c;a&&(o.themeColorsHue=a,o.themeColorsHueDynamic=!1)}function l(d){if(o.themeColorsHueDynamic)return!1;const c=dt("oklch")(d);if(!c||!c.h)return!1;const a=Math.abs(c.h-o.themeColorsHue);return a<.01||a>359.99}return(d,c)=>{const a=vn("motion");return k(),ue(ke,null,[Ve((k(),ue("div",gi,[x("button",{onClick:c[0]||(c[0]=u=>g(n).back())},c[3]||(c[3]=[x("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),x("h1",yi,[x("div",bi,[x("span",xi,U(g(t)("settings.title")),1)]),x("div",wi,U(g(t)("settings.pages.themes.title")),1)])])),[[a]]),x("div",Ci,[V(g(ut),{"mt-4":"","w-full":"",default:!0},{trigger:T(u=>[x("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:p=>u.setVisible(!u.visible)},[x("div",Oi,[c[4]||(c[4]=x("div",{"i-solar:pallete-2-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"},null,-1)),x("div",null,U(g(t)("settings.pages.themes.sections.section.custom-color.title")),1)]),x("div",{transform:"",transition:"transform duration-250",class:De({"rotate-180":u.visible})},c[5]||(c[5]=[x("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,Ai)]),default:T(()=>[x("div",Ei,[x("div",Di,U(g(t)("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),x("div",Pi,[Ve(x("input",{"onUpdate:modelValue":c[1]||(c[1]=u=>g(o).themeColorsHue=u),type:"range",min:"0",max:"360",step:"0.01",class:De(["theme-hue-slider h-10 w-full",{"opacity-25 cursor-not-allowed":g(o).themeColorsHueDynamic}]),disabled:g(o).themeColorsHueDynamic},null,10,Ti),[[hn,g(o).themeColorsHue]]),c[6]||(c[6]=x("div",{"h-10":"","w-full":"",flex:"","overflow-hidden":"","rounded-lg":""},[x("div",{bg:"primary-50",class:"primary-color-bar","text-black":""}," 50 "),x("div",{bg:"primary-100",class:"primary-color-bar","text-black":""}," 100 "),x("div",{bg:"primary-200",class:"primary-color-bar","text-black":""}," 200 "),x("div",{bg:"primary-300",class:"primary-color-bar","text-black":""}," 300 "),x("div",{bg:"primary-400",class:"primary-color-bar","text-black":""}," 400 "),x("div",{bg:"primary-500",class:"primary-color-bar","text-black":""}," 500 "),x("div",{bg:"primary-600",class:"primary-color-bar","text-white":""}," 600 "),x("div",{bg:"primary-700",class:"primary-color-bar","text-white":""}," 700 "),x("div",{bg:"primary-800",class:"primary-color-bar","text-white":""}," 800 "),x("div",{bg:"primary-900",class:"primary-color-bar","text-white":""}," 900 "),x("div",{bg:"primary-950",class:"primary-color-bar","text-white":""}," 950 ")],-1)),c[7]||(c[7]=x("div",{"h-10":"","w-full":"",flex:"","overflow-hidden":"","rounded-lg":"",class:"transparency-grid"},[x("div",{bg:"primary-500/5",class:"primary-color-bar","text-black":""}," 500/5 "),x("div",{bg:"primary-500/10",class:"primary-color-bar","text-black":""}," 500/10 "),x("div",{bg:"primary-500/20",class:"primary-color-bar","text-black":""}," 500/20 "),x("div",{bg:"primary-500/30",class:"primary-color-bar","text-black":""}," 500/30 "),x("div",{bg:"primary-500/40",class:"primary-color-bar","text-black":""}," 500/40 "),x("div",{bg:"primary-500/50",class:"primary-color-bar","text-black":""}," 500/50 "),x("div",{bg:"primary-500/60",class:"primary-color-bar","text-black":""}," 500/60 "),x("div",{bg:"primary-500/70",class:"primary-color-bar","text-black":""}," 500/70 "),x("div",{bg:"primary-500/80",class:"primary-color-bar","text-black":""}," 500/80 "),x("div",{bg:"primary-500/90",class:"primary-color-bar","text-black":""}," 500/90 "),x("div",{bg:"primary-500",class:"primary-color-bar","text-black":""}," 500 ")],-1))]),x("div",_i,[x("label",ki,[Ve(x("input",{"onUpdate:modelValue":c[2]||(c[2]=u=>g(o).themeColorsHueDynamic=u),type:"checkbox",class:"peer sr-only"},null,512),[[gn,g(o).themeColorsHueDynamic]]),c[8]||(c[8]=x("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),x("span",Bi,U(g(t)("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)]),x("button",{class:"rounded-md bg-neutral-100 px-3 py-1.5 text-sm transition-colors dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700",onClick:r},U(g(t)("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.reset.label")),1)])])]),_:1}),V(g(ut),{"mt-4":"","w-full":"",default:!0},{trigger:T(u=>[x("button",{bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:p=>u.setVisible(!u.visible)},[x("div",Si,[c[9]||(c[9]=x("div",{"i-solar:magic-stick-2-bold-duotone":"",class:"provider-icon size-6",transition:"filter duration-250 ease-in-out"},null,-1)),x("div",null,U(g(t)("settings.pages.themes.sections.section.theme-presets.title")),1)]),x("div",{transform:"",transition:"transform duration-250",class:De({"rotate-180":u.visible})},c[10]||(c[10]=[x("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,Ri)]),default:T(()=>[x("div",$i,[(k(!0),ue(ke,null,ct(i.value,u=>(k(),ue("div",{key:u.name,flex:"~ row",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","cursor-pointer":"","items-center":"","justify-between":"","gap-4":"","rounded-lg":"","px-4":"","py-3":""},[x("div",null,[x("div",Li,U(u.name),1),x("div",Mi,U(u.description),1)]),x("div",Ni,[(k(!0),ue(ke,null,ct(u.colors,p=>(k(),H(g(ci),{key:p.hex},{default:T(()=>[V(g(di),null,{default:T(()=>[V(g(fi),null,{default:T(()=>[x("div",{style:Me({backgroundColor:p.hex}),class:De(["size-6 cursor-pointer rounded-full transition-all duration-250 ease-in-out",[l(p.hex)?"scale-150 z-10 mx-1":"hover:scale-110"]]),onClick:f=>s(p.hex)},null,14,Hi)]),_:2},1024),V(g(hi),null,{default:T(()=>[V(g(mi),{class:"rounded-lg bg-white px-3 py-1.5 text-sm shadow-md dark:bg-neutral-800"},{default:T(()=>[_t(U(p.name)+" ",1),V(g(vi),{class:"fill-white dark:fill-neutral-800"})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])]))),128))])]),_:1})]),c[11]||(c[11]=x("div",{text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[x("div",{text:"40","i-lucide:paintbrush":""})],-1))],64)}}});typeof ft=="function"&&ft(Fi);export{Fi as default};
|
assets/{index-CI-4TcWF.js → index-D4_kVMUC.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{I as f}from"./IconStatusItem-Br2je_J5.js";import{d as y,bE as v,i as x,h,bw as _,c as r,o,A as d,a as t,e as n,D as l,bx as g,by as b,x as k}from"./index-TGrV2Wj8.js";import{b as m}from"./route-block-B_A1xBdJ.js";const w={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},I={relative:""},B={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},C={text:"neutral-300 dark:neutral-500","text-nowrap":""},D={"text-nowrap":"","text-3xl":"","font-semibold":""},E={grid:"~ cols-1 sm:cols-2 gap-4"},L=y({__name:"index",setup(S){const p=v(),{t:e}=x(),u=h(()=>[{id:"consciousness",name:e("settings.pages.modules.consciousness.title"),description:e("settings.pages.modules.consciousness.description"),icon:"i-lucide:ghost",to:"/settings/modules/consciousness",configured:!1},{id:"hearing",name:e("settings.pages.modules.hearing.title"),description:e("settings.pages.modules.hearing.description"),icon:"i-lucide:ear",to:"",configured:!1},{id:"messaging-discord",name:e("settings.pages.modules.messaging-discord.title"),description:e("settings.pages.modules.messaging-discord.description"),icon:"i-simple-icons:discord",to:"",configured:!1},{id:"speech",name:e("settings.pages.modules.speech.title"),description:e("settings.pages.modules.speech.description"),icon:"i-lucide:mic",to:"/settings/modules/speech",configured:!1},{id:"memory-short-term",name:e("settings.pages.modules.memory-short-term.title"),description:e("settings.pages.modules.memory-short-term.description"),icon:"i-lucide:book",to:"",configured:!1},{id:"memory-long-term",name:e("settings.pages.modules.memory-long-term.title"),description:e("settings.pages.modules.memory-long-term.description"),icon:"i-lucide:book-copy",to:"",configured:!1},{id:"vision",name:e("settings.pages.modules.vision.title"),description:e("settings.pages.modules.vision.description"),icon:"i-lucide:eye",to:"",configured:!1},{id:"game-minecraft",name:e("settings.pages.modules.gaming-minecraft.title"),description:e("settings.pages.modules.gaming-minecraft.description"),iconColor:"i-vscode-icons:file-type-minecraft",to:"",configured:!1},{id:"game-factorio",name:e("settings.pages.modules.gaming-factorio.title"),description:e("settings.pages.modules.gaming-factorio.description"),iconImage:"",to:"",configured:!1}]);return(z,s)=>{const a=_("motion");return o(),r(g,null,[d((o(),r("div",w,[t("button",{onClick:s[0]||(s[0]=i=>n(p).back())},s[1]||(s[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",I,[t("div",B,[t("span",C,l(n(e)("settings.title")),1)]),t("div",D,l(n(e)("settings.pages.modules.title")),1)])])),[[a]]),t("div",E,[(o(!0),r(g,null,b(u.value,(i,c)=>d((o(),k(n(f),{key:i.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+c*10,delay:c*50,title:i.name,description:i.description,icon:i.icon,"icon-color":i.iconColor,"icon-image":i.iconImage,to:i.to,configured:i.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[a]])),128))]),s[2]||(s[2]=t("div",{text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[t("div",{text:"40","i-lucide:blocks":""})],-1))],64)}}});typeof m=="function"&&m(L);export{L as default};
|
assets/{index-B9qfNJC9.js → index-DwDTqf6b.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as C,r as z,x as I,o,y as m,a as t,c as a,C as v,p as $,D as r,z as D,bn as R,bE as T,i as V,s as N,v as S,bC as L,bw as U,A as i,e,b as p,ad as f,B as k,bB as b,bx as E}from"./index-
|
|
|
1 |
+
import{d as C,r as z,x as I,o,y as m,a as t,c as a,C as v,p as $,D as r,z as D,bn as R,bE as T,i as V,s as N,v as S,bC as L,bw as U,A as i,e,b as p,ad as f,B as k,bB as b,bx as E}from"./index-TGrV2Wj8.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{b as w}from"./route-block-B_A1xBdJ.js";const j={"z-1":"","flex-1":""},A={"text-lg":"","font-bold":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},F={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},M=C({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(d){return(h,n)=>{const y=z("RouterLink");return o(),I(y,{box:"border",flex:"~ row",bg:"neutral-50 dark:neutral-800",border:"neutral-100 dark:neutral-700 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-item",transition:"all ease-in-out duration-400",relative:"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",cursor:"pointer",to:d.to},{default:m(()=>[t("div",j,[t("div",A,r(d.title),1),t("div",F,[t("span",null,r(d.description),1)])]),typeof d.icon=="string"?(o(),a("div",{key:0,class:D(["menu-icon-item-icon",[d.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-24":"","translate-y-4":"",text:"neutral-400/50 dark:neutral-600/50"},null,2)):v("",!0),d.iconTemplate?$(h.$slots,"icon",{key:1},void 0,!0):v("",!0)]),_:3},8,["to"])}}}),_=R(M,[["__scopeId","data-v-a1ec902c"]]),q={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},duration:100},G={"text-3xl":""},H={flex:"~ col gap-4"},J={flex:"~ col gap-4"},K={initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,delay:150},O={"text-2xl":""},P={flex:"~ col gap-4"},Q={grid:"~ cols-[150px_1fr]",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","items-center":"","gap-1.5":"","rounded-lg":"","px-4":"","py-3":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,delay:200},W={text:"sm"},X={flex:"~ row","w-full":"","justify-end":""},Y={value:"en-US"},Z={value:"zh-CN"},tt={bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","cursor-pointer":"","rounded-lg":"","px-4":"","py-3":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,delay:250},et=["checked","aria-checked"],nt={flex:"~ row","w-full":"","items-center":"","gap-1.5":""},it={text:"sm","w-full":"","flex-1":""},ot={"select-none":""},at={key:0,"i-solar:moon-stars-bold-duotone":"",transition:"all ease-in-out duration-250"},st={key:1,"i-solar:sun-fog-bold-duotone":"",transition:"all ease-in-out duration-250"},lt={bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250","w-full":"",flex:"","cursor-pointer":"","rounded-lg":"","px-4":"","py-3":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,delay:300},rt=["checked","aria-checked"],dt={flex:"~ row","w-full":"","items-center":"","gap-1.5":""},ut={text:"sm","w-full":"","flex-1":""},ct={"select-none":""},pt={key:0,"i-solar:people-nearby-bold-duotone":"",transition:"all ease-in-out duration-250"},gt={key:1,"i-solar:running-2-line-duotone":"",transition:"all ease-in-out duration-250"},_t={text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},ht={text:"60","i-lucide:cog":""},yt=C({__name:"index",setup(d){const h=T(),{t:n}=V(),{language:y,disableTransitions:u}=N(S()),c=L();function B(x){const s=x.target;y.value=s.value}return(x,s)=>{const l=U("motion");return o(),a(E,null,[i((o(),a("div",q,[t("button",{onClick:s[0]||(s[0]=g=>e(h).back())},s[3]||(s[3]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",G,r(e(n)("settings.title")),1)])),[[l]]),t("div",H,[t("div",J,[i(p(e(_),{initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,title:e(n)("settings.pages.modules.title"),description:e(n)("settings.pages.modules.description"),icon:"i-lucide:blocks",to:"/settings/modules"},null,8,["title","description"]),[[l]]),i(p(e(_),{initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,delay:50,title:e(n)("settings.pages.models.title"),description:e(n)("settings.pages.models.description"),icon:"i-lucide:person-standing",to:"/settings/models"},null,8,["title","description"]),[[l]]),i(p(e(_),{initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,delay:100,title:e(n)("settings.pages.providers.title"),description:e(n)("settings.pages.providers.description"),icon:"i-lucide:brain",to:"/settings/providers"},null,8,["title","description"]),[[l]]),i(p(e(_),{initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,delay:150,title:e(n)("settings.pages.themes.title"),description:e(n)("settings.pages.themes.description"),icon:"i-lucide:paintbrush",to:"/settings/themes"},null,8,["title","description"]),[[l]])]),i((o(),a("div",K,[t("h2",O,r(e(n)("settings.sections.section.general.title")),1)])),[[l]]),t("div",P,[i((o(),a("div",Q,[t("div",W,[t("span",null,r(e(n)("settings.language.title")),1)]),t("div",X,[t("select",{class:"w-32",bg:"transparent",text:"sm right neutral-800 dark:neutral-100",transition:"all ease-in-out duration-250",outline:"none","cursor-pointer":"",onChange:B},[t("option",Y,r(e(n)("settings.language.english")),1),t("option",Z,r(e(n)("settings.language.chinese")),1)],32)])])),[[l]]),i((o(),a("label",tt,[i(t("input",{"onUpdate:modelValue":s[1]||(s[1]=g=>f(c)?c.value=g:null),text:"neutral-800 dark:neutral-100",checked:e(c),"aria-checked":e(c),type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,et),[[k,e(c)]]),t("div",nt,[t("div",it,[t("span",null,r(e(n)("settings.theme")),1)]),t("div",ot,[p(b,{name:"slide-away",mode:"out-in"},{default:m(()=>[e(c)?(o(),a("div",at)):(o(),a("div",st))]),_:1})])])])),[[l]]),i((o(),a("label",lt,[i(t("input",{"onUpdate:modelValue":s[2]||(s[2]=g=>f(u)?u.value=g:null),text:"neutral-800 dark:neutral-100",checked:e(u),"aria-checked":e(u),type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,rt),[[k,e(u)]]),t("div",dt,[t("div",ut,[t("span",null,r(e(n)("settings.animations.stage-transitions.title")),1)]),t("div",ct,[p(b,{name:"slide-away",mode:"out-in"},{default:m(()=>[e(u)?(o(),a("div",pt)):(o(),a("div",gt))]),_:1})])])])),[[l]])]),t("div",_t,[i(t("div",ht,null,512),[[l]])])])],64)}}});typeof w=="function"&&w(yt);export{yt as default};
|
assets/{index-DdKO3wSp.js → index-TGrV2Wj8.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-
|
2 |
var fw=Object.defineProperty;var hw=(n,e,t)=>e in n?fw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ii=(n,e,t)=>hw(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();const dw="modulepreload",pw=function(n){return"/"+n},L_={},vt=function(e,t,i){let s=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(t.map(l=>{if(l=pw(l),l in L_)return;L_[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":dw,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,d)=>{f.addEventListener("load",h),f.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})};/**
|
3 |
* @vue/shared v3.5.13
|
4 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
@@ -3846,11 +3846,11 @@ void main() {
|
|
3846 |
* pinia v3.0.1
|
3847 |
* (c) 2025 Eduardo San Martin Morote
|
3848 |
* @license MIT
|
3849 |
-
*/let ET;const rd=n=>ET=n,TT=Symbol();function Am(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var ml;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(ml||(ml={}));function kk(){const n=qm(!0),e=n.run(()=>Ze({}));let t=[],i=[];const s=Qm({install(r){rd(s),s._a=r,r.provide(TT,s),r.config.globalProperties.$pinia=s,i.forEach(o=>t.push(o)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return s}const wT=()=>{};function Ny(n,e,t,i=wT){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&lh()&&Ym(s),s}function Vo(n,...e){n.slice().forEach(t=>{t(...e)})}const Vk=n=>n(),Uy=Symbol(),Ep=Symbol();function Cm(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t],s=n[t];Am(s)&&Am(i)&&n.hasOwnProperty(t)&&!wt(i)&&!vs(i)?n[t]=Cm(s,i):n[t]=i}return n}const zk=Symbol();function Hk(n){return!Am(n)||!n.hasOwnProperty(zk)}const{assign:Gs}=Object;function Gk(n){return!!(wt(n)&&n.effect)}function Wk(n,e,t,i){const{state:s,actions:r,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=s?s():{});const u=sb(t.state.value[n]);return Gs(u,r,Object.keys(o||{}).reduce((f,h)=>(f[h]=Qm(Se(()=>{rd(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=AT(n,c,e,t,i,!0),l}function AT(n,e,t={},i,s,r){let o;const a=Gs({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),Ze({});let _;function g(P){let b;c=u=!1,typeof P=="function"?(P(i.state.value[n]),b={type:ml.patchFunction,storeId:n,events:d}):(Cm(i.state.value[n],P),b={type:ml.patchObject,payload:P,storeId:n,events:d});const S=_=Symbol();cr().then(()=>{_===S&&(c=!0)}),u=!0,Vo(f,b,i.state.value[n])}const m=r?function(){const{state:b}=t,S=b?b():{};this.$patch(D=>{Gs(D,S)})}:wT;function y(){o.stop(),f=[],h=[],i._s.delete(n)}const x=(P,b="")=>{if(Uy in P)return P[Ep]=b,P;const S=function(){rd(i);const D=Array.from(arguments),B=[],H=[];function $(te){B.push(te)}function ee(te){H.push(te)}Vo(h,{args:D,name:S[Ep],store:E,after:$,onError:ee});let Z;try{Z=P.apply(this&&this.$id===n?this:E,D)}catch(te){throw Vo(H,te),te}return Z instanceof Promise?Z.then(te=>(Vo(B,te),te)).catch(te=>(Vo(H,te),Promise.reject(te))):(Vo(B,Z),Z)};return S[Uy]=!0,S[Ep]=b,S},v={_p:i,$id:n,$onAction:Ny.bind(null,h),$patch:g,$reset:m,$subscribe(P,b={}){const S=Ny(f,P,b.detached,()=>D()),D=o.run(()=>Ge(()=>i.state.value[n],B=>{(b.flush==="sync"?u:c)&&P({storeId:n,type:ml.direct,events:d},B)},Gs({},l,b)));return S},$dispose:y},E=hi(v);i._s.set(n,E);const M=(i._a&&i._a.runWithContext||Vk)(()=>i._e.run(()=>(o=qm()).run(()=>e({action:x}))));for(const P in M){const b=M[P];if(wt(b)&&!Gk(b)||vs(b))r||(p&&Hk(b)&&(wt(b)?b.value=p[P]:Cm(b,p[P])),i.state.value[n][P]=b);else if(typeof b=="function"){const S=x(b,P);M[P]=S,a.actions[P]=b}}return Gs(E,M),Gs(ot(E),M),Object.defineProperty(E,"$state",{get:()=>i.state.value[n],set:P=>{g(b=>{Gs(b,P)})}}),i._p.forEach(P=>{Gs(E,o.run(()=>P({store:E,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(E.$state,p),c=!0,u=!0,E}/*! #__NO_SIDE_EFFECTS__ */function Xk(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=ic();return o=o||(l?gn(TT,null):null),o&&rd(o),o=ET,o._s.has(n)||(s?AT(n,e,i,o):Wk(n,i,o)),o._s.get(n)}return r.$id=n,r}function $k(n){const e=ot(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Se({get:()=>n[i],set(r){n[i]=r}}):(wt(s)||vs(s))&&(t[i]=rb(n,i))}return t}const qk=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>vt(()=>import("./default-
|
3850 |
* vue-router v4.5.0
|
3851 |
* (c) 2024 Eduardo San Martin Morote
|
3852 |
* @license MIT
|
3853 |
-
*/const Ho=typeof document<"u";function CT(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function Yk(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&CT(n.default)}const yt=Object.assign;function Tp(n,e){const t={};for(const i in e){const s=e[i];t[i]=Pi(s)?s.map(n):n(s)}return t}const gl=()=>{},Pi=Array.isArray,RT=/#/g,jk=/&/g,Kk=/\//g,Zk=/=/g,Jk=/\?/g,PT=/\+/g,Qk=/%5B/g,eV=/%5D/g,IT=/%5E/g,tV=/%60/g,LT=/%7B/g,nV=/%7C/g,DT=/%7D/g,iV=/%20/g;function g_(n){return encodeURI(""+n).replace(nV,"|").replace(Qk,"[").replace(eV,"]")}function sV(n){return g_(n).replace(LT,"{").replace(DT,"}").replace(IT,"^")}function Rm(n){return g_(n).replace(PT,"%2B").replace(iV,"+").replace(RT,"%23").replace(jk,"%26").replace(tV,"`").replace(LT,"{").replace(DT,"}").replace(IT,"^")}function rV(n){return Rm(n).replace(Zk,"%3D")}function oV(n){return g_(n).replace(RT,"%23").replace(Jk,"%3F")}function aV(n){return n==null?"":oV(n).replace(Kk,"%2F")}function Kl(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const lV=/\/$/,cV=n=>n.replace(lV,"");function wp(n,e,t="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=n(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=dV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:Kl(o)}}function uV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Fy(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function fV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&fa(e.matched[i],t.matched[s])&&OT(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function fa(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function OT(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!hV(n[t],e[t]))return!1;return!0}function hV(n,e){return Pi(n)?By(n,e):Pi(e)?By(e,n):n===e}function By(n,e){return Pi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function dV(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=t.length-1,o,a;for(o=0;o<i.length;o++)if(a=i[o],a!==".")if(a==="..")r>1&&r--;else break;return t.slice(0,r).join("/")+"/"+i.slice(o).join("/")}const zs={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Zl;(function(n){n.pop="pop",n.push="push"})(Zl||(Zl={}));var _l;(function(n){n.back="back",n.forward="forward",n.unknown=""})(_l||(_l={}));function pV(n){if(!n)if(Ho){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),cV(n)}const mV=/^[^#]+#/;function gV(n,e){return n.replace(mV,"#")+e}function _V(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const od=()=>({left:window.scrollX,top:window.scrollY});function vV(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),s=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!s)return;e=_V(s,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function ky(n,e){return(history.state?history.state.position-e:-1)+n}const Pm=new Map;function yV(n,e){Pm.set(n,e)}function xV(n){const e=Pm.get(n);return Pm.delete(n),e}let bV=()=>location.protocol+"//"+location.host;function NT(n,e){const{pathname:t,search:i,hash:s}=e,r=n.indexOf("#");if(r>-1){let a=s.includes(n.slice(r))?n.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),Fy(l,"")}return Fy(t,n)+i+s}function SV(n,e,t,i){let s=[],r=[],o=null;const a=({state:h})=>{const d=NT(n,location),p=t.value,_=e.value;let g=0;if(h){if(t.value=d,e.value=h,o&&o===p){o=null;return}g=_?h.position-_.position:0}else i(d);s.forEach(m=>{m(t.value,p,{delta:g,type:Zl.pop,direction:g?g>0?_l.forward:_l.back:_l.unknown})})};function l(){o=t.value}function c(h){s.push(h);const d=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(yt({},h.state,{scroll:od()}),"")}function f(){for(const h of r)h();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function Vy(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?od():null}}function MV(n){const{history:e,location:t}=window,i={value:NT(n,t)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const f=n.indexOf("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:bV()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=yt({},e.state,Vy(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=yt({},s.value,e.state,{forward:l,scroll:od()});r(u.current,u,!0);const f=yt({},Vy(i.value,l,null),{position:u.position+1},c);r(l,f,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function EV(n){n=pV(n);const e=MV(n),t=SV(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=yt({location:"",base:n,go:i,createHref:gV.bind(null,n)},e,t);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function TV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),EV(n)}function wV(n){return typeof n=="string"||n&&typeof n=="object"}function UT(n){return typeof n=="string"||typeof n=="symbol"}const FT=Symbol("");var zy;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(zy||(zy={}));function ha(n,e){return yt(new Error,{type:n,[FT]:!0},e)}function os(n,e){return n instanceof Error&&FT in n&&(e==null||!!(n.type&e))}const Hy="[^/]+?",AV={sensitive:!1,strict:!1,start:!0,end:!0},CV=/[.+*?^${}()[\]/\\]/g;function RV(n,e){const t=yt({},AV,e),i=[];let s=t.start?"^":"";const r=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(s+="/");for(let f=0;f<c.length;f++){const h=c[f];let d=40+(t.sensitive?.25:0);if(h.type===0)f||(s+="/"),s+=h.value.replace(CV,"\\$&"),d+=40;else if(h.type===1){const{value:p,repeatable:_,optional:g,regexp:m}=h;r.push({name:p,repeatable:_,optional:g});const y=m||Hy;if(y!==Hy){d+=10;try{new RegExp(`(${y})`)}catch(v){throw new Error(`Invalid custom RegExp for param "${p}" (${y}): `+v.message)}}let x=_?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;f||(x=g&&c.length<2?`(?:/${x})`:"/"+x),g&&(x+="?"),s+=x,d+=20,g&&(d+=-8),_&&(d+=-20),y===".*"&&(d+=-50)}u.push(d)}i.push(u)}if(t.strict&&t.end){const c=i.length-1;i[c][i[c].length-1]+=.7000000000000001}t.strict||(s+="/?"),t.end?s+="$":t.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,t.sensitive?"":"i");function a(c){const u=c.match(o),f={};if(!u)return null;for(let h=1;h<u.length;h++){const d=u[h]||"",p=r[h-1];f[p.name]=d&&p.repeatable?d.split("/"):d}return f}function l(c){let u="",f=!1;for(const h of n){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const d of h)if(d.type===0)u+=d.value;else if(d.type===1){const{value:p,repeatable:_,optional:g}=d,m=p in c?c[p]:"";if(Pi(m)&&!_)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const y=Pi(m)?m.join("/"):m;if(!y)if(g)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${p}"`);u+=y}}return u||"/"}return{re:o,score:i,keys:r,parse:a,stringify:l}}function PV(n,e){let t=0;for(;t<n.length&&t<e.length;){const i=e[t]-n[t];if(i)return i;t++}return n.length<e.length?n.length===1&&n[0]===80?-1:1:n.length>e.length?e.length===1&&e[0]===80?1:-1:0}function BT(n,e){let t=0;const i=n.score,s=e.score;for(;t<i.length&&t<s.length;){const r=PV(i[t],s[t]);if(r)return r;t++}if(Math.abs(s.length-i.length)===1){if(Gy(i))return 1;if(Gy(s))return-1}return s.length-i.length}function Gy(n){const e=n[n.length-1];return n.length>0&&e[e.length-1]<0}const IV={type:0,value:""},LV=/[a-zA-Z0-9_]/;function DV(n){if(!n)return[[]];if(n==="/")return[[IV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(d){throw new Error(`ERR (${t})/"${c}": ${d}`)}let t=0,i=t;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function f(){c&&(t===0?r.push({type:0,value:c}):t===1||t===2||t===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<n.length;){if(l=n[a++],l==="\\"&&t!==2){i=t,t=4;continue}switch(t){case 0:l==="/"?(c&&f(),o()):l===":"?(f(),t=1):h();break;case 4:h(),t=i;break;case 1:l==="("?t=2:LV.test(l)?h():(f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:t=3:u+=l;break;case 3:f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return t===2&&e(`Unfinished custom RegExp for param "${c}"`),f(),o(),s}function OV(n,e,t){const i=RV(DV(n.path),t),s=yt(i,{record:n,parent:e,children:[],alias:[]});return e&&!s.record.aliasOf==!e.record.aliasOf&&e.children.push(s),s}function NV(n,e){const t=[],i=new Map;e=qy({strict:!1,end:!0,sensitive:!1},e);function s(f){return i.get(f)}function r(f,h,d){const p=!d,_=Xy(f);_.aliasOf=d&&d.record;const g=qy(e,f),m=[_];if("alias"in f){const v=typeof f.alias=="string"?[f.alias]:f.alias;for(const E of v)m.push(Xy(yt({},_,{components:d?d.record.components:_.components,path:E,aliasOf:d?d.record:_})))}let y,x;for(const v of m){const{path:E}=v;if(h&&E[0]!=="/"){const T=h.record.path,M=T[T.length-1]==="/"?"":"/";v.path=h.record.path+(E&&M+E)}if(y=OV(v,h,g),d?d.alias.push(y):(x=x||y,x!==y&&x.alias.push(y),p&&f.name&&!$y(y)&&o(f.name)),kT(y)&&l(y),_.children){const T=_.children;for(let M=0;M<T.length;M++)r(T[M],y,d&&d.children[M])}d=d||y}return x?()=>{o(x)}:gl}function o(f){if(UT(f)){const h=i.get(f);h&&(i.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,1),f.record.name&&i.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function l(f){const h=BV(f,t);t.splice(h,0,f),f.record.name&&!$y(f)&&i.set(f.record.name,f)}function c(f,h){let d,p={},_,g;if("name"in f&&f.name){if(d=i.get(f.name),!d)throw ha(1,{location:f});g=d.record.name,p=yt(Wy(h.params,d.keys.filter(x=>!x.optional).concat(d.parent?d.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),f.params&&Wy(f.params,d.keys.map(x=>x.name))),_=d.stringify(p)}else if(f.path!=null)_=f.path,d=t.find(x=>x.re.test(_)),d&&(p=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(x=>x.re.test(h.path)),!d)throw ha(1,{location:f,currentLocation:h});g=d.record.name,p=yt({},h.params,f.params),_=d.stringify(p)}const m=[];let y=d;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:_,params:p,matched:m,meta:FV(m)}}n.forEach(f=>r(f));function u(){t.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function Wy(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Xy(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:UV(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function UV(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function $y(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function FV(n){return n.reduce((e,t)=>yt(e,t.meta),{})}function qy(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function BV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;BT(n,e[r])<0?i=r:t=r+1}const s=kV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function kV(n){let e=n;for(;e=e.parent;)if(kT(e)&&BT(n,e)===0)return e}function kT({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function VV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;s<i.length;++s){const r=i[s].replace(PT," "),o=r.indexOf("="),a=Kl(o<0?r:r.slice(0,o)),l=o<0?null:Kl(r.slice(o+1));if(a in e){let c=e[a];Pi(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function Yy(n){let e="";for(let t in n){const i=n[t];if(t=rV(t),i==null){i!==void 0&&(e+=(e.length?"&":"")+t);continue}(Pi(i)?i.map(r=>r&&Rm(r)):[i&&Rm(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function zV(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Pi(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const HV=Symbol(""),jy=Symbol(""),ad=Symbol(""),VT=Symbol(""),Im=Symbol("");function za(){let n=[];function e(i){return n.push(i),()=>{const s=n.indexOf(i);s>-1&&n.splice(s,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function js(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(ha(4,{from:t,to:e})):h instanceof Error?l(h):wV(h)?l(ha(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),a())},u=r(()=>n.call(i&&i.instances[s],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(h=>l(h))})}function Ap(n,e,t,i,s=r=>r()){const r=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(CT(l)){const u=(l.__vccOpts||l)[e];u&&r.push(js(u,t,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=Yk(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&js(d,t,i,o,a,s)()}))}}return r}function Ky(n){const e=gn(ad),t=gn(VT),i=Se(()=>{const l=It(n.to);return e.resolve(l)}),s=Se(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const h=f.findIndex(fa.bind(null,u));if(h>-1)return h;const d=Zy(l[c-2]);return c>1&&Zy(u)===d&&f[f.length-1].path!==d?f.findIndex(fa.bind(null,l[c-2])):h}),r=Se(()=>s.value>-1&&qV(t.params,i.value.params)),o=Se(()=>s.value>-1&&s.value===t.matched.length-1&&OT(t.params,i.value.params));function a(l={}){if($V(l)){const c=e[It(n.replace)?"replace":"push"](It(n.to)).catch(gl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Se(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}function GV(n){return n.length===1?n[0]:n}const WV=sn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ky,setup(n,{slots:e}){const t=hi(Ky(n)),{options:i}=gn(ad),s=Se(()=>({[Jy(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Jy(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&GV(e.default(t));return n.custom?r:Ss("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),XV=WV;function $V(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function qV(n,e){for(const t in e){const i=e[t],s=n[t];if(typeof i=="string"){if(i!==s)return!1}else if(!Pi(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function Zy(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Jy=(n,e,t)=>n??e??t,YV=sn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=gn(Im),s=Se(()=>n.route||i.value),r=gn(jy,0),o=Se(()=>{let c=It(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Se(()=>s.value.matched[o.value]);er(jy,Se(()=>o.value+1)),er(HV,a),er(Im,s);const l=Ze();return Ge(()=>[l.value,a.value,n.name],([c,u,f],[h,d,p])=>{u&&(u.instances[f]=c,d&&d!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!fa(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return Qy(t.default,{Component:h,route:c});const d=f.props[u],p=d?d===!0?c.params:typeof d=="function"?d(c):d:null,g=Ss(h,yt({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Qy(t.default,{Component:g,route:c})||g}}});function Qy(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const zT=YV;function jV(n){const e=NV(n.routes,n),t=n.parseQuery||VV,i=n.stringifyQuery||Yy,s=n.history,r=za(),o=za(),a=za(),l=Ie(zs);let c=zs;Ho&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Tp.bind(null,W=>""+W),f=Tp.bind(null,aV),h=Tp.bind(null,Kl);function d(W,ae){let ue,le;return UT(W)?(ue=e.getRecordMatcher(W),le=ae):le=W,e.addRoute(le,ue)}function p(W){const ae=e.getRecordMatcher(W);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map(W=>W.record)}function g(W){return!!e.getRecordMatcher(W)}function m(W,ae){if(ae=yt({},ae||l.value),typeof W=="string"){const w=wp(t,W,ae.path),j=e.resolve({path:w.path},ae),G=s.createHref(w.fullPath);return yt(w,j,{params:h(j.params),hash:Kl(w.hash),redirectedFrom:void 0,href:G})}let ue;if(W.path!=null)ue=yt({},W,{path:wp(t,W.path,ae.path).path});else{const w=yt({},W.params);for(const j in w)w[j]==null&&delete w[j];ue=yt({},W,{params:f(w)}),ae.params=f(ae.params)}const le=e.resolve(ue,ae),Oe=W.hash||"";le.params=u(h(le.params));const I=uV(i,yt({},W,{hash:sV(Oe),path:le.path})),L=s.createHref(I);return yt({fullPath:I,hash:Oe,query:i===Yy?zV(W.query):W.query||{}},le,{redirectedFrom:void 0,href:L})}function y(W){return typeof W=="string"?wp(t,W,l.value.path):yt({},W)}function x(W,ae){if(c!==W)return ha(8,{from:ae,to:W})}function v(W){return M(W)}function E(W){return v(yt(y(W),{replace:!0}))}function T(W){const ae=W.matched[W.matched.length-1];if(ae&&ae.redirect){const{redirect:ue}=ae;let le=typeof ue=="function"?ue(W):ue;return typeof le=="string"&&(le=le.includes("?")||le.includes("#")?le=y(le):{path:le},le.params={}),yt({query:W.query,hash:W.hash,params:le.path!=null?{}:W.params},le)}}function M(W,ae){const ue=c=m(W),le=l.value,Oe=W.state,I=W.force,L=W.replace===!0,w=T(ue);if(w)return M(yt(y(w),{state:typeof w=="object"?yt({},Oe,w.state):Oe,force:I,replace:L}),ae||ue);const j=ue;j.redirectedFrom=ae;let G;return!I&&fV(i,le,ue)&&(G=ha(16,{to:j,from:le}),se(le,le,!0,!1)),(G?Promise.resolve(G):S(j,le)).catch(q=>os(q)?os(q,2)?q:ve(q):Q(q,j,le)).then(q=>{if(q){if(os(q,2))return M(yt({replace:L},y(q.to),{state:typeof q.to=="object"?yt({},Oe,q.to.state):Oe,force:I}),ae||j)}else q=B(j,le,!0,L,Oe);return D(j,le,q),q})}function P(W,ae){const ue=x(W,ae);return ue?Promise.reject(ue):Promise.resolve()}function b(W){const ae=re.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(W):W()}function S(W,ae){let ue;const[le,Oe,I]=KV(W,ae);ue=Ap(le.reverse(),"beforeRouteLeave",W,ae);for(const w of le)w.leaveGuards.forEach(j=>{ue.push(js(j,W,ae))});const L=P.bind(null,W,ae);return ue.push(L),be(ue).then(()=>{ue=[];for(const w of r.list())ue.push(js(w,W,ae));return ue.push(L),be(ue)}).then(()=>{ue=Ap(Oe,"beforeRouteUpdate",W,ae);for(const w of Oe)w.updateGuards.forEach(j=>{ue.push(js(j,W,ae))});return ue.push(L),be(ue)}).then(()=>{ue=[];for(const w of I)if(w.beforeEnter)if(Pi(w.beforeEnter))for(const j of w.beforeEnter)ue.push(js(j,W,ae));else ue.push(js(w.beforeEnter,W,ae));return ue.push(L),be(ue)}).then(()=>(W.matched.forEach(w=>w.enterCallbacks={}),ue=Ap(I,"beforeRouteEnter",W,ae,b),ue.push(L),be(ue))).then(()=>{ue=[];for(const w of o.list())ue.push(js(w,W,ae));return ue.push(L),be(ue)}).catch(w=>os(w,8)?w:Promise.reject(w))}function D(W,ae,ue){a.list().forEach(le=>b(()=>le(W,ae,ue)))}function B(W,ae,ue,le,Oe){const I=x(W,ae);if(I)return I;const L=ae===zs,w=Ho?history.state:{};ue&&(le||L?s.replace(W.fullPath,yt({scroll:L&&w&&w.scroll},Oe)):s.push(W.fullPath,Oe)),l.value=W,se(W,ae,ue,L),ve()}let H;function $(){H||(H=s.listen((W,ae,ue)=>{if(!ge.listening)return;const le=m(W),Oe=T(le);if(Oe){M(yt(Oe,{replace:!0,force:!0}),le).catch(gl);return}c=le;const I=l.value;Ho&&yV(ky(I.fullPath,ue.delta),od()),S(le,I).catch(L=>os(L,12)?L:os(L,2)?(M(yt(y(L.to),{force:!0}),le).then(w=>{os(w,20)&&!ue.delta&&ue.type===Zl.pop&&s.go(-1,!1)}).catch(gl),Promise.reject()):(ue.delta&&s.go(-ue.delta,!1),Q(L,le,I))).then(L=>{L=L||B(le,I,!1),L&&(ue.delta&&!os(L,8)?s.go(-ue.delta,!1):ue.type===Zl.pop&&os(L,20)&&s.go(-1,!1)),D(le,I,L)}).catch(gl)}))}let ee=za(),Z=za(),te;function Q(W,ae,ue){ve(W);const le=Z.list();return le.length?le.forEach(Oe=>Oe(W,ae,ue)):console.error(W),Promise.reject(W)}function pe(){return te&&l.value!==zs?Promise.resolve():new Promise((W,ae)=>{ee.add([W,ae])})}function ve(W){return te||(te=!W,$(),ee.list().forEach(([ae,ue])=>W?ue(W):ae()),ee.reset()),W}function se(W,ae,ue,le){const{scrollBehavior:Oe}=n;if(!Ho||!Oe)return Promise.resolve();const I=!ue&&xV(ky(W.fullPath,0))||(le||!ue)&&history.state&&history.state.scroll||null;return cr().then(()=>Oe(W,ae,I)).then(L=>L&&vV(L)).catch(L=>Q(L,W,ae))}const xe=W=>s.go(W);let ze;const re=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:v,replace:E,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:pe,install(W){const ae=this;W.component("RouterLink",XV),W.component("RouterView",zT),W.config.globalProperties.$router=ae,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>It(l)}),Ho&&!ze&&l.value===zs&&(ze=!0,v(s.location).catch(Oe=>{}));const ue={};for(const Oe in zs)Object.defineProperty(ue,Oe,{get:()=>l.value[Oe],enumerable:!0});W.provide(ad,ae),W.provide(VT,tb(ue)),W.provide(Im,l);const le=W.unmount;re.add(W),W.unmount=function(){re.delete(W),re.size<1&&(c=zs,H&&H(),H=null,l.value=zs,ze=!1,te=!1),le()}}};function be(W){return W.reduce((ae,ue)=>ae.then(()=>b(ue)),Promise.resolve())}return ge}function KV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;o<r;o++){const a=e.matched[o];a&&(n.matched.find(c=>fa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>fa(c,l))||s.push(l))}return[t,i,s]}function ZV(){return gn(ad)}const JV=[{path:"/",name:"/",component:()=>vt(()=>import("./index-CgbLDqR2.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,1,2,14,15,16,17])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>vt(()=>import("./_...all_-Cvv-HOpo.js"),[])},{path:"/audio",name:"/audio",component:()=>vt(()=>import("./audio-DIUvs_x2.js"),[])},{path:"/devtools",children:[{path:"image",name:"/devtools/image",component:()=>vt(()=>import("./image-B29eoFqF.js"),__vite__mapDeps([18,19]))}]},{path:"/queue",name:"/queue",component:()=>vt(()=>import("./queue-BUYrQYsG.js"),__vite__mapDeps([20,8]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>vt(()=>import("./index-B9qfNJC9.js"),__vite__mapDeps([21,4,5,16])),meta:{stageTransition:{name:"slide"}}},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>vt(()=>import("./index-Cr3TWF8U.js"),__vite__mapDeps([22,11,4,5,13,12,16])),meta:{stageTransition:{name:"slide"}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>vt(()=>import("./index-CI-4TcWF.js"),__vite__mapDeps([23,4,5,24,16])),meta:{stageTransition:{name:"slide"}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>vt(()=>import("./consciousness-BH9r76j8.js"),__vite__mapDeps([25,4,5,26,12,14,7,16])),meta:{stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>vt(()=>import("./speech-CUV2NmQo.js"),__vite__mapDeps([27,28,4,5,26,12,7,10,16])),meta:{stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>vt(()=>import("./index-A-leJNRw.js"),__vite__mapDeps([29,4,5,7,24,16])),meta:{stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>vt(()=>import("./cloudflare-workers-ai-DLB8yKU7.js"),__vite__mapDeps([30,4,5,7,31,32]))},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>vt(()=>import("./deepseek-nq_6ygPe.js"),__vite__mapDeps([33,4,5,7,34,13,12,31,32]))},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>vt(()=>import("./elevenlabs-CR6JUm8z.js"),__vite__mapDeps([35,28,4,5,7,10,34,13,12,31,32,6]))},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>vt(()=>import("./fireworks-ai-BSOPI1Ia.js"),__vite__mapDeps([36,4,5,7,34,13,12,31,32]))},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>vt(()=>import("./mistral-ai-D2wOpTqM.js"),__vite__mapDeps([37,4,5,7,34,13,12,31,32]))},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>vt(()=>import("./moonshot-ai-BZrSFYvE.js"),__vite__mapDeps([38,4,5,7,34,13,12,31,32]))},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>vt(()=>import("./novita-ai-CIm-m9hp.js"),__vite__mapDeps([39,4,5,7,34,13,12,31,32]))},{path:"ollama",name:"/settings/providers/ollama",component:()=>vt(()=>import("./ollama-Dccp0BFp.js"),__vite__mapDeps([40,31,4,5,7,34,13,12]))},{path:"openai",name:"/settings/providers/openai",component:()=>vt(()=>import("./openai-C6vHaTi8.js"),__vite__mapDeps([41,4,5,7,34,13,12,31,32]))},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>vt(()=>import("./openrouter-ai-BipOG1Du.js"),__vite__mapDeps([42,4,5,7,34,13,12,31,32]))},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>vt(()=>import("./together-ai-DzYtObxm.js"),__vite__mapDeps([43,4,5,7,34,13,12,31,32]))},{path:"xai",name:"/settings/providers/xai",component:()=>vt(()=>import("./xai-DqVvOU39.js"),__vite__mapDeps([44,4,5,7,34,13,12,31,32]))}]},{path:"themes",children:[{path:"",name:"/settings/themes/",component:()=>vt(()=>import("./index-CZ9ROQo_.js"),__vite__mapDeps([45,13,12,4,5,16,46])),meta:{stageTransition:{name:"slide"}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>vt(()=>import("./filter-message-B5b-aNaT.js"),[])},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>vt(()=>import("./delays-CZG8W2jg.js"),__vite__mapDeps([47,9,4,5,8,15]))},{path:"emotions",name:"/test/queues/emotions",component:()=>vt(()=>import("./emotions-DSIP21BL.js"),__vite__mapDeps([48,9,4,5,8]))},{path:"messages",name:"/test/queues/messages",component:()=>vt(()=>import("./messages-uwlcVulg.js"),__vite__mapDeps([49,9,4,5,8]))}]}]}],QV=178.17,ez=Xk("settings",()=>{const n=Ze(),e=Vs("settings/language","en-US"),t=Vs("settings/stage/view/model-renderer","2d"),i=Vs("settings/audio/input","true"),s=Se(()=>{var m;return(m=n.value)==null?void 0:m.deviceId}),{audioInputs:r}=jU({constraints:{audio:!0},requestPermissions:!0}),o=Ze(),a=Ze("/assets/live2d/models/hiyori_pro_zh.zip"),l=Ze("url"),c=Ze(!1),u=Vs("settings/live2d/position",{x:0,y:0}),f=Ze({group:"Idle",index:0}),h=Ze([]),d=Vs("settings/live2d/motion-map",{}),p=Vs("settings/disable-transitions",!0),_=Vs("settings/theme/colors/hue",QV),g=Vs("settings/theme/colors/hue-dynamic",!1);return Ge(i,m=>{m==="false"&&(n.value=void 0),m==="true"&&(n.value=r.value[0])}),yn(()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])}),Ge(r,()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])}),{live2dModelFile:o,live2dModelUrl:a,live2dLoadSource:l,live2dCurrentMotion:f,live2dPosition:u,availableLive2dMotions:h,live2dMotionMap:d,loadingLive2dModel:c,disableTransitions:p,language:e,stageView:t,themeColorsHue:_,themeColorsHueDynamic:g,isAudioInputOn:i,selectedAudioDevice:n,selectedAudioDeviceId:s}}),tz=sn({__name:"ArrowTransition",props:{stageTransition:{default:()=>({primaryColor:"#666",secondaryColor:"#ccc"})}},setup(n){const e=n,t=Se(()=>e.stageTransition),i=Se(()=>t.value.primaryColor||"#666"),s=Se(()=>t.value.secondaryColor||"#ccc");return yn(()=>{document.documentElement.style.setProperty("--stage-transition-3-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-3-overlay-color-2",s.value)}),(r,o)=>(ln(),ui("div",{class:"stage-transition-3",style:mi({zIndex:t.value.zIndex||100})},null,4))}}),yo=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},nz=yo(tz,[["__scopeId","data-v-df576df0"]]),iz=sn({__name:"BubbleWaveOutTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>{var i;return((i=e.stageTransition)==null?void 0:i.colors)||["#eee","#ebcb8b","#c56370","#3f3b52"]});return yn(()=>{var i,s;document.documentElement.style.setProperty("--circle-expansion-delay",`${((i=e.stageTransition)==null?void 0:i.delay)||0}s`),document.documentElement.style.setProperty("--circle-expansion-duration",`${((s=e.stageTransition)==null?void 0:s.duration)||.4}s`),t.value.forEach((r,o)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${o+1}`,r)})}),(i,s)=>{var r;return ln(),ui("div",{class:"circle-expansion-transition",style:mi({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)||100})},[(ln(!0),ui(Xt,null,SA(t.value,(o,a)=>(ln(),ui("div",{key:a}))),128))],4)}}}),sz=yo(iz,[["__scopeId","data-v-0c29056c"]]),rz=sn({__name:"FantasyFallTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>{var s;return((s=e.stageTransition)==null?void 0:s.direction)||"up"}),i=Se(()=>`fantasy-fall-${t.value}`);return yn(()=>{var s,r,o,a,l,c,u,f,h;document.documentElement.style.setProperty("--fantasy-fall-color",((s=e.stageTransition)==null?void 0:s.primaryColor)||"#eee"),document.documentElement.style.setProperty("--fantasy-fall-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.6}s`),document.documentElement.style.setProperty("--fantasy-fall-delay",`${((o=e.stageTransition)==null?void 0:o.delay)||0}s`),document.documentElement.style.setProperty("--fantasy-fall-radius-sm",`${((l=(a=e.stageTransition)==null?void 0:a.borderRadius)==null?void 0:l.sm)||"14rem"}`),document.documentElement.style.setProperty("--fantasy-fall-radius-md",`${((u=(c=e.stageTransition)==null?void 0:c.borderRadius)==null?void 0:u.md)||"14rem"}`),document.documentElement.style.setProperty("--fantasy-fall-radius-lg",`${((h=(f=e.stageTransition)==null?void 0:f.borderRadius)==null?void 0:h.lg)||"50%"}`)}),(s,r)=>{var o;return ln(),ui("div",{class:ga(["fantasy-fall-transition",i.value]),style:mi({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),oz=yo(rz,[["__scopeId","data-v-e62bf496"]]),az=sn({__name:"MultipleBlocksRevealTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>e.stageTransition),i=Se(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Se(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return yn(()=>{document.documentElement.style.setProperty("--stage-transition-4-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-4-overlay-color-2",s.value)}),(r,o)=>{var a;return ln(),ui("div",{class:"stage-transition-4",style:mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[t1('<div class="stage-transition-4__block" data-v-6d1179fc></div><div class="stage-transition-4__block" data-v-6d1179fc></div><div class="stage-transition-4__block" data-v-6d1179fc></div><div class="stage-transition-4__block" data-v-6d1179fc></div><div class="stage-transition-4__block" data-v-6d1179fc></div>',5)]),4)}}}),lz=yo(az,[["__scopeId","data-v-6d1179fc"]]),cz=sn({__name:"SlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>e.stageTransition),i=Se(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Se(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return Ge([t,i,s],()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),yn(()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),(r,o)=>{var a;return ln(),ui("div",{class:"stage-transition-1",style:mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),uz=yo(cz,[["__scopeId","data-v-bf1d1566"]]),fz=sn({__name:"SlopeSlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>e.stageTransition),i=Se(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)??"#666"}),s=Se(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)??"#ccc"});return yn(()=>{document.documentElement.style.setProperty("--stage-transition-2-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-2-overlay-color-2",s.value)}),(r,o)=>{var a;return ln(),ui("div",{class:"stage-transition-2",style:mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),hz=yo(fz,[["__scopeId","data-v-8ff7120f"]]),dz=sn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return yn(()=>{var t,i,s,r,o,a,l;document.documentElement.style.setProperty("--rectangle-rotate-1-color",((t=e.stageTransition)==null?void 0:t.primaryColor)||"#ebcb8b"),document.documentElement.style.setProperty("--rectangle-rotate-2-color",((i=e.stageTransition)==null?void 0:i.secondaryColor)||"#c56370"),document.documentElement.style.setProperty("--rectangle-rotate-3-color",((s=e.stageTransition)==null?void 0:s.tertiaryColor)||"#43445b"),document.documentElement.style.setProperty("--rectangle-rotate-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.6}s`),document.documentElement.style.setProperty("--rectangle-rotate-delay",`${((o=e.stageTransition)==null?void 0:o.delay)||0}s`),document.documentElement.style.setProperty("--rectangle-rotate-stagger",`${((a=e.stageTransition)==null?void 0:a.staggerDelay)||.1}s`),document.documentElement.style.setProperty("--rectangle-rotate-rotation",`${((l=e.stageTransition)==null?void 0:l.rotation)||270}deg`)}),(t,i)=>{var s;return ln(),ui("div",{class:"rectangle-rotate-transition",style:mi({zIndex:((s=n.stageTransition)==null?void 0:s.zIndex)??100})},i[0]||(i[0]=[$s("div",{class:"rectangle rectangle-rotate-1"},[$s("div")],-1),$s("div",{class:"rectangle rectangle-rotate-2"},[$s("div")],-1),$s("div",{class:"rectangle rectangle-rotate-3"},[$s("div")],-1)]),4)}}}),pz=yo(dz,[["__scopeId","data-v-f4b1dc64"]]),mz=sn({__name:"StageTransitionGroup",props:{primaryColor:null,secondaryColor:null,tertiaryColor:null,colors:null,zIndex:null,disableTransitions:{type:Boolean}},setup(n){const e=n,t=ZV(),i=Ze(!1),s=Ze(),r=Ze(""),o=Ze(),a=Ie({slide:{component:uz,duration:2700},"slope-slide":{component:hz,duration:2700},arrow:{component:nz,duration:2700},"multiple-blocks-reveal":{component:lz,duration:2800},"fantasy-fall":{component:oz,duration:2700},"rectangles-rotate":{component:pz,duration:2700},"bubble-wave-out":{component:sz,duration:1e3}}),l=Ze([]);function c(d){return l.value.push(d),()=>{const p=l.value.indexOf(d);p>=0&&l.value.splice(p,1)}}async function u(d,p={}){s.value=d;for(const _ of l.value)try{await Promise.resolve(_(d,p))}catch(g){console.error(`Error in transition hook at stage "${d}":`,g)}}async function f(d,p,_){if(d.name==="none"||!d.name){p(),_();return}const g=a.value[d.name];if(!g){console.error(`Transition ${d.name} not found`),p(),_();return}const m=g.nextDelay!==void 0?g.nextDelay:g.duration/3;let y=!1;const v=c(E=>{E==="navigation"&&!y&&(y=!0,p())});try{await u("before-enter",{transitionName:d.name}),i.value&&(await u("before-leave",{transitionName:r.value}),r.value="",o.value=void 0,i.value=!1,await u("after-leave",{transitionName:r.value}),await new Promise(T=>setTimeout(T,50))),r.value=d.name,o.value=d,i.value=!0,await u("enter-active",{transitionName:name}),setTimeout(async()=>{await u("navigation",{transitionName:d.name,config:g}),y||(y=!0,p())},m),setTimeout(async()=>{await u("after-enter",{transitionName:d.name})},g.duration),setTimeout(async()=>{await u("before-leave",{transitionName:d.name})},g.duration+10),setTimeout(async()=>{await u("leave-active",{transitionName:d.name})},g.duration+20);const E=g.exitDuration??0;setTimeout(async()=>{i.value=!1,r.value="",o.value=void 0,await u("after-leave",{transitionName:d.name}),_()},g.duration+E)}catch(E){console.error(E)}finally{v(),setTimeout(()=>{y||(y=!0,p())},g.duration*2)}}function h(d,p){return new Promise(_=>{f(d,p,_)})}return t.beforeEach((d,p,_)=>{if(typeof d.meta.stageTransition!="object"){_();return}const g=d.meta.stageTransition;if(typeof e.primaryColor<"u"&&(g.primaryColor=e.primaryColor),typeof e.secondaryColor<"u"&&(g.secondaryColor=e.secondaryColor),typeof e.tertiaryColor<"u"&&(g.tertiaryColor=e.tertiaryColor),typeof e.colors<"u"&&(g.colors=e.colors),typeof e.zIndex<"u"&&(g.zIndex=e.zIndex),e.disableTransitions){_();return}h(g,_)}),(d,p)=>(ln(),ui(Xt,null,[MA(d.$slots,"default"),i.value?(ln(),ui(Xt,{key:0},[a.value[r.value]?(ln(),El(bA(a.value[r.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):Z_("",!0)],64)):Z_("",!0)],64))}});/*!
|
3854 |
* shared v11.1.2
|
3855 |
* (c) 2025 kazuya kawaguchi
|
3856 |
* Released under the MIT License.
|
|
|
1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-Bi_MiWMk.js","assets/HeaderLink-_N25PCvc.js","assets/HeaderLink-DsxHr3rn.css","assets/index-5hrBSqy_.js","assets/Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js","assets/Stage-iiPk_v8G.css","assets/index-CCfJDiQ1.js","assets/providers-By8PGLd2.js","assets/queue-B_YcFivQ.js","assets/queues-BcuD6qtP.js","assets/speech-C6ot8rjM.js","assets/Model.vue_vue_type_script_setup_true_lang-Djpk3Ms6.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js","assets/consciousness-B3PnyIdr.js","assets/index-BUfvD8m2.js","assets/route-block-B_A1xBdJ.js","assets/index-BeuidkcH.css","assets/image-BcGESPTK.js","assets/image-BhuwcwI9.css","assets/queue-CQ8jM4y0.js","assets/index-DwDTqf6b.js","assets/index-BOuFXUkz.js","assets/index-D4_kVMUC.js","assets/IconStatusItem-Br2je_J5.js","assets/consciousness-D6MPamQ3.js","assets/RadioCardDetailManySelect-CCXGOLoc.js","assets/speech-DnbCuq6W.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-BKorzfHV.js","assets/index-Zq-keDdi.js","assets/cloudflare-workers-ai-8XuDD2Cs.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js","assets/deepseek-DIGt7-bf.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js","assets/elevenlabs-CNYJUyIo.js","assets/fireworks-ai-CQedA_FH.js","assets/mistral-ai-CvqIPFR2.js","assets/moonshot-ai-DCct7kvG.js","assets/novita-ai-CLXzxp4w.js","assets/ollama-BgPFZ05v.js","assets/openai-BnFpcOkR.js","assets/openrouter-ai-CneoFxfb.js","assets/together-ai-DiO6-uuf.js","assets/xai-BPyBUuDy.js","assets/index-CNfKN3A8.js","assets/index-DfgF6wHE.css","assets/delays-D9R8ocDz.js","assets/emotions-0f83nn0I.js","assets/messages-CJSYeDor.js"])))=>i.map(i=>d[i]);
|
2 |
var fw=Object.defineProperty;var hw=(n,e,t)=>e in n?fw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ii=(n,e,t)=>hw(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();const dw="modulepreload",pw=function(n){return"/"+n},L_={},vt=function(e,t,i){let s=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(t.map(l=>{if(l=pw(l),l in L_)return;L_[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":dw,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,d)=>{f.addEventListener("load",h),f.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})};/**
|
3 |
* @vue/shared v3.5.13
|
4 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
3846 |
* pinia v3.0.1
|
3847 |
* (c) 2025 Eduardo San Martin Morote
|
3848 |
* @license MIT
|
3849 |
+
*/let ET;const rd=n=>ET=n,TT=Symbol();function Am(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var ml;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(ml||(ml={}));function kk(){const n=qm(!0),e=n.run(()=>Ze({}));let t=[],i=[];const s=Qm({install(r){rd(s),s._a=r,r.provide(TT,s),r.config.globalProperties.$pinia=s,i.forEach(o=>t.push(o)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return s}const wT=()=>{};function Ny(n,e,t,i=wT){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&lh()&&Ym(s),s}function Vo(n,...e){n.slice().forEach(t=>{t(...e)})}const Vk=n=>n(),Uy=Symbol(),Ep=Symbol();function Cm(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t],s=n[t];Am(s)&&Am(i)&&n.hasOwnProperty(t)&&!wt(i)&&!vs(i)?n[t]=Cm(s,i):n[t]=i}return n}const zk=Symbol();function Hk(n){return!Am(n)||!n.hasOwnProperty(zk)}const{assign:Gs}=Object;function Gk(n){return!!(wt(n)&&n.effect)}function Wk(n,e,t,i){const{state:s,actions:r,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=s?s():{});const u=sb(t.state.value[n]);return Gs(u,r,Object.keys(o||{}).reduce((f,h)=>(f[h]=Qm(Se(()=>{rd(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=AT(n,c,e,t,i,!0),l}function AT(n,e,t={},i,s,r){let o;const a=Gs({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),Ze({});let _;function g(P){let b;c=u=!1,typeof P=="function"?(P(i.state.value[n]),b={type:ml.patchFunction,storeId:n,events:d}):(Cm(i.state.value[n],P),b={type:ml.patchObject,payload:P,storeId:n,events:d});const S=_=Symbol();cr().then(()=>{_===S&&(c=!0)}),u=!0,Vo(f,b,i.state.value[n])}const m=r?function(){const{state:b}=t,S=b?b():{};this.$patch(D=>{Gs(D,S)})}:wT;function y(){o.stop(),f=[],h=[],i._s.delete(n)}const x=(P,b="")=>{if(Uy in P)return P[Ep]=b,P;const S=function(){rd(i);const D=Array.from(arguments),B=[],H=[];function $(te){B.push(te)}function ee(te){H.push(te)}Vo(h,{args:D,name:S[Ep],store:E,after:$,onError:ee});let Z;try{Z=P.apply(this&&this.$id===n?this:E,D)}catch(te){throw Vo(H,te),te}return Z instanceof Promise?Z.then(te=>(Vo(B,te),te)).catch(te=>(Vo(H,te),Promise.reject(te))):(Vo(B,Z),Z)};return S[Uy]=!0,S[Ep]=b,S},v={_p:i,$id:n,$onAction:Ny.bind(null,h),$patch:g,$reset:m,$subscribe(P,b={}){const S=Ny(f,P,b.detached,()=>D()),D=o.run(()=>Ge(()=>i.state.value[n],B=>{(b.flush==="sync"?u:c)&&P({storeId:n,type:ml.direct,events:d},B)},Gs({},l,b)));return S},$dispose:y},E=hi(v);i._s.set(n,E);const M=(i._a&&i._a.runWithContext||Vk)(()=>i._e.run(()=>(o=qm()).run(()=>e({action:x}))));for(const P in M){const b=M[P];if(wt(b)&&!Gk(b)||vs(b))r||(p&&Hk(b)&&(wt(b)?b.value=p[P]:Cm(b,p[P])),i.state.value[n][P]=b);else if(typeof b=="function"){const S=x(b,P);M[P]=S,a.actions[P]=b}}return Gs(E,M),Gs(ot(E),M),Object.defineProperty(E,"$state",{get:()=>i.state.value[n],set:P=>{g(b=>{Gs(b,P)})}}),i._p.forEach(P=>{Gs(E,o.run(()=>P({store:E,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(E.$state,p),c=!0,u=!0,E}/*! #__NO_SIDE_EFFECTS__ */function Xk(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=ic();return o=o||(l?gn(TT,null):null),o&&rd(o),o=ET,o._s.has(n)||(s?AT(n,e,i,o):Wk(n,i,o)),o._s.get(n)}return r.$id=n,r}function $k(n){const e=ot(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Se({get:()=>n[i],set(r){n[i]=r}}):(wt(s)||vs(s))&&(t[i]=rb(n,i))}return t}const qk=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>vt(()=>import("./default-Bi_MiWMk.js"),__vite__mapDeps([0,1,2])),"/src/layouts/stage.vue":()=>vt(()=>import("./stage-CAI0RG-B.js"),[])})).forEach(([s,r])=>{let o=s.replace("/src/layouts/","").replace(".vue","");e[o]=r});function i(s,r=!0){return s.map(o=>{var a,l,c,u,f,h;if(((a=o.children)==null?void 0:a.length)>0&&(o.children=i(o.children,!1)),r){if(!o.component&&((l=o.children)==null?void 0:l.find(p=>{var _;return(p.path===""||p.path==="/")&&((_=p.meta)==null?void 0:_.isLayout)})))return o;if(((c=o.meta)==null?void 0:c.layout)!==!1)return{path:o.path,component:e[((u=o.meta)==null?void 0:u.layout)||"default"],children:o.path==="/"?[o]:[{...o,path:""}],meta:{isLayout:!0}}}return(f=o.meta)!=null&&f.layout?{path:o.path,component:e[(h=o.meta)==null?void 0:h.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return i(n)};/*!
|
3850 |
* vue-router v4.5.0
|
3851 |
* (c) 2024 Eduardo San Martin Morote
|
3852 |
* @license MIT
|
3853 |
+
*/const Ho=typeof document<"u";function CT(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function Yk(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&CT(n.default)}const yt=Object.assign;function Tp(n,e){const t={};for(const i in e){const s=e[i];t[i]=Pi(s)?s.map(n):n(s)}return t}const gl=()=>{},Pi=Array.isArray,RT=/#/g,jk=/&/g,Kk=/\//g,Zk=/=/g,Jk=/\?/g,PT=/\+/g,Qk=/%5B/g,eV=/%5D/g,IT=/%5E/g,tV=/%60/g,LT=/%7B/g,nV=/%7C/g,DT=/%7D/g,iV=/%20/g;function g_(n){return encodeURI(""+n).replace(nV,"|").replace(Qk,"[").replace(eV,"]")}function sV(n){return g_(n).replace(LT,"{").replace(DT,"}").replace(IT,"^")}function Rm(n){return g_(n).replace(PT,"%2B").replace(iV,"+").replace(RT,"%23").replace(jk,"%26").replace(tV,"`").replace(LT,"{").replace(DT,"}").replace(IT,"^")}function rV(n){return Rm(n).replace(Zk,"%3D")}function oV(n){return g_(n).replace(RT,"%23").replace(Jk,"%3F")}function aV(n){return n==null?"":oV(n).replace(Kk,"%2F")}function Kl(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const lV=/\/$/,cV=n=>n.replace(lV,"");function wp(n,e,t="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=n(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=dV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:Kl(o)}}function uV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Fy(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function fV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&fa(e.matched[i],t.matched[s])&&OT(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function fa(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function OT(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!hV(n[t],e[t]))return!1;return!0}function hV(n,e){return Pi(n)?By(n,e):Pi(e)?By(e,n):n===e}function By(n,e){return Pi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function dV(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=t.length-1,o,a;for(o=0;o<i.length;o++)if(a=i[o],a!==".")if(a==="..")r>1&&r--;else break;return t.slice(0,r).join("/")+"/"+i.slice(o).join("/")}const zs={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Zl;(function(n){n.pop="pop",n.push="push"})(Zl||(Zl={}));var _l;(function(n){n.back="back",n.forward="forward",n.unknown=""})(_l||(_l={}));function pV(n){if(!n)if(Ho){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),cV(n)}const mV=/^[^#]+#/;function gV(n,e){return n.replace(mV,"#")+e}function _V(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const od=()=>({left:window.scrollX,top:window.scrollY});function vV(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),s=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!s)return;e=_V(s,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function ky(n,e){return(history.state?history.state.position-e:-1)+n}const Pm=new Map;function yV(n,e){Pm.set(n,e)}function xV(n){const e=Pm.get(n);return Pm.delete(n),e}let bV=()=>location.protocol+"//"+location.host;function NT(n,e){const{pathname:t,search:i,hash:s}=e,r=n.indexOf("#");if(r>-1){let a=s.includes(n.slice(r))?n.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),Fy(l,"")}return Fy(t,n)+i+s}function SV(n,e,t,i){let s=[],r=[],o=null;const a=({state:h})=>{const d=NT(n,location),p=t.value,_=e.value;let g=0;if(h){if(t.value=d,e.value=h,o&&o===p){o=null;return}g=_?h.position-_.position:0}else i(d);s.forEach(m=>{m(t.value,p,{delta:g,type:Zl.pop,direction:g?g>0?_l.forward:_l.back:_l.unknown})})};function l(){o=t.value}function c(h){s.push(h);const d=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(yt({},h.state,{scroll:od()}),"")}function f(){for(const h of r)h();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function Vy(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?od():null}}function MV(n){const{history:e,location:t}=window,i={value:NT(n,t)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const f=n.indexOf("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:bV()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=yt({},e.state,Vy(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=yt({},s.value,e.state,{forward:l,scroll:od()});r(u.current,u,!0);const f=yt({},Vy(i.value,l,null),{position:u.position+1},c);r(l,f,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function EV(n){n=pV(n);const e=MV(n),t=SV(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=yt({location:"",base:n,go:i,createHref:gV.bind(null,n)},e,t);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function TV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),EV(n)}function wV(n){return typeof n=="string"||n&&typeof n=="object"}function UT(n){return typeof n=="string"||typeof n=="symbol"}const FT=Symbol("");var zy;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(zy||(zy={}));function ha(n,e){return yt(new Error,{type:n,[FT]:!0},e)}function os(n,e){return n instanceof Error&&FT in n&&(e==null||!!(n.type&e))}const Hy="[^/]+?",AV={sensitive:!1,strict:!1,start:!0,end:!0},CV=/[.+*?^${}()[\]/\\]/g;function RV(n,e){const t=yt({},AV,e),i=[];let s=t.start?"^":"";const r=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(s+="/");for(let f=0;f<c.length;f++){const h=c[f];let d=40+(t.sensitive?.25:0);if(h.type===0)f||(s+="/"),s+=h.value.replace(CV,"\\$&"),d+=40;else if(h.type===1){const{value:p,repeatable:_,optional:g,regexp:m}=h;r.push({name:p,repeatable:_,optional:g});const y=m||Hy;if(y!==Hy){d+=10;try{new RegExp(`(${y})`)}catch(v){throw new Error(`Invalid custom RegExp for param "${p}" (${y}): `+v.message)}}let x=_?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;f||(x=g&&c.length<2?`(?:/${x})`:"/"+x),g&&(x+="?"),s+=x,d+=20,g&&(d+=-8),_&&(d+=-20),y===".*"&&(d+=-50)}u.push(d)}i.push(u)}if(t.strict&&t.end){const c=i.length-1;i[c][i[c].length-1]+=.7000000000000001}t.strict||(s+="/?"),t.end?s+="$":t.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,t.sensitive?"":"i");function a(c){const u=c.match(o),f={};if(!u)return null;for(let h=1;h<u.length;h++){const d=u[h]||"",p=r[h-1];f[p.name]=d&&p.repeatable?d.split("/"):d}return f}function l(c){let u="",f=!1;for(const h of n){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const d of h)if(d.type===0)u+=d.value;else if(d.type===1){const{value:p,repeatable:_,optional:g}=d,m=p in c?c[p]:"";if(Pi(m)&&!_)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const y=Pi(m)?m.join("/"):m;if(!y)if(g)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${p}"`);u+=y}}return u||"/"}return{re:o,score:i,keys:r,parse:a,stringify:l}}function PV(n,e){let t=0;for(;t<n.length&&t<e.length;){const i=e[t]-n[t];if(i)return i;t++}return n.length<e.length?n.length===1&&n[0]===80?-1:1:n.length>e.length?e.length===1&&e[0]===80?1:-1:0}function BT(n,e){let t=0;const i=n.score,s=e.score;for(;t<i.length&&t<s.length;){const r=PV(i[t],s[t]);if(r)return r;t++}if(Math.abs(s.length-i.length)===1){if(Gy(i))return 1;if(Gy(s))return-1}return s.length-i.length}function Gy(n){const e=n[n.length-1];return n.length>0&&e[e.length-1]<0}const IV={type:0,value:""},LV=/[a-zA-Z0-9_]/;function DV(n){if(!n)return[[]];if(n==="/")return[[IV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(d){throw new Error(`ERR (${t})/"${c}": ${d}`)}let t=0,i=t;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function f(){c&&(t===0?r.push({type:0,value:c}):t===1||t===2||t===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<n.length;){if(l=n[a++],l==="\\"&&t!==2){i=t,t=4;continue}switch(t){case 0:l==="/"?(c&&f(),o()):l===":"?(f(),t=1):h();break;case 4:h(),t=i;break;case 1:l==="("?t=2:LV.test(l)?h():(f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:t=3:u+=l;break;case 3:f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return t===2&&e(`Unfinished custom RegExp for param "${c}"`),f(),o(),s}function OV(n,e,t){const i=RV(DV(n.path),t),s=yt(i,{record:n,parent:e,children:[],alias:[]});return e&&!s.record.aliasOf==!e.record.aliasOf&&e.children.push(s),s}function NV(n,e){const t=[],i=new Map;e=qy({strict:!1,end:!0,sensitive:!1},e);function s(f){return i.get(f)}function r(f,h,d){const p=!d,_=Xy(f);_.aliasOf=d&&d.record;const g=qy(e,f),m=[_];if("alias"in f){const v=typeof f.alias=="string"?[f.alias]:f.alias;for(const E of v)m.push(Xy(yt({},_,{components:d?d.record.components:_.components,path:E,aliasOf:d?d.record:_})))}let y,x;for(const v of m){const{path:E}=v;if(h&&E[0]!=="/"){const T=h.record.path,M=T[T.length-1]==="/"?"":"/";v.path=h.record.path+(E&&M+E)}if(y=OV(v,h,g),d?d.alias.push(y):(x=x||y,x!==y&&x.alias.push(y),p&&f.name&&!$y(y)&&o(f.name)),kT(y)&&l(y),_.children){const T=_.children;for(let M=0;M<T.length;M++)r(T[M],y,d&&d.children[M])}d=d||y}return x?()=>{o(x)}:gl}function o(f){if(UT(f)){const h=i.get(f);h&&(i.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,1),f.record.name&&i.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function l(f){const h=BV(f,t);t.splice(h,0,f),f.record.name&&!$y(f)&&i.set(f.record.name,f)}function c(f,h){let d,p={},_,g;if("name"in f&&f.name){if(d=i.get(f.name),!d)throw ha(1,{location:f});g=d.record.name,p=yt(Wy(h.params,d.keys.filter(x=>!x.optional).concat(d.parent?d.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),f.params&&Wy(f.params,d.keys.map(x=>x.name))),_=d.stringify(p)}else if(f.path!=null)_=f.path,d=t.find(x=>x.re.test(_)),d&&(p=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(x=>x.re.test(h.path)),!d)throw ha(1,{location:f,currentLocation:h});g=d.record.name,p=yt({},h.params,f.params),_=d.stringify(p)}const m=[];let y=d;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:_,params:p,matched:m,meta:FV(m)}}n.forEach(f=>r(f));function u(){t.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function Wy(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Xy(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:UV(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function UV(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function $y(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function FV(n){return n.reduce((e,t)=>yt(e,t.meta),{})}function qy(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function BV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;BT(n,e[r])<0?i=r:t=r+1}const s=kV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function kV(n){let e=n;for(;e=e.parent;)if(kT(e)&&BT(n,e)===0)return e}function kT({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function VV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;s<i.length;++s){const r=i[s].replace(PT," "),o=r.indexOf("="),a=Kl(o<0?r:r.slice(0,o)),l=o<0?null:Kl(r.slice(o+1));if(a in e){let c=e[a];Pi(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function Yy(n){let e="";for(let t in n){const i=n[t];if(t=rV(t),i==null){i!==void 0&&(e+=(e.length?"&":"")+t);continue}(Pi(i)?i.map(r=>r&&Rm(r)):[i&&Rm(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function zV(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Pi(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const HV=Symbol(""),jy=Symbol(""),ad=Symbol(""),VT=Symbol(""),Im=Symbol("");function za(){let n=[];function e(i){return n.push(i),()=>{const s=n.indexOf(i);s>-1&&n.splice(s,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function js(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(ha(4,{from:t,to:e})):h instanceof Error?l(h):wV(h)?l(ha(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),a())},u=r(()=>n.call(i&&i.instances[s],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(h=>l(h))})}function Ap(n,e,t,i,s=r=>r()){const r=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(CT(l)){const u=(l.__vccOpts||l)[e];u&&r.push(js(u,t,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=Yk(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&js(d,t,i,o,a,s)()}))}}return r}function Ky(n){const e=gn(ad),t=gn(VT),i=Se(()=>{const l=It(n.to);return e.resolve(l)}),s=Se(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const h=f.findIndex(fa.bind(null,u));if(h>-1)return h;const d=Zy(l[c-2]);return c>1&&Zy(u)===d&&f[f.length-1].path!==d?f.findIndex(fa.bind(null,l[c-2])):h}),r=Se(()=>s.value>-1&&qV(t.params,i.value.params)),o=Se(()=>s.value>-1&&s.value===t.matched.length-1&&OT(t.params,i.value.params));function a(l={}){if($V(l)){const c=e[It(n.replace)?"replace":"push"](It(n.to)).catch(gl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Se(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}function GV(n){return n.length===1?n[0]:n}const WV=sn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ky,setup(n,{slots:e}){const t=hi(Ky(n)),{options:i}=gn(ad),s=Se(()=>({[Jy(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Jy(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&GV(e.default(t));return n.custom?r:Ss("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),XV=WV;function $V(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function qV(n,e){for(const t in e){const i=e[t],s=n[t];if(typeof i=="string"){if(i!==s)return!1}else if(!Pi(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function Zy(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Jy=(n,e,t)=>n??e??t,YV=sn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=gn(Im),s=Se(()=>n.route||i.value),r=gn(jy,0),o=Se(()=>{let c=It(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Se(()=>s.value.matched[o.value]);er(jy,Se(()=>o.value+1)),er(HV,a),er(Im,s);const l=Ze();return Ge(()=>[l.value,a.value,n.name],([c,u,f],[h,d,p])=>{u&&(u.instances[f]=c,d&&d!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!fa(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return Qy(t.default,{Component:h,route:c});const d=f.props[u],p=d?d===!0?c.params:typeof d=="function"?d(c):d:null,g=Ss(h,yt({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Qy(t.default,{Component:g,route:c})||g}}});function Qy(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const zT=YV;function jV(n){const e=NV(n.routes,n),t=n.parseQuery||VV,i=n.stringifyQuery||Yy,s=n.history,r=za(),o=za(),a=za(),l=Ie(zs);let c=zs;Ho&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Tp.bind(null,W=>""+W),f=Tp.bind(null,aV),h=Tp.bind(null,Kl);function d(W,ae){let ue,le;return UT(W)?(ue=e.getRecordMatcher(W),le=ae):le=W,e.addRoute(le,ue)}function p(W){const ae=e.getRecordMatcher(W);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map(W=>W.record)}function g(W){return!!e.getRecordMatcher(W)}function m(W,ae){if(ae=yt({},ae||l.value),typeof W=="string"){const w=wp(t,W,ae.path),j=e.resolve({path:w.path},ae),G=s.createHref(w.fullPath);return yt(w,j,{params:h(j.params),hash:Kl(w.hash),redirectedFrom:void 0,href:G})}let ue;if(W.path!=null)ue=yt({},W,{path:wp(t,W.path,ae.path).path});else{const w=yt({},W.params);for(const j in w)w[j]==null&&delete w[j];ue=yt({},W,{params:f(w)}),ae.params=f(ae.params)}const le=e.resolve(ue,ae),Oe=W.hash||"";le.params=u(h(le.params));const I=uV(i,yt({},W,{hash:sV(Oe),path:le.path})),L=s.createHref(I);return yt({fullPath:I,hash:Oe,query:i===Yy?zV(W.query):W.query||{}},le,{redirectedFrom:void 0,href:L})}function y(W){return typeof W=="string"?wp(t,W,l.value.path):yt({},W)}function x(W,ae){if(c!==W)return ha(8,{from:ae,to:W})}function v(W){return M(W)}function E(W){return v(yt(y(W),{replace:!0}))}function T(W){const ae=W.matched[W.matched.length-1];if(ae&&ae.redirect){const{redirect:ue}=ae;let le=typeof ue=="function"?ue(W):ue;return typeof le=="string"&&(le=le.includes("?")||le.includes("#")?le=y(le):{path:le},le.params={}),yt({query:W.query,hash:W.hash,params:le.path!=null?{}:W.params},le)}}function M(W,ae){const ue=c=m(W),le=l.value,Oe=W.state,I=W.force,L=W.replace===!0,w=T(ue);if(w)return M(yt(y(w),{state:typeof w=="object"?yt({},Oe,w.state):Oe,force:I,replace:L}),ae||ue);const j=ue;j.redirectedFrom=ae;let G;return!I&&fV(i,le,ue)&&(G=ha(16,{to:j,from:le}),se(le,le,!0,!1)),(G?Promise.resolve(G):S(j,le)).catch(q=>os(q)?os(q,2)?q:ve(q):Q(q,j,le)).then(q=>{if(q){if(os(q,2))return M(yt({replace:L},y(q.to),{state:typeof q.to=="object"?yt({},Oe,q.to.state):Oe,force:I}),ae||j)}else q=B(j,le,!0,L,Oe);return D(j,le,q),q})}function P(W,ae){const ue=x(W,ae);return ue?Promise.reject(ue):Promise.resolve()}function b(W){const ae=re.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(W):W()}function S(W,ae){let ue;const[le,Oe,I]=KV(W,ae);ue=Ap(le.reverse(),"beforeRouteLeave",W,ae);for(const w of le)w.leaveGuards.forEach(j=>{ue.push(js(j,W,ae))});const L=P.bind(null,W,ae);return ue.push(L),be(ue).then(()=>{ue=[];for(const w of r.list())ue.push(js(w,W,ae));return ue.push(L),be(ue)}).then(()=>{ue=Ap(Oe,"beforeRouteUpdate",W,ae);for(const w of Oe)w.updateGuards.forEach(j=>{ue.push(js(j,W,ae))});return ue.push(L),be(ue)}).then(()=>{ue=[];for(const w of I)if(w.beforeEnter)if(Pi(w.beforeEnter))for(const j of w.beforeEnter)ue.push(js(j,W,ae));else ue.push(js(w.beforeEnter,W,ae));return ue.push(L),be(ue)}).then(()=>(W.matched.forEach(w=>w.enterCallbacks={}),ue=Ap(I,"beforeRouteEnter",W,ae,b),ue.push(L),be(ue))).then(()=>{ue=[];for(const w of o.list())ue.push(js(w,W,ae));return ue.push(L),be(ue)}).catch(w=>os(w,8)?w:Promise.reject(w))}function D(W,ae,ue){a.list().forEach(le=>b(()=>le(W,ae,ue)))}function B(W,ae,ue,le,Oe){const I=x(W,ae);if(I)return I;const L=ae===zs,w=Ho?history.state:{};ue&&(le||L?s.replace(W.fullPath,yt({scroll:L&&w&&w.scroll},Oe)):s.push(W.fullPath,Oe)),l.value=W,se(W,ae,ue,L),ve()}let H;function $(){H||(H=s.listen((W,ae,ue)=>{if(!ge.listening)return;const le=m(W),Oe=T(le);if(Oe){M(yt(Oe,{replace:!0,force:!0}),le).catch(gl);return}c=le;const I=l.value;Ho&&yV(ky(I.fullPath,ue.delta),od()),S(le,I).catch(L=>os(L,12)?L:os(L,2)?(M(yt(y(L.to),{force:!0}),le).then(w=>{os(w,20)&&!ue.delta&&ue.type===Zl.pop&&s.go(-1,!1)}).catch(gl),Promise.reject()):(ue.delta&&s.go(-ue.delta,!1),Q(L,le,I))).then(L=>{L=L||B(le,I,!1),L&&(ue.delta&&!os(L,8)?s.go(-ue.delta,!1):ue.type===Zl.pop&&os(L,20)&&s.go(-1,!1)),D(le,I,L)}).catch(gl)}))}let ee=za(),Z=za(),te;function Q(W,ae,ue){ve(W);const le=Z.list();return le.length?le.forEach(Oe=>Oe(W,ae,ue)):console.error(W),Promise.reject(W)}function pe(){return te&&l.value!==zs?Promise.resolve():new Promise((W,ae)=>{ee.add([W,ae])})}function ve(W){return te||(te=!W,$(),ee.list().forEach(([ae,ue])=>W?ue(W):ae()),ee.reset()),W}function se(W,ae,ue,le){const{scrollBehavior:Oe}=n;if(!Ho||!Oe)return Promise.resolve();const I=!ue&&xV(ky(W.fullPath,0))||(le||!ue)&&history.state&&history.state.scroll||null;return cr().then(()=>Oe(W,ae,I)).then(L=>L&&vV(L)).catch(L=>Q(L,W,ae))}const xe=W=>s.go(W);let ze;const re=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:v,replace:E,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:pe,install(W){const ae=this;W.component("RouterLink",XV),W.component("RouterView",zT),W.config.globalProperties.$router=ae,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>It(l)}),Ho&&!ze&&l.value===zs&&(ze=!0,v(s.location).catch(Oe=>{}));const ue={};for(const Oe in zs)Object.defineProperty(ue,Oe,{get:()=>l.value[Oe],enumerable:!0});W.provide(ad,ae),W.provide(VT,tb(ue)),W.provide(Im,l);const le=W.unmount;re.add(W),W.unmount=function(){re.delete(W),re.size<1&&(c=zs,H&&H(),H=null,l.value=zs,ze=!1,te=!1),le()}}};function be(W){return W.reduce((ae,ue)=>ae.then(()=>b(ue)),Promise.resolve())}return ge}function KV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;o<r;o++){const a=e.matched[o];a&&(n.matched.find(c=>fa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>fa(c,l))||s.push(l))}return[t,i,s]}function ZV(){return gn(ad)}const JV=[{path:"/",name:"/",component:()=>vt(()=>import("./index-5hrBSqy_.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,1,2,14,15,16,17])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>vt(()=>import("./_...all_-DOpDf6rk.js"),[])},{path:"/audio",name:"/audio",component:()=>vt(()=>import("./audio-bsyyLIUP.js"),[])},{path:"/devtools",children:[{path:"image",name:"/devtools/image",component:()=>vt(()=>import("./image-BcGESPTK.js"),__vite__mapDeps([18,19]))}]},{path:"/queue",name:"/queue",component:()=>vt(()=>import("./queue-CQ8jM4y0.js"),__vite__mapDeps([20,8]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>vt(()=>import("./index-DwDTqf6b.js"),__vite__mapDeps([21,4,5,16])),meta:{stageTransition:{name:"slide"}}},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>vt(()=>import("./index-BOuFXUkz.js"),__vite__mapDeps([22,11,4,5,13,12,16])),meta:{stageTransition:{name:"slide"}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>vt(()=>import("./index-D4_kVMUC.js"),__vite__mapDeps([23,4,5,24,16])),meta:{stageTransition:{name:"slide"}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>vt(()=>import("./consciousness-D6MPamQ3.js"),__vite__mapDeps([25,4,5,26,12,14,7,16])),meta:{stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>vt(()=>import("./speech-DnbCuq6W.js"),__vite__mapDeps([27,28,4,5,26,12,7,10,16])),meta:{stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>vt(()=>import("./index-Zq-keDdi.js"),__vite__mapDeps([29,4,5,7,24,16])),meta:{stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>vt(()=>import("./cloudflare-workers-ai-8XuDD2Cs.js"),__vite__mapDeps([30,4,5,7,31,32]))},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>vt(()=>import("./deepseek-DIGt7-bf.js"),__vite__mapDeps([33,4,5,7,34,13,12,31,32]))},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>vt(()=>import("./elevenlabs-CNYJUyIo.js"),__vite__mapDeps([35,28,4,5,7,10,34,13,12,31,32,6]))},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>vt(()=>import("./fireworks-ai-CQedA_FH.js"),__vite__mapDeps([36,4,5,7,34,13,12,31,32]))},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>vt(()=>import("./mistral-ai-CvqIPFR2.js"),__vite__mapDeps([37,4,5,7,34,13,12,31,32]))},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>vt(()=>import("./moonshot-ai-DCct7kvG.js"),__vite__mapDeps([38,4,5,7,34,13,12,31,32]))},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>vt(()=>import("./novita-ai-CLXzxp4w.js"),__vite__mapDeps([39,4,5,7,34,13,12,31,32]))},{path:"ollama",name:"/settings/providers/ollama",component:()=>vt(()=>import("./ollama-BgPFZ05v.js"),__vite__mapDeps([40,31,4,5,7,34,13,12]))},{path:"openai",name:"/settings/providers/openai",component:()=>vt(()=>import("./openai-BnFpcOkR.js"),__vite__mapDeps([41,4,5,7,34,13,12,31,32]))},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>vt(()=>import("./openrouter-ai-CneoFxfb.js"),__vite__mapDeps([42,4,5,7,34,13,12,31,32]))},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>vt(()=>import("./together-ai-DiO6-uuf.js"),__vite__mapDeps([43,4,5,7,34,13,12,31,32]))},{path:"xai",name:"/settings/providers/xai",component:()=>vt(()=>import("./xai-BPyBUuDy.js"),__vite__mapDeps([44,4,5,7,34,13,12,31,32]))}]},{path:"themes",children:[{path:"",name:"/settings/themes/",component:()=>vt(()=>import("./index-CNfKN3A8.js"),__vite__mapDeps([45,13,12,4,5,16,46])),meta:{stageTransition:{name:"slide"}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>vt(()=>import("./filter-message-Ui1t0i_J.js"),[])},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>vt(()=>import("./delays-D9R8ocDz.js"),__vite__mapDeps([47,9,4,5,8,15]))},{path:"emotions",name:"/test/queues/emotions",component:()=>vt(()=>import("./emotions-0f83nn0I.js"),__vite__mapDeps([48,9,4,5,8]))},{path:"messages",name:"/test/queues/messages",component:()=>vt(()=>import("./messages-CJSYeDor.js"),__vite__mapDeps([49,9,4,5,8]))}]}]}],QV=178.17,ez=Xk("settings",()=>{const n=Ze(),e=Vs("settings/language","en-US"),t=Vs("settings/stage/view/model-renderer","2d"),i=Vs("settings/audio/input","true"),s=Se(()=>{var m;return(m=n.value)==null?void 0:m.deviceId}),{audioInputs:r}=jU({constraints:{audio:!0},requestPermissions:!0}),o=Ze(),a=Ze("/assets/live2d/models/hiyori_pro_zh.zip"),l=Ze("url"),c=Ze(!1),u=Vs("settings/live2d/position",{x:0,y:0}),f=Ze({group:"Idle",index:0}),h=Ze([]),d=Vs("settings/live2d/motion-map",{}),p=Vs("settings/disable-transitions",!0),_=Vs("settings/theme/colors/hue",QV),g=Vs("settings/theme/colors/hue-dynamic",!1);return Ge(i,m=>{m==="false"&&(n.value=void 0),m==="true"&&(n.value=r.value[0])}),yn(()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])}),Ge(r,()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])}),{live2dModelFile:o,live2dModelUrl:a,live2dLoadSource:l,live2dCurrentMotion:f,live2dPosition:u,availableLive2dMotions:h,live2dMotionMap:d,loadingLive2dModel:c,disableTransitions:p,language:e,stageView:t,themeColorsHue:_,themeColorsHueDynamic:g,isAudioInputOn:i,selectedAudioDevice:n,selectedAudioDeviceId:s}}),tz=sn({__name:"ArrowTransition",props:{stageTransition:{default:()=>({primaryColor:"#666",secondaryColor:"#ccc"})}},setup(n){const e=n,t=Se(()=>e.stageTransition),i=Se(()=>t.value.primaryColor||"#666"),s=Se(()=>t.value.secondaryColor||"#ccc");return yn(()=>{document.documentElement.style.setProperty("--stage-transition-3-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-3-overlay-color-2",s.value)}),(r,o)=>(ln(),ui("div",{class:"stage-transition-3",style:mi({zIndex:t.value.zIndex||100})},null,4))}}),yo=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},nz=yo(tz,[["__scopeId","data-v-df576df0"]]),iz=sn({__name:"BubbleWaveOutTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>{var i;return((i=e.stageTransition)==null?void 0:i.colors)||["#eee","#ebcb8b","#c56370","#3f3b52"]});return yn(()=>{var i,s;document.documentElement.style.setProperty("--circle-expansion-delay",`${((i=e.stageTransition)==null?void 0:i.delay)||0}s`),document.documentElement.style.setProperty("--circle-expansion-duration",`${((s=e.stageTransition)==null?void 0:s.duration)||.4}s`),t.value.forEach((r,o)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${o+1}`,r)})}),(i,s)=>{var r;return ln(),ui("div",{class:"circle-expansion-transition",style:mi({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)||100})},[(ln(!0),ui(Xt,null,SA(t.value,(o,a)=>(ln(),ui("div",{key:a}))),128))],4)}}}),sz=yo(iz,[["__scopeId","data-v-0c29056c"]]),rz=sn({__name:"FantasyFallTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>{var s;return((s=e.stageTransition)==null?void 0:s.direction)||"up"}),i=Se(()=>`fantasy-fall-${t.value}`);return yn(()=>{var s,r,o,a,l,c,u,f,h;document.documentElement.style.setProperty("--fantasy-fall-color",((s=e.stageTransition)==null?void 0:s.primaryColor)||"#eee"),document.documentElement.style.setProperty("--fantasy-fall-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.6}s`),document.documentElement.style.setProperty("--fantasy-fall-delay",`${((o=e.stageTransition)==null?void 0:o.delay)||0}s`),document.documentElement.style.setProperty("--fantasy-fall-radius-sm",`${((l=(a=e.stageTransition)==null?void 0:a.borderRadius)==null?void 0:l.sm)||"14rem"}`),document.documentElement.style.setProperty("--fantasy-fall-radius-md",`${((u=(c=e.stageTransition)==null?void 0:c.borderRadius)==null?void 0:u.md)||"14rem"}`),document.documentElement.style.setProperty("--fantasy-fall-radius-lg",`${((h=(f=e.stageTransition)==null?void 0:f.borderRadius)==null?void 0:h.lg)||"50%"}`)}),(s,r)=>{var o;return ln(),ui("div",{class:ga(["fantasy-fall-transition",i.value]),style:mi({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),oz=yo(rz,[["__scopeId","data-v-e62bf496"]]),az=sn({__name:"MultipleBlocksRevealTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>e.stageTransition),i=Se(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Se(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return yn(()=>{document.documentElement.style.setProperty("--stage-transition-4-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-4-overlay-color-2",s.value)}),(r,o)=>{var a;return ln(),ui("div",{class:"stage-transition-4",style:mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[t1('<div class="stage-transition-4__block" data-v-6d1179fc></div><div class="stage-transition-4__block" data-v-6d1179fc></div><div class="stage-transition-4__block" data-v-6d1179fc></div><div class="stage-transition-4__block" data-v-6d1179fc></div><div class="stage-transition-4__block" data-v-6d1179fc></div>',5)]),4)}}}),lz=yo(az,[["__scopeId","data-v-6d1179fc"]]),cz=sn({__name:"SlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>e.stageTransition),i=Se(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Se(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return Ge([t,i,s],()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),yn(()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),(r,o)=>{var a;return ln(),ui("div",{class:"stage-transition-1",style:mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),uz=yo(cz,[["__scopeId","data-v-bf1d1566"]]),fz=sn({__name:"SlopeSlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Se(()=>e.stageTransition),i=Se(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)??"#666"}),s=Se(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)??"#ccc"});return yn(()=>{document.documentElement.style.setProperty("--stage-transition-2-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-2-overlay-color-2",s.value)}),(r,o)=>{var a;return ln(),ui("div",{class:"stage-transition-2",style:mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),hz=yo(fz,[["__scopeId","data-v-8ff7120f"]]),dz=sn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return yn(()=>{var t,i,s,r,o,a,l;document.documentElement.style.setProperty("--rectangle-rotate-1-color",((t=e.stageTransition)==null?void 0:t.primaryColor)||"#ebcb8b"),document.documentElement.style.setProperty("--rectangle-rotate-2-color",((i=e.stageTransition)==null?void 0:i.secondaryColor)||"#c56370"),document.documentElement.style.setProperty("--rectangle-rotate-3-color",((s=e.stageTransition)==null?void 0:s.tertiaryColor)||"#43445b"),document.documentElement.style.setProperty("--rectangle-rotate-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.6}s`),document.documentElement.style.setProperty("--rectangle-rotate-delay",`${((o=e.stageTransition)==null?void 0:o.delay)||0}s`),document.documentElement.style.setProperty("--rectangle-rotate-stagger",`${((a=e.stageTransition)==null?void 0:a.staggerDelay)||.1}s`),document.documentElement.style.setProperty("--rectangle-rotate-rotation",`${((l=e.stageTransition)==null?void 0:l.rotation)||270}deg`)}),(t,i)=>{var s;return ln(),ui("div",{class:"rectangle-rotate-transition",style:mi({zIndex:((s=n.stageTransition)==null?void 0:s.zIndex)??100})},i[0]||(i[0]=[$s("div",{class:"rectangle rectangle-rotate-1"},[$s("div")],-1),$s("div",{class:"rectangle rectangle-rotate-2"},[$s("div")],-1),$s("div",{class:"rectangle rectangle-rotate-3"},[$s("div")],-1)]),4)}}}),pz=yo(dz,[["__scopeId","data-v-f4b1dc64"]]),mz=sn({__name:"StageTransitionGroup",props:{primaryColor:null,secondaryColor:null,tertiaryColor:null,colors:null,zIndex:null,disableTransitions:{type:Boolean}},setup(n){const e=n,t=ZV(),i=Ze(!1),s=Ze(),r=Ze(""),o=Ze(),a=Ie({slide:{component:uz,duration:2700},"slope-slide":{component:hz,duration:2700},arrow:{component:nz,duration:2700},"multiple-blocks-reveal":{component:lz,duration:2800},"fantasy-fall":{component:oz,duration:2700},"rectangles-rotate":{component:pz,duration:2700},"bubble-wave-out":{component:sz,duration:1e3}}),l=Ze([]);function c(d){return l.value.push(d),()=>{const p=l.value.indexOf(d);p>=0&&l.value.splice(p,1)}}async function u(d,p={}){s.value=d;for(const _ of l.value)try{await Promise.resolve(_(d,p))}catch(g){console.error(`Error in transition hook at stage "${d}":`,g)}}async function f(d,p,_){if(d.name==="none"||!d.name){p(),_();return}const g=a.value[d.name];if(!g){console.error(`Transition ${d.name} not found`),p(),_();return}const m=g.nextDelay!==void 0?g.nextDelay:g.duration/3;let y=!1;const v=c(E=>{E==="navigation"&&!y&&(y=!0,p())});try{await u("before-enter",{transitionName:d.name}),i.value&&(await u("before-leave",{transitionName:r.value}),r.value="",o.value=void 0,i.value=!1,await u("after-leave",{transitionName:r.value}),await new Promise(T=>setTimeout(T,50))),r.value=d.name,o.value=d,i.value=!0,await u("enter-active",{transitionName:name}),setTimeout(async()=>{await u("navigation",{transitionName:d.name,config:g}),y||(y=!0,p())},m),setTimeout(async()=>{await u("after-enter",{transitionName:d.name})},g.duration),setTimeout(async()=>{await u("before-leave",{transitionName:d.name})},g.duration+10),setTimeout(async()=>{await u("leave-active",{transitionName:d.name})},g.duration+20);const E=g.exitDuration??0;setTimeout(async()=>{i.value=!1,r.value="",o.value=void 0,await u("after-leave",{transitionName:d.name}),_()},g.duration+E)}catch(E){console.error(E)}finally{v(),setTimeout(()=>{y||(y=!0,p())},g.duration*2)}}function h(d,p){return new Promise(_=>{f(d,p,_)})}return t.beforeEach((d,p,_)=>{if(typeof d.meta.stageTransition!="object"){_();return}const g=d.meta.stageTransition;if(typeof e.primaryColor<"u"&&(g.primaryColor=e.primaryColor),typeof e.secondaryColor<"u"&&(g.secondaryColor=e.secondaryColor),typeof e.tertiaryColor<"u"&&(g.tertiaryColor=e.tertiaryColor),typeof e.colors<"u"&&(g.colors=e.colors),typeof e.zIndex<"u"&&(g.zIndex=e.zIndex),e.disableTransitions){_();return}h(g,_)}),(d,p)=>(ln(),ui(Xt,null,[MA(d.$slots,"default"),i.value?(ln(),ui(Xt,{key:0},[a.value[r.value]?(ln(),El(bA(a.value[r.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):Z_("",!0)],64)):Z_("",!0)],64))}});/*!
|
3854 |
* shared v11.1.2
|
3855 |
* (c) 2025 kazuya kawaguchi
|
3856 |
* Released under the MIT License.
|
assets/{index-A-leJNRw.js → index-Zq-keDdi.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as g,i as _,bE as y,s as v,bw as b,c as s,o as n,A as c,a as e,e as i,D as d,bx as u,by as k,x as w}from"./index-TGrV2Wj8.js";import{u as D}from"./providers-By8PGLd2.js";import{I}from"./IconStatusItem-Br2je_J5.js";import{b as p}from"./route-block-B_A1xBdJ.js";const h={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},B={relative:""},S={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},z={text:"neutral-300 dark:neutral-500","text-nowrap":""},C={"text-nowrap":"","text-3xl":"","font-semibold":""},E={grid:"~ cols-2 gap-4"},N=g({__name:"index",setup(P){const{t:a}=_(),m=y(),f=D(),{allProvidersMetadata:x}=v(f);return(R,o)=>{const r=b("motion");return n(),s(u,null,[c((n(),s("div",h,[e("button",{onClick:o[0]||(o[0]=t=>i(m).back())},o[1]||(o[1]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e("h1",B,[e("div",S,[e("span",z,d(i(a)("settings.title")),1)]),e("div",C,d(i(a)("settings.pages.providers.title")),1)])])),[[r]]),e("div",E,[(n(!0),s(u,null,k(i(x),(t,l)=>c((n(),w(i(I),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+l*10,delay:l*50,title:t.localizedName,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[r]])),128))]),o[2]||(o[2]=e("div",{text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[e("div",{text:"40","i-lucide:brain":""})],-1))],64)}}});typeof p=="function"&&p(N);export{N as default};
|
assets/{messages-uwlcVulg.js → messages-CJSYeDor.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{u as m,_ as g,l as _}from"./queues-
|
|
|
1 |
+
import{u as m,_ as g,l as _}from"./queues-BcuD6qtP.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{u as v}from"./queue-B_YcFivQ.js";import{d as b,g as t,c as l,o as u,a as e,b as x,e as k,D as c,bx as h,by as z}from"./index-TGrV2Wj8.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},S={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},V={"w-full":"",flex:"","flex-row":"","gap-4":""},M={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E=b({__name:"messages",setup(Q){const s=t(""),d=t([]),a=t(!1),f=v({handlers:[async i=>{d.value.push(i.data)}]}),r=m(f);async function p(){a.value=!0,r.add(s.value),r.add(_),s.value="",a.value=!1}return(i,n)=>(u(),l("div",w,[e("div",y,[x(k(g),{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:p},null,8,["modelValue"]),e("button",S,c(a.value?"Processing...":"Send"),1)]),e("div",V,[e("div",M,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(h,null,z(d.value,o=>(u(),l("div",{key:o},[e("div",null,c(o),1)]))),128))])])]))}});export{E as default};
|
assets/{mistral-ai-D2wOpTqM.js → mistral-ai-CvqIPFR2.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as U,i as V,bE as y,s as $,h as c,m as k,w as K,x as h,o as x,y as d,b as r,e as t}from"./index-TGrV2Wj8.js";import{u as w}from"./providers-By8PGLd2.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";import{a as N,b as P,c as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const a="mistral-ai",D=U({__name:"mistral-ai",setup(S){const{t:m}=V(),_=y(),p=w(),{providers:o}=$(p),n=c(()=>p.getProviderMetadata(a)),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),l=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});k(()=>{var e,s;p.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",l.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),K([i,l],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:l.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var v,f;return x(),h(t(R),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:d(()=>[r(t(N),null,{default:d(()=>[r(t(P),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:d(()=>{var u;return[r(t(M),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"mis-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(z),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:d(()=>[r(t(C),{modelValue:l.value,"onUpdate:modelValue":s[1]||(s[1]=u=>l.value=u),placeholder:"https://api.mistral.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{D as default};
|
assets/{moonshot-ai-BZrSFYvE.js → moonshot-ai-DCct7kvG.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as h,i as U,bE as V,s as y,h as v,m as $,w as k,x as K,o as x,y as d,b as r,e as t}from"./index-TGrV2Wj8.js";import{u as w}from"./providers-By8PGLd2.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";import{a as P,b as R,c as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const a="moonshot-ai",D=h({__name:"moonshot-ai",setup(B){const{t:m}=U(),_=V(),p=w(),{providers:o}=y(p),n=v(()=>p.getProviderMetadata(a)),i=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),l=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;p.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",l.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),k([i,l],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:l.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var c,f;return x(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:d(()=>[r(t(P),null,{default:d(()=>[r(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:d(()=>{var u;return[r(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"ms-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(z),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:d(()=>[r(t(M),{modelValue:l.value,"onUpdate:modelValue":s[1]||(s[1]=u=>l.value=u),placeholder:"https://api.moonshot.cn/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{D as default};
|
assets/{novita-ai-CIm-m9hp.js → novita-ai-CLXzxp4w.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as U,i as V,bE as y,s as $,h as c,m as k,w as K,x as h,o as x,y as d,b as r,e as t}from"./index-TGrV2Wj8.js";import{u as w}from"./providers-By8PGLd2.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";import{a as N,b as P,c as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const a="novita-ai",D=U({__name:"novita-ai",setup(S){const{t:v}=V(),_=y(),p=w(),{providers:o}=$(p),n=c(()=>p.getProviderMetadata(a)),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),l=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});k(()=>{var e,i;p.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",l.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([s,l],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:l.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var m,f;return x(),h(t(R),{"provider-name":(m=n.value)==null?void 0:m.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:d(()=>[r(t(N),null,{default:d(()=>[r(t(P),{title:t(v)("settings.pages.providers.common.section.basic.title"),description:t(v)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:d(()=>{var u;return[r(t(M),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=g=>s.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"nvt-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(z),{title:t(v)("settings.pages.providers.common.section.advanced.title")},{default:d(()=>[r(t(C),{modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=u=>l.value=u),placeholder:"https://api.novita.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{D as default};
|
assets/{ollama-Dccp0BFp.js → ollama-BgPFZ05v.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as P,a as B,b as O,c as D}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{d as P,a as B,b as O,c as D}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import{d as w,bN as x,bO as U,c as g,o as f,b as m,g as $,w as q,bw as R,a as _,A as S,b_ as z,C as I,D as M,bx as A,by as E,i as F,bE as T,s as L,h as C,m as j,b$ as G,x as H,y as V,e as t}from"./index-TGrV2Wj8.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{u as J}from"./providers-By8PGLd2.js";import{a as Q,_ as W}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const X={flex:"~ gap-2"},Y=w({__name:"InputKeyValue",props:x({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:["update:propertyKey","update:propertyValue"],setup(v){const o=v,s=U(v,"propertyKey"),u=U(v,"propertyValue");return(r,a)=>(f(),g("div",X,[m(P,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=n=>s.value=n),placeholder:o.keyPlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"]),m(P,{modelValue:u.value,"onUpdate:modelValue":a[1]||(a[1]=n=>u.value=n),placeholder:o.valuePlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"])]))}}),Z={"max-w-full":""},ee={flex:"~ col gap-2"},le={class:"flex items-center gap-1 text-sm font-medium"},ae={key:0,class:"text-red-500"},te={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},oe={flex:"~ col gap-2"},re=["onClick"],se=w({__name:"FieldKeyValues",props:x({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:x(["remove","add"],["update:modelValue"]),setup(v,{emit:o}){const s=v,u=o,r=U(v,"modelValue"),a=$(""),n=$("");return q([a,n],()=>{u("add",a.value,n.value)}),(K,p)=>{const k=R("auto-animate");return f(),g("div",Z,[_("label",ee,[_("div",null,[_("div",le,[z(M(s.label)+" ",1),s.required!==!1?(f(),g("span",ae,"*")):I("",!0)]),_("div",te,M(s.description),1)]),S((f(),g("div",oe,[(f(!0),g(A,null,E(r.value,(y,l)=>(f(),g("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(Y,{"property-key":y.key,"onUpdate:propertyKey":e=>y.key=e,"property-value":y.value,"onUpdate:propertyValue":e=>y.value=e,"key-placeholder":s.keyPlaceholder,"value-placeholder":s.valuePlaceholder,"w-full":""},null,8,["property-key","onUpdate:propertyKey","property-value","onUpdate:propertyValue","key-placeholder","value-placeholder"]),_("button",{onClick:e=>u("remove",l)},p[0]||(p[0]=[_("div",{"i-solar:minus-circle-line-duotone":"",size:"6"},null,-1)]),8,re)]))),128))])),[[k]])])])}}}),d="ollama",ve=w({__name:"ollama",setup(v){const{t:o}=F(),s=T(),u=J(),{providers:r}=L(u),a=C(()=>u.getProviderMetadata(d)),n=C({get:()=>{var l,e,i;return((l=r.value[d])==null?void 0:l.baseUrl)||((i=(e=a.value)==null?void 0:e.defaultOptions)==null?void 0:i.baseUrl)||""},set:l=>{r.value[d]||(r.value[d]={}),r.value[d].baseUrl=l}});j(()=>{var l,e,i,b;u.initializeProvider(d),n.value=((l=r.value[d])==null?void 0:l.baseUrl)||((i=(e=a.value)==null?void 0:e.defaultOptions)==null?void 0:i.baseUrl)||"",(b=r.value[d])!=null&&b.headers||(r.value[d].headers={})});function K(){var l;r.value[d]={...(l=a.value)==null?void 0:l.defaultOptions}}const p=G([{key:"",value:""}]);function k(l,e,i){l&&l.push({key:e,value:i})}function y(l,e){e&&(e.length===1?(e[0].key="",e[0].value=""):e.splice(l,1))}return q(p,l=>{l.length>0&&(l[l.length-1].key!==""||l[l.length-1].value!=="")&&l.push({key:"",value:""})},{deep:!0,immediate:!0}),(l,e)=>{var i,b;return f(),H(t(D),{"provider-name":(i=a.value)==null?void 0:i.localizedName,"provider-icon":(b=a.value)==null?void 0:b.icon,"on-back":()=>t(s).back()},{default:V(()=>[m(t(B),null,{default:V(()=>[m(t(O),{title:t(o)("settings.pages.providers.common.section.basic.title"),description:t(o)("settings.pages.providers.common.section.basic.description"),"on-reset":K},{default:V(()=>{var c,h;return[m(t(Q),{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=N=>n.value=N),placeholder:((h=(c=a.value)==null?void 0:c.defaultOptions)==null?void 0:h.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(t(W),{title:t(o)("settings.pages.providers.common.section.advanced.title")},{default:V(()=>[m(t(se),{modelValue:p,"onUpdate:modelValue":e[1]||(e[1]=c=>p=c),label:t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.label"),description:t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.description"),"key-placeholder":t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder"),"value-placeholder":t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder"),onAdd:e[2]||(e[2]=(c,h)=>k(p,c,h)),onRemove:e[3]||(e[3]=c=>y(c,p))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{ve as default};
|
assets/{openai-C6vHaTi8.js → openai-BnFpcOkR.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as h,i as U,bE as V,s as k,h as v,m as y,w as $,x as K,o as x,y as p,b as r,e as t}from"./index-TGrV2Wj8.js";import{u as I}from"./providers-By8PGLd2.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";import{a as R,b as S,c as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const e="openai",D=h({__name:"openai",setup(A){const{t:u}=U(),_=V(),c=I(),{providers:a}=k(c),m=v(()=>c.getProviderMetadata(e)),i=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),l=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://api.openai.com/v1/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});y(()=>{var o,s;a.value[e]||(a.value[e]={baseUrl:"https://api.openai.com/v1/"}),i.value=((o=a.value[e])==null?void 0:o.apiKey)||"",l.value=((s=a.value[e])==null?void 0:s.baseUrl)||"https://api.openai.com/v1/"}),$([i,l],()=>{a.value[e]={...a.value[e],apiKey:i.value,baseUrl:l.value||"https://api.openai.com/v1/"}});function b(){a.value[e]={baseUrl:"https://api.openai.com/v1/"}}return(o,s)=>{var d,f;return x(),K(t(z),{"provider-name":((d=m.value)==null?void 0:d.localizedName)||"OpenAI","provider-icon":(f=m.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[r(t(R),null,{default:p(()=>[r(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var n;return[r(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":((n=m.value)==null?void 0:n.localizedName)||"OpenAI",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(w),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[r(t(M),{modelValue:l.value,"onUpdate:modelValue":s[1]||(s[1]=n=>l.value=n),placeholder:"https://api.openai.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{D as default};
|
assets/{openrouter-ai-BipOG1Du.js → openrouter-ai-CneoFxfb.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as V,i as k,bE as y,s as $,h as _,m as K,w as O,x as h,o as x,y as c,b as p,e as s}from"./index-TGrV2Wj8.js";import{u as w}from"./providers-By8PGLd2.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";import{a as P,b as R,c as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const a="openrouter-ai",F=V({__name:"openrouter-ai",setup(B){const{t:m}=k(),b=y(),f=w(),{providers:o}=$(f),l=_(()=>f.getProviderMetadata(a)),i=_({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),n=_({get:()=>{var e,t,r;return((e=o.value[a])==null?void 0:e.baseUrl)||((r=(t=l.value)==null?void 0:t.defaultOptions)==null?void 0:r.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,t,r,u;f.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",n.value=((t=o.value[a])==null?void 0:t.baseUrl)||((u=(r=l.value)==null?void 0:r.defaultOptions)==null?void 0:u.baseUrl)||""}),O([i,n],()=>{var e,t;o.value[a]={...o.value[a],apiKey:i.value,baseUrl:n.value||((t=(e=l.value)==null?void 0:e.defaultOptions)==null?void 0:t.baseUrl)||""}});function U(){var e;o.value[a]={...(e=l.value)==null?void 0:e.defaultOptions}}return(e,t)=>{var r,u;return x(),h(s(S),{"provider-name":(r=l.value)==null?void 0:r.localizedName,"provider-icon":(u=l.value)==null?void 0:u.icon,"on-back":()=>s(b).back()},{default:c(()=>[p(s(P),null,{default:c(()=>[p(s(R),{title:s(m)("settings.pages.providers.common.section.basic.title"),description:s(m)("settings.pages.providers.common.section.basic.description"),"on-reset":U},{default:c(()=>{var d;return[p(s(N),{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=v=>i.value=v),"provider-name":(d=l.value)==null?void 0:d.localizedName,placeholder:"sk-or-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),p(s(z),{title:s(m)("settings.pages.providers.common.section.advanced.title")},{default:c(()=>{var d,v;return[p(s(M),{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=g=>n.value=g),placeholder:((v=(d=l.value)==null?void 0:d.defaultOptions)==null?void 0:v.baseUrl)||""},null,8,["modelValue","placeholder"])]}),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{F as default};
|
assets/{providers-C0QEXqAJ.js → providers-By8PGLd2.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
var Y=Object.defineProperty;var I=(r,i,a)=>i in r?Y(r,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[i]=a;var U=(r,i,a)=>I(r,typeof i!="symbol"?i+"":i,a);import{f as R,bL as ee,i as re,g as O,w as ie,h as S}from"./index-DdKO3wSp.js";var C=class extends Error{constructor(i,a){super(i);U(this,"response");this.name="XSAIError",this.response=a}},te=r=>r.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),x=r=>Object.fromEntries(Object.entries(r).map(([i,a])=>[te(i),a])),D=r=>Object.fromEntries(Object.entries(r).filter(([,i])=>i!==void 0)),me=r=>JSON.stringify(x(D({...r,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),X=(r,i)=>D({Authorization:i!==void 0?`Bearer ${i}`:void 0,...r}),J=(r,i)=>{const a=i.toString();return new URL(r,a.endsWith("/")?a:`${a}/`)},ae=async r=>{if(!r.ok){const i=new C(`Remote sent ${r.status} response`,r);throw i.cause=new Error(await r.text()),i}if(!r.body)throw new C("Response body is empty from remote server",r);if(!(r.body instanceof ReadableStream)){const i=new C(`Expected Response body to be a ReadableStream, but got ${String(r.body)}`,r);throw i.cause=new Error(`Content-Type is ${r.headers.get("Content-Type")}`),i}return r},V=async r=>ae(r).then(async i=>i.json()),g=async r=>(r.fetch??globalThis.fetch)(J("models",r.baseURL),{headers:X({"Content-Type":"application/json",...r.headers},r.apiKey),signal:r.abortSignal}).then(V).then(({data:i})=>i),c=r=>({chat:i=>Object.assign(r,{model:i})}),w=r=>({embed:i=>Object.assign(r,{model:i})}),u=r=>({model:()=>r}),oe=r=>({speech:i=>Object.assign(r,{model:i})}),se=r=>({transcription:i=>Object.assign(r,{model:i})}),d=(r,i)=>({metadata:{id:r,...i}}),n=(...r)=>Object.assign(r[0],...r.slice(1)),A=(r,i="https://api.deepseek.com/")=>n(d("deepseek"),c({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),B=(r,i="https://api.fireworks.ai/inference/v1/")=>n(d("fireworks"),c({apiKey:r,baseURL:i}),w({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),$=(r,i="https://api.mistral.ai/v1/")=>n(d("mistral"),c({apiKey:r,baseURL:i}),w({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),T=(r,i="https://api.moonshot.cn/v1/")=>n(d("moonshot"),c({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),z=(r,i="https://api.novita.ai/v3/openai/")=>n(d("novita"),c({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),F=(r,i="https://api.openai.com/v1/")=>n(d("openai"),c({apiKey:r,baseURL:i}),w({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i}),oe({apiKey:r,baseURL:i}),se({apiKey:r,baseURL:i})),ne=(r,i="")=>n(d("openrouter"),{chat:(a,o)=>{const h={apiKey:r,baseURL:i,model:a};return{...o?(({extraHeaders:p,models:b,provider:y})=>{p!=null&&(h.headers??(h.headers={}),Object.assign(h.headers,p));let v;return y!=null&&(v=x(y)),x({models:b,provider:v})})(o):{},...h}}},u({apiKey:r,baseURL:i})),le=(r,i="https://api.perplexity.ai/")=>n(d("perplexity"),c({apiKey:r,baseURL:i})),N=(r,i="https://api.together.xyz/v1/")=>n(d("together-ai"),c({apiKey:r,baseURL:i}),w({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i,fetch:async(...a)=>globalThis.fetch(...a).then(async o=>o.json()).then(o=>Response.json({data:o,object:"list"}))})),de=(r,i)=>{const a=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return n(d("workers-ai"),c({apiKey:r,baseURL:a}),w({apiKey:r,baseURL:a}))},q=(r,i="https://api.x.ai/v1/")=>n(d("xai"),c({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),j=(r="http://localhost:11434/v1/")=>n(d("ollama"),c({baseURL:r}),w({baseURL:r}),u({baseURL:r}));function W(r,i="http://localhost:5933/v1/"){const a=({applyTextNormalization:l,languageCode:p,nextRequestIds:b,nextText:y,previousRequestIds:v,previousText:K,pronunciationDictionaryLocators:f,seed:P,voiceSettings:k})=>({extraBody:x({applyTextNormalization:l,languageCode:p,nextRequestIds:b,nextText:y,previousRequestIds:v,previousText:K,pronunciationDictionaryLocators:f?f.map(E=>x(E)):void 0,seed:P,voiceSettings:k!=null?x(k):{similarityBoost:.75,stability:.5}})});return n({speech:(l,p)=>({...p?a(p):{},apiKey:r,baseURL:i,model:`elevenlabs/${l}`})},{voice:l=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=elevenlabs",...l?a(l):{},apiKey:r,baseURL:i})})}async function ce(r){return(r.fetch??globalThis.fetch)(J(r.query?`api/voices?${r.query}`:"api/voices",r.baseURL),{headers:X({...r.headers},r.apiKey),method:"GET",signal:r.abortSignal}).then(V).then(({voices:i})=>i)}const ue=R("providers",()=>{const r=ee("settings/credentials/providers",{}),{t:i}=re();async function a(e){try{const t=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${e.apiKey}`,"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to fetch OpenRouter models: ${t.statusText}`);return(await t.json()).data.map(s=>({id:s.id,name:s.name||s.id,provider:"openrouter-ai",description:s.description||"",contextLength:s.context_length,deprecated:!1}))}catch(t){throw console.error("Error fetching OpenRouter models:",t),t}}const o={"openrouter-ai":{id:"openrouter-ai",nameKey:"settings.pages.providers.provider.openrouter.title",name:"OpenRouter",descriptionKey:"settings.pages.providers.provider.openrouter.description",description:"openrouter.ai",icon:"i-lobe-icons:openrouter",defaultOptions:{baseUrl:"https://openrouter.ai/api/v1/"},createProvider:e=>ne(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>a(e)}},openai:{id:"openai",nameKey:"settings.pages.providers.provider.openai.title",name:"OpenAI",descriptionKey:"settings.pages.providers.provider.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",defaultOptions:{baseUrl:"https://api.openai.com/v1/"},createProvider:e=>F(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...F(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))}},ollama:{id:"ollama",nameKey:"settings.pages.providers.provider.ollama.title",name:"Ollama",descriptionKey:"settings.pages.providers.provider.ollama.description",description:"ollama.com",icon:"i-lobe-icons:ollama",defaultOptions:{baseUrl:"http://localhost:11434/api/"},createProvider:e=>j(e.baseUrl),capabilities:{listModels:async e=>(await g({...j(e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))}},vllm:{id:"vllm",nameKey:"settings.pages.providers.provider.vllm.title",name:"vLLM",descriptionKey:"settings.pages.providers.provider.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm-color",createProvider:e=>j(e.baseUrl),capabilities:{listModels:async()=>[{id:"llama-2-7b",name:"Llama 2 (7B)",provider:"vllm",description:"Meta's Llama 2 7B parameter model",contextLength:4096},{id:"llama-2-13b",name:"Llama 2 (13B)",provider:"vllm",description:"Meta's Llama 2 13B parameter model",contextLength:4096},{id:"llama-2-70b",name:"Llama 2 (70B)",provider:"vllm",description:"Meta's Llama 2 70B parameter model",contextLength:4096},{id:"mistral-7b",name:"Mistral (7B)",provider:"vllm",description:"Mistral AI's 7B parameter model",contextLength:8192},{id:"mixtral-8x7b",name:"Mixtral (8x7B)",provider:"vllm",description:"Mistral AI's Mixtral 8x7B MoE model",contextLength:32768},{id:"custom",name:"Custom Model",provider:"vllm",description:"Specify a custom model name",contextLength:0}]}},"perplexity-ai":{id:"perplexity-ai",nameKey:"settings.pages.providers.provider.perplexity.title",name:"Perplexity",descriptionKey:"settings.pages.providers.provider.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",defaultOptions:{baseUrl:"https://api.perplexity.ai"},createProvider:e=>le(e.apiKey,e.baseUrl),capabilities:{listModels:async()=>[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3},{id:"sonar-medium-online",name:"Sonar Medium (Online)",provider:"perplexity-ai",description:"Balanced model with online search capabilities",contextLength:12e3},{id:"sonar-large-online",name:"Sonar Large (Online)",provider:"perplexity-ai",description:"Powerful model with online search capabilities",contextLength:12e3},{id:"codey-small",name:"Codey Small",provider:"perplexity-ai",description:"Specialized for code generation and understanding",contextLength:12e3},{id:"codey-large",name:"Codey Large",provider:"perplexity-ai",description:"Advanced code generation and understanding",contextLength:12e3}]}},elevenlabs:{id:"elevenlabs",nameKey:"settings.pages.providers.provider.elevenlabs.title",name:"ElevenLabs",descriptionKey:"settings.pages.providers.provider.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/",voiceSettings:{similarityBoost:.75,stability:.5}},createProvider:e=>W(e.apiKey,e.baseUrl),capabilities:{listModels:async()=>[],listVoices:async e=>{const t=W(e.apiKey,e.baseUrl);return(await ce({...t.voice()})).map(s=>({id:s.id,name:s.name,provider:"elevenlabs"}))}}},xai:{id:"xai",nameKey:"settings.pages.providers.provider.xai.title",name:"xAI",descriptionKey:"settings.pages.providers.provider.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:e=>q(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...q(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))}},deepseek:{id:"deepseek",nameKey:"settings.pages.providers.provider.deepseek.title",name:"DeepSeek",descriptionKey:"settings.pages.providers.provider.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek-color",createProvider:e=>A(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...A(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))}},"together-ai":{id:"together-ai",nameKey:"settings.pages.providers.provider.together.title",name:"Together.ai",descriptionKey:"settings.pages.providers.provider.together.description",description:"together.ai",iconColor:"i-lobe-icons:together-color",createProvider:e=>N(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...N(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))}},"novita-ai":{id:"novita-ai",nameKey:"settings.pages.providers.provider.novita.title",name:"Novita",descriptionKey:"settings.pages.providers.provider.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita-color",createProvider:e=>z(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...z(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))}},"fireworks-ai":{id:"fireworks-ai",nameKey:"settings.pages.providers.provider.fireworks.title",name:"Fireworks.ai",descriptionKey:"settings.pages.providers.provider.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:e=>B(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...B(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))}},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"settings.pages.providers.provider.cloudflare-workers-ai.title",name:"Cloudflare Workers AI",descriptionKey:"settings.pages.providers.provider.cloudflare-workers-ai.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare-color",createProvider:e=>de(e.apiKey,e.accountId),capabilities:{listModels:async()=>[]}},"mistral-ai":{id:"mistral-ai",nameKey:"settings.pages.providers.provider.mistral.title",name:"Mistral",descriptionKey:"settings.pages.providers.provider.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral-color",createProvider:e=>$(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...$(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))}},"moonshot-ai":{id:"moonshot-ai",nameKey:"settings.pages.providers.provider.moonshot.title",name:"Moonshot AI",descriptionKey:"settings.pages.providers.provider.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:e=>T(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...T(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))}}};function h(e){const t=r.value[e];if(!t)return!1;switch(e){case"openrouter-ai":return!!t.apiKey&&!!t.baseUrl;case"openai":return!!t.apiKey;case"ollama":return!!t.baseUrl;case"vllm":return!!t.baseUrl;case"elevenlabs":return!!t.apiKey;case"xai":return!!t.apiKey;case"deepseek":return!!t.apiKey;case"together-ai":return!!t.apiKey;case"novita-ai":return!!t.apiKey;case"fireworks-ai":return!!t.apiKey;case"cloudflare-workers-ai":return!!t.apiKey;case"mistral-ai":return!!t.apiKey;case"moonshot-ai":return!!t.apiKey;default:return!1}}const l=O({});function p(e){var t;if(!r.value[e]){const m=o[e];r.value[e]={baseUrl:((t=m.defaultOptions)==null?void 0:t.baseUrl)||""}}}Object.keys(o).forEach(p);function b(){Object.keys(o).forEach(e=>{l.value[e]=h(e)})}b(),ie(r,b,{deep:!0});const y=S(()=>Object.keys(o).filter(e=>l.value[e])),v=O({}),K=O({}),f=O({});async function P(e){const t=r.value[e];if(!t)return[];const m=o[e];if(!m)return[];K.value[e]=!0,f.value[e]=null;try{const s=m.capabilities.listModels?await m.capabilities.listModels(t):[];return v.value[e]=s.map(M=>({id:M.id,name:M.name,description:M.description,contextLength:M.contextLength,deprecated:M.deprecated,provider:e})),v.value[e]}catch(s){return console.error(`Error fetching models for ${e}:`,s),f.value[e]=s instanceof Error?s.message:"Unknown error",[]}finally{K.value[e]=!1}}function k(e){return v.value[e]||[]}const E=S(()=>{const e=[];for(const t of y.value)e.push(...v.value[t]||[]);return e});async function _(){for(const e of y.value)o[e].capabilities.listModels&&await P(e)}function L(e){const t=o[e];if(!t)throw new Error(`Provider metadata for ${e} not found`);return{...t,localizedName:i(t.nameKey,t.name),localizedDescription:i(t.descriptionKey,t.description)}}const G=S(()=>Object.values(o).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:l.value[e.id]||!1})));function Z(e){const t=r.value[e];if(!t)throw new Error(`Provider credentials for ${e} not found`);const m=o[e];if(!m)throw new Error(`Provider metadata for ${e} not found`);try{return m.createProvider(t)}catch(s){throw console.error(`Error creating provider instance for ${e}:`,s),s}}const H=S(()=>y.value.map(e=>L(e)));function Q(e){return r.value[e]}return{providers:r,getProviderConfig:Q,availableProviders:y,configuredProviders:l,providerMetadata:o,getProviderMetadata:L,allProvidersMetadata:G,initializeProvider:p,validateProvider:h,availableModels:v,isLoadingModels:K,modelLoadError:f,fetchModelsForProvider:P,getModelsForProvider:k,allAvailableModels:E,loadModelsForConfiguredProviders:_,getProviderInstance:Z,availableProvidersMetadata:H}});export{X as a,me as b,ae as c,g as l,J as r,ue as u};
|
|
|
1 |
+
var Y=Object.defineProperty;var I=(r,i,a)=>i in r?Y(r,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[i]=a;var U=(r,i,a)=>I(r,typeof i!="symbol"?i+"":i,a);import{f as R,bL as ee,i as re,g as O,w as ie,h as S}from"./index-TGrV2Wj8.js";var C=class extends Error{constructor(i,a){super(i);U(this,"response");this.name="XSAIError",this.response=a}},te=r=>r.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),x=r=>Object.fromEntries(Object.entries(r).map(([i,a])=>[te(i),a])),D=r=>Object.fromEntries(Object.entries(r).filter(([,i])=>i!==void 0)),me=r=>JSON.stringify(x(D({...r,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),X=(r,i)=>D({Authorization:i!==void 0?`Bearer ${i}`:void 0,...r}),J=(r,i)=>{const a=i.toString();return new URL(r,a.endsWith("/")?a:`${a}/`)},ae=async r=>{if(!r.ok){const i=new C(`Remote sent ${r.status} response`,r);throw i.cause=new Error(await r.text()),i}if(!r.body)throw new C("Response body is empty from remote server",r);if(!(r.body instanceof ReadableStream)){const i=new C(`Expected Response body to be a ReadableStream, but got ${String(r.body)}`,r);throw i.cause=new Error(`Content-Type is ${r.headers.get("Content-Type")}`),i}return r},V=async r=>ae(r).then(async i=>i.json()),g=async r=>(r.fetch??globalThis.fetch)(J("models",r.baseURL),{headers:X({"Content-Type":"application/json",...r.headers},r.apiKey),signal:r.abortSignal}).then(V).then(({data:i})=>i),c=r=>({chat:i=>Object.assign(r,{model:i})}),w=r=>({embed:i=>Object.assign(r,{model:i})}),u=r=>({model:()=>r}),oe=r=>({speech:i=>Object.assign(r,{model:i})}),se=r=>({transcription:i=>Object.assign(r,{model:i})}),d=(r,i)=>({metadata:{id:r,...i}}),n=(...r)=>Object.assign(r[0],...r.slice(1)),A=(r,i="https://api.deepseek.com/")=>n(d("deepseek"),c({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),B=(r,i="https://api.fireworks.ai/inference/v1/")=>n(d("fireworks"),c({apiKey:r,baseURL:i}),w({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),$=(r,i="https://api.mistral.ai/v1/")=>n(d("mistral"),c({apiKey:r,baseURL:i}),w({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),T=(r,i="https://api.moonshot.cn/v1/")=>n(d("moonshot"),c({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),z=(r,i="https://api.novita.ai/v3/openai/")=>n(d("novita"),c({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),F=(r,i="https://api.openai.com/v1/")=>n(d("openai"),c({apiKey:r,baseURL:i}),w({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i}),oe({apiKey:r,baseURL:i}),se({apiKey:r,baseURL:i})),ne=(r,i="")=>n(d("openrouter"),{chat:(a,o)=>{const h={apiKey:r,baseURL:i,model:a};return{...o?(({extraHeaders:p,models:b,provider:y})=>{p!=null&&(h.headers??(h.headers={}),Object.assign(h.headers,p));let v;return y!=null&&(v=x(y)),x({models:b,provider:v})})(o):{},...h}}},u({apiKey:r,baseURL:i})),le=(r,i="https://api.perplexity.ai/")=>n(d("perplexity"),c({apiKey:r,baseURL:i})),N=(r,i="https://api.together.xyz/v1/")=>n(d("together-ai"),c({apiKey:r,baseURL:i}),w({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i,fetch:async(...a)=>globalThis.fetch(...a).then(async o=>o.json()).then(o=>Response.json({data:o,object:"list"}))})),de=(r,i)=>{const a=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return n(d("workers-ai"),c({apiKey:r,baseURL:a}),w({apiKey:r,baseURL:a}))},q=(r,i="https://api.x.ai/v1/")=>n(d("xai"),c({apiKey:r,baseURL:i}),u({apiKey:r,baseURL:i})),j=(r="http://localhost:11434/v1/")=>n(d("ollama"),c({baseURL:r}),w({baseURL:r}),u({baseURL:r}));function W(r,i="http://localhost:5933/v1/"){const a=({applyTextNormalization:l,languageCode:p,nextRequestIds:b,nextText:y,previousRequestIds:v,previousText:K,pronunciationDictionaryLocators:f,seed:P,voiceSettings:k})=>({extraBody:x({applyTextNormalization:l,languageCode:p,nextRequestIds:b,nextText:y,previousRequestIds:v,previousText:K,pronunciationDictionaryLocators:f?f.map(E=>x(E)):void 0,seed:P,voiceSettings:k!=null?x(k):{similarityBoost:.75,stability:.5}})});return n({speech:(l,p)=>({...p?a(p):{},apiKey:r,baseURL:i,model:`elevenlabs/${l}`})},{voice:l=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=elevenlabs",...l?a(l):{},apiKey:r,baseURL:i})})}async function ce(r){return(r.fetch??globalThis.fetch)(J(r.query?`api/voices?${r.query}`:"api/voices",r.baseURL),{headers:X({...r.headers},r.apiKey),method:"GET",signal:r.abortSignal}).then(V).then(({voices:i})=>i)}const ue=R("providers",()=>{const r=ee("settings/credentials/providers",{}),{t:i}=re();async function a(e){try{const t=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${e.apiKey}`,"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to fetch OpenRouter models: ${t.statusText}`);return(await t.json()).data.map(s=>({id:s.id,name:s.name||s.id,provider:"openrouter-ai",description:s.description||"",contextLength:s.context_length,deprecated:!1}))}catch(t){throw console.error("Error fetching OpenRouter models:",t),t}}const o={"openrouter-ai":{id:"openrouter-ai",nameKey:"settings.pages.providers.provider.openrouter.title",name:"OpenRouter",descriptionKey:"settings.pages.providers.provider.openrouter.description",description:"openrouter.ai",icon:"i-lobe-icons:openrouter",defaultOptions:{baseUrl:"https://openrouter.ai/api/v1/"},createProvider:e=>ne(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>a(e)}},openai:{id:"openai",nameKey:"settings.pages.providers.provider.openai.title",name:"OpenAI",descriptionKey:"settings.pages.providers.provider.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",defaultOptions:{baseUrl:"https://api.openai.com/v1/"},createProvider:e=>F(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...F(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))}},ollama:{id:"ollama",nameKey:"settings.pages.providers.provider.ollama.title",name:"Ollama",descriptionKey:"settings.pages.providers.provider.ollama.description",description:"ollama.com",icon:"i-lobe-icons:ollama",defaultOptions:{baseUrl:"http://localhost:11434/api/"},createProvider:e=>j(e.baseUrl),capabilities:{listModels:async e=>(await g({...j(e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))}},vllm:{id:"vllm",nameKey:"settings.pages.providers.provider.vllm.title",name:"vLLM",descriptionKey:"settings.pages.providers.provider.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm-color",createProvider:e=>j(e.baseUrl),capabilities:{listModels:async()=>[{id:"llama-2-7b",name:"Llama 2 (7B)",provider:"vllm",description:"Meta's Llama 2 7B parameter model",contextLength:4096},{id:"llama-2-13b",name:"Llama 2 (13B)",provider:"vllm",description:"Meta's Llama 2 13B parameter model",contextLength:4096},{id:"llama-2-70b",name:"Llama 2 (70B)",provider:"vllm",description:"Meta's Llama 2 70B parameter model",contextLength:4096},{id:"mistral-7b",name:"Mistral (7B)",provider:"vllm",description:"Mistral AI's 7B parameter model",contextLength:8192},{id:"mixtral-8x7b",name:"Mixtral (8x7B)",provider:"vllm",description:"Mistral AI's Mixtral 8x7B MoE model",contextLength:32768},{id:"custom",name:"Custom Model",provider:"vllm",description:"Specify a custom model name",contextLength:0}]}},"perplexity-ai":{id:"perplexity-ai",nameKey:"settings.pages.providers.provider.perplexity.title",name:"Perplexity",descriptionKey:"settings.pages.providers.provider.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",defaultOptions:{baseUrl:"https://api.perplexity.ai"},createProvider:e=>le(e.apiKey,e.baseUrl),capabilities:{listModels:async()=>[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3},{id:"sonar-medium-online",name:"Sonar Medium (Online)",provider:"perplexity-ai",description:"Balanced model with online search capabilities",contextLength:12e3},{id:"sonar-large-online",name:"Sonar Large (Online)",provider:"perplexity-ai",description:"Powerful model with online search capabilities",contextLength:12e3},{id:"codey-small",name:"Codey Small",provider:"perplexity-ai",description:"Specialized for code generation and understanding",contextLength:12e3},{id:"codey-large",name:"Codey Large",provider:"perplexity-ai",description:"Advanced code generation and understanding",contextLength:12e3}]}},elevenlabs:{id:"elevenlabs",nameKey:"settings.pages.providers.provider.elevenlabs.title",name:"ElevenLabs",descriptionKey:"settings.pages.providers.provider.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/",voiceSettings:{similarityBoost:.75,stability:.5}},createProvider:e=>W(e.apiKey,e.baseUrl),capabilities:{listModels:async()=>[],listVoices:async e=>{const t=W(e.apiKey,e.baseUrl);return(await ce({...t.voice()})).map(s=>({id:s.id,name:s.name,provider:"elevenlabs"}))}}},xai:{id:"xai",nameKey:"settings.pages.providers.provider.xai.title",name:"xAI",descriptionKey:"settings.pages.providers.provider.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:e=>q(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...q(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))}},deepseek:{id:"deepseek",nameKey:"settings.pages.providers.provider.deepseek.title",name:"DeepSeek",descriptionKey:"settings.pages.providers.provider.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek-color",createProvider:e=>A(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...A(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))}},"together-ai":{id:"together-ai",nameKey:"settings.pages.providers.provider.together.title",name:"Together.ai",descriptionKey:"settings.pages.providers.provider.together.description",description:"together.ai",iconColor:"i-lobe-icons:together-color",createProvider:e=>N(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...N(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))}},"novita-ai":{id:"novita-ai",nameKey:"settings.pages.providers.provider.novita.title",name:"Novita",descriptionKey:"settings.pages.providers.provider.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita-color",createProvider:e=>z(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...z(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))}},"fireworks-ai":{id:"fireworks-ai",nameKey:"settings.pages.providers.provider.fireworks.title",name:"Fireworks.ai",descriptionKey:"settings.pages.providers.provider.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:e=>B(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...B(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))}},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"settings.pages.providers.provider.cloudflare-workers-ai.title",name:"Cloudflare Workers AI",descriptionKey:"settings.pages.providers.provider.cloudflare-workers-ai.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare-color",createProvider:e=>de(e.apiKey,e.accountId),capabilities:{listModels:async()=>[]}},"mistral-ai":{id:"mistral-ai",nameKey:"settings.pages.providers.provider.mistral.title",name:"Mistral",descriptionKey:"settings.pages.providers.provider.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral-color",createProvider:e=>$(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...$(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))}},"moonshot-ai":{id:"moonshot-ai",nameKey:"settings.pages.providers.provider.moonshot.title",name:"Moonshot AI",descriptionKey:"settings.pages.providers.provider.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:e=>T(e.apiKey,e.baseUrl),capabilities:{listModels:async e=>(await g({...T(e.apiKey,e.baseUrl).model()})).map(t=>({id:t.id,name:t.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))}}};function h(e){const t=r.value[e];if(!t)return!1;switch(e){case"openrouter-ai":return!!t.apiKey&&!!t.baseUrl;case"openai":return!!t.apiKey;case"ollama":return!!t.baseUrl;case"vllm":return!!t.baseUrl;case"elevenlabs":return!!t.apiKey;case"xai":return!!t.apiKey;case"deepseek":return!!t.apiKey;case"together-ai":return!!t.apiKey;case"novita-ai":return!!t.apiKey;case"fireworks-ai":return!!t.apiKey;case"cloudflare-workers-ai":return!!t.apiKey;case"mistral-ai":return!!t.apiKey;case"moonshot-ai":return!!t.apiKey;default:return!1}}const l=O({});function p(e){var t;if(!r.value[e]){const m=o[e];r.value[e]={baseUrl:((t=m.defaultOptions)==null?void 0:t.baseUrl)||""}}}Object.keys(o).forEach(p);function b(){Object.keys(o).forEach(e=>{l.value[e]=h(e)})}b(),ie(r,b,{deep:!0});const y=S(()=>Object.keys(o).filter(e=>l.value[e])),v=O({}),K=O({}),f=O({});async function P(e){const t=r.value[e];if(!t)return[];const m=o[e];if(!m)return[];K.value[e]=!0,f.value[e]=null;try{const s=m.capabilities.listModels?await m.capabilities.listModels(t):[];return v.value[e]=s.map(M=>({id:M.id,name:M.name,description:M.description,contextLength:M.contextLength,deprecated:M.deprecated,provider:e})),v.value[e]}catch(s){return console.error(`Error fetching models for ${e}:`,s),f.value[e]=s instanceof Error?s.message:"Unknown error",[]}finally{K.value[e]=!1}}function k(e){return v.value[e]||[]}const E=S(()=>{const e=[];for(const t of y.value)e.push(...v.value[t]||[]);return e});async function _(){for(const e of y.value)o[e].capabilities.listModels&&await P(e)}function L(e){const t=o[e];if(!t)throw new Error(`Provider metadata for ${e} not found`);return{...t,localizedName:i(t.nameKey,t.name),localizedDescription:i(t.descriptionKey,t.description)}}const G=S(()=>Object.values(o).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:l.value[e.id]||!1})));function Z(e){const t=r.value[e];if(!t)throw new Error(`Provider credentials for ${e} not found`);const m=o[e];if(!m)throw new Error(`Provider metadata for ${e} not found`);try{return m.createProvider(t)}catch(s){throw console.error(`Error creating provider instance for ${e}:`,s),s}}const H=S(()=>y.value.map(e=>L(e)));function Q(e){return r.value[e]}return{providers:r,getProviderConfig:Q,availableProviders:y,configuredProviders:l,providerMetadata:o,getProviderMetadata:L,allProvidersMetadata:G,initializeProvider:p,validateProvider:h,availableModels:v,isLoadingModels:K,modelLoadError:f,fetchModelsForProvider:P,getModelsForProvider:k,allAvailableModels:E,loadModelsForConfiguredProviders:_,getProviderInstance:Z,availableProvidersMetadata:H}});export{X as a,me as b,ae as c,g as l,J as r,ue as u};
|
assets/{queue-CQtxggOE.js → queue-B_YcFivQ.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{g as l}from"./index-
|
|
|
1 |
+
import{g as l}from"./index-TGrV2Wj8.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function g(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=g();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u};
|
assets/{queue-BUYrQYsG.js → queue-CQ8jM4y0.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{u as o}from"./queue-
|
|
|
1 |
+
import{u as o}from"./queue-B_YcFivQ.js";import{d as v,g as h,m as g,c as k,o as w,a as I}from"./index-TGrV2Wj8.js";const Q=v({__name:"queue",setup(P){function i(e){return new Promise(a=>setTimeout(a,e))}const n=h(""),d=o({handlers:[async e=>{console.log("ready to play speech audio for",e)}]}),u=o({handlers:[async e=>{console.log("ready to stream speech audio for",e),d.add(e.data)}]}),c=o({handlers:[async e=>{const a=[".","?","!"];let s=!1;for(const t of a){if(!e.data.includes(t))continue;const r=e.data.indexOf(t),p=e.data.slice(0,r+1),y=e.data.slice(r+1);n.value+=p,u.add(n.value.trim()),n.value=y,s=!0}s||(n.value+=e.data)}]}),l=["Hello"," N","eko","! I"," am"," an"," AI"," assistant"," trained"," to"," help"," with"," a"," variety"," of"," tasks"," such"," as"," answering"," questions",","," providing"," information",","," giving"," recommendations",","," and"," more",". How"," can"," I"," assist"," you"," today","?","Hello"," N","eko",","," I"," am"," an"," AI"," assistant","."," I"," can"," help"," answer"," questions",","," provide"," information",","," assist"," with"," tasks",","," and"," engage"," in"," conversation","."," How"," can"," I"," assist"," you"," today","?"];async function f(){for(const e of l)await i(100),c.add(e)}async function m(){f()}return g(()=>{m()}),(e,a)=>(w(),k("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default};
|
assets/{queues-CTLSCsGY.js → queues-BcuD6qtP.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as m,bN as p,bO as v,g as u,w as y,A as k,bH as w,o as b,c as h,n as E}from"./index-
|
|
|
1 |
+
import{d as m,bN as p,bO as v,g as u,w as y,A as k,bH as w,o as b,c as h,n as E}from"./index-TGrV2Wj8.js";import{E as f}from"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{u as l}from"./queue-B_YcFivQ.js";const D=m({__name:"BasicTextarea",props:{modelValue:{default:""},modelModifiers:{}},emits:p(["submit"],["update:modelValue"]),setup(o,{emit:n}){const e=n,t=v(o,"modelValue"),a=u(),s=u("auto");function i(r){r.code==="Enter"&&!r.shiftKey&&(r.preventDefault(),e("submit",t.value))}return y(t,()=>{s.value="auto",requestAnimationFrame(()=>{a.value&&(s.value=`${a.value.scrollHeight}px`)})},{immediate:!0}),(r,d)=>k((b(),h("textarea",{ref_key:"textareaRef",ref:a,"onUpdate:modelValue":d[0]||(d[0]=c=>t.value=c),style:E({height:s.value}),onKeydown:i},null,36)),[[w,t.value]])}}),M="<|llm_inference_end|>";function N(o){function n(e){for(const t of f)if(e.includes(t))return{ok:!0,emotion:t};return{ok:!1,emotion:""}}return l({handlers:[async e=>{if(f.includes(e.data)){e.emit("emotion",e.data),await o.add(e.data);return}{const{ok:t,emotion:a}=n(e.data);t&&(e.emit("emotion",a),await o.add(a))}}]})}function A(){function o(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const t=/<\|DELAY:(\d+)\|>/i.exec(e),a=t==null?void 0:t[1];if(!a)return{ok:!1,delay:0};const s=Number.parseFloat(a);return s<=0||Number.isNaN(s)?{ok:!0,delay:0}:{ok:!0,delay:s}}function n(e){return new Promise(t=>setTimeout(t,e))}return l({handlers:[async e=>{const{ok:t,delay:a}=o(e.data);t&&(e.emit("delay",a),await n(a*1e3))}]})}function T(o){const n=u("");return l({handlers:[async e=>{if(e.data===M){const a=n.value.trim();a&&await o.add(a),n.value="";return}const t=/[.?!]/;for(n.value+=e.data;n.value;){const a=t.exec(n.value);if(!a||typeof a.index>"u")break;const s=n.value.slice(0,a.index+1),i=n.value.slice(a.index+1);await o.add(s),n.value=i}}]})}export{D as _,N as a,A as b,M as l,T as u};
|
assets/{speech-daB7xiBS.js → speech-C6ot8rjM.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{f as B,bL as s,g as f,h as c,w as E}from"./index-
|
|
|
1 |
+
import{f as B,bL as s,g as f,h as c,w as E}from"./index-TGrV2Wj8.js";import{u as F}from"./providers-By8PGLd2.js";const N={Myriam:"lNxY9WuCBCZCISASyJ55",Beatrice:"KAsXoQDshjF6ehsWa1mF",Camilla_KM:"dLhSyo03JRp5WkGpUlz1","Sally Sunshine":"qswttdunP3b44zVZKMRB",Annie:"AfA1PA0ldViH0DA6pbml","Kawaii Aerisita":"vGQNBgLaiM3EdZtxIiuY",Morioki:"8EkOjt4xTPGMclNlh1pk"},b=["Myriam","Beatrice","Camilla_KM","Sally Sunshine","Annie","Kawaii Aerisita"],P=["Morioki"],h={en:b,"en-US":b,ja:P,"ja-JP":P},$=B("speech",()=>{const r=F(),l=s("settings/speech/active-provider",""),y=s("settings/speech/active-model","eleven_multilingual_v2"),i=s("settings/speech/voice-name",""),L=s("settings/speech/voice-id",""),o=s("settings/speech/pitch",0),n=s("settings/speech/rate",1),u=s("settings/speech/ssml-enabled",!1),v=f(!1),g=f(null),p=f({}),m=s("settings/speech/language","en-US"),V=c(()=>r.availableProviders.filter(e=>d(e)).map(e=>r.getProviderMetadata(e))),A=c(()=>["elevenlabs","microsoft","google"].includes(l.value)),k=c(()=>Object.keys(h)),w=c(()=>{const e=m.value;return!e||!h[e]?[]:h[e].map(a=>({id:N[a],name:a,provider:"elevenlabs",language:e}))});function d(e){return["elevenlabs","microsoft","google","amazon"].includes(e)}function j(){i.value="",o.value=0,n.value=1,u.value=!1}async function S(e){var a,M;if(!e||!d(e))return[];v.value=!0,g.value=null;try{const t=await((M=(a=r.getProviderMetadata(e).capabilities).listVoices)==null?void 0:M.call(a,r.getProviderConfig(e)))||[];return p.value[e]=t,t}catch(t){return console.error(`Error fetching voices for ${e}:`,t),g.value=t instanceof Error?t.message:"Unknown error",[]}finally{v.value=!1}}function C(e){return p.value[e]||[]}E(l,async e=>{e&&await S(e)});function K(e){if(!u.value)return e;let a="<speak>";return i.value&&(a+=`<voice name="${i.value}">`),(o.value!==0||n.value!==1)&&(a+=`<prosody pitch="+${o.value}%" rate="${n.value}">`),a+=e,(o.value!==0||n.value!==1)&&(a+="</prosody>"),i.value&&(a+="</voice>"),a+="</speak>",a}return{activeSpeechProvider:l,activeSpeechModel:y,voiceName:i,voiceId:L,pitch:o,rate:n,ssmlEnabled:u,selectedLanguage:m,isLoadingSpeechProviderVoices:v,speechProviderError:g,availableVoices:p,availableSpeechProvidersMetadata:V,supportsSSML:A,availableLanguages:k,availableVoicesForLanguage:w,resetVoiceSettings:j,loadVoicesForProvider:S,getVoicesForProvider:C,generateSSML:K,isSpeechProvider:d}});export{$ as u,N as v};
|
assets/{speech-CUV2NmQo.js → speech-DnbCuq6W.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
import{d as T,i as H,s as E,bE as q,g as U,m as Q,w as J,bw as Y,c as n,o as a,A as h,a as l,e as t,D as b,C as g,bx as C,by as G,b as c,y as K,bo as O,ad as r,bI as P,bH as W,x as X}from"./index-
|
2 |
Hello, my name is <voice name="${d.value||"Default"}">
|
3 |
<prosody pitch="+${u.value||0}%" rate="${p.value||1}">
|
4 |
AI Assistant
|
|
|
1 |
+
import{d as T,i as H,s as E,bE as q,g as U,m as Q,w as J,bw as Y,c as n,o as a,A as h,a as l,e as t,D as b,C as g,bx as C,by as G,b as c,y as K,bo as O,ad as r,bI as P,bH as W,x as X}from"./index-TGrV2Wj8.js";import{_ as k,a as A}from"./FieldRange.vue_vue_type_script_setup_true_lang-BKorzfHV.js";import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{R as Z,a as ee}from"./RadioCardDetailManySelect-CCXGOLoc.js";import{u as te}from"./providers-By8PGLd2.js";import{u as le}from"./speech-C6ot8rjM.js";import{b as L}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const oe={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},se={relative:""},ae={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},ne={text:"neutral-300 dark:neutral-500","text-nowrap":""},ie={"text-nowrap":"","text-3xl":"","font-semibold":""},re={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},de={flex:"~ col gap-4"},ue={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},pe={text:"neutral-400 dark:neutral-500"},ce={"max-w-full":""},me={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},ve={key:1},xe={key:0},be={flex:"~ col gap-4"},ge={key:0,class:"flex items-center justify-center py-4"},fe={key:1,class:"flex items-center gap-3 border border-2 border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},he={class:"flex flex-col"},ke={class:"text-sm text-red-600 dark:text-red-400"},ye={key:2,class:"space-y-6"},Ve={key:0},_e={flex:"~ col gap-4"},we={key:3,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},Se={key:4,class:"mt-2 space-y-6"},Me={key:0},Ee={flex:"~ col gap-4"},Ue=T({__name:"speech",setup(Ce){const{t:i}=H(),N=te(),y=le(),{availableProviders:R,availableProvidersMetadata:$}=E(N),{activeSpeechProvider:s,activeSpeechModel:v,voiceId:d,pitch:u,rate:p,isLoadingSpeechProviderVoices:V,speechProviderError:_,ssmlEnabled:x,availableVoices:m}=E(y),D=q(),I=U(`<speak>
|
2 |
Hello, my name is <voice name="${d.value||"Default"}">
|
3 |
<prosody pitch="+${u.value||0}%" rate="${p.value||1}">
|
4 |
AI Assistant
|
assets/{stage-DXwrfUxX.js → stage-CAI0RG-B.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as p,u as s,c,b as d,r as i,n as m,e,o as l}from"./index-
|
|
|
1 |
+
import{d as p,u as s,c,b as d,r as i,n as m,e,o as l}from"./index-TGrV2Wj8.js";const x=p({__name:"stage",setup(u){const{top:t,right:o,bottom:a,left:n}=s();return(f,_)=>{const r=i("RouterView");return l(),c("main",{text:"gray-700 dark:gray-200","h-full":"","font-cuteen":"",style:m({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default};
|
assets/{together-ai-DzYtObxm.js → together-ai-DiO6-uuf.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-
|
|
|
1 |
+
import"./Stage.vue_vue_type_style_index_0_scoped_cad77b27_lang-BuMei0dy.js";import{d as h,i as y,bE as U,s as V,h as v,m as $,w as k,x,o as K,y as d,b as l,e as t}from"./index-TGrV2Wj8.js";import{u as z}from"./providers-By8PGLd2.js";import{_ as w,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BvjJ3pzk.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-COFdKFOb.js";import{a as N,b as P,c as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-2FcLqcv9.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D1Ujsh_i.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BQfmOE_Z.js";const a="together-ai",D=h({__name:"together-ai",setup(S){const{t:p}=y(),_=U(),c=z(),{providers:o}=V(c),n=v(()=>c.getProviderMetadata(a)),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),i=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;c.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",i.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),k([r,i],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:i.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var m,f;return K(),x(t(R),{"provider-name":(m=n.value)==null?void 0:m.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:d(()=>[l(t(N),null,{default:d(()=>[l(t(P),{title:t(p)("settings.pages.providers.common.section.basic.title"),description:t(p)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:d(()=>{var u;return[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=b=>r.value=b),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"togetherapi-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(w),{title:t(p)("settings.pages.providers.common.section.advanced.title")},{default:d(()=>[l(t(C),{modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=u=>i.value=u),placeholder:"https://api.together.xyz/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{D as default};
|