nekomeowww commited on
Commit
58be689
·
1 Parent(s): ae68c74

release: build ecaee565c6401001e088de614b6a08782158756a

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. assets/{CardCreationDialog-CWUK6H46.js → CardCreationDialog-_HK5fWgk.js} +1 -1
  2. assets/{CardCreationDialog-DuDWESxe.js → CardCreationDialog-gsVk89PB.js} +1 -1
  3. assets/{CardDetailDialog-PEMWkVsQ.js → CardDetailDialog-Cvh7ZUPs.js} +1 -1
  4. assets/{CardDetailDialog-DjM36CZ0.js → CardDetailDialog-VKi8LQVN.js} +1 -1
  5. assets/{CardListItem-B1Ve6EBM.js → CardListItem-B1zvnKyD.js} +1 -1
  6. assets/{CardListItem-eN5RFq0F.js → CardListItem-Bthp8pz1.js} +1 -1
  7. assets/{DeleteCardDialog-D46ZYHoE.js → DeleteCardDialog-CkPWJ8xw.js} +1 -1
  8. assets/{DeleteCardDialog-BtaEqXh5.js → DeleteCardDialog-CmHtyAg7.js} +1 -1
  9. assets/{_...all_-B3lSfdoW.js → _...all_-BqpFnMzQ.js} +1 -1
  10. assets/{_providerId_-BvqVqU88.js → _providerId_-BSeylxVk.js} +1 -1
  11. assets/{airi-card-CTkOffj9.js → airi-card-BusK3Ukg.js} +1 -1
  12. assets/{airi-card-jd5RKZ9L.js → airi-card-CMRWvgk7.js} +1 -1
  13. assets/{alibaba-cloud-model-studio-CJbLLIEq.js → alibaba-cloud-model-studio-BuM3eY9k.js} +1 -1
  14. assets/{azure-ai-foundry-BggcU4Kh.js → azure-ai-foundry-ZOGjf2aU.js} +1 -1
  15. assets/{beat-sync-D0DTRDRF.js → beat-sync-BNa1wmOR.js} +1 -1
  16. assets/{beat-sync-C_1ZGy5j.js → beat-sync-DxHONjVw.js} +1 -1
  17. assets/{cloudflare-workers-ai-C-llJBDC.js → cloudflare-workers-ai-GK_eCKf1.js} +1 -1
  18. assets/{color-scheme-CPFkMPxs.js → color-scheme-CVpFudkv.js} +1 -1
  19. assets/{comet-api-speech-D-DQ2RsR.js → comet-api-speech-Bwy8bQvb.js} +1 -1
  20. assets/{comet-api-transcription-BSTynG_P.js → comet-api-transcription-lFerJ1-v.js} +1 -1
  21. assets/{components-BoQNNhDi.js → components-BaJFFT8H.js} +1 -1
  22. assets/{consciousness-ArDiPgp6.js → consciousness-knrJPCa_.js} +1 -1
  23. assets/{developer-DO7XE69u.js → developer-pVobF-7Q.js} +1 -1
  24. assets/{elevenlabs-bqo4A0-p.js → elevenlabs-BdtpEP_h.js} +1 -1
  25. assets/{gaming-factorio-B7mKyUZ5.js → gaming-factorio-CQUNLQTe.js} +1 -1
  26. assets/{gaming-minecraft-DFjvis0-.js → gaming-minecraft-DQGY8CR-.js} +1 -1
  27. assets/{general-CNxitDVY.js → general-BWog0-5k.js} +1 -1
  28. assets/{hearing-DSNTfBAe.js → hearing-CP3k82oL.js} +1 -1
  29. assets/{hearing-BIevHtny.js → hearing-TtHReWNu.js} +1 -1
  30. assets/{index-CpDsmg27.js → index-Bc-RzF5X.js} +0 -0
  31. assets/{index-Ct6uZcQz.css → index-ZfbyyV3b.css} +0 -0
  32. assets/{index-tts-vllm-nctOHKs2.js → index-tts-vllm-CC6rzOox.js} +1 -1
  33. assets/{lm-studio-BSvHf4Dd.js → lm-studio-CKUfVW0w.js} +1 -1
  34. assets/{memory-CTY6oUkq.js → memory-DYc-ho0c.js} +1 -1
  35. assets/{messaging-discord-i_PwdF3R.js → messaging-discord-BQHwV6j6.js} +1 -1
  36. assets/{microsoft-speech-Dow8Enfi.js → microsoft-speech-5dyWoYUF.js} +1 -1
  37. assets/models-CPPBdq-c.js +1 -0
  38. assets/models-HggxzGo_.js +0 -1
  39. assets/{modules-CNIKa2X6.js → modules-OamrgFS1.js} +1 -1
  40. assets/{ollama-D-qLXlYt.js → ollama-Cm4YMI7F.js} +1 -1
  41. assets/{openai-audio-speech-daRxKyoQ.js → openai-audio-speech-CXOiu7dz.js} +1 -1
  42. assets/{openai-audio-transcription-Cje_YdxX.js → openai-audio-transcription-BgmG61-9.js} +1 -1
  43. assets/{openai-compatible-audio-speech-tfIdLsNC.js → openai-compatible-audio-speech-CgQ-Yph_.js} +1 -1
  44. assets/{openai-compatible-audio-transcription-CME3o1Xy.js → openai-compatible-audio-transcription-BHT9RryS.js} +1 -1
  45. assets/{pages-nCEBY9h2.js → pages-oqAPIc5F.js} +2 -2
  46. assets/{player2-speech-B0i8ANiC.js → player2-speech-DBWEKEdv.js} +1 -1
  47. assets/{polaroid-BOEJ-8Lm.js → polaroid-CqKiATNr.js} +1 -1
  48. assets/{providers-B4bTFnXo.js → providers-BlEXvCwn.js} +1 -1
  49. assets/{providers-transcription-realtime-aliyun-nls-DQYvaLps.js → providers-transcription-realtime-aliyun-nls-C4LmGRje.js} +1 -1
  50. assets/{scene-CwhSr_On.js → scene-OA_P31Ke.js} +1 -1
assets/{CardCreationDialog-CWUK6H46.js → CardCreationDialog-_HK5fWgk.js} RENAMED
@@ -1,3 +1,3 @@
1
- import{o as e,t}from"./chunk-oCmw4s_B.js";import{A as n,C as r,Ct as i,Dt as a,K as o,Mt as s,O as c,R as l,S as u,W as d,b as f,et as ee,k as p,kt as m,m as h,mt as g,st as _,w as v,x as y,yt as b}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as x,I as te,K as ne,M as re,N as ie,u as S}from"./widgets-DJ153_lR.js";import{c as C,i as ae}from"./src-BEKjKq3V.js";import{t as w}from"./_plugin-vue_export-helper-CdbDUOI-.js";import{n as oe}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as se}from"./airi-card-jd5RKZ9L.js";var T=t(((e,t)=>{function n(e){return e.toLowerCase()}t.exports=n})),E=t(((e,t)=>{t.exports=T()})),D=t(((e,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n})),O=t(((e,t)=>{t.exports=D()})),k=t(((e,t)=>{t.exports=String.prototype.trim!==void 0})),A=t(((e,t)=>{t.exports=String.prototype.trim})),j=t(((e,t)=>{var n=A(),r=`
2
  \r
3
  \f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a})),M=t(((e,t)=>{var n=O(),r=/^[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*([\S\s]*?)[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*$/;function i(e){return n(e,r,`$1`)}t.exports=i})),N=t(((e,t)=>{var n=A();function r(e){return n.call(e)}t.exports=r})),P=t(((e,t)=>{var n=k(),r=j(),i=M(),a=N();t.exports=n&&r()?a:i})),F=t(((e,t)=>{var n=E(),r=O(),i=P(),a=/\s+/g,o=/[!"'(),–.:;<>?`{}|~\/\\\[\]_#$*&^@%]+/g,s=/([a-z0-9])([A-Z])/g;function c(e){return e=r(e,o,` `),e=r(e,s,`$1 $2`),e=i(e),e=r(e,a,`-`),n(e)}t.exports=c})),I=e(t(((e,t)=>{t.exports=F()}))(),1),L={class:`w-full flex flex-col gap-5`},R={class:`mt-4`},z={class:`border-b border-neutral-200 dark:border-neutral-700`},B={class:`flex justify-center -mb-px sm:justify-start space-x-1`},V=[`onClick`],H={class:`flex items-center gap-1`},U={key:0,class:`w-full rounded-xl bg-red900`},W={class:`w-full p-4`},G={key:1,class:`tab-content ml-auto mr-auto w-95%`},ce={class:`mb-3`},le={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},ue={key:2,class:`tab-content ml-auto mr-auto w-95%`},de={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},fe={key:3,class:`tab-content ml-auto mr-auto w-95%`},pe={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},me={class:`ml-auto mr-1 flex flex-row gap-2`},K=w(n({__name:`CardCreationDialog`,props:l({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:l([`update:modelValue`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,l=ee(e,`modelValue`),{t:w}=oe(),T=se(),E=b(``),D=[{id:`identity`,label:w(`settings.pages.card.creation.identity`),icon:`i-solar:emoji-funny-square-bold-duotone`},{id:`behavior`,label:w(`settings.pages.card.creation.behavior`),icon:`i-solar:chat-round-line-bold-duotone`},{id:`settings`,label:w(`settings.pages.card.creation.settings`),icon:`i-solar:settings-bold-duotone`}],O=f({get:()=>D.find(e=>e.id===E.value)?E.value:D[0]?.id||``,set:e=>{E.value=e}}),k=b(!1),A=b(``);function j(e){let t=i(e);if(t.name.length>0)if(/^(?:\d+\.)+\d+$/.test(t.version))if(t.description.length>0)if(t.personality.length>0)if(t.scenario.length>0)if(t.systemPrompt.length>0){if(!(t.postHistoryInstructions.length>0))return k.value=!0,A.value=w(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.systemprompt`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.scenario`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.personality`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.description`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.version`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.name`),!1;return k.value=!1,T.addCard(t),l.value=!1,!0}let M=b({name:w(`settings.pages.card.creation.defaults.name`),nickname:void 0,version:`1.0`,description:``,notes:void 0,personality:w(`settings.pages.card.creation.defaults.personality`),scenario:w(`settings.pages.card.creation.defaults.scenario`),systemPrompt:w(`settings.pages.card.creation.defaults.systemprompt`),postHistoryInstructions:w(`settings.pages.card.creation.defaults.posthistoryinstructions`),greetings:[],messageExample:[]});function N(e,t){return f({get:()=>M.value[e]??``,set:n=>{let r=n.trim();M.value[e]=r.length>0?t?t(r):r:``}})}let P=N(`name`,e=>(0,I.default)(e)),F=N(`nickname`),K=N(`description`),q=N(`notes`),J=N(`personality`),Y=N(`scenario`),X=f({get:()=>M.value.greetings??[],set:e=>{M.value.greetings=e||[]}}),Z=N(`version`),Q=N(`systemPrompt`),$=N(`postHistoryInstructions`);return(e,t)=>(d(),u(a(ne),{open:l.value,"onUpdate:open":t[12]||=e=>n(`update:modelValue`,e)},{default:_(()=>[p(a(ie),null,{default:_(()=>[p(a(x),{class:`fixed inset-0 z-100 bg-black/50 backdrop-blur-sm data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn`}),p(a(te),{class:`fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 data-[state=closed]:animate-contentHide data-[state=open]:animate-contentShow dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:_(()=>[y(`div`,L,[p(a(re),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:_(()=>[c(s(a(w)(`settings.pages.card.create_card`)),1)]),_:1}),y(`div`,R,[y(`div`,z,[y(`div`,B,[(d(),v(h,null,o(D,e=>y(`button`,{key:e.id,class:m([`px-4 py-2 text-sm font-medium`,[O.value===e.id?`text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400`:`text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300`]]),onClick:t=>O.value=e.id},[y(`div`,H,[y(`div`,{class:m(e.icon)},null,2),c(` `+s(e.label),1)])],10,V)),64))])])]),k.value?(d(),v(`div`,U,[y(`p`,W,s(A.value),1)])):r(``,!0),O.value===`identity`?(d(),v(`div`,G,[y(`p`,ce,s(a(w)(`settings.pages.card.creation.fields_info.subtitle`)),1),y(`div`,le,[p(a(C),{modelValue:a(P),"onUpdate:modelValue":t[0]||=e=>g(P)?P.value=e:null,label:a(w)(`settings.pages.card.creation.name`),description:a(w)(`settings.pages.card.creation.fields_info.name`),required:!0},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(F),"onUpdate:modelValue":t[1]||=e=>g(F)?F.value=e:null,label:a(w)(`settings.pages.card.creation.nickname`),description:a(w)(`settings.pages.card.creation.fields_info.nickname`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(K),"onUpdate:modelValue":t[2]||=e=>g(K)?K.value=e:null,label:a(w)(`settings.pages.card.creation.description`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.description`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(q),"onUpdate:modelValue":t[3]||=e=>g(q)?q.value=e:null,label:a(w)(`settings.pages.card.creator_notes`),"single-line":!1,description:a(w)(`settings.pages.card.creation.fields_info.notes`)},null,8,[`modelValue`,`label`,`description`])])])):O.value===`behavior`?(d(),v(`div`,ue,[y(`div`,de,[p(a(C),{modelValue:a(J),"onUpdate:modelValue":t[4]||=e=>g(J)?J.value=e:null,label:a(w)(`settings.pages.card.personality`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.personality`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(Y),"onUpdate:modelValue":t[5]||=e=>g(Y)?Y.value=e:null,label:a(w)(`settings.pages.card.scenario`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.scenario`)},null,8,[`modelValue`,`label`,`description`]),p(a(ae),{modelValue:X.value,"onUpdate:modelValue":t[6]||=e=>X.value=e,label:a(w)(`settings.pages.card.creation.greetings`),description:a(w)(`settings.pages.card.creation.fields_info.greetings`)},null,8,[`modelValue`,`label`,`description`])])])):O.value===`settings`?(d(),v(`div`,fe,[y(`div`,pe,[p(a(C),{modelValue:a(Q),"onUpdate:modelValue":t[7]||=e=>g(Q)?Q.value=e:null,label:a(w)(`settings.pages.card.systemprompt`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.systemprompt`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a($),"onUpdate:modelValue":t[8]||=e=>g($)?$.value=e:null,label:a(w)(`settings.pages.card.posthistoryinstructions`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.posthistoryinstructions`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(Z),"onUpdate:modelValue":t[9]||=e=>g(Z)?Z.value=e:null,label:a(w)(`settings.pages.card.creation.version`),required:!0,description:a(w)(`settings.pages.card.creation.fields_info.version`)},null,8,[`modelValue`,`label`,`description`])])])):r(``,!0),y(`div`,me,[p(a(S),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:a(w)(`settings.pages.card.cancel`),disabled:!1,onClick:t[10]||=e=>l.value=!1},null,8,[`label`]),p(a(S),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:a(w)(`settings.pages.card.creation.create`),disabled:!1,onClick:t[11]||=e=>j(M.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),[[`__scopeId`,`data-v-439c497b`]]);export{K as t};
 
1
+ import{o as e,t}from"./chunk-oCmw4s_B.js";import{A as n,C as r,Ct as i,Dt as a,K as o,Mt as s,O as c,R as l,S as u,W as d,b as f,et as ee,k as p,kt as m,m as h,mt as g,st as _,w as v,x as y,yt as b}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as x,I as te,K as ne,M as re,N as ie,u as S}from"./widgets-Bo0BM5C8.js";import{c as C,i as ae}from"./src-BEKjKq3V.js";import{t as w}from"./_plugin-vue_export-helper-CdbDUOI-.js";import{n as oe}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as se}from"./airi-card-CMRWvgk7.js";var T=t(((e,t)=>{function n(e){return e.toLowerCase()}t.exports=n})),E=t(((e,t)=>{t.exports=T()})),D=t(((e,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n})),O=t(((e,t)=>{t.exports=D()})),k=t(((e,t)=>{t.exports=String.prototype.trim!==void 0})),A=t(((e,t)=>{t.exports=String.prototype.trim})),j=t(((e,t)=>{var n=A(),r=`
2
  \r
3
  \f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a})),M=t(((e,t)=>{var n=O(),r=/^[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*([\S\s]*?)[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*$/;function i(e){return n(e,r,`$1`)}t.exports=i})),N=t(((e,t)=>{var n=A();function r(e){return n.call(e)}t.exports=r})),P=t(((e,t)=>{var n=k(),r=j(),i=M(),a=N();t.exports=n&&r()?a:i})),F=t(((e,t)=>{var n=E(),r=O(),i=P(),a=/\s+/g,o=/[!"'(),–.:;<>?`{}|~\/\\\[\]_#$*&^@%]+/g,s=/([a-z0-9])([A-Z])/g;function c(e){return e=r(e,o,` `),e=r(e,s,`$1 $2`),e=i(e),e=r(e,a,`-`),n(e)}t.exports=c})),I=e(t(((e,t)=>{t.exports=F()}))(),1),L={class:`w-full flex flex-col gap-5`},R={class:`mt-4`},z={class:`border-b border-neutral-200 dark:border-neutral-700`},B={class:`flex justify-center -mb-px sm:justify-start space-x-1`},V=[`onClick`],H={class:`flex items-center gap-1`},U={key:0,class:`w-full rounded-xl bg-red900`},W={class:`w-full p-4`},G={key:1,class:`tab-content ml-auto mr-auto w-95%`},ce={class:`mb-3`},le={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},ue={key:2,class:`tab-content ml-auto mr-auto w-95%`},de={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},fe={key:3,class:`tab-content ml-auto mr-auto w-95%`},pe={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},me={class:`ml-auto mr-1 flex flex-row gap-2`},K=w(n({__name:`CardCreationDialog`,props:l({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:l([`update:modelValue`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,l=ee(e,`modelValue`),{t:w}=oe(),T=se(),E=b(``),D=[{id:`identity`,label:w(`settings.pages.card.creation.identity`),icon:`i-solar:emoji-funny-square-bold-duotone`},{id:`behavior`,label:w(`settings.pages.card.creation.behavior`),icon:`i-solar:chat-round-line-bold-duotone`},{id:`settings`,label:w(`settings.pages.card.creation.settings`),icon:`i-solar:settings-bold-duotone`}],O=f({get:()=>D.find(e=>e.id===E.value)?E.value:D[0]?.id||``,set:e=>{E.value=e}}),k=b(!1),A=b(``);function j(e){let t=i(e);if(t.name.length>0)if(/^(?:\d+\.)+\d+$/.test(t.version))if(t.description.length>0)if(t.personality.length>0)if(t.scenario.length>0)if(t.systemPrompt.length>0){if(!(t.postHistoryInstructions.length>0))return k.value=!0,A.value=w(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.systemprompt`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.scenario`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.personality`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.description`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.version`),!1;else return k.value=!0,A.value=w(`settings.pages.card.creation.errors.name`),!1;return k.value=!1,T.addCard(t),l.value=!1,!0}let M=b({name:w(`settings.pages.card.creation.defaults.name`),nickname:void 0,version:`1.0`,description:``,notes:void 0,personality:w(`settings.pages.card.creation.defaults.personality`),scenario:w(`settings.pages.card.creation.defaults.scenario`),systemPrompt:w(`settings.pages.card.creation.defaults.systemprompt`),postHistoryInstructions:w(`settings.pages.card.creation.defaults.posthistoryinstructions`),greetings:[],messageExample:[]});function N(e,t){return f({get:()=>M.value[e]??``,set:n=>{let r=n.trim();M.value[e]=r.length>0?t?t(r):r:``}})}let P=N(`name`,e=>(0,I.default)(e)),F=N(`nickname`),K=N(`description`),q=N(`notes`),J=N(`personality`),Y=N(`scenario`),X=f({get:()=>M.value.greetings??[],set:e=>{M.value.greetings=e||[]}}),Z=N(`version`),Q=N(`systemPrompt`),$=N(`postHistoryInstructions`);return(e,t)=>(d(),u(a(ne),{open:l.value,"onUpdate:open":t[12]||=e=>n(`update:modelValue`,e)},{default:_(()=>[p(a(ie),null,{default:_(()=>[p(a(x),{class:`fixed inset-0 z-100 bg-black/50 backdrop-blur-sm data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn`}),p(a(te),{class:`fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 data-[state=closed]:animate-contentHide data-[state=open]:animate-contentShow dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:_(()=>[y(`div`,L,[p(a(re),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:_(()=>[c(s(a(w)(`settings.pages.card.create_card`)),1)]),_:1}),y(`div`,R,[y(`div`,z,[y(`div`,B,[(d(),v(h,null,o(D,e=>y(`button`,{key:e.id,class:m([`px-4 py-2 text-sm font-medium`,[O.value===e.id?`text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400`:`text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300`]]),onClick:t=>O.value=e.id},[y(`div`,H,[y(`div`,{class:m(e.icon)},null,2),c(` `+s(e.label),1)])],10,V)),64))])])]),k.value?(d(),v(`div`,U,[y(`p`,W,s(A.value),1)])):r(``,!0),O.value===`identity`?(d(),v(`div`,G,[y(`p`,ce,s(a(w)(`settings.pages.card.creation.fields_info.subtitle`)),1),y(`div`,le,[p(a(C),{modelValue:a(P),"onUpdate:modelValue":t[0]||=e=>g(P)?P.value=e:null,label:a(w)(`settings.pages.card.creation.name`),description:a(w)(`settings.pages.card.creation.fields_info.name`),required:!0},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(F),"onUpdate:modelValue":t[1]||=e=>g(F)?F.value=e:null,label:a(w)(`settings.pages.card.creation.nickname`),description:a(w)(`settings.pages.card.creation.fields_info.nickname`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(K),"onUpdate:modelValue":t[2]||=e=>g(K)?K.value=e:null,label:a(w)(`settings.pages.card.creation.description`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.description`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(q),"onUpdate:modelValue":t[3]||=e=>g(q)?q.value=e:null,label:a(w)(`settings.pages.card.creator_notes`),"single-line":!1,description:a(w)(`settings.pages.card.creation.fields_info.notes`)},null,8,[`modelValue`,`label`,`description`])])])):O.value===`behavior`?(d(),v(`div`,ue,[y(`div`,de,[p(a(C),{modelValue:a(J),"onUpdate:modelValue":t[4]||=e=>g(J)?J.value=e:null,label:a(w)(`settings.pages.card.personality`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.personality`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(Y),"onUpdate:modelValue":t[5]||=e=>g(Y)?Y.value=e:null,label:a(w)(`settings.pages.card.scenario`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.scenario`)},null,8,[`modelValue`,`label`,`description`]),p(a(ae),{modelValue:X.value,"onUpdate:modelValue":t[6]||=e=>X.value=e,label:a(w)(`settings.pages.card.creation.greetings`),description:a(w)(`settings.pages.card.creation.fields_info.greetings`)},null,8,[`modelValue`,`label`,`description`])])])):O.value===`settings`?(d(),v(`div`,fe,[y(`div`,pe,[p(a(C),{modelValue:a(Q),"onUpdate:modelValue":t[7]||=e=>g(Q)?Q.value=e:null,label:a(w)(`settings.pages.card.systemprompt`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.systemprompt`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a($),"onUpdate:modelValue":t[8]||=e=>g($)?$.value=e:null,label:a(w)(`settings.pages.card.posthistoryinstructions`),"single-line":!1,required:!0,description:a(w)(`settings.pages.card.creation.fields_info.posthistoryinstructions`)},null,8,[`modelValue`,`label`,`description`]),p(a(C),{modelValue:a(Z),"onUpdate:modelValue":t[9]||=e=>g(Z)?Z.value=e:null,label:a(w)(`settings.pages.card.creation.version`),required:!0,description:a(w)(`settings.pages.card.creation.fields_info.version`)},null,8,[`modelValue`,`label`,`description`])])])):r(``,!0),y(`div`,me,[p(a(S),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:a(w)(`settings.pages.card.cancel`),disabled:!1,onClick:t[10]||=e=>l.value=!1},null,8,[`label`]),p(a(S),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:a(w)(`settings.pages.card.creation.create`),disabled:!1,onClick:t[11]||=e=>j(M.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),[[`__scopeId`,`data-v-439c497b`]]);export{K as t};
assets/{CardCreationDialog-DuDWESxe.js → CardCreationDialog-gsVk89PB.js} RENAMED
@@ -1 +1 @@
1
- import"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import"./airi-card-jd5RKZ9L.js";import{t as e}from"./CardCreationDialog-CWUK6H46.js";export{e as default};
 
1
+ import"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import"./airi-card-CMRWvgk7.js";import{t as e}from"./CardCreationDialog-_HK5fWgk.js";export{e as default};
assets/{CardDetailDialog-PEMWkVsQ.js → CardDetailDialog-Cvh7ZUPs.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,K as r,Mt as i,O as a,W as o,b as s,k as c,kt as l,m as u,st as d,w as f,x as p,yt as m}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as ee,I as te,K as ne,M as re,N as h,u as ie}from"./widgets-DJ153_lR.js";import{I as ae}from"./settings-ckdWvS_B.js";import{t as g}from"./DeleteCardDialog-BtaEqXh5.js";import{kt as oe}from"./components-BoQNNhDi.js";import{n as se}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as ce}from"./airi-card-jd5RKZ9L.js";var le={key:0,class:`w-full flex flex-col gap-5`},ue={flex:`~ col`,"gap-3":``},de={flex:`~ row`,"items-center":``,"justify-between":``},fe={flex:`~ row`,"items-center":``,"gap-2":``},pe={key:0,class:`flex items-center gap-1 rounded-full bg-primary-100 px-2 py-0.5 text-xs text-primary-600 font-medium dark:bg-primary-900/40 dark:text-primary-400`},me={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},he={"font-medium":``},_={flex:`~ row`,"gap-2":``},v={class:`mt-4`},y={class:`border-b border-neutral-200 dark:border-neutral-700`},b={class:`flex justify-center -mb-px sm:justify-start space-x-1`},x=[`onClick`],S={class:`flex items-center gap-1`},C={key:0},w=[`innerHTML`],T={key:1},E=[`innerHTML`],D={key:2},O={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},k={key:0,flex:`~ col`,"gap-2":``},A={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},j=[`innerHTML`],M={key:3},N={grid:`~ cols-1 sm:cols-3`,"gap-4":``},P={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-1":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},F={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},ge={truncate:``,"font-medium":``},I={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-2":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},L={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},_e={truncate:``,"font-medium":``},ve={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-2":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},ye={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},be={truncate:``,"font-medium":``},xe={key:1,bg:`neutral-50/50 dark:neutral-900/50`,"rounded-xl":``,"p-8":``,"text-center":``,border:`~ neutral-200/50 dark:neutral-700/30`,shadow:`sm`},R=e({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:{}},emits:[`update:modelValue`],setup(e,{emit:R}){let z=e,B=R,{t:V}=se(),H=ce(),{removeCard:Se}=H,{activeCardId:U}=ae(H),W=s(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=s(()=>{if(!W.value||!W.value.extensions?.airi?.modules)return{consciousness:``,speech:``,voice:``};let e=W.value.extensions.airi.modules;return{consciousness:e.consciousness?.model||``,speech:e.speech?.model||``,voice:e.speech?.voice_id||``}}),K=s(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=s(()=>z.cardId===U.value),J=m(!1);function Ce(){J.value=!0,setTimeout(()=>{U.value=z.cardId,J.value=!1},300)}function Y(e){return oe.sanitize(e?.replace(/\{\{(.*?)\}\}/g,`<span class="bg-primary-500/20 inline-block">{{ $1 }}</span>`).trim())}let X=m(!1);function we(){W.value&&(Se(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=m(``),Q=s(()=>{let e=[];return W.value?.description&&e.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),W.value?.notes&&e.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&e.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),e.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),e}),$=s({get:()=>Q.value.find(e=>e.id===Z.value)?Z.value:Q.value[0]?.id||``,set:e=>{Z.value=e}});return(s,m)=>(o(),f(u,null,[c(n(ne),{open:e.modelValue,"onUpdate:open":m[0]||=e=>B(`update:modelValue`,e)},{default:d(()=>[c(n(h),null,{default:d(()=>[c(n(ee),{class:`fixed inset-0 z-100 bg-black/50 backdrop-blur-sm data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn`}),c(n(te),{class:`fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 data-[state=closed]:animate-contentHide data-[state=open]:animate-contentShow dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:d(()=>[W.value?(o(),f(`div`,le,[p(`div`,ue,[p(`div`,de,[p(`div`,null,[p(`div`,fe,[c(n(re),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:d(()=>[a(i(W.value.name),1)]),_:1}),q.value?(o(),f(`div`,pe,[m[3]||=p(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),a(` `+i(n(V)(`settings.pages.card.active_badge`)),1)])):t(``,!0)]),p(`div`,me,[a(` v`+i(W.value.version)+` `,1),W.value.creator?(o(),f(u,{key:0},[a(` · `+i(n(V)(`settings.pages.card.created_by`))+` `,1),p(`span`,he,i(W.value.creator),1)],64)):t(``,!0)])]),p(`div`,_,[c(n(ie),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?n(V)(`settings.pages.card.active`):n(V)(`settings.pages.card.activate`),disabled:q.value,class:l({"animate-pulse":J.value}),onClick:Ce},null,8,[`icon`,`label`,`disabled`,`class`])])]),p(`div`,v,[p(`div`,y,[p(`div`,b,[(o(!0),f(u,null,r(Q.value,e=>(o(),f(`button`,{key:e.id,class:l([`px-4 py-2 text-sm font-medium`,[$.value===e.id?`text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400`:`text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300`]]),onClick:t=>$.value=e.id},[p(`div`,S,[p(`div`,{class:l(e.icon)},null,2),a(` `+i(e.label),1)])],10,x))),128))])])]),$.value===`notes`&&W.value.notes?(o(),f(`div`,C,[p(`div`,{bg:`white/60 dark:black/30`,border:`~ neutral-200/50 dark:neutral-700/30`,"max-h-60":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-4":``,"text-neutral-700":``,"sm:max-h-80":``,"dark:text-neutral-300":``,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`,innerHTML:Y(W.value.notes)},null,8,w)])):t(``,!0),$.value===`description`&&W.value.description?(o(),f(`div`,T,[p(`div`,{bg:`white/60 dark:black/30`,"max-h-60":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-4":``,"sm:max-h-80":``,text:`neutral-600 dark:neutral-300`,border:`~ neutral-200/50 dark:neutral-700/30`,innerHTML:Y(W.value.description)},null,8,E)])):t(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(o(),f(`div`,D,[p(`div`,O,[(o(!0),f(u,null,r(K.value,(e,r)=>(o(),f(u,{key:r},[e?(o(),f(`div`,k,[p(`h2`,A,i(n(V)(`settings.pages.card.${r.toLowerCase()}`)),1),p(`div`,{bg:`white/60 dark:black/30`,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`,"max-h-none":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-3":``,"text-neutral-700":``,"dark:text-neutral-300":``,innerHTML:Y(e)},null,8,j)])):t(``,!0)],64))),128))])])):t(``,!0),$.value===`modules`?(o(),f(`div`,M,[p(`div`,N,[p(`div`,P,[p(`span`,F,[m[4]||=p(`div`,{"i-lucide:ghost":``},null,-1),a(` `+i(n(V)(`settings.pages.card.consciousness.model`)),1)]),p(`div`,ge,i(G.value.consciousness??`default`),1)]),p(`div`,I,[p(`span`,L,[m[5]||=p(`div`,{"i-lucide:mic":``},null,-1),a(` `+i(n(V)(`settings.pages.card.speech.model`)),1)]),p(`div`,_e,i(G.value.speech??`default`),1)]),p(`div`,ve,[p(`span`,ye,[m[6]||=p(`div`,{"i-lucide:music":``},null,-1),a(` `+i(n(V)(`settings.pages.card.speech.voice`)),1)]),p(`div`,be,i(G.value.voice??`default`),1)])])])):t(``,!0)])])):(o(),f(`div`,xe,[m[7]||=p(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),a(` `+i(n(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),c(g,{modelValue:X.value,"onUpdate:modelValue":m[1]||=e=>X.value=e,"card-name":W.value?.name,onConfirm:we,onCancel:m[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64))}});export{R as t};
 
1
+ import{A as e,C as t,Dt as n,K as r,Mt as i,O as a,W as o,b as s,k as c,kt as l,m as u,st as d,w as f,x as p,yt as m}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as ee,I as te,K as ne,M as re,N as h,u as ie}from"./widgets-Bo0BM5C8.js";import{I as ae}from"./settings-CVVqd1wK.js";import{t as g}from"./DeleteCardDialog-CmHtyAg7.js";import{kt as oe}from"./components-BaJFFT8H.js";import{n as se}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as ce}from"./airi-card-CMRWvgk7.js";var le={key:0,class:`w-full flex flex-col gap-5`},ue={flex:`~ col`,"gap-3":``},de={flex:`~ row`,"items-center":``,"justify-between":``},fe={flex:`~ row`,"items-center":``,"gap-2":``},pe={key:0,class:`flex items-center gap-1 rounded-full bg-primary-100 px-2 py-0.5 text-xs text-primary-600 font-medium dark:bg-primary-900/40 dark:text-primary-400`},me={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},he={"font-medium":``},_={flex:`~ row`,"gap-2":``},v={class:`mt-4`},y={class:`border-b border-neutral-200 dark:border-neutral-700`},b={class:`flex justify-center -mb-px sm:justify-start space-x-1`},x=[`onClick`],S={class:`flex items-center gap-1`},C={key:0},w=[`innerHTML`],T={key:1},E=[`innerHTML`],D={key:2},O={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},k={key:0,flex:`~ col`,"gap-2":``},A={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},j=[`innerHTML`],M={key:3},N={grid:`~ cols-1 sm:cols-3`,"gap-4":``},P={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-1":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},F={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},ge={truncate:``,"font-medium":``},I={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-2":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},L={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},_e={truncate:``,"font-medium":``},ve={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-2":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},ye={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},be={truncate:``,"font-medium":``},xe={key:1,bg:`neutral-50/50 dark:neutral-900/50`,"rounded-xl":``,"p-8":``,"text-center":``,border:`~ neutral-200/50 dark:neutral-700/30`,shadow:`sm`},R=e({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:{}},emits:[`update:modelValue`],setup(e,{emit:R}){let z=e,B=R,{t:V}=se(),H=ce(),{removeCard:Se}=H,{activeCardId:U}=ae(H),W=s(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=s(()=>{if(!W.value||!W.value.extensions?.airi?.modules)return{consciousness:``,speech:``,voice:``};let e=W.value.extensions.airi.modules;return{consciousness:e.consciousness?.model||``,speech:e.speech?.model||``,voice:e.speech?.voice_id||``}}),K=s(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=s(()=>z.cardId===U.value),J=m(!1);function Ce(){J.value=!0,setTimeout(()=>{U.value=z.cardId,J.value=!1},300)}function Y(e){return oe.sanitize(e?.replace(/\{\{(.*?)\}\}/g,`<span class="bg-primary-500/20 inline-block">{{ $1 }}</span>`).trim())}let X=m(!1);function we(){W.value&&(Se(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=m(``),Q=s(()=>{let e=[];return W.value?.description&&e.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),W.value?.notes&&e.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&e.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),e.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),e}),$=s({get:()=>Q.value.find(e=>e.id===Z.value)?Z.value:Q.value[0]?.id||``,set:e=>{Z.value=e}});return(s,m)=>(o(),f(u,null,[c(n(ne),{open:e.modelValue,"onUpdate:open":m[0]||=e=>B(`update:modelValue`,e)},{default:d(()=>[c(n(h),null,{default:d(()=>[c(n(ee),{class:`fixed inset-0 z-100 bg-black/50 backdrop-blur-sm data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn`}),c(n(te),{class:`fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 data-[state=closed]:animate-contentHide data-[state=open]:animate-contentShow dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:d(()=>[W.value?(o(),f(`div`,le,[p(`div`,ue,[p(`div`,de,[p(`div`,null,[p(`div`,fe,[c(n(re),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:d(()=>[a(i(W.value.name),1)]),_:1}),q.value?(o(),f(`div`,pe,[m[3]||=p(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),a(` `+i(n(V)(`settings.pages.card.active_badge`)),1)])):t(``,!0)]),p(`div`,me,[a(` v`+i(W.value.version)+` `,1),W.value.creator?(o(),f(u,{key:0},[a(` · `+i(n(V)(`settings.pages.card.created_by`))+` `,1),p(`span`,he,i(W.value.creator),1)],64)):t(``,!0)])]),p(`div`,_,[c(n(ie),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?n(V)(`settings.pages.card.active`):n(V)(`settings.pages.card.activate`),disabled:q.value,class:l({"animate-pulse":J.value}),onClick:Ce},null,8,[`icon`,`label`,`disabled`,`class`])])]),p(`div`,v,[p(`div`,y,[p(`div`,b,[(o(!0),f(u,null,r(Q.value,e=>(o(),f(`button`,{key:e.id,class:l([`px-4 py-2 text-sm font-medium`,[$.value===e.id?`text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400`:`text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300`]]),onClick:t=>$.value=e.id},[p(`div`,S,[p(`div`,{class:l(e.icon)},null,2),a(` `+i(e.label),1)])],10,x))),128))])])]),$.value===`notes`&&W.value.notes?(o(),f(`div`,C,[p(`div`,{bg:`white/60 dark:black/30`,border:`~ neutral-200/50 dark:neutral-700/30`,"max-h-60":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-4":``,"text-neutral-700":``,"sm:max-h-80":``,"dark:text-neutral-300":``,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`,innerHTML:Y(W.value.notes)},null,8,w)])):t(``,!0),$.value===`description`&&W.value.description?(o(),f(`div`,T,[p(`div`,{bg:`white/60 dark:black/30`,"max-h-60":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-4":``,"sm:max-h-80":``,text:`neutral-600 dark:neutral-300`,border:`~ neutral-200/50 dark:neutral-700/30`,innerHTML:Y(W.value.description)},null,8,E)])):t(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(o(),f(`div`,D,[p(`div`,O,[(o(!0),f(u,null,r(K.value,(e,r)=>(o(),f(u,{key:r},[e?(o(),f(`div`,k,[p(`h2`,A,i(n(V)(`settings.pages.card.${r.toLowerCase()}`)),1),p(`div`,{bg:`white/60 dark:black/30`,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`,"max-h-none":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-3":``,"text-neutral-700":``,"dark:text-neutral-300":``,innerHTML:Y(e)},null,8,j)])):t(``,!0)],64))),128))])])):t(``,!0),$.value===`modules`?(o(),f(`div`,M,[p(`div`,N,[p(`div`,P,[p(`span`,F,[m[4]||=p(`div`,{"i-lucide:ghost":``},null,-1),a(` `+i(n(V)(`settings.pages.card.consciousness.model`)),1)]),p(`div`,ge,i(G.value.consciousness??`default`),1)]),p(`div`,I,[p(`span`,L,[m[5]||=p(`div`,{"i-lucide:mic":``},null,-1),a(` `+i(n(V)(`settings.pages.card.speech.model`)),1)]),p(`div`,_e,i(G.value.speech??`default`),1)]),p(`div`,ve,[p(`span`,ye,[m[6]||=p(`div`,{"i-lucide:music":``},null,-1),a(` `+i(n(V)(`settings.pages.card.speech.voice`)),1)]),p(`div`,be,i(G.value.voice??`default`),1)])])])):t(``,!0)])])):(o(),f(`div`,xe,[m[7]||=p(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),a(` `+i(n(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),c(g,{modelValue:X.value,"onUpdate:modelValue":m[1]||=e=>X.value=e,"card-name":W.value?.name,onConfirm:we,onCancel:m[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64))}});export{R as t};
assets/{CardDetailDialog-DjM36CZ0.js → CardDetailDialog-VKi8LQVN.js} RENAMED
@@ -1 +1 @@
1
- import"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./DeleteCardDialog-BtaEqXh5.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import"./airi-card-jd5RKZ9L.js";import{t as e}from"./CardDetailDialog-PEMWkVsQ.js";export{e as default};
 
1
+ import"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./DeleteCardDialog-CmHtyAg7.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import"./airi-card-CMRWvgk7.js";import{t as e}from"./CardDetailDialog-Cvh7ZUPs.js";export{e as default};
assets/{CardListItem-B1Ve6EBM.js → CardListItem-B1zvnKyD.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,Mt as r,S as i,W as a,f as o,kt as s,st as c,w as l,x as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{pt as d}from"./components-BoQNNhDi.js";var f={relative:``,flex:`~ col 1`,"justify-between":``,"gap-3":``,"overflow-hidden":``,"rounded-lg":``,bg:`white dark:neutral-900`,"p-5":``,transition:`all ease-in-out duration-400`,after:`content-empty absolute inset-0 z--2 w-full h-full bg-dotted-[neutral-200/80] bg-size-10px mask-image-[linear-gradient(165deg,white_30%,transparent_50%)] transition-all duration-400 ease-in-out`,hover:`after:bg-dotted-[primary-300/50] dark:after:bg-dotted-[primary-200/20] text-primary-600/80 dark:text-primary-300/80`},p={"z-1":``,flex:``,"items-start":``,"justify-between":``,"gap-2":``},m={"flex-1":``,truncate:``,"text-lg":``,"font-normal":``},h={key:0,"shrink-0":``,"rounded-md":``,"p-1":``,bg:`primary-100 dark:primary-900/40`,text:`primary-600 dark:primary-400`},g={key:0,"line-clamp-3":``,"min-h-40px":``,"flex-1":``,"text-sm":``,text:`neutral-500 dark:neutral-400`},_={"z-1":``,flex:``,"items-center":``,"justify-between":``,"text-xs":``,text:`neutral-500 dark:neutral-400`},v={flex:``,"items-center":``,"gap-1.5":``},y={flex:``,"items-center":``,"gap-0.5":``},b={flex:``,"items-center":``,"gap-0.5":``},x={flex:``,"items-center":``,"justify-end":``,"px-2":``,"py-1.5":``},S=[`disabled`],C=e({__name:`CardListItem`,props:{id:{},name:{},description:{},isActive:{type:Boolean},isSelected:{type:Boolean},version:{},consciousnessModel:{},voiceModel:{}},emits:[`select`,`activate`,`delete`],setup(e,{emit:C}){let w=C;return(C,T)=>(a(),i(n(d),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:s([e.isSelected?`border-2 border-primary-400 dark:border-primary-600`:`border-2 border-neutral-100 dark:border-neutral-800/25`]),bg:`neutral-200/50 dark:neutral-800/50`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,transition:`all ease-in-out duration-400`,before:`content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0`,hover:`before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent`,onClick:T[2]||=e=>w(`select`)},{default:c(()=>[u(`div`,f,[u(`div`,p,[u(`h3`,m,r(e.name),1),e.isActive?(a(),l(`div`,h,[...T[3]||=[u(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)]])):t(``,!0)]),e.description?(a(),l(`p`,g,r(e.description),1)):t(``,!0),u(`div`,_,[u(`div`,null,`v`+r(e.version),1),u(`div`,v,[u(`div`,y,[T[4]||=u(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),u(`span`,null,r(e.consciousnessModel),1)]),u(`div`,b,[T[5]||=u(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),u(`span`,null,r(e.voiceModel),1)])])])]),u(`div`,x,[u(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:e.isActive,onClick:T[0]||=o(e=>w(`activate`),[`stop`])},[u(`div`,{class:s([e.isActive?`i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400`:`i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400`])},null,2)],8,S),e.id===`default`?t(``,!0):(a(),l(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:T[1]||=o(e=>w(`delete`),[`stop`])},[...T[6]||=[u(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]]))])]),_:1},8,[`class`]))}});export{C as t};
 
1
+ import{A as e,C as t,Dt as n,Mt as r,S as i,W as a,f as o,kt as s,st as c,w as l,x as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{pt as d}from"./components-BaJFFT8H.js";var f={relative:``,flex:`~ col 1`,"justify-between":``,"gap-3":``,"overflow-hidden":``,"rounded-lg":``,bg:`white dark:neutral-900`,"p-5":``,transition:`all ease-in-out duration-400`,after:`content-empty absolute inset-0 z--2 w-full h-full bg-dotted-[neutral-200/80] bg-size-10px mask-image-[linear-gradient(165deg,white_30%,transparent_50%)] transition-all duration-400 ease-in-out`,hover:`after:bg-dotted-[primary-300/50] dark:after:bg-dotted-[primary-200/20] text-primary-600/80 dark:text-primary-300/80`},p={"z-1":``,flex:``,"items-start":``,"justify-between":``,"gap-2":``},m={"flex-1":``,truncate:``,"text-lg":``,"font-normal":``},h={key:0,"shrink-0":``,"rounded-md":``,"p-1":``,bg:`primary-100 dark:primary-900/40`,text:`primary-600 dark:primary-400`},g={key:0,"line-clamp-3":``,"min-h-40px":``,"flex-1":``,"text-sm":``,text:`neutral-500 dark:neutral-400`},_={"z-1":``,flex:``,"items-center":``,"justify-between":``,"text-xs":``,text:`neutral-500 dark:neutral-400`},v={flex:``,"items-center":``,"gap-1.5":``},y={flex:``,"items-center":``,"gap-0.5":``},b={flex:``,"items-center":``,"gap-0.5":``},x={flex:``,"items-center":``,"justify-end":``,"px-2":``,"py-1.5":``},S=[`disabled`],C=e({__name:`CardListItem`,props:{id:{},name:{},description:{},isActive:{type:Boolean},isSelected:{type:Boolean},version:{},consciousnessModel:{},voiceModel:{}},emits:[`select`,`activate`,`delete`],setup(e,{emit:C}){let w=C;return(C,T)=>(a(),i(n(d),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:s([e.isSelected?`border-2 border-primary-400 dark:border-primary-600`:`border-2 border-neutral-100 dark:border-neutral-800/25`]),bg:`neutral-200/50 dark:neutral-800/50`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,transition:`all ease-in-out duration-400`,before:`content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0`,hover:`before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent`,onClick:T[2]||=e=>w(`select`)},{default:c(()=>[u(`div`,f,[u(`div`,p,[u(`h3`,m,r(e.name),1),e.isActive?(a(),l(`div`,h,[...T[3]||=[u(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)]])):t(``,!0)]),e.description?(a(),l(`p`,g,r(e.description),1)):t(``,!0),u(`div`,_,[u(`div`,null,`v`+r(e.version),1),u(`div`,v,[u(`div`,y,[T[4]||=u(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),u(`span`,null,r(e.consciousnessModel),1)]),u(`div`,b,[T[5]||=u(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),u(`span`,null,r(e.voiceModel),1)])])])]),u(`div`,x,[u(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:e.isActive,onClick:T[0]||=o(e=>w(`activate`),[`stop`])},[u(`div`,{class:s([e.isActive?`i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400`:`i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400`])},null,2)],8,S),e.id===`default`?t(``,!0):(a(),l(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:T[1]||=o(e=>w(`delete`),[`stop`])},[...T[6]||=[u(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]]))])]),_:1},8,[`class`]))}});export{C as t};
assets/{CardListItem-eN5RFq0F.js → CardListItem-Bthp8pz1.js} RENAMED
@@ -1 +1 @@
1
- import"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as e}from"./CardListItem-B1Ve6EBM.js";export{e as default};
 
1
+ import"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as e}from"./CardListItem-B1zvnKyD.js";export{e as default};
assets/{DeleteCardDialog-D46ZYHoE.js → DeleteCardDialog-CkPWJ8xw.js} RENAMED
@@ -1 +1 @@
1
- import"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import{t as e}from"./DeleteCardDialog-BtaEqXh5.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";export{e as default};
 
1
+ import"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import{t as e}from"./DeleteCardDialog-CmHtyAg7.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";export{e as default};
assets/{DeleteCardDialog-BtaEqXh5.js → DeleteCardDialog-CmHtyAg7.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,At as t,B as n,Dt as r,H as i,M as a,Mt as o,O as s,S as c,W as l,f as u,k as d,q as f,st as p,x as m,yt as h,z as g}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as _,I as v,K as y,M as b,P as x,q as S,u as C}from"./widgets-DJ153_lR.js";import{D as w,F as T,L as E,N as D,Z as O}from"./src-BEKjKq3V.js";import{n as k}from"./vue-i18n.runtime-Asl2hnl1.js";var A=e({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;T();let n=S();return(e,i)=>(l(),c(r(w),g(t,{type:e.as===`button`?`button`:void 0,onClick:i[0]||=e=>r(n).onOpenChange(!1)}),{default:p(()=>[f(e.$slots,`default`)]),_:3},16,[`type`]))}}),j=e({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;T();let n=S();return(e,i)=>(l(),c(r(w),g(t,{id:r(n).descriptionId}),{default:p(()=>[f(e.$slots,`default`)]),_:3},16,[`id`]))}}),M=e({__name:`AlertDialogAction`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e;return T(),(e,i)=>(l(),c(r(A),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),[N,P]=O(`AlertDialogContent`),F=e({__name:`AlertDialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let i=e,a=E(t);T();let o=h();return P({onCancelElementChange:e=>{o.value=e}}),(e,t)=>(l(),c(r(v),g({...i,...r(a)},{role:`alertdialog`,onPointerDownOutside:t[0]||=u(()=>{},[`prevent`]),onInteractOutside:t[1]||=u(()=>{},[`prevent`]),onOpenAutoFocus:t[2]||=()=>{n(()=>{o.value?.focus({preventScroll:!0})})}}),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),I=e({__name:`AlertDialogCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=N(),{forwardRef:a,currentElement:o}=T();return i(()=>{n.onCancelElementChange(o.value)}),(e,n)=>(l(),c(r(A),g(t,{ref:r(a)}),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),L=e({__name:`AlertDialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let n=e;return T(),(e,i)=>(l(),c(r(j),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),R=e({__name:`AlertDialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let n=e;return T(),(e,i)=>(l(),c(r(_),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),z=e({__name:`AlertDialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let n=e;return(e,i)=>(l(),c(r(x),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),B=e({__name:`AlertDialogRoot`,props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1}},emits:[`update:open`],setup(e,{emit:n}){let i=D(e,n);return T(),(e,n)=>(l(),c(r(y),g(r(i),{modal:!0}),{default:p(n=>[f(e.$slots,`default`,t(a(n)))]),_:3},16))}}),V=e({__name:`AlertDialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let n=e;return T(),(e,i)=>(l(),c(r(b),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),H={class:`flex flex-row justify-end gap-3`},U=e({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:{}},emits:[`update:modelValue`,`confirm`,`cancel`],setup(e,{emit:t}){let n=t,{t:i}=k();function a(){n(`update:modelValue`,!1),n(`cancel`)}function u(){n(`update:modelValue`,!1),n(`confirm`)}return(t,f)=>(l(),c(r(B),{open:e.modelValue,"onUpdate:open":f[0]||=e=>n(`update:modelValue`,e)},{default:p(()=>[d(r(z),null,{default:p(()=>[d(r(R),{class:`fixed inset-0 z-100 bg-black/50 data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn`}),d(r(F),{class:`fixed left-1/2 top-1/2 z-100 max-w-md w-full border border-neutral-200 rounded-xl bg-white p-6 shadow-xl -translate-x-1/2 -translate-y-1/2 data-[state=closed]:animate-contentHide data-[state=open]:animate-contentShow dark:border-neutral-700 dark:bg-neutral-800`},{default:p(()=>[d(r(V),{class:`mb-4 text-xl font-normal`},{default:p(()=>[s(o(r(i)(`settings.pages.card.delete_card`)),1)]),_:1}),d(r(L),{class:`mb-6`},{default:p(()=>[s(o(r(i)(`settings.pages.card.delete_confirmation`))+` `,1),m(`b`,null,`"`+o(e.cardName||``)+`"`,1)]),_:1}),m(`div`,H,[d(r(I),{"as-child":``},{default:p(()=>[d(r(C),{variant:`secondary`,label:r(i)(`settings.pages.card.cancel`),onClick:a},null,8,[`label`])]),_:1}),d(r(M),{"as-child":``},{default:p(()=>[d(r(C),{variant:`danger`,label:r(i)(`settings.pages.card.delete`),onClick:u},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}});export{U as t};
 
1
+ import{A as e,At as t,B as n,Dt as r,H as i,M as a,Mt as o,O as s,S as c,W as l,f as u,k as d,q as f,st as p,x as m,yt as h,z as g}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as _,I as v,K as y,M as b,P as x,q as S,u as C}from"./widgets-Bo0BM5C8.js";import{D as w,F as T,L as E,N as D,Z as O}from"./src-BEKjKq3V.js";import{n as k}from"./vue-i18n.runtime-Asl2hnl1.js";var A=e({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;T();let n=S();return(e,i)=>(l(),c(r(w),g(t,{type:e.as===`button`?`button`:void 0,onClick:i[0]||=e=>r(n).onOpenChange(!1)}),{default:p(()=>[f(e.$slots,`default`)]),_:3},16,[`type`]))}}),j=e({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;T();let n=S();return(e,i)=>(l(),c(r(w),g(t,{id:r(n).descriptionId}),{default:p(()=>[f(e.$slots,`default`)]),_:3},16,[`id`]))}}),M=e({__name:`AlertDialogAction`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e;return T(),(e,i)=>(l(),c(r(A),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),[N,P]=O(`AlertDialogContent`),F=e({__name:`AlertDialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let i=e,a=E(t);T();let o=h();return P({onCancelElementChange:e=>{o.value=e}}),(e,t)=>(l(),c(r(v),g({...i,...r(a)},{role:`alertdialog`,onPointerDownOutside:t[0]||=u(()=>{},[`prevent`]),onInteractOutside:t[1]||=u(()=>{},[`prevent`]),onOpenAutoFocus:t[2]||=()=>{n(()=>{o.value?.focus({preventScroll:!0})})}}),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),I=e({__name:`AlertDialogCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=N(),{forwardRef:a,currentElement:o}=T();return i(()=>{n.onCancelElementChange(o.value)}),(e,n)=>(l(),c(r(A),g(t,{ref:r(a)}),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),L=e({__name:`AlertDialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let n=e;return T(),(e,i)=>(l(),c(r(j),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),R=e({__name:`AlertDialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let n=e;return T(),(e,i)=>(l(),c(r(_),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),z=e({__name:`AlertDialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let n=e;return(e,i)=>(l(),c(r(x),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),B=e({__name:`AlertDialogRoot`,props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1}},emits:[`update:open`],setup(e,{emit:n}){let i=D(e,n);return T(),(e,n)=>(l(),c(r(y),g(r(i),{modal:!0}),{default:p(n=>[f(e.$slots,`default`,t(a(n)))]),_:3},16))}}),V=e({__name:`AlertDialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let n=e;return T(),(e,i)=>(l(),c(r(b),t(a(n)),{default:p(()=>[f(e.$slots,`default`)]),_:3},16))}}),H={class:`flex flex-row justify-end gap-3`},U=e({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:{}},emits:[`update:modelValue`,`confirm`,`cancel`],setup(e,{emit:t}){let n=t,{t:i}=k();function a(){n(`update:modelValue`,!1),n(`cancel`)}function u(){n(`update:modelValue`,!1),n(`confirm`)}return(t,f)=>(l(),c(r(B),{open:e.modelValue,"onUpdate:open":f[0]||=e=>n(`update:modelValue`,e)},{default:p(()=>[d(r(z),null,{default:p(()=>[d(r(R),{class:`fixed inset-0 z-100 bg-black/50 data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn`}),d(r(F),{class:`fixed left-1/2 top-1/2 z-100 max-w-md w-full border border-neutral-200 rounded-xl bg-white p-6 shadow-xl -translate-x-1/2 -translate-y-1/2 data-[state=closed]:animate-contentHide data-[state=open]:animate-contentShow dark:border-neutral-700 dark:bg-neutral-800`},{default:p(()=>[d(r(V),{class:`mb-4 text-xl font-normal`},{default:p(()=>[s(o(r(i)(`settings.pages.card.delete_card`)),1)]),_:1}),d(r(L),{class:`mb-6`},{default:p(()=>[s(o(r(i)(`settings.pages.card.delete_confirmation`))+` `,1),m(`b`,null,`"`+o(e.cardName||``)+`"`,1)]),_:1}),m(`div`,H,[d(r(I),{"as-child":``},{default:p(()=>[d(r(C),{variant:`secondary`,label:r(i)(`settings.pages.card.cancel`),onClick:a},null,8,[`label`])]),_:1}),d(r(M),{"as-child":``},{default:p(()=>[d(r(C),{variant:`danger`,label:r(i)(`settings.pages.card.delete`),onClick:u},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}});export{U as t};
assets/{_...all_-B3lSfdoW.js → _...all_-BqpFnMzQ.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,O as n,W as r,k as i,st as a,w as o,x as s}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{u as c}from"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import{o as l}from"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";var u={"h-full":``,"w-full":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``,"gap-4":``},d=e({__name:`[...all]`,setup(e){let d=l();return(e,l)=>(r(),o(`div`,u,[l[2]||=s(`div`,{"text-3xl":``},` Where are we? `,-1),s(`div`,null,[i(t(c),{onClick:l[0]||=e=>t(d).go(-1)},{default:a(()=>[...l[1]||=[n(` Go Back `,-1)]]),_:1})])]))}});export{d as default};
 
1
+ import{A as e,Dt as t,O as n,W as r,k as i,st as a,w as o,x as s}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{u as c}from"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import{o as l}from"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";var u={"h-full":``,"w-full":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``,"gap-4":``},d=e({__name:`[...all]`,setup(e){let d=l();return(e,l)=>(r(),o(`div`,u,[l[2]||=s(`div`,{"text-3xl":``},` Where are we? `,-1),s(`div`,null,[i(t(c),{onClick:l[0]||=e=>t(d).go(-1)},{default:a(()=>[...l[1]||=[n(` Go Back `,-1)]]),_:1})])]))}});export{d as default};
assets/{_providerId_-BvqVqU88.js → _providerId_-BSeylxVk.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import{a as m}from"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as h,G as g,J as _,K as v,X as y,Y as b,q as x}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as S}from"./route-block-B7Ro39Uj.js";import{t as C}from"./use-provider-validation-CpjXOGL1.js";var w={class:`whitespace-pre-wrap break-all`},T=e({__name:`[providerId]`,setup(e){let S=m().params.providerId,{providers:T}=p(h()),E=c({get:()=>T.value[S]?.apiKey||``,set:e=>{T.value[S]||(T.value[S]={}),T.value[S].apiKey=e}}),D=c({get:()=>T.value[S]?.baseUrl||``,set:e=>{T.value[S]||(T.value[S]={}),T.value[S].baseUrl=e}}),{t:O,router:k,providerMetadata:A,isValidating:j,isValid:M,validationMessage:N,handleResetSettings:P}=C(S);return(e,c)=>(s(),o(n(g),{"provider-name":n(A)?.localizedName,"provider-icon-color":n(A)?.iconColor,"on-back":()=>n(k).back()},{default:u(()=>[l(n(v),null,{default:u(()=>[l(n(x),{title:n(O)(`settings.pages.providers.common.section.basic.title`),description:n(O)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(P)},{default:u(()=>[l(n(b),{modelValue:E.value,"onUpdate:modelValue":c[0]||=e=>E.value=e,"provider-name":n(A)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(y),{title:n(O)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(_),{modelValue:D.value,"onUpdate:modelValue":c[1]||=e=>D.value=e,placeholder:n(A)?.defaultOptions?.().baseUrl||`Base URL of your provider`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`title`]),!n(M)&&n(j)===0&&n(N)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(O)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(N)?{name:`content`,fn:u(()=>[d(`div`,w,i(n(N)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(M)&&n(j)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(O)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof S==`function`&&S(T);var E=T;export{E as default};
 
1
+ import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import{a as m}from"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as h,G as g,J as _,K as v,X as y,Y as b,q as x}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as S}from"./route-block-B7Ro39Uj.js";import{t as C}from"./use-provider-validation-CwajWImW.js";var w={class:`whitespace-pre-wrap break-all`},T=e({__name:`[providerId]`,setup(e){let S=m().params.providerId,{providers:T}=p(h()),E=c({get:()=>T.value[S]?.apiKey||``,set:e=>{T.value[S]||(T.value[S]={}),T.value[S].apiKey=e}}),D=c({get:()=>T.value[S]?.baseUrl||``,set:e=>{T.value[S]||(T.value[S]={}),T.value[S].baseUrl=e}}),{t:O,router:k,providerMetadata:A,isValidating:j,isValid:M,validationMessage:N,handleResetSettings:P}=C(S);return(e,c)=>(s(),o(n(g),{"provider-name":n(A)?.localizedName,"provider-icon-color":n(A)?.iconColor,"on-back":()=>n(k).back()},{default:u(()=>[l(n(v),null,{default:u(()=>[l(n(x),{title:n(O)(`settings.pages.providers.common.section.basic.title`),description:n(O)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(P)},{default:u(()=>[l(n(b),{modelValue:E.value,"onUpdate:modelValue":c[0]||=e=>E.value=e,"provider-name":n(A)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(y),{title:n(O)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(_),{modelValue:D.value,"onUpdate:modelValue":c[1]||=e=>D.value=e,placeholder:n(A)?.defaultOptions?.().baseUrl||`Base URL of your provider`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`title`]),!n(M)&&n(j)===0&&n(N)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(O)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(N)?{name:`content`,fn:u(()=>[d(`div`,w,i(n(N)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(M)&&n(j)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(O)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof S==`function`&&S(T);var E=T;export{E as default};
assets/{airi-card-CTkOffj9.js → airi-card-BusK3Ukg.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,K as r,Mt as i,O as a,S as o,W as s,Y as c,b as l,ct as u,k as d,kt as f,l as p,m,rt as h,st as g,w as _,x as v,yt as y}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as ee}from"./widgets-DJ153_lR.js";import{t as te}from"./src-BEKjKq3V.js";import{I as ne}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import{t as re}from"./DeleteCardDialog-BtaEqXh5.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./BasicInputFile-CQXt7OnG.js";import{t as b}from"./InputFile-CFl1Dtoi.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import{n as x}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as S}from"./route-block-B7Ro39Uj.js";import{t as C}from"./airi-card-jd5RKZ9L.js";import{t as w}from"./CardCreate-M_WzUuEv.js";import{t as ie}from"./CardCreationDialog-CWUK6H46.js";import{t as T}from"./CardDetailDialog-PEMWkVsQ.js";import{t as E}from"./CardListItem-B1Ve6EBM.js";var D={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ae={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},oe={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},O=[`placeholder`],k={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},A={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},j={key:0,flex:``,"flex-col":``,"items-center":``},M={"font-medium":``,text:`neutral-600 dark:neutral-300`},N={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},P={key:1,flex:``,"flex-col":``,"items-center":``},F={"font-medium":``,text:`primary-600 dark:primary-300`},I={key:1,class:`col-span-full rounded-xl p-8 text-center`,border:`~ neutral-200/50 dark:neutral-700/30`,bg:`neutral-50/50 dark:neutral-900/50`},L={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},R=e({__name:`index`,setup(e){let{t:S}=x(),R=C(),{addCard:z,removeCard:B}=R,{cards:V,activeCardId:H}=ne(R),U=y(``),W=y(!1),G=y(!1),K=y(``),q=y(`nameAsc`),J=y([]);h(J,async e=>{let t=e[0];if(t)try{let e=await t.text();U.value=z(JSON.parse(e)),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=l(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),se=l(()=>{if(!K.value)return Y.value;let e=K.value.toLowerCase();return Y.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),X=l(()=>{let e=[...se.value];return q.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):q.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):q.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),Z=y(!1),Q=y(null);function ce(){Q.value&&(B(Q.value),Q.value=null,Z.value=!1)}function le(e){Q.value=e,Z.value=!0}function ue(e){U.value=e,W.value=!0}function de(){G.value=!0}function fe(e){H.value=e}function pe(e){return V.value.get(e)?.version||`1.0.0`}function $(e,t){let n=V.value.get(e);if(!n||!n.extensions?.airi?.modules)return`default`;let r=n.extensions.airi.modules;return t===`consciousness`?r.consciousness?.model&&r.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&r.speech?.voice_id||`default`}return(e,l)=>{let h=c(`motion`);return s(),_(m,null,[v(`div`,D,[v(`div`,ae,[v(`div`,oe,[l[7]||=v(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[v(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),u(v(`input`,{"onUpdate:modelValue":l[0]||=e=>K.value=e,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:n(S)(`settings.pages.card.search`)},null,8,O),[[p,K.value]])]),v(`div`,k,[v(`div`,A,i(n(S)(`settings.pages.card.sort_by`))+`: `,1),d(n(te),{modelValue:q.value,"onUpdate:modelValue":l[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:n(S)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:n(S)(`settings.pages.card.name_desc`)},{value:`recent`,label:n(S)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),v(`div`,{class:f([`mt-4`,{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":n(V).size>0}])},[d(n(b),{modelValue:J.value,"onUpdate:modelValue":l[2]||=e=>J.value=e,accept:`*.json`},{default:g(({isDragging:e})=>[e?(s(),_(`div`,P,[l[9]||=v(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),v(`p`,F,i(n(S)(`settings.pages.card.drop_here`)),1)])):(s(),_(`div`,j,[l[8]||=v(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),v(`p`,M,i(n(S)(`settings.pages.card.upload`)),1),v(`p`,N,i(n(S)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),d(w,{onClick:de}),n(V).size>0?(s(!0),_(m,{key:0},r(X.value,e=>(s(),o(E,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===n(H),"is-selected":e.id===U.value&&W.value,version:pe(e.id),"consciousness-model":$(e.id,`consciousness`),"voice-model":$(e.id,`voice`),onSelect:t=>ue(e.id),onActivate:t=>fe(e.id),onDelete:t=>le(e.id)},null,8,[`id`,`name`,`description`,`is-active`,`is-selected`,`version`,`consciousness-model`,`voice-model`,`onSelect`,`onActivate`,`onDelete`]))),128)):t(``,!0),n(V).size===0?(s(),_(`div`,I,[l[10]||=v(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),v(`p`,null,i(n(S)(`settings.pages.card.no_cards`)),1)])):t(``,!0),K.value&&X.value.length===0?(s(),o(n(ee),{key:2,type:`warning`},{title:g(()=>[a(i(n(S)(`settings.pages.card.no_results`)),1)]),content:g(()=>[a(i(n(S)(`settings.pages.card.try_different_search`)),1)]),_:1})):t(``,!0)],2)]),d(re,{modelValue:Z.value,"onUpdate:modelValue":l[3]||=e=>Z.value=e,"card-name":Q.value?n(R).getCard(Q.value)?.name:``,onConfirm:ce,onCancel:l[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),d(T,{modelValue:W.value,"onUpdate:modelValue":l[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),d(ie,{modelValue:G.value,"onUpdate:modelValue":l[6]||=e=>G.value=e},null,8,[`modelValue`]),u((s(),_(`div`,L,[...l[11]||=[v(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)]])),[[h]])],64)}}});typeof S==`function`&&S(R);var z=R;export{z as default};
 
1
+ import{A as e,C as t,Dt as n,K as r,Mt as i,O as a,S as o,W as s,Y as c,b as l,ct as u,k as d,kt as f,l as p,m,rt as h,st as g,w as _,x as v,yt as y}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as ee}from"./widgets-Bo0BM5C8.js";import{t as te}from"./src-BEKjKq3V.js";import{I as ne}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import{t as re}from"./DeleteCardDialog-CmHtyAg7.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./BasicInputFile-CQXt7OnG.js";import{t as b}from"./InputFile-CFl1Dtoi.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import{n as x}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as S}from"./route-block-B7Ro39Uj.js";import{t as C}from"./airi-card-CMRWvgk7.js";import{t as w}from"./CardCreate-M_WzUuEv.js";import{t as ie}from"./CardCreationDialog-_HK5fWgk.js";import{t as T}from"./CardDetailDialog-Cvh7ZUPs.js";import{t as E}from"./CardListItem-B1zvnKyD.js";var D={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ae={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},oe={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},O=[`placeholder`],k={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},A={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},j={key:0,flex:``,"flex-col":``,"items-center":``},M={"font-medium":``,text:`neutral-600 dark:neutral-300`},N={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},P={key:1,flex:``,"flex-col":``,"items-center":``},F={"font-medium":``,text:`primary-600 dark:primary-300`},I={key:1,class:`col-span-full rounded-xl p-8 text-center`,border:`~ neutral-200/50 dark:neutral-700/30`,bg:`neutral-50/50 dark:neutral-900/50`},L={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},R=e({__name:`index`,setup(e){let{t:S}=x(),R=C(),{addCard:z,removeCard:B}=R,{cards:V,activeCardId:H}=ne(R),U=y(``),W=y(!1),G=y(!1),K=y(``),q=y(`nameAsc`),J=y([]);h(J,async e=>{let t=e[0];if(t)try{let e=await t.text();U.value=z(JSON.parse(e)),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=l(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),se=l(()=>{if(!K.value)return Y.value;let e=K.value.toLowerCase();return Y.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),X=l(()=>{let e=[...se.value];return q.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):q.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):q.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),Z=y(!1),Q=y(null);function ce(){Q.value&&(B(Q.value),Q.value=null,Z.value=!1)}function le(e){Q.value=e,Z.value=!0}function ue(e){U.value=e,W.value=!0}function de(){G.value=!0}function fe(e){H.value=e}function pe(e){return V.value.get(e)?.version||`1.0.0`}function $(e,t){let n=V.value.get(e);if(!n||!n.extensions?.airi?.modules)return`default`;let r=n.extensions.airi.modules;return t===`consciousness`?r.consciousness?.model&&r.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&r.speech?.voice_id||`default`}return(e,l)=>{let h=c(`motion`);return s(),_(m,null,[v(`div`,D,[v(`div`,ae,[v(`div`,oe,[l[7]||=v(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[v(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),u(v(`input`,{"onUpdate:modelValue":l[0]||=e=>K.value=e,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:n(S)(`settings.pages.card.search`)},null,8,O),[[p,K.value]])]),v(`div`,k,[v(`div`,A,i(n(S)(`settings.pages.card.sort_by`))+`: `,1),d(n(te),{modelValue:q.value,"onUpdate:modelValue":l[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:n(S)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:n(S)(`settings.pages.card.name_desc`)},{value:`recent`,label:n(S)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),v(`div`,{class:f([`mt-4`,{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":n(V).size>0}])},[d(n(b),{modelValue:J.value,"onUpdate:modelValue":l[2]||=e=>J.value=e,accept:`*.json`},{default:g(({isDragging:e})=>[e?(s(),_(`div`,P,[l[9]||=v(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),v(`p`,F,i(n(S)(`settings.pages.card.drop_here`)),1)])):(s(),_(`div`,j,[l[8]||=v(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),v(`p`,M,i(n(S)(`settings.pages.card.upload`)),1),v(`p`,N,i(n(S)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),d(w,{onClick:de}),n(V).size>0?(s(!0),_(m,{key:0},r(X.value,e=>(s(),o(E,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===n(H),"is-selected":e.id===U.value&&W.value,version:pe(e.id),"consciousness-model":$(e.id,`consciousness`),"voice-model":$(e.id,`voice`),onSelect:t=>ue(e.id),onActivate:t=>fe(e.id),onDelete:t=>le(e.id)},null,8,[`id`,`name`,`description`,`is-active`,`is-selected`,`version`,`consciousness-model`,`voice-model`,`onSelect`,`onActivate`,`onDelete`]))),128)):t(``,!0),n(V).size===0?(s(),_(`div`,I,[l[10]||=v(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),v(`p`,null,i(n(S)(`settings.pages.card.no_cards`)),1)])):t(``,!0),K.value&&X.value.length===0?(s(),o(n(ee),{key:2,type:`warning`},{title:g(()=>[a(i(n(S)(`settings.pages.card.no_results`)),1)]),content:g(()=>[a(i(n(S)(`settings.pages.card.try_different_search`)),1)]),_:1})):t(``,!0)],2)]),d(re,{modelValue:Z.value,"onUpdate:modelValue":l[3]||=e=>Z.value=e,"card-name":Q.value?n(R).getCard(Q.value)?.name:``,onConfirm:ce,onCancel:l[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),d(T,{modelValue:W.value,"onUpdate:modelValue":l[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),d(ie,{modelValue:G.value,"onUpdate:modelValue":l[6]||=e=>G.value=e},null,8,[`modelValue`]),u((s(),_(`div`,L,[...l[11]||=[v(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)]])),[[h]])],64)}}});typeof S==`function`&&S(R);var z=R;export{z as default};
assets/{airi-card-jd5RKZ9L.js → airi-card-CMRWvgk7.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{H as e,b as t,rt as n}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as r,I as i,u as a}from"./settings-ckdWvS_B.js";import{f as o}from"./dist-D-gzSpcr.js";import{Mt as s,Q as c,l}from"./components-BoQNNhDi.js";import{n as u}from"./vue-i18n.runtime-Asl2hnl1.js";const d=r(`airi-card`,()=>{let r=o(`airi-cards`,new Map),d=o(`airi-card-active-id`,`default`),f=t(()=>r.value.get(d.value)),p=c(),m=l(),{activeModel:h}=i(p),{activeSpeechVoiceId:g,activeSpeechModel:_}=i(m),v=e=>{let t=a();return r.value.set(t,S(e)),t},y=e=>{r.value.delete(e)},b=e=>r.value.get(e);function x(e){let t=`data`in e?e.data?.extensions?.airi:e.extensions?.airi,n={consciousness:{model:h.value},speech:{model:_.value,voice_id:g.value}};return t?{modules:{consciousness:{model:t.modules?.consciousness?.model??n.consciousness.model},speech:{model:t.modules?.speech?.model??n.speech.model,voice_id:t.modules?.speech?.voice_id??n.speech.voice_id,pitch:t.modules?.speech?.pitch,rate:t.modules?.speech?.rate,ssml:t.modules?.speech?.ssml,language:t.modules?.speech?.language},vrm:t.modules?.vrm,live2d:t.modules?.live2d},agents:t.agents??{}}:{modules:n,agents:{}}}function S(e){if(`data`in e){let t=e;return{name:t.data.name,version:t.data.character_version??`1.0.0`,description:t.data.description??``,creator:t.data.creator??``,notes:t.data.creator_notes??``,notesMultilingual:t.data.creator_notes_multilingual,personality:t.data.personality??``,scenario:t.data.scenario??``,greetings:[t.data.first_mes,...t.data.alternate_greetings??[]],greetingsGroupOnly:t.data.group_only_greetings??[],systemPrompt:t.data.system_prompt??``,postHistoryInstructions:t.data.post_history_instructions??``,messageExample:t.data.mes_example?t.data.mes_example.split(`<START>
2
  `).filter(Boolean).map(e=>e.split(`
3
  `).map(e=>{if(e.startsWith(`{{char}}:`)||e.startsWith(`{{user}}:`))return e;throw Error(`Invalid message example format: ${e}`)})):[],tags:t.data.tags??[],extensions:{airi:x(t),...t.data.extensions}}}return{...e,extensions:{airi:x(e),...e.extensions}}}return e(()=>{let{t:e}=u();r.value.set(`default`,S({name:`ReLU`,version:`1.0.0`,description:s(e(`base.prompt.prefix`),e(`base.prompt.suffix`)).content}))}),n(f,e=>{if(!e)return;let t=x(e);t&&(h.value=t?.modules?.consciousness?.model,_.value=t?.modules?.speech?.model,g.value=t?.modules?.speech?.voice_id)}),{cards:r,activeCard:f,activeCardId:d,addCard:v,removeCard:y,getCard:b,currentModels:t(()=>({consciousness:{model:h.value},speech:{model:_.value,voice_id:g.value}})),systemPrompt:t(()=>{let e=f.value;return e?[e.systemPrompt,e.description,e.personality].filter(Boolean).join(`
4
  `):``})}});export{d as t};
 
1
+ import{H as e,b as t,rt as n}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as r,I as i,u as a}from"./settings-CVVqd1wK.js";import{f as o}from"./dist-D-gzSpcr.js";import{Mt as s,Q as c,l}from"./components-BaJFFT8H.js";import{n as u}from"./vue-i18n.runtime-Asl2hnl1.js";const d=r(`airi-card`,()=>{let r=o(`airi-cards`,new Map),d=o(`airi-card-active-id`,`default`),f=t(()=>r.value.get(d.value)),p=c(),m=l(),{activeModel:h}=i(p),{activeSpeechVoiceId:g,activeSpeechModel:_}=i(m),v=e=>{let t=a();return r.value.set(t,S(e)),t},y=e=>{r.value.delete(e)},b=e=>r.value.get(e);function x(e){let t=`data`in e?e.data?.extensions?.airi:e.extensions?.airi,n={consciousness:{model:h.value},speech:{model:_.value,voice_id:g.value}};return t?{modules:{consciousness:{model:t.modules?.consciousness?.model??n.consciousness.model},speech:{model:t.modules?.speech?.model??n.speech.model,voice_id:t.modules?.speech?.voice_id??n.speech.voice_id,pitch:t.modules?.speech?.pitch,rate:t.modules?.speech?.rate,ssml:t.modules?.speech?.ssml,language:t.modules?.speech?.language},vrm:t.modules?.vrm,live2d:t.modules?.live2d},agents:t.agents??{}}:{modules:n,agents:{}}}function S(e){if(`data`in e){let t=e;return{name:t.data.name,version:t.data.character_version??`1.0.0`,description:t.data.description??``,creator:t.data.creator??``,notes:t.data.creator_notes??``,notesMultilingual:t.data.creator_notes_multilingual,personality:t.data.personality??``,scenario:t.data.scenario??``,greetings:[t.data.first_mes,...t.data.alternate_greetings??[]],greetingsGroupOnly:t.data.group_only_greetings??[],systemPrompt:t.data.system_prompt??``,postHistoryInstructions:t.data.post_history_instructions??``,messageExample:t.data.mes_example?t.data.mes_example.split(`<START>
2
  `).filter(Boolean).map(e=>e.split(`
3
  `).map(e=>{if(e.startsWith(`{{char}}:`)||e.startsWith(`{{user}}:`))return e;throw Error(`Invalid message example format: ${e}`)})):[],tags:t.data.tags??[],extensions:{airi:x(t),...t.data.extensions}}}return{...e,extensions:{airi:x(e),...e.extensions}}}return e(()=>{let{t:e}=u();r.value.set(`default`,S({name:`ReLU`,version:`1.0.0`,description:s(e(`base.prompt.prefix`),e(`base.prompt.suffix`)).content}))}),n(f,e=>{if(!e)return;let t=x(e);t&&(h.value=t?.modules?.consciousness?.model,_.value=t?.modules?.speech?.model,g.value=t?.modules?.speech?.voice_id)}),{cards:r,activeCard:f,activeCardId:d,addCard:v,removeCard:y,getCard:b,currentModels:t(()=>({consciousness:{model:h.value},speech:{model:_.value,voice_id:g.value}})),systemPrompt:t(()=>{let e=f.value;return e?[e.systemPrompt,e.description,e.personality].filter(Boolean).join(`
4
  `):``})}});export{d as t};
assets/{alibaba-cloud-model-studio-CJbLLIEq.js → alibaba-cloud-model-studio-BuM3eY9k.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,H as n,S as r,W as i,b as a,k as o,rt as s,st as c,x as l,yt as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import{o as d}from"./src-BEKjKq3V.js";import{I as f}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as p,c as m,f as h,l as g}from"./components-BoQNNhDi.js";import{n as _}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as v}from"./route-block-B7Ro39Uj.js";var y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`,S=e({__name:`alibaba-cloud-model-studio`,setup(e){let v={speed:1},S=u(0),C=u(1),w=u(0),T=g(),E=p(),{providers:D}=f(E),{t:O}=_(),k=a(()=>!!D.value[b]?.apiKey),A=a(()=>T.availableVoices[b]||[]);async function j(e,t,n){let r=await E.getProviderInstance(b);if(!r)throw Error(`Failed to initialize speech provider`);let i=E.getProviderConfig(b),a=i.model||x;return await T.speech(r,a,e,t,{...i,...v})}return n(async()=>{let e=E.getProviderConfig(b);await E.getProviderMetadata(b).validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)}),s(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),s(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),s(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),s(D,async()=>{let e=E.getProviderConfig(b);await E.getProviderMetadata(b).validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,n)=>(i(),r(t(m),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":c(()=>[l(`div`,y,[o(t(d),{modelValue:S.value,"onUpdate:modelValue":n[0]||=e=>S.value=e,label:t(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:t(O)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),o(t(d),{modelValue:C.value,"onUpdate:modelValue":n[1]||=e=>C.value=e,label:t(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(d),{modelValue:w.value,"onUpdate:modelValue":n[2]||=e=>w.value=e,label:t(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:t(O)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:c(()=>[o(t(h),{"available-voices":A.value,"generate-speech":j,"api-key-configured":k.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof v==`function`&&v(S);var C=S;export{C as default};
 
1
+ import{A as e,Dt as t,H as n,S as r,W as i,b as a,k as o,rt as s,st as c,x as l,yt as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import{o as d}from"./src-BEKjKq3V.js";import{I as f}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as p,c as m,f as h,l as g}from"./components-BaJFFT8H.js";import{n as _}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as v}from"./route-block-B7Ro39Uj.js";var y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`,S=e({__name:`alibaba-cloud-model-studio`,setup(e){let v={speed:1},S=u(0),C=u(1),w=u(0),T=g(),E=p(),{providers:D}=f(E),{t:O}=_(),k=a(()=>!!D.value[b]?.apiKey),A=a(()=>T.availableVoices[b]||[]);async function j(e,t,n){let r=await E.getProviderInstance(b);if(!r)throw Error(`Failed to initialize speech provider`);let i=E.getProviderConfig(b),a=i.model||x;return await T.speech(r,a,e,t,{...i,...v})}return n(async()=>{let e=E.getProviderConfig(b);await E.getProviderMetadata(b).validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)}),s(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),s(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),s(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),s(D,async()=>{let e=E.getProviderConfig(b);await E.getProviderMetadata(b).validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,n)=>(i(),r(t(m),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":c(()=>[l(`div`,y,[o(t(d),{modelValue:S.value,"onUpdate:modelValue":n[0]||=e=>S.value=e,label:t(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:t(O)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),o(t(d),{modelValue:C.value,"onUpdate:modelValue":n[1]||=e=>C.value=e,label:t(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(d),{modelValue:w.value,"onUpdate:modelValue":n[2]||=e=>w.value=e,label:t(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:t(O)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:c(()=>[o(t(h),{"available-voices":A.value,"generate-speech":j,"api-key-configured":k.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof v==`function`&&v(S);var C=S;export{C as default};
assets/{azure-ai-foundry-BggcU4Kh.js → azure-ai-foundry-ZOGjf2aU.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,G as h,K as g,X as _,Y as v,Z as y,q as b}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as x}from"./route-block-B7Ro39Uj.js";import{t as S}from"./use-provider-validation-CpjXOGL1.js";var C={class:`whitespace-pre-wrap break-all`},w=`azure-ai-foundry`,T=e({__name:`azure-ai-foundry`,setup(e){let{providers:x}=p(m()),T=c({get:()=>x.value[w]?.apiKey||``,set:e=>{x.value[w]||(x.value[w]={}),x.value[w].apiKey=e}}),E=c({get:()=>x.value[w]?.resourceName||``,set:e=>{x.value[w]||(x.value[w]={}),x.value[w].resourceName=e}}),D=c({get:()=>x.value[w]?.apiVersion||``,set:e=>{x.value[w]||(x.value[w]={}),x.value[w].apiVersion=e}}),O=c({get:()=>x.value[w]?.modelId||``,set:e=>{x.value[w]||(x.value[w]={}),x.value[w].modelId=e}}),{t:k,router:A,providerMetadata:j,isValidating:M,isValid:N,validationMessage:P,handleResetSettings:F}=S(w);return(e,c)=>(s(),o(n(h),{"provider-name":n(j)?.localizedName,"provider-icon-color":n(j)?.iconColor,"on-back":()=>n(A).back()},{default:u(()=>[l(n(g),null,{default:u(()=>[l(n(b),{title:n(k)(`settings.pages.providers.common.section.basic.title`),description:n(k)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(F)},{default:u(()=>[l(n(v),{modelValue:T.value,"onUpdate:modelValue":c[0]||=e=>T.value=e,"provider-name":n(j)?.localizedName,placeholder:`...`,required:``},null,8,[`modelValue`,`provider-name`]),l(n(y),{modelValue:E.value,"onUpdate:modelValue":c[1]||=e=>E.value=e,label:`Resouce name`,placeholder:`...`,description:`Prefix used in https://<prefix>.services.ai.azure.com`,required:``},null,8,[`modelValue`]),l(n(y),{modelValue:O.value,"onUpdate:modelValue":c[2]||=e=>O.value=e,label:`Model id`,placeholder:`...`,description:`Model ID on Azure AI Foundry`,required:``},null,8,[`modelValue`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(_),{title:n(k)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(y),{modelValue:D.value,"onUpdate:modelValue":c[3]||=e=>D.value=e,label:`API version`,placeholder:`e.g. 2025-04-01-preview`,description:`API version for snapshot of the models`},null,8,[`modelValue`])]),_:1},8,[`title`]),!n(N)&&n(M)===0&&n(P)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(k)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(P)?{name:`content`,fn:u(()=>[d(`div`,C,i(n(P)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(N)&&n(M)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(k)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof x==`function`&&x(T);var E=T;export{E as default};
 
1
+ import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,G as h,K as g,X as _,Y as v,Z as y,q as b}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as x}from"./route-block-B7Ro39Uj.js";import{t as S}from"./use-provider-validation-CwajWImW.js";var C={class:`whitespace-pre-wrap break-all`},w=`azure-ai-foundry`,T=e({__name:`azure-ai-foundry`,setup(e){let{providers:x}=p(m()),T=c({get:()=>x.value[w]?.apiKey||``,set:e=>{x.value[w]||(x.value[w]={}),x.value[w].apiKey=e}}),E=c({get:()=>x.value[w]?.resourceName||``,set:e=>{x.value[w]||(x.value[w]={}),x.value[w].resourceName=e}}),D=c({get:()=>x.value[w]?.apiVersion||``,set:e=>{x.value[w]||(x.value[w]={}),x.value[w].apiVersion=e}}),O=c({get:()=>x.value[w]?.modelId||``,set:e=>{x.value[w]||(x.value[w]={}),x.value[w].modelId=e}}),{t:k,router:A,providerMetadata:j,isValidating:M,isValid:N,validationMessage:P,handleResetSettings:F}=S(w);return(e,c)=>(s(),o(n(h),{"provider-name":n(j)?.localizedName,"provider-icon-color":n(j)?.iconColor,"on-back":()=>n(A).back()},{default:u(()=>[l(n(g),null,{default:u(()=>[l(n(b),{title:n(k)(`settings.pages.providers.common.section.basic.title`),description:n(k)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(F)},{default:u(()=>[l(n(v),{modelValue:T.value,"onUpdate:modelValue":c[0]||=e=>T.value=e,"provider-name":n(j)?.localizedName,placeholder:`...`,required:``},null,8,[`modelValue`,`provider-name`]),l(n(y),{modelValue:E.value,"onUpdate:modelValue":c[1]||=e=>E.value=e,label:`Resouce name`,placeholder:`...`,description:`Prefix used in https://<prefix>.services.ai.azure.com`,required:``},null,8,[`modelValue`]),l(n(y),{modelValue:O.value,"onUpdate:modelValue":c[2]||=e=>O.value=e,label:`Model id`,placeholder:`...`,description:`Model ID on Azure AI Foundry`,required:``},null,8,[`modelValue`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(_),{title:n(k)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(y),{modelValue:D.value,"onUpdate:modelValue":c[3]||=e=>D.value=e,label:`API version`,placeholder:`e.g. 2025-04-01-preview`,description:`API version for snapshot of the models`},null,8,[`modelValue`])]),_:1},8,[`title`]),!n(N)&&n(M)===0&&n(P)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(k)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(P)?{name:`content`,fn:u(()=>[d(`div`,C,i(n(P)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(N)&&n(M)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(k)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof x==`function`&&x(T);var E=T;export{E as default};
assets/{beat-sync-D0DTRDRF.js → beat-sync-BNa1wmOR.js} RENAMED
@@ -1 +1 @@
1
- import{St as e,vt as t,yt as n}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as r}from"./settings-ckdWvS_B.js";var i=`/assets/worklet-D3oCvJ3_.js`,a=`workletAnalyserProcessor`,o={minBeatInterval:.2,sensitivity:.7,lowpassFilterFrequency:200,highpassFilterFrequency:30,envelopeFilterFrequency:12,warmup:!0,bufferDuration:4,adaptiveThreshold:!0,spectralFlux:!0};function s(e){let{mode:t=`default`,onReport:n}=e,r=0,i=0,a=[];return{push:(e,o)=>{for(a.push([e,o]),r+=e,i+=o,t===`eager`&&i<60&&n?.(i===0?0:r/i*60,i,!1);i>=60;){if(a.length===0)throw Error(`Expected the bucket to be non-empty`);if(i-a[0][1]<1)break;let[e,t]=a.shift();r-=e,i-=t}n?.(i===0?0:r/i*60,i,i>60)},clear:()=>{i=0,r=0,a=[]}}}async function c(e){let{context:t,worklet:n,listeners:r,workletParams:i,reportBPM:o}=e,c=!1;if(!t.audioWorklet)throw Error(`AudioWorklet is not supported in this context`);let l;o&&(l=s(o)),await t.audioWorklet.addModule(n);let u=new AudioWorkletNode(t,a,{channelCountMode:`max`,numberOfInputs:1,numberOfOutputs:1,outputChannelCount:[1]});u.port.onmessage=e=>{switch(e.data.type){case`beat`:{let{energy:t,interval:n}=e.data;l?.push(1,n),r?.onBeat?.({energy:t,interval:n});break}}};let d=(e,t=!1)=>{if(c)throw Error(`Analyser is already stopped`);u.port.postMessage({type:`parameters`,parameters:{...e},reset:t})};return i&&d(i),{workletNode:u,updateParameters:d,stop:()=>{c||(c=!0,u.disconnect(),u.port.postMessage({type:`stop`}),u.port.close(),l?.clear())}}}const l=r(`beat-sync`,()=>{let r=e(),a=e(),o=e(),s=n(!1),l,u=[],d=()=>{s.value&&(s.value=!1,l?.(),l=void 0,o.value?.disconnect(),o.value=void 0,a.value?.stop(),a.value=void 0,r.value?.close(),r.value=void 0)},f=async e=>{d(),r.value=new AudioContext,a.value=await c({context:r.value,worklet:i,listeners:{onBeat:(...e)=>{u.forEach(t=>t(...e))}}});let t=await e(r.value);t.connect(a.value.workletNode),o.value=t,s.value=!0};return{start:f,updateParameters:e=>{a.value?.updateParameters(e)},startFromScreenCapture:async()=>f(async e=>{let t=await navigator.mediaDevices.getDisplayMedia({audio:{echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1},video:!0});if(t.getAudioTracks().length===0)throw Error(`No audio track available in the stream`);t.getAudioTracks().forEach(e=>{let t=!1;e.addEventListener(`ended`,()=>{t||(t=!0,d())})});let n=e.createMediaStreamSource(t);return l=()=>{t.getTracks().forEach(e=>e.stop())},n}),stop:d,on:(e,t)=>{switch(e){case`beat`:u.push(t);break;default:throw Error(`Unknown event: ${e}`)}},off:(e,t)=>{switch(e){case`beat`:{let e=u.indexOf(t);e!==-1&&u.splice(e,1);break}default:throw Error(`Unknown event: ${e}`)}},isActive:t(s),context:t(r),analyser:t(a),source:t(o)}});export{o as n,l as t};
 
1
+ import{St as e,vt as t,yt as n}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as r}from"./settings-CVVqd1wK.js";var i=`/assets/worklet-D3oCvJ3_.js`,a=`workletAnalyserProcessor`,o={minBeatInterval:.2,sensitivity:.7,lowpassFilterFrequency:200,highpassFilterFrequency:30,envelopeFilterFrequency:12,warmup:!0,bufferDuration:4,adaptiveThreshold:!0,spectralFlux:!0};function s(e){let{mode:t=`default`,onReport:n}=e,r=0,i=0,a=[];return{push:(e,o)=>{for(a.push([e,o]),r+=e,i+=o,t===`eager`&&i<60&&n?.(i===0?0:r/i*60,i,!1);i>=60;){if(a.length===0)throw Error(`Expected the bucket to be non-empty`);if(i-a[0][1]<1)break;let[e,t]=a.shift();r-=e,i-=t}n?.(i===0?0:r/i*60,i,i>60)},clear:()=>{i=0,r=0,a=[]}}}async function c(e){let{context:t,worklet:n,listeners:r,workletParams:i,reportBPM:o}=e,c=!1;if(!t.audioWorklet)throw Error(`AudioWorklet is not supported in this context`);let l;o&&(l=s(o)),await t.audioWorklet.addModule(n);let u=new AudioWorkletNode(t,a,{channelCountMode:`max`,numberOfInputs:1,numberOfOutputs:1,outputChannelCount:[1]});u.port.onmessage=e=>{switch(e.data.type){case`beat`:{let{energy:t,interval:n}=e.data;l?.push(1,n),r?.onBeat?.({energy:t,interval:n});break}}};let d=(e,t=!1)=>{if(c)throw Error(`Analyser is already stopped`);u.port.postMessage({type:`parameters`,parameters:{...e},reset:t})};return i&&d(i),{workletNode:u,updateParameters:d,stop:()=>{c||(c=!0,u.disconnect(),u.port.postMessage({type:`stop`}),u.port.close(),l?.clear())}}}const l=r(`beat-sync`,()=>{let r=e(),a=e(),o=e(),s=n(!1),l,u=[],d=()=>{s.value&&(s.value=!1,l?.(),l=void 0,o.value?.disconnect(),o.value=void 0,a.value?.stop(),a.value=void 0,r.value?.close(),r.value=void 0)},f=async e=>{d(),r.value=new AudioContext,a.value=await c({context:r.value,worklet:i,listeners:{onBeat:(...e)=>{u.forEach(t=>t(...e))}}});let t=await e(r.value);t.connect(a.value.workletNode),o.value=t,s.value=!0};return{start:f,updateParameters:e=>{a.value?.updateParameters(e)},startFromScreenCapture:async()=>f(async e=>{let t=await navigator.mediaDevices.getDisplayMedia({audio:{echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1},video:!0});if(t.getAudioTracks().length===0)throw Error(`No audio track available in the stream`);t.getAudioTracks().forEach(e=>{let t=!1;e.addEventListener(`ended`,()=>{t||(t=!0,d())})});let n=e.createMediaStreamSource(t);return l=()=>{t.getTracks().forEach(e=>e.stop())},n}),stop:d,on:(e,t)=>{switch(e){case`beat`:u.push(t);break;default:throw Error(`Unknown event: ${e}`)}},off:(e,t)=>{switch(e){case`beat`:{let e=u.indexOf(t);e!==-1&&u.splice(e,1);break}default:throw Error(`Unknown event: ${e}`)}},isActive:t(s),context:t(r),analyser:t(a),source:t(o)}});export{o as n,l as t};
assets/{beat-sync-C_1ZGy5j.js → beat-sync-DxHONjVw.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,H as n,K as r,Mt as i,O as a,S as o,U as s,W as c,it as l,k as u,m as ee,r as d,st as f,w as p,x as m,yt as h}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{u as g}from"./widgets-DJ153_lR.js";import{o as _,u as v}from"./src-BEKjKq3V.js";import{u as y}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{A as b,B as x,C as S,D as C,E as w,F as T,H as E,I as D,L as O,M as k,N as A,O as j,P as M,R as N,S as P,T as te,U as ne,V as F,W as I,b as L,j as R,k as z,w as B,x as V,y as H,z as U}from"./components-BoQNNhDi.js";import{n as W}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as G}from"./route-block-B7Ro39Uj.js";import{n as K,t as q}from"./beat-sync-D0DTRDRF.js";var J=(e,t)=>{if(U(t,`<`)){let n=t[1]===`<`,r=e._tail,i=r?r._offset+r._delay:0;return n?i:i+r.duration}},Y=(e,t)=>{let n=e.iterationDuration;if(n===1e-11&&(n=0),D(t))return n;if(A(+t))return+t;let r=t,i=e?e.labels:null,a=!k(i),o=J(e,r),s=!D(o),c=ne.exec(r);if(c){let e=c[0],t=r.split(e),l=a&&t[0]?i[t[0]]:n;return w(s?o:a?l:n,+t[1],e[0])}else return s?o:a?D(i[r])?n:i[r]:n};function X(e){return z((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function Z(e,t,n,r,i,a){let o=A(e.duration)&&e.duration<=1e-11?n-E:n;te(t,o,1,1,I.AUTO);let s=r?new H(r,e,t,o,!1,i,a):new P(e,t,o);return s.init(!0),j(t,s),b(t,e=>{let n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=X(t),t}var re=class extends P{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};let t=e.defaults,n=x.defaults;this.defaults=t?O(t,n):n,this.onRender=e.onRender||n.onRender;let r=C(e.playbackEase,n.playbackEase);this._ease=r?L(r):null,this.iterationDuration=0}add(e,t,n){let r=M(t),i=M(e);if(r||i){if(this._hasChildren=!0,r){let r=t;if(R(n)){let t=n,i=V(e),a=this.duration,o=this.iterationDuration,s=r.id,c=0,l=i.length;i.forEach(e=>{let n={...r};this.duration=a,this.iterationDuration=o,D(s)||(n.id=s+`-`+c),Z(n,this,Y(this,t(e,c,l,this)),e,c,l),c++})}else Z(r,this,Y(this,n),e)}else Z(e,this,Y(this,t));return this.init(!0)}}sync(e,t){if(D(e)||e&&D(e.pause))return this;e.pause();let n=+(e.effect?e.effect.getTiming().duration:e.duration);return this.add(e,{currentTime:[0,n],duration:n,ease:`linear`},t)}set(e,t,n){return D(t)?this:(t.duration=E,t.composition=F.replace,this.add(e,t,n))}call(e,t){return D(e)||e&&!R(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return D(e)||e&&!T(e)||(this.labels[e]=Y(this,t)),this}remove(e,t){return S(V(e),this,t),this}stretch(e){let t=this.duration;if(t===N(e))return this;let n=e/t,r=this.labels;for(let e in b(this,e=>e.stretch(e.duration*n)),r)r[e]*=n;return super.stretch(e)}refresh(){return b(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),b(this,e=>e.revert,!0),B(this)}then(e){return super.then(e)}},ie=e=>new re(e).init(),ae={flex:`~ col md:row gap-6`},oe={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`h-fit w-full md:w-[40%]`},se={flex:`~ col gap-6`},ce={flex:`~ col gap-4`},le={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},ue={text:`neutral-400 dark:neutral-400`},de={"max-w-full":``,flex:`~ row gap-4 wrap`},fe={flex:`~ col gap-4`},pe={flex:`~ row`,"items-center":``,"justify-between":``},me={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},Q={text:`neutral-400 dark:neutral-400`},he={"max-w-full":``,flex:`~ col gap-4`},ge={class:`text text-neutral-500 md:text-xl dark:text-neutral-500`},_e={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},ve={"w-full":``,"rounded-xl":``,flex:`~ col gap-4`},ye={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},be={class:`inline-flex items-center gap-4`},xe={flex:`~ col gap-4 items-center`},Se=[`data-beat-id`],$=e({__name:`beat-sync`,setup(e){let b=q(),{t:x}=W(),S=h([]),C=h({...K});l(()=>{b.updateParameters(C.value)});function w(e){return((2**e-1)/1)**.5}n(()=>{let e=({energy:e})=>{S.value.unshift({id:y(),energy:e,normalizedEnergy:w(e)})};b.on(`beat`,e),s(()=>{b.off(`beat`,e)})});function T(e,t){let n=e.dataset.beatId;ie().set(e,{opacity:1,scale:0}).add(e,{opacity:0,scale:1,duration:2e3,delay:0,ease:`out(5)`,onComplete:()=>{if(!n)return;let e=S.value.findIndex(e=>e.id===n);e>=0&&S.value.splice(e,1),t()}})}function E(){C.value={...K}}return(e,n)=>(c(),p(`div`,ae,[m(`div`,oe,[m(`div`,se,[m(`div`,ce,[m(`div`,null,[m(`h2`,le,i(t(x)(`settings.pages.modules.beat_sync.sections.audio_source.title`)),1),m(`div`,ue,[m(`span`,null,i(t(x)(`settings.pages.modules.beat_sync.sections.audio_source.description`)),1)])]),m(`div`,de,[t(b).isActive?(c(),o(t(g),{key:0,onClick:t(b).stop},{default:f(()=>[a(i(t(x)(`settings.pages.modules.beat_sync.sections.audio_source.actions.stop`)),1)]),_:1},8,[`onClick`])):(c(),o(t(g),{key:1,onClick:t(b).startFromScreenCapture},{default:f(()=>[a(i(t(x)(`settings.pages.modules.beat_sync.sections.audio_source.actions.start_screen_capture`)),1)]),_:1},8,[`onClick`]))])]),m(`div`,fe,[m(`div`,pe,[m(`div`,null,[m(`h2`,me,i(t(x)(`settings.pages.modules.beat_sync.sections.parameters.title`)),1),m(`div`,Q,[m(`span`,null,i(t(x)(`settings.pages.modules.beat_sync.sections.parameters.description`)),1)])]),m(`button`,{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:E},[...n[9]||=[m(`div`,{"i-solar:refresh-bold-duotone":``,"text-xl":``},null,-1)]])]),m(`div`,he,[u(t(_),{modelValue:C.value.sensitivity,"onUpdate:modelValue":n[0]||=e=>C.value.sensitivity=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.sensitivity.label`),min:0,max:1,step:.01,"format-value":e=>e.toFixed(1)},null,8,[`modelValue`,`label`,`format-value`]),u(t(_),{modelValue:C.value.minBeatInterval,"onUpdate:modelValue":n[1]||=e=>C.value.minBeatInterval=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.min_beat_interval.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.min_beat_interval.description`),min:.05,max:1,step:.01,"format-value":e=>`${(60/e).toFixed(1)} BPM / ${e.toFixed(2)} s`},null,8,[`modelValue`,`label`,`description`,`format-value`]),m(`div`,null,[m(`h3`,ge,i(t(x)(`settings.pages.modules.beat_sync.sections.parameters.advanced_parameters`)),1)]),u(t(_),{modelValue:C.value.lowpassFilterFrequency,"onUpdate:modelValue":n[2]||=e=>C.value.lowpassFilterFrequency=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.lowpass_filter_frequency.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.lowpass_filter_frequency.description`),min:20,max:600,step:10,"format-value":e=>`${e.toFixed(0)} Hz`},null,8,[`modelValue`,`label`,`description`,`format-value`]),u(t(_),{modelValue:C.value.highpassFilterFrequency,"onUpdate:modelValue":n[3]||=e=>C.value.highpassFilterFrequency=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.highpass_filter_frequency.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.highpass_filter_frequency.description`),min:150,max:2e3,step:10,"format-value":e=>`${e.toFixed(0)} Hz`},null,8,[`modelValue`,`label`,`description`,`format-value`]),u(t(_),{modelValue:C.value.envelopeFilterFrequency,"onUpdate:modelValue":n[4]||=e=>C.value.envelopeFilterFrequency=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.envelope_filter_frequency.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.envelope_filter_frequency.description`),min:20,max:200,step:10,"format-value":e=>`${e.toFixed(0)} Hz`},null,8,[`modelValue`,`label`,`description`,`format-value`]),u(t(v),{modelValue:C.value.warmup,"onUpdate:modelValue":n[5]||=e=>C.value.warmup=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.warmup.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.warmup.description`)},null,8,[`modelValue`,`label`,`description`]),u(t(v),{modelValue:C.value.adaptiveThreshold,"onUpdate:modelValue":n[6]||=e=>C.value.adaptiveThreshold=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.adaptive_threshold.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.adaptive_threshold.description`)},null,8,[`modelValue`,`label`,`description`]),u(t(v),{modelValue:C.value.spectralFlux,"onUpdate:modelValue":n[7]||=e=>C.value.spectralFlux=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.spectral_flux.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.spectral_flux.description`)},null,8,[`modelValue`,`label`,`description`]),u(t(_),{modelValue:C.value.bufferDuration,"onUpdate:modelValue":n[8]||=e=>C.value.bufferDuration=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.buffer_duration.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.buffer_duration.description`),min:2,max:10,step:.5,"format-value":e=>`${e.toFixed(1)} s`},null,8,[`modelValue`,`label`,`description`,`format-value`])])])])]),m(`div`,_e,[m(`div`,ve,[m(`h2`,ye,[m(`div`,be,i(t(x)(`settings.pages.modules.beat_sync.sections.beat_visualizer.title`)),1)]),m(`div`,xe,[u(d,{tag:`div`,bg:`neutral/10`,relative:``,"box-border":``,"aspect-square":``,"h-full":``,"max-h-400px":``,"max-w-400px":``,"w-full":``,"rounded-2xl":``,flex:`~ row gap-2 wrap items-center`,css:!1,onEnter:T},{default:f(()=>[(c(!0),p(ee,null,r(S.value,e=>(c(),p(`div`,{key:e.id,"data-beat-id":e.id,absolute:``,"h-full":``,"w-full":``,"rounded-full":``,bg:`primary/50`},null,8,Se))),128))]),_:1})])])])]))}});typeof G==`function`&&G($);var Ce=$;export{Ce as default};
 
1
+ import{A as e,Dt as t,H as n,K as r,Mt as i,O as a,S as o,U as s,W as c,it as l,k as u,m as ee,r as d,st as f,w as p,x as m,yt as h}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{u as g}from"./widgets-Bo0BM5C8.js";import{o as _,u as v}from"./src-BEKjKq3V.js";import{u as y}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{A as b,B as x,C as S,D as C,E as w,F as T,H as E,I as D,L as O,M as k,N as A,O as j,P as M,R as N,S as P,T as te,U as ne,V as F,W as I,b as L,j as R,k as z,w as B,x as V,y as H,z as U}from"./components-BaJFFT8H.js";import{n as W}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as G}from"./route-block-B7Ro39Uj.js";import{n as K,t as q}from"./beat-sync-BNa1wmOR.js";var J=(e,t)=>{if(U(t,`<`)){let n=t[1]===`<`,r=e._tail,i=r?r._offset+r._delay:0;return n?i:i+r.duration}},Y=(e,t)=>{let n=e.iterationDuration;if(n===1e-11&&(n=0),D(t))return n;if(A(+t))return+t;let r=t,i=e?e.labels:null,a=!k(i),o=J(e,r),s=!D(o),c=ne.exec(r);if(c){let e=c[0],t=r.split(e),l=a&&t[0]?i[t[0]]:n;return w(s?o:a?l:n,+t[1],e[0])}else return s?o:a?D(i[r])?n:i[r]:n};function X(e){return z((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function Z(e,t,n,r,i,a){let o=A(e.duration)&&e.duration<=1e-11?n-E:n;te(t,o,1,1,I.AUTO);let s=r?new H(r,e,t,o,!1,i,a):new P(e,t,o);return s.init(!0),j(t,s),b(t,e=>{let n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=X(t),t}var re=class extends P{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};let t=e.defaults,n=x.defaults;this.defaults=t?O(t,n):n,this.onRender=e.onRender||n.onRender;let r=C(e.playbackEase,n.playbackEase);this._ease=r?L(r):null,this.iterationDuration=0}add(e,t,n){let r=M(t),i=M(e);if(r||i){if(this._hasChildren=!0,r){let r=t;if(R(n)){let t=n,i=V(e),a=this.duration,o=this.iterationDuration,s=r.id,c=0,l=i.length;i.forEach(e=>{let n={...r};this.duration=a,this.iterationDuration=o,D(s)||(n.id=s+`-`+c),Z(n,this,Y(this,t(e,c,l,this)),e,c,l),c++})}else Z(r,this,Y(this,n),e)}else Z(e,this,Y(this,t));return this.init(!0)}}sync(e,t){if(D(e)||e&&D(e.pause))return this;e.pause();let n=+(e.effect?e.effect.getTiming().duration:e.duration);return this.add(e,{currentTime:[0,n],duration:n,ease:`linear`},t)}set(e,t,n){return D(t)?this:(t.duration=E,t.composition=F.replace,this.add(e,t,n))}call(e,t){return D(e)||e&&!R(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return D(e)||e&&!T(e)||(this.labels[e]=Y(this,t)),this}remove(e,t){return S(V(e),this,t),this}stretch(e){let t=this.duration;if(t===N(e))return this;let n=e/t,r=this.labels;for(let e in b(this,e=>e.stretch(e.duration*n)),r)r[e]*=n;return super.stretch(e)}refresh(){return b(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),b(this,e=>e.revert,!0),B(this)}then(e){return super.then(e)}},ie=e=>new re(e).init(),ae={flex:`~ col md:row gap-6`},oe={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`h-fit w-full md:w-[40%]`},se={flex:`~ col gap-6`},ce={flex:`~ col gap-4`},le={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},ue={text:`neutral-400 dark:neutral-400`},de={"max-w-full":``,flex:`~ row gap-4 wrap`},fe={flex:`~ col gap-4`},pe={flex:`~ row`,"items-center":``,"justify-between":``},me={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},Q={text:`neutral-400 dark:neutral-400`},he={"max-w-full":``,flex:`~ col gap-4`},ge={class:`text text-neutral-500 md:text-xl dark:text-neutral-500`},_e={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},ve={"w-full":``,"rounded-xl":``,flex:`~ col gap-4`},ye={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},be={class:`inline-flex items-center gap-4`},xe={flex:`~ col gap-4 items-center`},Se=[`data-beat-id`],$=e({__name:`beat-sync`,setup(e){let b=q(),{t:x}=W(),S=h([]),C=h({...K});l(()=>{b.updateParameters(C.value)});function w(e){return((2**e-1)/1)**.5}n(()=>{let e=({energy:e})=>{S.value.unshift({id:y(),energy:e,normalizedEnergy:w(e)})};b.on(`beat`,e),s(()=>{b.off(`beat`,e)})});function T(e,t){let n=e.dataset.beatId;ie().set(e,{opacity:1,scale:0}).add(e,{opacity:0,scale:1,duration:2e3,delay:0,ease:`out(5)`,onComplete:()=>{if(!n)return;let e=S.value.findIndex(e=>e.id===n);e>=0&&S.value.splice(e,1),t()}})}function E(){C.value={...K}}return(e,n)=>(c(),p(`div`,ae,[m(`div`,oe,[m(`div`,se,[m(`div`,ce,[m(`div`,null,[m(`h2`,le,i(t(x)(`settings.pages.modules.beat_sync.sections.audio_source.title`)),1),m(`div`,ue,[m(`span`,null,i(t(x)(`settings.pages.modules.beat_sync.sections.audio_source.description`)),1)])]),m(`div`,de,[t(b).isActive?(c(),o(t(g),{key:0,onClick:t(b).stop},{default:f(()=>[a(i(t(x)(`settings.pages.modules.beat_sync.sections.audio_source.actions.stop`)),1)]),_:1},8,[`onClick`])):(c(),o(t(g),{key:1,onClick:t(b).startFromScreenCapture},{default:f(()=>[a(i(t(x)(`settings.pages.modules.beat_sync.sections.audio_source.actions.start_screen_capture`)),1)]),_:1},8,[`onClick`]))])]),m(`div`,fe,[m(`div`,pe,[m(`div`,null,[m(`h2`,me,i(t(x)(`settings.pages.modules.beat_sync.sections.parameters.title`)),1),m(`div`,Q,[m(`span`,null,i(t(x)(`settings.pages.modules.beat_sync.sections.parameters.description`)),1)])]),m(`button`,{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:E},[...n[9]||=[m(`div`,{"i-solar:refresh-bold-duotone":``,"text-xl":``},null,-1)]])]),m(`div`,he,[u(t(_),{modelValue:C.value.sensitivity,"onUpdate:modelValue":n[0]||=e=>C.value.sensitivity=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.sensitivity.label`),min:0,max:1,step:.01,"format-value":e=>e.toFixed(1)},null,8,[`modelValue`,`label`,`format-value`]),u(t(_),{modelValue:C.value.minBeatInterval,"onUpdate:modelValue":n[1]||=e=>C.value.minBeatInterval=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.min_beat_interval.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.min_beat_interval.description`),min:.05,max:1,step:.01,"format-value":e=>`${(60/e).toFixed(1)} BPM / ${e.toFixed(2)} s`},null,8,[`modelValue`,`label`,`description`,`format-value`]),m(`div`,null,[m(`h3`,ge,i(t(x)(`settings.pages.modules.beat_sync.sections.parameters.advanced_parameters`)),1)]),u(t(_),{modelValue:C.value.lowpassFilterFrequency,"onUpdate:modelValue":n[2]||=e=>C.value.lowpassFilterFrequency=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.lowpass_filter_frequency.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.lowpass_filter_frequency.description`),min:20,max:600,step:10,"format-value":e=>`${e.toFixed(0)} Hz`},null,8,[`modelValue`,`label`,`description`,`format-value`]),u(t(_),{modelValue:C.value.highpassFilterFrequency,"onUpdate:modelValue":n[3]||=e=>C.value.highpassFilterFrequency=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.highpass_filter_frequency.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.highpass_filter_frequency.description`),min:150,max:2e3,step:10,"format-value":e=>`${e.toFixed(0)} Hz`},null,8,[`modelValue`,`label`,`description`,`format-value`]),u(t(_),{modelValue:C.value.envelopeFilterFrequency,"onUpdate:modelValue":n[4]||=e=>C.value.envelopeFilterFrequency=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.envelope_filter_frequency.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.envelope_filter_frequency.description`),min:20,max:200,step:10,"format-value":e=>`${e.toFixed(0)} Hz`},null,8,[`modelValue`,`label`,`description`,`format-value`]),u(t(v),{modelValue:C.value.warmup,"onUpdate:modelValue":n[5]||=e=>C.value.warmup=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.warmup.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.warmup.description`)},null,8,[`modelValue`,`label`,`description`]),u(t(v),{modelValue:C.value.adaptiveThreshold,"onUpdate:modelValue":n[6]||=e=>C.value.adaptiveThreshold=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.adaptive_threshold.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.adaptive_threshold.description`)},null,8,[`modelValue`,`label`,`description`]),u(t(v),{modelValue:C.value.spectralFlux,"onUpdate:modelValue":n[7]||=e=>C.value.spectralFlux=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.spectral_flux.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.spectral_flux.description`)},null,8,[`modelValue`,`label`,`description`]),u(t(_),{modelValue:C.value.bufferDuration,"onUpdate:modelValue":n[8]||=e=>C.value.bufferDuration=e,label:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.buffer_duration.label`),description:t(x)(`settings.pages.modules.beat_sync.sections.parameters.parameters.buffer_duration.description`),min:2,max:10,step:.5,"format-value":e=>`${e.toFixed(1)} s`},null,8,[`modelValue`,`label`,`description`,`format-value`])])])])]),m(`div`,_e,[m(`div`,ve,[m(`h2`,ye,[m(`div`,be,i(t(x)(`settings.pages.modules.beat_sync.sections.beat_visualizer.title`)),1)]),m(`div`,xe,[u(d,{tag:`div`,bg:`neutral/10`,relative:``,"box-border":``,"aspect-square":``,"h-full":``,"max-h-400px":``,"max-w-400px":``,"w-full":``,"rounded-2xl":``,flex:`~ row gap-2 wrap items-center`,css:!1,onEnter:T},{default:f(()=>[(c(!0),p(ee,null,r(S.value,e=>(c(),p(`div`,{key:e.id,"data-beat-id":e.id,absolute:``,"h-full":``,"w-full":``,"rounded-full":``,bg:`primary/50`},null,8,Se))),128))]),_:1})])])])]))}});typeof G==`function`&&G($);var Ce=$;export{Ce as default};
assets/{cloudflare-workers-ai-C-llJBDC.js → cloudflare-workers-ai-GK_eCKf1.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,G as h,K as g,Y as _,Z as v,q as y}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as b}from"./route-block-B7Ro39Uj.js";import{t as x}from"./use-provider-validation-CpjXOGL1.js";var S={class:`whitespace-pre-wrap break-all`},C=`cloudflare-workers-ai`,w=e({__name:`cloudflare-workers-ai`,setup(e){let{providers:b}=p(m()),w=c({get:()=>b.value[C]?.apiKey||``,set:e=>{b.value[C]||(b.value[C]={}),b.value[C].apiKey=e}}),T=c({get:()=>b.value[C]?.accountId||``,set:e=>{b.value[C]||(b.value[C]={}),b.value[C].accountId=e}}),{t:E,router:D,providerMetadata:O,isValidating:k,isValid:A,validationMessage:j,handleResetSettings:M}=x(C);return(e,c)=>(s(),o(n(h),{"provider-name":n(O)?.localizedName,"provider-icon":n(O)?.icon,"provider-icon-color":n(O)?.iconColor,"on-back":()=>n(D).back()},{default:u(()=>[l(n(g),null,{default:u(()=>[l(n(y),{title:n(E)(`settings.pages.providers.common.section.basic.title`),description:n(E)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(M)},{default:u(()=>[l(n(_),{modelValue:w.value,"onUpdate:modelValue":c[0]||=e=>w.value=e,"provider-name":n(O)?.localizedName,placeholder:n(E)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),l(n(v),{modelValue:T.value,"onUpdate:modelValue":c[1]||=e=>T.value=e,label:n(E)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:n(E)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:n(E)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder`)},null,8,[`modelValue`,`label`,`description`,`placeholder`])]),_:1},8,[`title`,`description`,`on-reset`]),!n(A)&&n(k)===0&&n(j)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(E)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(j)?{name:`content`,fn:u(()=>[d(`div`,S,i(n(j)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(A)&&n(k)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(E)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`provider-icon-color`,`on-back`]))}});typeof b==`function`&&b(w);var T=w;export{T as default};
 
1
+ import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,G as h,K as g,Y as _,Z as v,q as y}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as b}from"./route-block-B7Ro39Uj.js";import{t as x}from"./use-provider-validation-CwajWImW.js";var S={class:`whitespace-pre-wrap break-all`},C=`cloudflare-workers-ai`,w=e({__name:`cloudflare-workers-ai`,setup(e){let{providers:b}=p(m()),w=c({get:()=>b.value[C]?.apiKey||``,set:e=>{b.value[C]||(b.value[C]={}),b.value[C].apiKey=e}}),T=c({get:()=>b.value[C]?.accountId||``,set:e=>{b.value[C]||(b.value[C]={}),b.value[C].accountId=e}}),{t:E,router:D,providerMetadata:O,isValidating:k,isValid:A,validationMessage:j,handleResetSettings:M}=x(C);return(e,c)=>(s(),o(n(h),{"provider-name":n(O)?.localizedName,"provider-icon":n(O)?.icon,"provider-icon-color":n(O)?.iconColor,"on-back":()=>n(D).back()},{default:u(()=>[l(n(g),null,{default:u(()=>[l(n(y),{title:n(E)(`settings.pages.providers.common.section.basic.title`),description:n(E)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(M)},{default:u(()=>[l(n(_),{modelValue:w.value,"onUpdate:modelValue":c[0]||=e=>w.value=e,"provider-name":n(O)?.localizedName,placeholder:n(E)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),l(n(v),{modelValue:T.value,"onUpdate:modelValue":c[1]||=e=>T.value=e,label:n(E)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:n(E)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:n(E)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder`)},null,8,[`modelValue`,`label`,`description`,`placeholder`])]),_:1},8,[`title`,`description`,`on-reset`]),!n(A)&&n(k)===0&&n(j)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(E)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(j)?{name:`content`,fn:u(()=>[d(`div`,S,i(n(j)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(A)&&n(k)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(E)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`provider-icon-color`,`on-back`]))}});typeof b==`function`&&b(w);var T=w;export{T as default};
assets/{color-scheme-CPFkMPxs.js → color-scheme-CVpFudkv.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,K as n,Mt as r,O as i,S as a,W as o,Y as s,a as c,ct as l,k as u,m as d,st as f,w as p,x as m}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{p as h,t as g}from"./widgets-DJ153_lR.js";import{r as _}from"./src-BEKjKq3V.js";import{n as v}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import{t as y}from"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import{n as b}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as x}from"./route-block-B7Ro39Uj.js";var S=[[],[`#A5978B`,`#D8CAAF`,`#B8B4A7`,`#C4BCB1`,`#E5DED8`,`#9A8F7D`,`#BEB5A7`,`#C9C0B6`],[`#7A9EAF`,`#B8C7CC`,`#D4B79C`,`#8B9D77`,`#C7D5CB`,`#E6D0B1`,`#94A7B1`,`#B4C8C3`],[`#D9B48F`,`#B5917A`,`#8C7A6B`,`#A17F5F`,`#B98C46`,`#C7A252`,`#DAB300`,`#D19826`],[`#9BA7B0`,`#C1CBD4`,`#A5ADB6`,`#8B959E`,`#D4DCE4`,`#7F8A94`,`#B3BCC6`,`#98A4AE`],[`#E4C6D0`,`#A61B29`,`#5D513C`,`#789262`,`#1C0D1A`,`#F7C242`,`#62A9DD`,`#8C4B3C`]],C={flex:``,"items-center":``,"justify-between":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:300,delay:250,transition:`all ease-in-out duration-250`},w={"text-lg":``,"font-normal":``},T={relative:``,flex:``,"cursor-pointer":``,"items-center":``,"gap-2":``},E={class:`color-bar text-[10px] md:text-base sm:text-xs`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:320,delay:350,transition:`all ease-in-out duration-250`},D={"text-white":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:330,delay:400,transition:`all ease-in-out duration-250`},O={class:`color-bar transparency-grid text-[10px] md:text-base sm:text-xs`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:340,delay:450,transition:`all ease-in-out duration-250`},k=[`duration`,`delay`],A={"font-medium":``},j={text:`sm neutral-500`},M={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``},N=e({__name:`color-scheme`,setup(e){let y=v(),{t:x}=b();return(e,v)=>{let b=s(`motion`);return o(),p(d,null,[l((o(),a(t(h),{"mb-2":``,title:t(x)(`settings.pages.system.sections.section.custom-color.title`),icon:`i-solar:pallete-2-bold-duotone`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:290,delay:200,transition:`all ease-in-out duration-250`},{default:f(()=>[l((o(),p(`div`,C,[m(`span`,w,r(e.$t(`settings.pages.system.sections.section.custom-color.fields.field.primary-color.label`)),1),m(`label`,T,[l(m(`input`,{"onUpdate:modelValue":v[0]||=e=>t(y).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[c,t(y).themeColorsHueDynamic]]),v[2]||=m(`div`,{class:`h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 peer-checked:bg-primary-500 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white`},null,-1),i(` `+r(e.$t(`settings.pages.system.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[b]]),l(u(t(_),{modelValue:t(y).themeColorsHue,"onUpdate:modelValue":v[1]||=e=>t(y).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:300,disabled:t(y).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[b]]),l((o(),p(`div`,E,[v[4]||=m(`span`,{"bg-primary-50":``},`50`,-1),v[5]||=m(`span`,{"bg-primary-100":``},`100`,-1),v[6]||=m(`span`,{"bg-primary-200":``},`200`,-1),v[7]||=m(`span`,{"bg-primary-300":``},`300`,-1),v[8]||=m(`span`,{"bg-primary-400":``},`400`,-1),v[9]||=m(`span`,{"bg-primary-500":``},`500`,-1),l((o(),p(`div`,D,[...v[3]||=[m(`span`,{"bg-primary-600":``},`600`,-1),m(`span`,{"bg-primary-700":``},`700`,-1),m(`span`,{"bg-primary-800":``},`800`,-1),m(`span`,{"bg-primary-900":``},`900`,-1),m(`span`,{"bg-primary-950":``},`950`,-1)]])),[[b]])])),[[b]]),l((o(),p(`div`,O,[...v[10]||=[m(`span`,{bg:`primary-500/5`},`500/5`,-1),m(`span`,{bg:`primary-500/10`},`500/10`,-1),m(`span`,{bg:`primary-500/20`},`500/20`,-1),m(`span`,{bg:`primary-500/30`},`500/30`,-1),m(`span`,{bg:`primary-500/40`},`500/40`,-1),m(`span`,{bg:`primary-500/50`},`500/50`,-1),m(`span`,{bg:`primary-500/60`},`500/60`,-1),m(`span`,{bg:`primary-500/70`},`500/70`,-1),m(`span`,{bg:`primary-500/80`},`500/80`,-1),m(`span`,{bg:`primary-500/90`},`500/90`,-1),m(`span`,{bg:`primary-500`},`500`,-1)]])),[[b]])]),_:1},8,[`title`])),[[b]]),l((o(),a(t(h),{"mb-2":``,title:t(x)(`settings.pages.system.sections.section.theme-presets.title`),icon:`i-solar:magic-stick-2-bold-duotone`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:350,delay:500,transition:`all ease-in-out duration-250`},{default:f(()=>[(o(!0),p(d,null,n(e.$tm(`settings.pages.system.sections.section.theme-presets.presets`),({title:n,description:i,colors:a},s)=>l((o(),p(`div`,{key:s,class:`w-full flex flex-col items-start justify-between gap-2 rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out md:flex-row md:items-center md:gap-0`,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:360+s*10,delay:550+s*50,transition:`all ease-in-out duration-250`},[m(`div`,null,[m(`span`,A,r(e.$rt(n)),1),m(`div`,j,r(e.$rt(i)),1)]),u(t(g),{colors:a.map((n,r)=>({hex:t(S)[s][r],name:e.$rt(n)}))},null,8,[`colors`])],8,k)),[[b]])),128))]),_:1},8,[`title`])),[[b]]),l((o(),p(`div`,M,[...v[11]||=[m(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)]])),[[b]])],64)}}});typeof x==`function`&&x(N);var P=y(N,[[`__scopeId`,`data-v-b1891b95`]]);export{P as default};
 
1
+ import{A as e,Dt as t,K as n,Mt as r,O as i,S as a,W as o,Y as s,a as c,ct as l,k as u,m as d,st as f,w as p,x as m}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{p as h,t as g}from"./widgets-Bo0BM5C8.js";import{r as _}from"./src-BEKjKq3V.js";import{n as v}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import{t as y}from"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import{n as b}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as x}from"./route-block-B7Ro39Uj.js";var S=[[],[`#A5978B`,`#D8CAAF`,`#B8B4A7`,`#C4BCB1`,`#E5DED8`,`#9A8F7D`,`#BEB5A7`,`#C9C0B6`],[`#7A9EAF`,`#B8C7CC`,`#D4B79C`,`#8B9D77`,`#C7D5CB`,`#E6D0B1`,`#94A7B1`,`#B4C8C3`],[`#D9B48F`,`#B5917A`,`#8C7A6B`,`#A17F5F`,`#B98C46`,`#C7A252`,`#DAB300`,`#D19826`],[`#9BA7B0`,`#C1CBD4`,`#A5ADB6`,`#8B959E`,`#D4DCE4`,`#7F8A94`,`#B3BCC6`,`#98A4AE`],[`#E4C6D0`,`#A61B29`,`#5D513C`,`#789262`,`#1C0D1A`,`#F7C242`,`#62A9DD`,`#8C4B3C`]],C={flex:``,"items-center":``,"justify-between":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:300,delay:250,transition:`all ease-in-out duration-250`},w={"text-lg":``,"font-normal":``},T={relative:``,flex:``,"cursor-pointer":``,"items-center":``,"gap-2":``},E={class:`color-bar text-[10px] md:text-base sm:text-xs`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:320,delay:350,transition:`all ease-in-out duration-250`},D={"text-white":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:330,delay:400,transition:`all ease-in-out duration-250`},O={class:`color-bar transparency-grid text-[10px] md:text-base sm:text-xs`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:340,delay:450,transition:`all ease-in-out duration-250`},k=[`duration`,`delay`],A={"font-medium":``},j={text:`sm neutral-500`},M={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``},N=e({__name:`color-scheme`,setup(e){let y=v(),{t:x}=b();return(e,v)=>{let b=s(`motion`);return o(),p(d,null,[l((o(),a(t(h),{"mb-2":``,title:t(x)(`settings.pages.system.sections.section.custom-color.title`),icon:`i-solar:pallete-2-bold-duotone`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:290,delay:200,transition:`all ease-in-out duration-250`},{default:f(()=>[l((o(),p(`div`,C,[m(`span`,w,r(e.$t(`settings.pages.system.sections.section.custom-color.fields.field.primary-color.label`)),1),m(`label`,T,[l(m(`input`,{"onUpdate:modelValue":v[0]||=e=>t(y).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[c,t(y).themeColorsHueDynamic]]),v[2]||=m(`div`,{class:`h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 peer-checked:bg-primary-500 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white`},null,-1),i(` `+r(e.$t(`settings.pages.system.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[b]]),l(u(t(_),{modelValue:t(y).themeColorsHue,"onUpdate:modelValue":v[1]||=e=>t(y).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:300,disabled:t(y).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[b]]),l((o(),p(`div`,E,[v[4]||=m(`span`,{"bg-primary-50":``},`50`,-1),v[5]||=m(`span`,{"bg-primary-100":``},`100`,-1),v[6]||=m(`span`,{"bg-primary-200":``},`200`,-1),v[7]||=m(`span`,{"bg-primary-300":``},`300`,-1),v[8]||=m(`span`,{"bg-primary-400":``},`400`,-1),v[9]||=m(`span`,{"bg-primary-500":``},`500`,-1),l((o(),p(`div`,D,[...v[3]||=[m(`span`,{"bg-primary-600":``},`600`,-1),m(`span`,{"bg-primary-700":``},`700`,-1),m(`span`,{"bg-primary-800":``},`800`,-1),m(`span`,{"bg-primary-900":``},`900`,-1),m(`span`,{"bg-primary-950":``},`950`,-1)]])),[[b]])])),[[b]]),l((o(),p(`div`,O,[...v[10]||=[m(`span`,{bg:`primary-500/5`},`500/5`,-1),m(`span`,{bg:`primary-500/10`},`500/10`,-1),m(`span`,{bg:`primary-500/20`},`500/20`,-1),m(`span`,{bg:`primary-500/30`},`500/30`,-1),m(`span`,{bg:`primary-500/40`},`500/40`,-1),m(`span`,{bg:`primary-500/50`},`500/50`,-1),m(`span`,{bg:`primary-500/60`},`500/60`,-1),m(`span`,{bg:`primary-500/70`},`500/70`,-1),m(`span`,{bg:`primary-500/80`},`500/80`,-1),m(`span`,{bg:`primary-500/90`},`500/90`,-1),m(`span`,{bg:`primary-500`},`500`,-1)]])),[[b]])]),_:1},8,[`title`])),[[b]]),l((o(),a(t(h),{"mb-2":``,title:t(x)(`settings.pages.system.sections.section.theme-presets.title`),icon:`i-solar:magic-stick-2-bold-duotone`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:350,delay:500,transition:`all ease-in-out duration-250`},{default:f(()=>[(o(!0),p(d,null,n(e.$tm(`settings.pages.system.sections.section.theme-presets.presets`),({title:n,description:i,colors:a},s)=>l((o(),p(`div`,{key:s,class:`w-full flex flex-col items-start justify-between gap-2 rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out md:flex-row md:items-center md:gap-0`,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:360+s*10,delay:550+s*50,transition:`all ease-in-out duration-250`},[m(`div`,null,[m(`span`,A,r(e.$rt(n)),1),m(`div`,j,r(e.$rt(i)),1)]),u(t(g),{colors:a.map((n,r)=>({hex:t(S)[s][r],name:e.$rt(n)}))},null,8,[`colors`])],8,k)),[[b]])),128))]),_:1},8,[`title`])),[[b]]),l((o(),p(`div`,M,[...v[11]||=[m(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)]])),[[b]])],64)}}});typeof x==`function`&&x(N);var P=y(N,[[`__scopeId`,`data-v-b1891b95`]]);export{P as default};
assets/{comet-api-speech-D-DQ2RsR.js → comet-api-speech-Bwy8bQvb.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,S as n,W as r,b as i,k as a,rt as o,st as s,yt as c}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import{o as l}from"./src-BEKjKq3V.js";import{I as u}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as d,c as f,f as p,l as m}from"./components-BoQNNhDi.js";import{n as h}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as g}from"./route-block-B7Ro39Uj.js";var _=`comet-api-speech`,v=`gpt-4o-mini-tts`,y=e({__name:`comet-api-speech`,setup(e){let g=m(),y=d(),{providers:b}=u(y),{t:x}=h(),S={speed:1},C=c(1),w=i(()=>!!b.value[_]?.apiKey),T=i(()=>g.availableVoices[_]||[]);async function E(e,t,n){let r=await y.getProviderInstance(_);if(!r)throw Error(`Failed to initialize speech provider`);let i=y.getProviderConfig(_),a=i.model||v;return await g.speech(r,a,e,t,{...i,...S})}return o(C,async()=>{let e=y.getProviderConfig(_);e.speed=C.value}),(e,i)=>(r(),n(t(f),{"provider-id":_,"default-model":v,"additional-settings":S},{"voice-settings":s(()=>[a(t(l),{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:t(x)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(x)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:s(()=>[a(t(p),{"available-voices":T.value,"generate-speech":E,"api-key-configured":w.value,"default-text":`Hello! This is a test of the OpenAI Speech.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof g==`function`&&g(y);var b=y;export{b as default};
 
1
+ import{A as e,Dt as t,S as n,W as r,b as i,k as a,rt as o,st as s,yt as c}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import{o as l}from"./src-BEKjKq3V.js";import{I as u}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as d,c as f,f as p,l as m}from"./components-BaJFFT8H.js";import{n as h}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as g}from"./route-block-B7Ro39Uj.js";var _=`comet-api-speech`,v=`gpt-4o-mini-tts`,y=e({__name:`comet-api-speech`,setup(e){let g=m(),y=d(),{providers:b}=u(y),{t:x}=h(),S={speed:1},C=c(1),w=i(()=>!!b.value[_]?.apiKey),T=i(()=>g.availableVoices[_]||[]);async function E(e,t,n){let r=await y.getProviderInstance(_);if(!r)throw Error(`Failed to initialize speech provider`);let i=y.getProviderConfig(_),a=i.model||v;return await g.speech(r,a,e,t,{...i,...S})}return o(C,async()=>{let e=y.getProviderConfig(_);e.speed=C.value}),(e,i)=>(r(),n(t(f),{"provider-id":_,"default-model":v,"additional-settings":S},{"voice-settings":s(()=>[a(t(l),{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:t(x)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(x)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:s(()=>[a(t(p),{"available-voices":T.value,"generate-speech":E,"api-key-configured":w.value,"default-text":`Hello! This is a test of the OpenAI Speech.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof g==`function`&&g(y);var b=y;export{b as default};
assets/{comet-api-transcription-BSTynG_P.js → comet-api-transcription-lFerJ1-v.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-DJ153_lR.js";import{c as p}from"./src-BEKjKq3V.js";import{I as m}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as h,G as g,J as _,K as v,X as y,Y as b,a as x,q as S}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as C}from"./route-block-B7Ro39Uj.js";import{n as w}from"./hearing-DSNTfBAe.js";import{t as T}from"./use-provider-validation-CpjXOGL1.js";var E={class:`whitespace-pre-wrap break-all`},D=`comet-api-transcription`,O=e({__name:`comet-api-transcription`,setup(e){let C=w(),O=h(),{providers:k}=m(O),A=c({get:()=>k.value[D]?.apiKey||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].apiKey=e}}),j=c({get:()=>k.value[D]?.baseUrl||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].baseUrl=e}}),M=c({get:()=>k.value[D]?.model||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].model=e}}),N=c(()=>!!k.value[D]?.apiKey);async function P(e){let t=await O.getProviderInstance(D);if(!t)throw Error(`Failed to initialize transcription provider`);return await C.transcription(t,M.value,e,`json`)}let{t:F,router:I,providerMetadata:L,isValidating:R,isValid:z,validationMessage:B,handleResetSettings:V}=T(D);return(e,c)=>(s(),o(n(g),{"provider-name":n(L)?.localizedName,"provider-icon-color":n(L)?.iconColor,"on-back":()=>n(I).back()},{default:u(()=>[l(n(v),null,{default:u(()=>[l(n(S),{title:n(F)(`settings.pages.providers.common.section.basic.title`),description:n(F)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(V)},{default:u(()=>[l(n(b),{modelValue:A.value,"onUpdate:modelValue":c[0]||=e=>A.value=e,"provider-name":n(L)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`]),l(n(p),{modelValue:M.value,"onUpdate:modelValue":c[1]||=e=>M.value=e,label:n(F)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`),placeholder:n(F)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,[`modelValue`,`label`,`placeholder`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(y),{title:n(F)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(_),{modelValue:j.value,"onUpdate:modelValue":c[2]||=e=>j.value=e,placeholder:n(L)?.defaultOptions?.().baseUrl||`https://api.cometapi.com/v1/`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`title`]),!n(z)&&n(R)===0&&n(B)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(F)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(B)?{name:`content`,fn:u(()=>[d(`div`,E,i(n(B)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(z)&&n(R)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(F)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1}),l(n(x),{"generate-transcription":P,"api-key-configured":N.value},null,8,[`api-key-configured`])]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof C==`function`&&C(O);var k=O;export{k as default};
 
1
+ import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-Bo0BM5C8.js";import{c as p}from"./src-BEKjKq3V.js";import{I as m}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as h,G as g,J as _,K as v,X as y,Y as b,a as x,q as S}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as C}from"./route-block-B7Ro39Uj.js";import{n as w}from"./hearing-CP3k82oL.js";import{t as T}from"./use-provider-validation-CwajWImW.js";var E={class:`whitespace-pre-wrap break-all`},D=`comet-api-transcription`,O=e({__name:`comet-api-transcription`,setup(e){let C=w(),O=h(),{providers:k}=m(O),A=c({get:()=>k.value[D]?.apiKey||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].apiKey=e}}),j=c({get:()=>k.value[D]?.baseUrl||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].baseUrl=e}}),M=c({get:()=>k.value[D]?.model||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].model=e}}),N=c(()=>!!k.value[D]?.apiKey);async function P(e){let t=await O.getProviderInstance(D);if(!t)throw Error(`Failed to initialize transcription provider`);return await C.transcription(t,M.value,e,`json`)}let{t:F,router:I,providerMetadata:L,isValidating:R,isValid:z,validationMessage:B,handleResetSettings:V}=T(D);return(e,c)=>(s(),o(n(g),{"provider-name":n(L)?.localizedName,"provider-icon-color":n(L)?.iconColor,"on-back":()=>n(I).back()},{default:u(()=>[l(n(v),null,{default:u(()=>[l(n(S),{title:n(F)(`settings.pages.providers.common.section.basic.title`),description:n(F)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(V)},{default:u(()=>[l(n(b),{modelValue:A.value,"onUpdate:modelValue":c[0]||=e=>A.value=e,"provider-name":n(L)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`]),l(n(p),{modelValue:M.value,"onUpdate:modelValue":c[1]||=e=>M.value=e,label:n(F)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`),placeholder:n(F)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,[`modelValue`,`label`,`placeholder`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(y),{title:n(F)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(_),{modelValue:j.value,"onUpdate:modelValue":c[2]||=e=>j.value=e,placeholder:n(L)?.defaultOptions?.().baseUrl||`https://api.cometapi.com/v1/`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`title`]),!n(z)&&n(R)===0&&n(B)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(F)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(B)?{name:`content`,fn:u(()=>[d(`div`,E,i(n(B)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(z)&&n(R)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(F)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1}),l(n(x),{"generate-transcription":P,"api-key-configured":N.value},null,8,[`api-key-configured`])]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof C==`function`&&C(O);var k=O;export{k as default};
assets/{components-BoQNNhDi.js → components-BaJFFT8H.js} RENAMED
@@ -1,5 +1,5 @@
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-cj42VddV.js","assets/angular-html-BkhTissY.js","assets/html-Bw5wOFsA.js","assets/css-DInTgiZM.js","assets/javascript-C4PvEnyW.js","assets/angular-ts-CJOwTI6r.js","assets/scss-BARf998G.js","assets/apl-C1zUtu0S.js","assets/java-Dp7WMuBn.js","assets/json-hs7jIn-2.js","assets/xml-DbeMrzj9.js","assets/astro-D5uWHQ85.js","assets/postcss-DCtD9rnT.js","assets/tsx-BNJUgOo8.js","assets/typescript-wk9j-Jpa.js","assets/blade-BZ8c328q.js","assets/html-derivative-JfadVUQb.js","assets/sql-B4nHmD6q.js","assets/bsl-YgDQJdIX.js","assets/sdbl-BVmFsB2X.js","assets/c-YgjpuK_v.js","assets/c-ISnc8W16.js","assets/cairo-hw37ILIv.js","assets/python-UZ0YOhoX.js","assets/cmake-DutOoB7B.js","assets/cmake-BS6nTqvk.js","assets/cobol-B_Zrxbt9.js","assets/coffee-CPPHv8FA.js","assets/cpp-C-G-eJVJ.js","assets/cpp-CKg3alKE.js","assets/glsl-CdIfhB5p.js","assets/regexp-fGJZXNZk.js","assets/crystal-CKpPJdCF.js","assets/shellscript-De2EFoxY.js","assets/csharp-BXi1_xBE.js","assets/csharp-bImjwtES.js","assets/css-BkAkkBRR.js","assets/csv-D3YVRFQp.js","assets/csv-Dms9qfWK.js","assets/diff-C1t2UleD.js","assets/diff-DDfEfAre.js","assets/edge-cGM633o-.js","assets/elixir-yZbeK8Aa.js","assets/elm-JIrYqb8t.js","assets/erb-NgBfXQaQ.js","assets/graphql-k3zbZZL5.js","assets/jsx-CFpSJeI9.js","assets/haml-B-A-8zk5.js","assets/lua-BF0CpxpZ.js","assets/ruby-Df4D6WRm.js","assets/yaml-GQ0uSSzF.js","assets/erlang-CJL2GFcQ.js","assets/markdown-Vu-dFVAW.js","assets/fortran-fixed-form-FM4VxHCi.js","assets/fortran-free-form-Jby2T0Wq.js","assets/fortran-free-form-CTfrqX6C.js","assets/fsharp-4HS56nbA.js","assets/gdresource-NryrpWuR.js","assets/gdscript-6AZaccPj.js","assets/gdshader-Pp-sZRGT.js","assets/gdscript-CKJMOIsb.js","assets/gdshader-KmG83rhm.js","assets/git-commit-CW_7EFVp.js","assets/git-rebase-DRXi5V7H.js","assets/glimmer-js-BB40h89I.js","assets/glimmer-ts-k800qAV5.js","assets/glsl-BK3DVI1P.js","assets/go-vYmq8WPw.js","assets/go-C-kfIkbb.js","assets/graphql-tIswcGyf.js","assets/hack-DsmZh1Iq.js","assets/haml-QL653m-5.js","assets/handlebars-T_Hid4q_.js","assets/haxe-DB67yEYl.js","assets/haxe-k9JM0gWH.js","assets/hlsl-D1yiT-un.js","assets/hlsl-Bv1rohgx.js","assets/html-DwdsDnxA.js","assets/html-derivative-CZIbiup3.js","assets/http-BUAz5L8x.js","assets/hurl-B0aBHECq.js","assets/hxml-CPrpRyF3.js","assets/java-BYS9YX1Y.js","assets/javascript-sDs-xsdi.js","assets/jinja-_V2yFEMG.js","assets/jison-DTHzAt2g.js","assets/json-DUUxdjQR.js","assets/jsx-BH73hLeH.js","assets/julia-CZh_Tth_.js","assets/r-B4mroz16.js","assets/latex-Mbanwahz.js","assets/tex-C_D3PuKP.js","assets/less-gm_XYiRo.js","assets/less-B5CC_kqO.js","assets/liquid-Buk66WdL.js","assets/lua-Dv6300iW.js","assets/markdown-D8VCPPAY.js","assets/marko-B91FCwwL.js","assets/mdc-Bg8MgeCs.js","assets/nginx-BmfTkokM.js","assets/nim-HfTztAeH.js","assets/perl-Dd2DM-YJ.js","assets/php-9NblZCTV.js","assets/php-FjVpuN5M.js","assets/postcss-Ca2gP8UL.js","assets/pug-CqC4JvUU.js","assets/python-DCsl9Ztb.js","assets/qml-RnbDU3bo.js","assets/r-Cr55qUvU.js","assets/razor-B0k1zKsk.js","assets/regexp-CZdcb2F3.js","assets/rst-BBlC7zvZ.js","assets/ruby-Cs7zGqUV.js","assets/sas-DpAC-lBo.js","assets/scss-CAZWwA7N.js","assets/sdbl-CbsK5FWN.js","assets/shaderlab-B97rGrWe.js","assets/shellscript-De1y_eMY.js","assets/shellsession-Dz2pEKeE.js","assets/soy-CF-GuURf.js","assets/sparql-DeuWczD0.js","assets/turtle-CgZz_AkG.js","assets/sql-CceKApSt.js","assets/stata-DDc2WRBc.js","assets/stylus-eIzzNL_h.js","assets/stylus-xGiQByw_.js","assets/svelte-BgWcigK9.js","assets/templ-Dvg0xsCN.js","assets/tex-CrM9zCwa.js","assets/ts-tags-B-_-a7h2.js","assets/tsx-LWFLIpGW.js","assets/turtle-D9_gllAl.js","assets/twig-n4rZazfh.js","assets/typescript-mWy6aDab.js","assets/vue-BTdOHvs5.js","assets/vue-zvhKChv1.js","assets/vue-html-Q0GLhVDp.js","assets/vue-vine-RF854hEs.js","assets/xml-BhKbnzKs.js","assets/xsl-B_KZ9xyu.js","assets/yaml-Ho2wrQj6.js"])))=>i.map(i=>d[i]);
2
- import{o as e,r as t,t as n}from"./chunk-oCmw4s_B.js";import{A as r,B as i,C as a,Dt as o,E as s,F as c,G as l,H as u,J as d,K as f,Mt as p,O as m,R as h,S as g,St as _,U as v,V as y,W as b,Y as x,a as S,b as C,ct as ee,et as w,f as T,jt as E,k as D,kt as O,l as te,m as ne,mt as re,n as ie,q as k,rt as ae,s as oe,st as A,w as j,wt as se,x as M,yt as N}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{E as ce,F as le,I as ue,K as de,M as fe,N as pe,Y as me,_ as he,a as ge,d as _e,h as ve,i as ye,j as be,n as xe,r as Se,u as Ce}from"./widgets-DJ153_lR.js";import{a as we,c as Te,l as Ee,o as De,u as Oe,v as ke}from"./src-BEKjKq3V.js";import{F as Ae,I as je,N as Me,j as Ne,k as Pe}from"./settings-ckdWvS_B.js";import{n as Fe,t as P}from"./preload-helper-C_mzgxuZ.js";import{o as Ie}from"./vue-router-DbGkV_8v.js";import{t as Le}from"./_plugin-vue_export-helper-CdbDUOI-.js";import{D as Re,S as ze,T as Be,b as Ve,c as He,f as Ue,l as We,m as Ge,n as Ke,v as qe,y as Je}from"./dist-D-gzSpcr.js";import{n as Ye,r as Xe,t as Ze}from"./src-B2sntzra.js";import{n as Qe}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as $e}from"./sleep-scadwjYE.js";import{n as et}from"./webgpu-D1xql1eX.js";import{a as tt,i as nt,n as rt,r as it,t as at}from"./output-KkRq_Mb9.js";var ot=r({__name:`AudioSpectrum`,props:{stream:{},bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(e){let t=e,n=N(Array.from({length:t.bars}).fill(0));u(()=>{r()}),ae(()=>t.stream,()=>{r()});function r(){if(!t.stream)return;let e=new(window.AudioContext||window.webkitAudioContext),r=e.createMediaStreamSource(t.stream),i=e.createAnalyser();i.fftSize=2048,r.connect(i);let a=i.frequencyBinCount,o=new Uint8Array(a),s=e.sampleRate/i.fftSize,c=Math.floor(t.minFreq/s),l=Math.floor(t.maxFreq/s),u=l-c,d=Math.floor(u/t.bars),f=()=>{try{requestAnimationFrame(f),i.getByteFrequencyData(o);let e=Array.from({length:t.bars}).fill(0);for(let n=0;n<t.bars;n++){let t=0,r=c+n*d;for(let e=0;e<d;e++){let n=r+e;n<l&&(t+=o[n])}e[n]=t/d/255}n.value=e}catch(e){console.error(e)}};f()}return(e,t)=>k(e.$slots,`default`,{frequencies:n.value})}}),st={"h-full":``,flex:``,"items-center":``,"gap-1":``},ct=5,lt=r({__name:`AudioSpectrumVisualizer`,props:{frequencies:{},barsClass:{}},setup(e){let t=e;function n(e,t){let n=.1;return n+(1-n)*(e/t)}function r(e,r){let i=n(r,t.frequencies.length);return Math.min(100,Math.max(10,e*100*ct*i))}return(t,n)=>(b(),j(`div`,st,[(b(!0),j(ne,null,f(e.frequencies,(t,n)=>(b(),j(`div`,{key:n,"h-full":``,flex:``,"flex-1":``,"items-end":``},[M(`div`,{transition:`all 100 ease-in-out`,"mx-auto":``,"my-0":``,"w-full":``,"rounded-full":``,class:O(e.barsClass),style:E({height:`${r(t,n)}%`})},null,6)]))),128))]))}}),ut={key:0,class:`mb-2 flex items-center justify-between`},dt={class:`text-sm font-medium`},ft={class:`text-sm text-neutral-500`},pt=r({__name:`LevelMeter`,props:{level:{},min:{default:0},max:{default:100},numBars:{default:20},label:{default:`Level`},unit:{default:`%`},height:{default:24},showHeader:{type:Boolean,default:!0},animationSpeed:{default:75},colorThresholds:{default:()=>[{value:60,color:`bg-green-500`},{value:80,color:`bg-yellow-500`},{value:100,color:`bg-red-500`}]},formatValue:{}},setup(e){let t=e,n=C(()=>{let e=Math.max(0,Math.min(100,(t.level-t.min)/(t.max-t.min)*100)),n=Math.floor(e/100*t.numBars);return Array.from({length:t.numBars},(e,r)=>({active:r<n,level:r/t.numBars*100}))});function r(e,n){let r=[...t.colorThresholds].sort((e,t)=>e.value-t.value);for(let e of r)if(n<=e.value)return e.color;return r[r.length-1]?.color||`bg-green-500`}return(t,i)=>(b(),j(`div`,null,[e.showHeader?(b(),j(`div`,ut,[M(`span`,dt,p(e.label),1),M(`span`,ft,p(e.formatValue?e.formatValue(e.level):`${Math.round(e.level)}${e.unit}`),1)])):a(``,!0),M(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 dark:bg-neutral-700`,style:E({height:`${e.height}px`})},[(b(!0),j(ne,null,f(n.value,(t,n)=>(b(),j(`div`,{key:n,class:O([`flex-1 rounded-sm transition-all`,[t.active?r(n,t.level):`bg-neutral-200 dark:bg-neutral-600`,`duration-${e.animationSpeed}`]]),style:E({height:t.active?`100%`:`20%`})},null,6))),128))],4)]))}}),mt=Le(r({__name:`Volumed`,props:{perspective:{},transform:{}},setup(e){return(t,n)=>(b(),j(`div`,{class:`volumed`,style:E({perspective:`${e.perspective}px`,transform:e.transform})},[k(t.$slots,`default`,{},void 0,!0)],4))}}),[[`__scopeId`,`data-v-45a50d47`]]),ht=r({__name:`CursorMomentum`,props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(e,{expose:t}){let n=e,r=N(1),i=N(0),a=0,o=se(()=>n.friction),s=se(()=>n.baseSpeed),c=se(()=>n.momentumFactor);function l(e){a||=e;let t=e-a;a=e,r.value=s.value+(r.value-s.value)*o.value,i.value+=r.value*t,requestAnimationFrame(l)}function d(e){let t=Math.sqrt(e.movementX**2+e.movementY**2);r.value+=t*c.value}return u(()=>{window.addEventListener(`mousemove`,d),requestAnimationFrame(l)}),v(()=>{window.removeEventListener(`mousemove`,d)}),t({momentum:r,currentValue:i}),(e,t)=>k(e.$slots,`default`,{momentum:r.value,currentValue:i.value})}}),gt=Le(r({__name:`TestDummyMarkerFlat`,props:{size:{}},setup(e){return(t,n)=>(b(),j(`div`,{class:`test-dummy-flat`,style:E({width:`${e.size}px`,height:`${e.size}px`})},[...n[0]||=[M(`div`,{class:`marker`},null,-1)]],4))}}),[[`__scopeId`,`data-v-aa597cdd`]]),_t=r({__name:`TestDummyMarker`,setup(e){return(e,t)=>(b(),g(ht,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:A(({currentValue:e})=>[D(mt,{perspective:800,transform:`rotateX(45deg) translateY(3px)`},{default:A(()=>[D(gt,{size:24,style:E({transform:`rotate(${e}deg)`})},null,8,[`style`])]),_:2},1024)]),_:1}))}}),vt={key:0,class:`mb-2 flex items-center justify-between`},yt={class:`text-sm font-medium`},bt={class:`text-sm text-neutral-500`},xt={key:1,class:`mt-1 flex gap-3 text-xs text-neutral-500`},St={class:`flex items-center gap-1`},Ct={class:`flex items-center gap-1`},wt={class:`flex items-center gap-1`},Tt=r({__name:`ThresholdMeter`,props:{value:{},threshold:{},min:{default:0},max:{default:1},numBars:{default:20},label:{default:`Value`},unit:{default:`%`},precision:{default:1},height:{default:24},showHeader:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},animationSpeed:{default:100},belowThresholdClass:{default:`bg-primary-300 dark:bg-primary-600`},aboveThresholdClass:{default:`bg-green-500`},thresholdBarClass:{default:`bg-white dark:bg-neutral-800`},inactiveBarClass:{default:`bg-neutral-300 dark:bg-neutral-600`},belowLabel:{default:`Below`},aboveLabel:{default:`Above`},thresholdLabel:{default:`Threshold`},formatValue:{}},setup(e){let t=e,n=C(()=>{let e=Math.max(0,Math.min(1,(t.value-t.min)/(t.max-t.min))),n=Math.max(0,Math.min(1,(t.threshold-t.min)/(t.max-t.min))),r=Math.floor(e*t.numBars),i=Math.floor(n*t.numBars);return Array.from({length:t.numBars},(e,t)=>({active:t<r,isThreshold:t===i,isAboveThreshold:t<r&&t>=i,isBelowThreshold:t<r&&t<i}))});return(t,r)=>(b(),j(`div`,null,[e.showHeader?(b(),j(`div`,vt,[M(`span`,yt,p(e.label),1),M(`span`,bt,p(e.formatValue?e.formatValue(e.value):`${(e.value*100).toFixed(e.precision)}${e.unit}`),1)])):a(``,!0),M(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 p-1 dark:bg-neutral-700`,style:E({height:`${e.height}px`})},[(b(!0),j(ne,null,f(n.value,(t,n)=>(b(),j(`div`,{key:`threshold-${n}`,class:O([`flex-1 rounded-sm transition-all`,[t.isThreshold?e.thresholdBarClass:t.isAboveThreshold?e.aboveThresholdClass:t.isBelowThreshold?e.belowThresholdClass:e.inactiveBarClass,`duration-${e.animationSpeed}`]]),style:E({height:t.active||t.isThreshold?`100%`:`20%`})},null,6))),128))],4),e.showLegend?(b(),j(`div`,xt,[M(`span`,St,[M(`div`,{class:O(`inline-block h-0.5lh w-1lh rounded-full ${e.belowThresholdClass}`)},null,2),m(` `+p(e.belowLabel),1)]),M(`span`,Ct,[M(`div`,{class:O(`inline-block h-0.5lh w-1lh rounded-full border border-neutral-400 ${e.thresholdBarClass}`)},null,2),m(` `+p(e.thresholdLabel),1)]),M(`span`,wt,[M(`div`,{class:O(`inline-block h-0.5lh w-1lh rounded-full ${e.aboveThresholdClass}`)},null,2),m(` `+p(e.aboveLabel),1)])])):a(``,!0)]))}});function Et(e){return{color:e,withAlpha:t=>{let n=Ze(e);if(!n)throw Error(`Invalid color provided for alpha adjustment`);return Et(Ze({mode:`oklch`,l:n.l,c:n.c,h:n.h,alpha:t}))},toHex:()=>Xe(e),toCSS:()=>Ye(e)}}function Dt(e=200,t){let n=t??.18+Math.cos(e*Math.PI/180)*.04,r={50:{lightness:.95,chromaMultiplier:.3,mixWithWhite:.7},100:{lightness:.95,chromaMultiplier:.5,mixWithWhite:.2},200:{lightness:.9,chromaMultiplier:.6},300:{lightness:.85,chromaMultiplier:.75},400:{lightness:.74,chromaMultiplier:.85},500:{lightness:.62,chromaMultiplier:1},600:{lightness:.54,chromaMultiplier:1.15},700:{lightness:.49,chromaMultiplier:1.1},800:{lightness:.42,chromaMultiplier:.85},900:{lightness:.37,chromaMultiplier:.7},950:{lightness:.29,chromaMultiplier:.5}},i=(t,i,a=0)=>{let o=r[t],s=(e+a)%360,c=n*o.chromaMultiplier,l=Ze({mode:`oklch`,l:o.lightness,c,h:s,alpha:i??1});return o.mixWithWhite?Et(Ot(l,Ze({mode:`oklch`,l:1,c:0,h:0,alpha:i??1}),o.mixWithWhite)):Et(l)};return{baseHue:e,chroma:n,getAllShades:(e,t=0)=>{let n={};for(let a of Object.keys(r)){let r=Number.parseInt(a);n[r]=i(r,e,t)}return n},shadeBy:i}}function Ot(e,t,n=.5){let r=Ze(e),i=Ze(t);if(!r||!i)throw Error(`Invalid colors provided for mixing`);return Ze({mode:`oklch`,l:r.l*(1-n)+i.l*n,c:r.c*(1-n)+i.c*n,h:kt(r.h??0,i.h??0,n)})}function kt(e,t,n){let r=t-e;return r>180&&(r-=360),r<-180&&(r+=360),(e+r*n+360)%360}const At=Symbol(`@proj-airi/chromatic-hue`);function jt(e,t){return{role:`system`,content:[e,he.map(e=>`- ${e}`).join(`
3
  `),t].join(`
4
 
5
  `)}}var Mt=jt;const Nt=`<|llm_inference_end|>`;var Pt={key:0,class:`flex items-center justify-between`},Ft={class:`text-sm font-medium`},It={class:`text-xs text-neutral-500`},Lt={class:`h-full w-full`},Rt={id:`below-threshold-gradient`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},zt=[`fill`],Bt=[`y`,`height`,`fill`],Vt=[`y1`,`y2`,`stroke`,`fill`],Ht=[`d`,`fill`],Ut=[`d`,`stroke`,`stroke-width`],Wt={key:0,class:`absolute left-2 top-2 flex items-center gap-1.5 border border-primary-200 rounded-md bg-primary-50 px-2 py-1 dark:border-primary-800 dark:bg-primary-900`},Gt={class:`text-xs text-primary-700 font-medium dark:text-primary-300`},Kt={key:1,class:`flex flex-wrap items-center justify-between text-xs text-neutral-500`},qt={class:`flex items-center gap-3`},Jt={class:`flex items-center gap-1 text-nowrap`},Yt={class:`flex items-center gap-1 text-nowrap`},Xt={key:0,class:`text-nowrap`},Zt=Le(r({__name:`TimeSeriesChart`,props:{history:{},currentValue:{},threshold:{default:null},isActive:{type:Boolean},title:{default:`Time Series`},colorsHue:{},lineColor:{},thresholdColor:{},activeColor:{},inactiveColor:{},subtitle:{default:`Recent data`},activeLabel:{default:`Active`},activeLegendLabel:{default:`Active state`},inactiveLegendLabel:{default:`Inactive state`},thresholdLabel:{default:`Threshold`},height:{default:80},lineWidth:{default:1.5},chartHeight:{},minDataPoints:{default:5},precision:{default:0},unit:{default:`%`},showHeader:{type:Boolean,default:!0},showThreshold:{type:Boolean,default:!0},showArea:{type:Boolean,default:!0},showThresholdAreas:{type:Boolean,default:!0},showCurrentValue:{type:Boolean,default:!0},showActiveIndicator:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},formatValue:{}},setup(e){let t=e,n=C(()=>t.height),r=N(),i=c(At,220.44),o=se(()=>t.colorsHue||i||220.44),s=C(()=>Dt(o.value)),l=We(r,{windowResize:!0});ae([o,r],()=>{r.value&&r.value.style.setProperty(`--chromatic-hue`,o.value.toString())},{immediate:!0});let u=se(()=>t.lineColor),d=C(()=>u.value?u.value:s.value.shadeBy(500).toHex()),f=se(()=>t.thresholdColor),h=C(()=>{if(!f.value){let e=s.value.shadeBy(500).withAlpha(.1).color;return`oklch(${e.l} ${e.c} ${e.h} / ${e.alpha})`}return f.value}),g=se(()=>t.activeColor),_=C(()=>g.value?g.value:s.value.shadeBy(600).toHex()),v=se(()=>t.inactiveColor),y=C(()=>v.value?v.value:s.value.shadeBy(400).toHex()),x=Math.random().toString(36).substring(2,9),S=`grid-${x}`,ee=`area-gradient-${x}`,w=`threshold-gradient-${x}`,T=C(()=>t.threshold===null?0:Math.max(0,Math.min(1,t.threshold))),te=C(()=>t.threshold===null?0:n.value-T.value*n.value),ne=C(()=>{let e=t.history;if(e.length<2)return``;let r=l.width.value,i=n.value,a=`M0,${i-e[0]*i}`;for(let t=1;t<e.length;t++){let n=t/(e.length-1)*r,o=i-e[t]*i;if(t===1)a+=` Q${n/2},${i-e[0]*i} ${n},${o}`;else{let s=((t-1)/(e.length-1)*r+n)/2,c=i-e[t-1]*i;a+=` Q${s},${c} ${n},${o}`}}return a}),re=C(()=>{let e=t.history;if(e.length<2)return``;let r=l.width.value,i=n.value,a=`M0,${i} L0,${i-e[0]*i}`;for(let t=1;t<e.length;t++){let n=t/(e.length-1)*r,o=i-e[t]*i;if(t===1)a+=` Q${n/2},${i-e[0]*i} ${n},${o}`;else{let s=((t-1)/(e.length-1)*r+n)/2,c=i-e[t-1]*i;a+=` Q${s},${c} ${n},${o}`}}return a+=` L${r},${i} Z`,a});return(t,i)=>e.history.length>e.minDataPoints?(b(),j(`div`,{key:0,ref_key:`timeSeriesChartRef`,ref:r,class:`time-series-chart space-y-3`},[e.showHeader?(b(),j(`div`,Pt,[M(`div`,Ft,p(e.title),1),M(`div`,It,p(e.subtitle),1)])):a(``,!0),M(`div`,{class:`relative overflow-hidden border border-neutral-200 rounded-lg from-neutral-50 to-neutral-100 bg-gradient-to-b dark:border-neutral-800 dark:from-neutral-800 dark:to-neutral-900`,style:E({height:`${n.value}px`})},[(b(),j(`svg`,Lt,[M(`defs`,null,[M(`pattern`,{id:S,width:`20`,height:`10`,patternUnits:`userSpaceOnUse`},[...i[0]||=[M(`path`,{d:`M 20 0 L 0 0 0 10`,fill:`none`,stroke:`rgb(156 163 175 / 0.1)`,"stroke-width":`0.5`},null,-1)]]),M(`linearGradient`,{id:ee,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[M(`stop`,{offset:`0%`,style:E(`stop-color:${d.value};stop-opacity:0.3`)},null,4),M(`stop`,{offset:`50%`,style:E(`stop-color:${d.value};stop-opacity:0.15`)},null,4),M(`stop`,{offset:`100%`,style:E(`stop-color:${d.value};stop-opacity:0.05`)},null,4)]),M(`linearGradient`,{id:w,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[M(`stop`,{offset:`0%`,style:E(`stop-color:${_.value};stop-opacity:0.3`)},null,4),M(`stop`,{offset:`50%`,style:E(`stop-color:${_.value};stop-opacity:0.15`)},null,4),M(`stop`,{offset:`100%`,style:E(`stop-color:${_.value};stop-opacity:0.05`)},null,4)]),M(`linearGradient`,Rt,[M(`stop`,{offset:`0%`,style:E(`stop-color:${h.value};stop-opacity:0.2`)},null,4),M(`stop`,{offset:`50%`,style:E(`stop-color:${h.value};stop-opacity:0.1`)},null,4),M(`stop`,{offset:`100%`,style:E(`stop-color:${h.value};stop-opacity:0.05`)},null,4)])]),M(`rect`,{width:`100%`,height:`100%`,fill:`url(#${S})`},null,8,zt),e.showThreshold&&e.threshold!==null?(b(),j(`rect`,{key:0,x:`0`,y:te.value,width:`100%`,height:n.value-te.value,fill:h.value,class:`transition-all duration-300`},null,8,Bt)):a(``,!0),e.showThreshold&&e.threshold!==null?(b(),j(`line`,{key:1,x1:`0`,y1:te.value,x2:`100%`,y2:te.value,stroke:h.value,"stroke-width":`1.5`,"stroke-dasharray":`4,4`,fill:h.value,class:`transition-all duration-300`},null,8,Vt)):a(``,!0),re.value&&e.showArea?(b(),j(`path`,{key:2,d:re.value,fill:`url(#${ee})`,class:`transition-all duration-75`},null,8,Ht)):a(``,!0),ne.value?(b(),j(`path`,{key:3,d:ne.value,fill:`none`,stroke:d.value,"stroke-width":e.lineWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`drop-shadow-sm transition-all duration-75`},null,8,Ut)):a(``,!0)])),e.showCurrentValue?(b(),j(`div`,{key:0,class:O([`absolute right-2 top-2 border border-neutral-200 rounded-md bg-white px-2 py-1 shadow-sm transition-all duration-200 dark:border-neutral-700 dark:bg-neutral-800`,e.isActive?`bg-primary-50 dark:bg-primary-900 border-primary-200 dark:border-primary-800`:``])},[M(`div`,{class:O([`text-xs font-medium`,e.isActive?`text-primary-700 dark:text-primary-300`:`text-neutral-600 dark:text-neutral-400`])},p(e.formatValue?e.formatValue(e.currentValue):`${(e.currentValue*100).toFixed(e.precision)}${e.unit}`),3)],2)):a(``,!0),D(ie,{name:`fade`},{default:A(()=>[e.isActive&&e.showActiveIndicator?(b(),j(`div`,Wt,[i[1]||=M(`div`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-500`},null,-1),M(`span`,Gt,p(e.activeLabel),1)])):a(``,!0)]),_:1})],4),e.showLegend?(b(),j(`div`,Kt,[M(`div`,qt,[M(`span`,Jt,[M(`div`,{class:`h-2 w-2 rounded-full`,style:E({backgroundColor:_.value})},null,4),m(` `+p(e.activeLegendLabel),1)]),M(`span`,Yt,[M(`div`,{class:`h-2 w-2 rounded-full`,style:E({backgroundColor:y.value})},null,4),m(` `+p(e.inactiveLegendLabel),1)])]),e.threshold===null?a(``,!0):(b(),j(`span`,Xt,p(e.thresholdLabel)+`: `+p((e.threshold*100).toFixed(0))+`%`,1))])):a(``,!0)],512)):a(``,!0)}}),[[`__scopeId`,`data-v-3b2e411d`]]),{entries:Qt,setPrototypeOf:$t,isFrozen:en,getPrototypeOf:tn,getOwnPropertyDescriptor:nn}=Object,{freeze:rn,seal:an,create:on}=Object,{apply:sn,construct:cn}=typeof Reflect<`u`&&Reflect;rn||=function(e){return e},an||=function(e){return e},sn||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},cn||=function(e){return new e(...[...arguments].slice(1))};var ln=Cn(Array.prototype.forEach),un=Cn(Array.prototype.lastIndexOf),dn=Cn(Array.prototype.pop),fn=Cn(Array.prototype.push),pn=Cn(Array.prototype.splice),mn=Cn(String.prototype.toLowerCase),hn=Cn(String.prototype.toString),gn=Cn(String.prototype.match),_n=Cn(String.prototype.replace),vn=Cn(String.prototype.indexOf),yn=Cn(String.prototype.trim),bn=Cn(Object.prototype.hasOwnProperty),xn=Cn(RegExp.prototype.test),Sn=wn(TypeError);function Cn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return sn(e,t,n)}}function wn(e){return function(){return cn(e,[...arguments])}}function Tn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mn;$t&&$t(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(en(t)||(t[r]=e),i=e)}e[i]=!0}return e}function En(e){for(let t=0;t<e.length;t++)bn(e,t)||(e[t]=null);return e}function Dn(e){let t=on(null);for(let[n,r]of Qt(e))bn(e,n)&&(Array.isArray(r)?t[n]=En(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=Dn(r):t[n]=r);return t}function On(e,t){for(;e!==null;){let n=nn(e,t);if(n){if(n.get)return Cn(n.get);if(typeof n.value==`function`)return Cn(n.value)}e=tn(e)}function n(){return null}return n}var kn=rn(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),An=rn(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),jn=rn([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Mn=rn([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Nn=rn(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Pn=rn([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Fn=rn([`#text`]),In=rn(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),Ln=rn(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Rn=rn(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),zn=rn([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Bn=an(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Vn=an(/<%[\w\W]*|[\w\W]*%>/gm),Hn=an(/\$\{[\w\W]*/gm),Un=an(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wn=an(/^aria-[\-\w]+$/),Gn=an(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Kn=an(/^(?:\w+script|data):/i),qn=an(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jn=an(/^html$/i),Yn=an(/^[a-z][.\w]*(-[.\w]+)+$/i),Xn=Object.freeze({__proto__:null,ARIA_ATTR:Wn,ATTR_WHITESPACE:qn,CUSTOM_ELEMENT:Yn,DATA_ATTR:Un,DOCTYPE_NAME:Jn,ERB_EXPR:Vn,IS_ALLOWED_URI:Gn,IS_SCRIPT_OR_DATA:Kn,MUSTACHE_EXPR:Bn,TMPLIT_EXPR:Hn}),Zn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Qn=function(){return typeof window>`u`?null:window},$n=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},er=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function tr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qn(),t=e=>tr(e);if(t.version=`3.3.0`,t.removed=[],!e||!e.document||e.document.nodeType!==Zn.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=On(m,`cloneNode`),g=On(m,`remove`),_=On(m,`nextSibling`),v=On(m,`childNodes`),y=On(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:ee,getElementsByTagName:w}=n,{importNode:T}=r,E=er();t.isSupported=typeof Qt==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:D,ERB_EXPR:O,TMPLIT_EXPR:te,DATA_ATTR:ne,ARIA_ATTR:re,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:k,CUSTOM_ELEMENT:ae}=Xn,{IS_ALLOWED_URI:oe}=Xn,A=null,j=Tn({},[...kn,...An,...jn,...Nn,...Fn]),se=null,M=Tn({},[...In,...Ln,...Rn,...zn]),N=Object.seal(on(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ce=null,le=null,ue=Object.seal(on(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),de=!0,fe=!0,pe=!1,me=!0,he=!1,ge=!0,_e=!1,ve=!1,ye=!1,be=!1,xe=!1,Se=!1,Ce=!0,we=!1,Te=!0,Ee=!1,De={},Oe=null,ke=Tn({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ae=null,je=Tn({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Me=null,Ne=Tn({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Pe=`http://www.w3.org/1998/Math/MathML`,Fe=`http://www.w3.org/2000/svg`,P=`http://www.w3.org/1999/xhtml`,Ie=P,Le=!1,Re=null,ze=Tn({},[Pe,Fe,P],hn),Be=Tn({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Ve=Tn({},[`annotation-xml`]),He=Tn({},[`title`,`style`,`font`,`a`,`script`]),Ue=null,We=[`application/xhtml+xml`,`text/html`],Ge=null,Ke=null,qe=n.createElement(`form`),Je=function(e){return e instanceof RegExp||e instanceof Function},Ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ke&&Ke===e)){if((!e||typeof e!=`object`)&&(e={}),e=Dn(e),Ue=We.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Ge=Ue===`application/xhtml+xml`?hn:mn,A=bn(e,`ALLOWED_TAGS`)?Tn({},e.ALLOWED_TAGS,Ge):j,se=bn(e,`ALLOWED_ATTR`)?Tn({},e.ALLOWED_ATTR,Ge):M,Re=bn(e,`ALLOWED_NAMESPACES`)?Tn({},e.ALLOWED_NAMESPACES,hn):ze,Me=bn(e,`ADD_URI_SAFE_ATTR`)?Tn(Dn(Ne),e.ADD_URI_SAFE_ATTR,Ge):Ne,Ae=bn(e,`ADD_DATA_URI_TAGS`)?Tn(Dn(je),e.ADD_DATA_URI_TAGS,Ge):je,Oe=bn(e,`FORBID_CONTENTS`)?Tn({},e.FORBID_CONTENTS,Ge):ke,ce=bn(e,`FORBID_TAGS`)?Tn({},e.FORBID_TAGS,Ge):Dn({}),le=bn(e,`FORBID_ATTR`)?Tn({},e.FORBID_ATTR,Ge):Dn({}),De=bn(e,`USE_PROFILES`)?e.USE_PROFILES:!1,de=e.ALLOW_ARIA_ATTR!==!1,fe=e.ALLOW_DATA_ATTR!==!1,pe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,me=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,he=e.SAFE_FOR_TEMPLATES||!1,ge=e.SAFE_FOR_XML!==!1,_e=e.WHOLE_DOCUMENT||!1,be=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Se=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,Ce=e.SANITIZE_DOM!==!1,we=e.SANITIZE_NAMED_PROPS||!1,Te=e.KEEP_CONTENT!==!1,Ee=e.IN_PLACE||!1,oe=e.ALLOWED_URI_REGEXP||Gn,Ie=e.NAMESPACE||P,Be=e.MATHML_TEXT_INTEGRATION_POINTS||Be,Ve=e.HTML_INTEGRATION_POINTS||Ve,N=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Je(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Je(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(N.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),he&&(fe=!1),xe&&(be=!0),De&&(A=Tn({},Fn),se=[],De.html===!0&&(Tn(A,kn),Tn(se,In)),De.svg===!0&&(Tn(A,An),Tn(se,Ln),Tn(se,zn)),De.svgFilters===!0&&(Tn(A,jn),Tn(se,Ln),Tn(se,zn)),De.mathMl===!0&&(Tn(A,Nn),Tn(se,Rn),Tn(se,zn))),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?ue.tagCheck=e.ADD_TAGS:(A===j&&(A=Dn(A)),Tn(A,e.ADD_TAGS,Ge))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?ue.attributeCheck=e.ADD_ATTR:(se===M&&(se=Dn(se)),Tn(se,e.ADD_ATTR,Ge))),e.ADD_URI_SAFE_ATTR&&Tn(Me,e.ADD_URI_SAFE_ATTR,Ge),e.FORBID_CONTENTS&&(Oe===ke&&(Oe=Dn(Oe)),Tn(Oe,e.FORBID_CONTENTS,Ge)),Te&&(A[`#text`]=!0),_e&&Tn(A,[`html`,`head`,`body`]),A.table&&(Tn(A,[`tbody`]),delete ce.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Sn(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Sn(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=$n(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));rn&&rn(e),Ke=e}},Xe=Tn({},[...An,...jn,...Mn]),Ze=Tn({},[...Nn,...Pn]),Qe=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ie,tagName:`template`});let n=mn(e.tagName),r=mn(t.tagName);return Re[e.namespaceURI]?e.namespaceURI===Fe?t.namespaceURI===P?n===`svg`:t.namespaceURI===Pe?n===`svg`&&(r===`annotation-xml`||Be[r]):!!Xe[n]:e.namespaceURI===Pe?t.namespaceURI===P?n===`math`:t.namespaceURI===Fe?n===`math`&&Ve[r]:!!Ze[n]:e.namespaceURI===P?t.namespaceURI===Fe&&!Ve[r]||t.namespaceURI===Pe&&!Be[r]?!1:!Ze[n]&&(He[n]||!Xe[n]):!!(Ue===`application/xhtml+xml`&&Re[e.namespaceURI]):!1},$e=function(e){fn(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},et=function(e,n){try{fn(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{fn(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(be||xe)try{$e(n)}catch{}else try{n.setAttribute(e,``)}catch{}},tt=function(e){let t=null,r=null;if(ye)e=`<remove></remove>`+e;else{let t=gn(e,/^[\r\n\t ]+/);r=t&&t[0]}Ue===`application/xhtml+xml`&&Ie===P&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(Ie===P)try{t=new f().parseFromString(i,Ue)}catch{}if(!t||!t.documentElement){t=S.createDocument(Ie,`template`,null);try{t.documentElement.innerHTML=Le?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ie===P?w.call(t,_e?`html`:`body`)[0]:_e?t.documentElement:a},nt=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},rt=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},it=function(e){return typeof s==`function`&&e instanceof s};function at(e,n,r){ln(e,e=>{e.call(t,n,r,Ke)})}let ot=function(e){let n=null;if(at(E.beforeSanitizeElements,e,null),rt(e))return $e(e),!0;let r=Ge(e.nodeName);if(at(E.uponSanitizeElement,e,{tagName:r,allowedTags:A}),ge&&e.hasChildNodes()&&!it(e.firstElementChild)&&xn(/<[/\w!]/g,e.innerHTML)&&xn(/<[/\w!]/g,e.textContent)||e.nodeType===Zn.progressingInstruction||ge&&e.nodeType===Zn.comment&&xn(/<[/\w]/g,e.data))return $e(e),!0;if(!(ue.tagCheck instanceof Function&&ue.tagCheck(r))&&(!A[r]||ce[r])){if(!ce[r]&&ct(r)&&(N.tagNameCheck instanceof RegExp&&xn(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r)))return!1;if(Te&&!Oe[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return $e(e),!0}return e instanceof c&&!Qe(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&xn(/<\/no(script|embed|frames)/i,e.innerHTML)?($e(e),!0):(he&&e.nodeType===Zn.text&&(n=e.textContent,ln([D,O,te],e=>{n=_n(n,e,` `)}),e.textContent!==n&&(fn(t.removed,{element:e.cloneNode()}),e.textContent=n)),at(E.afterSanitizeElements,e,null),!1)},st=function(e,t,r){if(Ce&&(t===`id`||t===`name`)&&(r in n||r in qe))return!1;if(!(fe&&!le[t]&&xn(ne,t))&&!(de&&xn(re,t))&&!(ue.attributeCheck instanceof Function&&ue.attributeCheck(t,e))){if(!se[t]||le[t]){if(!(ct(e)&&(N.tagNameCheck instanceof RegExp&&xn(N.tagNameCheck,e)||N.tagNameCheck instanceof Function&&N.tagNameCheck(e))&&(N.attributeNameCheck instanceof RegExp&&xn(N.attributeNameCheck,t)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(t,e))||t===`is`&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&xn(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r))))return!1}else if(!Me[t]&&!xn(oe,_n(r,k,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&vn(r,`data:`)===0&&Ae[e])&&!(pe&&!xn(ie,_n(r,k,``)))&&r)return!1}return!0},ct=function(e){return e!==`annotation-xml`&&gn(e,ae)},lt=function(e){at(E.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||rt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:se,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=Ge(a),l=s,u=a===`value`?l:yn(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,at(E.uponSanitizeAttribute,e,r),u=r.attrValue,we&&(c===`id`||c===`name`)&&(et(a,e),u=`user-content-`+u),ge&&xn(/((--!?|])>)|<\/(style|title|textarea)/i,u)){et(a,e);continue}if(c===`attributename`&&gn(u,`href`)){et(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){et(a,e);continue}if(!me&&xn(/\/>/i,u)){et(a,e);continue}he&&ln([D,O,te],e=>{u=_n(u,e,` `)});let d=Ge(e.nodeName);if(!st(d,c,u)){et(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),rt(e)?$e(e):dn(t.removed)}catch{et(a,e)}}at(E.afterSanitizeAttributes,e,null)},ut=function e(t){let n=null,r=nt(t);for(at(E.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)at(E.uponSanitizeShadowNode,n,null),ot(n),lt(n),n.content instanceof a&&e(n.content);at(E.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(Le=!e,Le&&(e=`<!-->`),typeof e!=`string`&&!it(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Sn(`dirty is not a string, aborting`)}else throw Sn(`toString is not a function`);if(!t.isSupported)return e;if(ve||Ye(n),t.removed=[],typeof e==`string`&&(Ee=!1),Ee){if(e.nodeName){let t=Ge(e.nodeName);if(!A[t]||ce[t])throw Sn(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=tt(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===Zn.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!be&&!he&&!_e&&e.indexOf(`<`)===-1)return b&&Se?b.createHTML(e):e;if(i=tt(e),!i)return be?null:Se?x:``}i&&ye&&$e(i.firstChild);let u=nt(Ee?e:i);for(;c=u.nextNode();)ot(c),lt(c),c.content instanceof a&&ut(c.content);if(Ee)return e;if(be){if(xe)for(l=ee.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(se.shadowroot||se.shadowrootmode)&&(l=T.call(r,l,!0)),l}let d=_e?i.outerHTML:i.innerHTML;return _e&&A[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&xn(Jn,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
 
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-cj42VddV.js","assets/angular-html-BkhTissY.js","assets/html-Bw5wOFsA.js","assets/css-DInTgiZM.js","assets/javascript-C4PvEnyW.js","assets/angular-ts-CJOwTI6r.js","assets/scss-BARf998G.js","assets/apl-C1zUtu0S.js","assets/java-Dp7WMuBn.js","assets/json-hs7jIn-2.js","assets/xml-DbeMrzj9.js","assets/astro-D5uWHQ85.js","assets/postcss-DCtD9rnT.js","assets/tsx-BNJUgOo8.js","assets/typescript-wk9j-Jpa.js","assets/blade-BZ8c328q.js","assets/html-derivative-JfadVUQb.js","assets/sql-B4nHmD6q.js","assets/bsl-YgDQJdIX.js","assets/sdbl-BVmFsB2X.js","assets/c-YgjpuK_v.js","assets/c-ISnc8W16.js","assets/cairo-hw37ILIv.js","assets/python-UZ0YOhoX.js","assets/cmake-DutOoB7B.js","assets/cmake-BS6nTqvk.js","assets/cobol-B_Zrxbt9.js","assets/coffee-CPPHv8FA.js","assets/cpp-C-G-eJVJ.js","assets/cpp-CKg3alKE.js","assets/glsl-CdIfhB5p.js","assets/regexp-fGJZXNZk.js","assets/crystal-CKpPJdCF.js","assets/shellscript-De2EFoxY.js","assets/csharp-BXi1_xBE.js","assets/csharp-bImjwtES.js","assets/css-BkAkkBRR.js","assets/csv-D3YVRFQp.js","assets/csv-Dms9qfWK.js","assets/diff-C1t2UleD.js","assets/diff-DDfEfAre.js","assets/edge-cGM633o-.js","assets/elixir-yZbeK8Aa.js","assets/elm-JIrYqb8t.js","assets/erb-NgBfXQaQ.js","assets/graphql-k3zbZZL5.js","assets/jsx-CFpSJeI9.js","assets/haml-B-A-8zk5.js","assets/lua-BF0CpxpZ.js","assets/ruby-Df4D6WRm.js","assets/yaml-GQ0uSSzF.js","assets/erlang-CJL2GFcQ.js","assets/markdown-Vu-dFVAW.js","assets/fortran-fixed-form-FM4VxHCi.js","assets/fortran-free-form-Jby2T0Wq.js","assets/fortran-free-form-CTfrqX6C.js","assets/fsharp-4HS56nbA.js","assets/gdresource-NryrpWuR.js","assets/gdscript-6AZaccPj.js","assets/gdshader-Pp-sZRGT.js","assets/gdscript-CKJMOIsb.js","assets/gdshader-KmG83rhm.js","assets/git-commit-CW_7EFVp.js","assets/git-rebase-DRXi5V7H.js","assets/glimmer-js-BB40h89I.js","assets/glimmer-ts-k800qAV5.js","assets/glsl-BK3DVI1P.js","assets/go-vYmq8WPw.js","assets/go-C-kfIkbb.js","assets/graphql-tIswcGyf.js","assets/hack-DsmZh1Iq.js","assets/haml-QL653m-5.js","assets/handlebars-T_Hid4q_.js","assets/haxe-DB67yEYl.js","assets/haxe-k9JM0gWH.js","assets/hlsl-D1yiT-un.js","assets/hlsl-Bv1rohgx.js","assets/html-DwdsDnxA.js","assets/html-derivative-CZIbiup3.js","assets/http-BUAz5L8x.js","assets/hurl-B0aBHECq.js","assets/hxml-CPrpRyF3.js","assets/java-BYS9YX1Y.js","assets/javascript-sDs-xsdi.js","assets/jinja-_V2yFEMG.js","assets/jison-DTHzAt2g.js","assets/json-DUUxdjQR.js","assets/jsx-BH73hLeH.js","assets/julia-CZh_Tth_.js","assets/r-B4mroz16.js","assets/latex-Mbanwahz.js","assets/tex-C_D3PuKP.js","assets/less-gm_XYiRo.js","assets/less-B5CC_kqO.js","assets/liquid-Buk66WdL.js","assets/lua-Dv6300iW.js","assets/markdown-D8VCPPAY.js","assets/marko-B91FCwwL.js","assets/mdc-Bg8MgeCs.js","assets/nginx-BmfTkokM.js","assets/nim-HfTztAeH.js","assets/perl-Dd2DM-YJ.js","assets/php-9NblZCTV.js","assets/php-FjVpuN5M.js","assets/postcss-Ca2gP8UL.js","assets/pug-CqC4JvUU.js","assets/python-DCsl9Ztb.js","assets/qml-RnbDU3bo.js","assets/r-Cr55qUvU.js","assets/razor-B0k1zKsk.js","assets/regexp-CZdcb2F3.js","assets/rst-BBlC7zvZ.js","assets/ruby-Cs7zGqUV.js","assets/sas-DpAC-lBo.js","assets/scss-CAZWwA7N.js","assets/sdbl-CbsK5FWN.js","assets/shaderlab-B97rGrWe.js","assets/shellscript-De1y_eMY.js","assets/shellsession-Dz2pEKeE.js","assets/soy-CF-GuURf.js","assets/sparql-DeuWczD0.js","assets/turtle-CgZz_AkG.js","assets/sql-CceKApSt.js","assets/stata-DDc2WRBc.js","assets/stylus-eIzzNL_h.js","assets/stylus-xGiQByw_.js","assets/svelte-BgWcigK9.js","assets/templ-Dvg0xsCN.js","assets/tex-CrM9zCwa.js","assets/ts-tags-B-_-a7h2.js","assets/tsx-LWFLIpGW.js","assets/turtle-D9_gllAl.js","assets/twig-n4rZazfh.js","assets/typescript-mWy6aDab.js","assets/vue-BTdOHvs5.js","assets/vue-zvhKChv1.js","assets/vue-html-Q0GLhVDp.js","assets/vue-vine-RF854hEs.js","assets/xml-BhKbnzKs.js","assets/xsl-B_KZ9xyu.js","assets/yaml-Ho2wrQj6.js"])))=>i.map(i=>d[i]);
2
+ import{o as e,r as t,t as n}from"./chunk-oCmw4s_B.js";import{A as r,B as i,C as a,Dt as o,E as s,F as c,G as l,H as u,J as d,K as f,Mt as p,O as m,R as h,S as g,St as _,U as v,V as y,W as b,Y as x,a as S,b as C,ct as ee,et as w,f as T,jt as E,k as D,kt as O,l as te,m as ne,mt as re,n as ie,q as k,rt as ae,s as oe,st as A,w as j,wt as se,x as M,yt as N}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{E as ce,F as le,I as ue,K as de,M as fe,N as pe,Y as me,_ as he,a as ge,d as _e,h as ve,i as ye,j as be,n as xe,r as Se,u as Ce}from"./widgets-Bo0BM5C8.js";import{a as we,c as Te,l as Ee,o as De,u as Oe,v as ke}from"./src-BEKjKq3V.js";import{F as Ae,I as je,N as Me,j as Ne,k as Pe}from"./settings-CVVqd1wK.js";import{n as Fe,t as P}from"./preload-helper-C_mzgxuZ.js";import{o as Ie}from"./vue-router-DbGkV_8v.js";import{t as Le}from"./_plugin-vue_export-helper-CdbDUOI-.js";import{D as Re,S as ze,T as Be,b as Ve,c as He,f as Ue,l as We,m as Ge,n as Ke,v as qe,y as Je}from"./dist-D-gzSpcr.js";import{n as Ye,r as Xe,t as Ze}from"./src-B2sntzra.js";import{n as Qe}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as $e}from"./sleep-scadwjYE.js";import{n as et}from"./webgpu-D1xql1eX.js";import{a as tt,i as nt,n as rt,r as it,t as at}from"./output-KkRq_Mb9.js";var ot=r({__name:`AudioSpectrum`,props:{stream:{},bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(e){let t=e,n=N(Array.from({length:t.bars}).fill(0));u(()=>{r()}),ae(()=>t.stream,()=>{r()});function r(){if(!t.stream)return;let e=new(window.AudioContext||window.webkitAudioContext),r=e.createMediaStreamSource(t.stream),i=e.createAnalyser();i.fftSize=2048,r.connect(i);let a=i.frequencyBinCount,o=new Uint8Array(a),s=e.sampleRate/i.fftSize,c=Math.floor(t.minFreq/s),l=Math.floor(t.maxFreq/s),u=l-c,d=Math.floor(u/t.bars),f=()=>{try{requestAnimationFrame(f),i.getByteFrequencyData(o);let e=Array.from({length:t.bars}).fill(0);for(let n=0;n<t.bars;n++){let t=0,r=c+n*d;for(let e=0;e<d;e++){let n=r+e;n<l&&(t+=o[n])}e[n]=t/d/255}n.value=e}catch(e){console.error(e)}};f()}return(e,t)=>k(e.$slots,`default`,{frequencies:n.value})}}),st={"h-full":``,flex:``,"items-center":``,"gap-1":``},ct=5,lt=r({__name:`AudioSpectrumVisualizer`,props:{frequencies:{},barsClass:{}},setup(e){let t=e;function n(e,t){let n=.1;return n+(1-n)*(e/t)}function r(e,r){let i=n(r,t.frequencies.length);return Math.min(100,Math.max(10,e*100*ct*i))}return(t,n)=>(b(),j(`div`,st,[(b(!0),j(ne,null,f(e.frequencies,(t,n)=>(b(),j(`div`,{key:n,"h-full":``,flex:``,"flex-1":``,"items-end":``},[M(`div`,{transition:`all 100 ease-in-out`,"mx-auto":``,"my-0":``,"w-full":``,"rounded-full":``,class:O(e.barsClass),style:E({height:`${r(t,n)}%`})},null,6)]))),128))]))}}),ut={key:0,class:`mb-2 flex items-center justify-between`},dt={class:`text-sm font-medium`},ft={class:`text-sm text-neutral-500`},pt=r({__name:`LevelMeter`,props:{level:{},min:{default:0},max:{default:100},numBars:{default:20},label:{default:`Level`},unit:{default:`%`},height:{default:24},showHeader:{type:Boolean,default:!0},animationSpeed:{default:75},colorThresholds:{default:()=>[{value:60,color:`bg-green-500`},{value:80,color:`bg-yellow-500`},{value:100,color:`bg-red-500`}]},formatValue:{}},setup(e){let t=e,n=C(()=>{let e=Math.max(0,Math.min(100,(t.level-t.min)/(t.max-t.min)*100)),n=Math.floor(e/100*t.numBars);return Array.from({length:t.numBars},(e,r)=>({active:r<n,level:r/t.numBars*100}))});function r(e,n){let r=[...t.colorThresholds].sort((e,t)=>e.value-t.value);for(let e of r)if(n<=e.value)return e.color;return r[r.length-1]?.color||`bg-green-500`}return(t,i)=>(b(),j(`div`,null,[e.showHeader?(b(),j(`div`,ut,[M(`span`,dt,p(e.label),1),M(`span`,ft,p(e.formatValue?e.formatValue(e.level):`${Math.round(e.level)}${e.unit}`),1)])):a(``,!0),M(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 dark:bg-neutral-700`,style:E({height:`${e.height}px`})},[(b(!0),j(ne,null,f(n.value,(t,n)=>(b(),j(`div`,{key:n,class:O([`flex-1 rounded-sm transition-all`,[t.active?r(n,t.level):`bg-neutral-200 dark:bg-neutral-600`,`duration-${e.animationSpeed}`]]),style:E({height:t.active?`100%`:`20%`})},null,6))),128))],4)]))}}),mt=Le(r({__name:`Volumed`,props:{perspective:{},transform:{}},setup(e){return(t,n)=>(b(),j(`div`,{class:`volumed`,style:E({perspective:`${e.perspective}px`,transform:e.transform})},[k(t.$slots,`default`,{},void 0,!0)],4))}}),[[`__scopeId`,`data-v-45a50d47`]]),ht=r({__name:`CursorMomentum`,props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(e,{expose:t}){let n=e,r=N(1),i=N(0),a=0,o=se(()=>n.friction),s=se(()=>n.baseSpeed),c=se(()=>n.momentumFactor);function l(e){a||=e;let t=e-a;a=e,r.value=s.value+(r.value-s.value)*o.value,i.value+=r.value*t,requestAnimationFrame(l)}function d(e){let t=Math.sqrt(e.movementX**2+e.movementY**2);r.value+=t*c.value}return u(()=>{window.addEventListener(`mousemove`,d),requestAnimationFrame(l)}),v(()=>{window.removeEventListener(`mousemove`,d)}),t({momentum:r,currentValue:i}),(e,t)=>k(e.$slots,`default`,{momentum:r.value,currentValue:i.value})}}),gt=Le(r({__name:`TestDummyMarkerFlat`,props:{size:{}},setup(e){return(t,n)=>(b(),j(`div`,{class:`test-dummy-flat`,style:E({width:`${e.size}px`,height:`${e.size}px`})},[...n[0]||=[M(`div`,{class:`marker`},null,-1)]],4))}}),[[`__scopeId`,`data-v-aa597cdd`]]),_t=r({__name:`TestDummyMarker`,setup(e){return(e,t)=>(b(),g(ht,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:A(({currentValue:e})=>[D(mt,{perspective:800,transform:`rotateX(45deg) translateY(3px)`},{default:A(()=>[D(gt,{size:24,style:E({transform:`rotate(${e}deg)`})},null,8,[`style`])]),_:2},1024)]),_:1}))}}),vt={key:0,class:`mb-2 flex items-center justify-between`},yt={class:`text-sm font-medium`},bt={class:`text-sm text-neutral-500`},xt={key:1,class:`mt-1 flex gap-3 text-xs text-neutral-500`},St={class:`flex items-center gap-1`},Ct={class:`flex items-center gap-1`},wt={class:`flex items-center gap-1`},Tt=r({__name:`ThresholdMeter`,props:{value:{},threshold:{},min:{default:0},max:{default:1},numBars:{default:20},label:{default:`Value`},unit:{default:`%`},precision:{default:1},height:{default:24},showHeader:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},animationSpeed:{default:100},belowThresholdClass:{default:`bg-primary-300 dark:bg-primary-600`},aboveThresholdClass:{default:`bg-green-500`},thresholdBarClass:{default:`bg-white dark:bg-neutral-800`},inactiveBarClass:{default:`bg-neutral-300 dark:bg-neutral-600`},belowLabel:{default:`Below`},aboveLabel:{default:`Above`},thresholdLabel:{default:`Threshold`},formatValue:{}},setup(e){let t=e,n=C(()=>{let e=Math.max(0,Math.min(1,(t.value-t.min)/(t.max-t.min))),n=Math.max(0,Math.min(1,(t.threshold-t.min)/(t.max-t.min))),r=Math.floor(e*t.numBars),i=Math.floor(n*t.numBars);return Array.from({length:t.numBars},(e,t)=>({active:t<r,isThreshold:t===i,isAboveThreshold:t<r&&t>=i,isBelowThreshold:t<r&&t<i}))});return(t,r)=>(b(),j(`div`,null,[e.showHeader?(b(),j(`div`,vt,[M(`span`,yt,p(e.label),1),M(`span`,bt,p(e.formatValue?e.formatValue(e.value):`${(e.value*100).toFixed(e.precision)}${e.unit}`),1)])):a(``,!0),M(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 p-1 dark:bg-neutral-700`,style:E({height:`${e.height}px`})},[(b(!0),j(ne,null,f(n.value,(t,n)=>(b(),j(`div`,{key:`threshold-${n}`,class:O([`flex-1 rounded-sm transition-all`,[t.isThreshold?e.thresholdBarClass:t.isAboveThreshold?e.aboveThresholdClass:t.isBelowThreshold?e.belowThresholdClass:e.inactiveBarClass,`duration-${e.animationSpeed}`]]),style:E({height:t.active||t.isThreshold?`100%`:`20%`})},null,6))),128))],4),e.showLegend?(b(),j(`div`,xt,[M(`span`,St,[M(`div`,{class:O(`inline-block h-0.5lh w-1lh rounded-full ${e.belowThresholdClass}`)},null,2),m(` `+p(e.belowLabel),1)]),M(`span`,Ct,[M(`div`,{class:O(`inline-block h-0.5lh w-1lh rounded-full border border-neutral-400 ${e.thresholdBarClass}`)},null,2),m(` `+p(e.thresholdLabel),1)]),M(`span`,wt,[M(`div`,{class:O(`inline-block h-0.5lh w-1lh rounded-full ${e.aboveThresholdClass}`)},null,2),m(` `+p(e.aboveLabel),1)])])):a(``,!0)]))}});function Et(e){return{color:e,withAlpha:t=>{let n=Ze(e);if(!n)throw Error(`Invalid color provided for alpha adjustment`);return Et(Ze({mode:`oklch`,l:n.l,c:n.c,h:n.h,alpha:t}))},toHex:()=>Xe(e),toCSS:()=>Ye(e)}}function Dt(e=200,t){let n=t??.18+Math.cos(e*Math.PI/180)*.04,r={50:{lightness:.95,chromaMultiplier:.3,mixWithWhite:.7},100:{lightness:.95,chromaMultiplier:.5,mixWithWhite:.2},200:{lightness:.9,chromaMultiplier:.6},300:{lightness:.85,chromaMultiplier:.75},400:{lightness:.74,chromaMultiplier:.85},500:{lightness:.62,chromaMultiplier:1},600:{lightness:.54,chromaMultiplier:1.15},700:{lightness:.49,chromaMultiplier:1.1},800:{lightness:.42,chromaMultiplier:.85},900:{lightness:.37,chromaMultiplier:.7},950:{lightness:.29,chromaMultiplier:.5}},i=(t,i,a=0)=>{let o=r[t],s=(e+a)%360,c=n*o.chromaMultiplier,l=Ze({mode:`oklch`,l:o.lightness,c,h:s,alpha:i??1});return o.mixWithWhite?Et(Ot(l,Ze({mode:`oklch`,l:1,c:0,h:0,alpha:i??1}),o.mixWithWhite)):Et(l)};return{baseHue:e,chroma:n,getAllShades:(e,t=0)=>{let n={};for(let a of Object.keys(r)){let r=Number.parseInt(a);n[r]=i(r,e,t)}return n},shadeBy:i}}function Ot(e,t,n=.5){let r=Ze(e),i=Ze(t);if(!r||!i)throw Error(`Invalid colors provided for mixing`);return Ze({mode:`oklch`,l:r.l*(1-n)+i.l*n,c:r.c*(1-n)+i.c*n,h:kt(r.h??0,i.h??0,n)})}function kt(e,t,n){let r=t-e;return r>180&&(r-=360),r<-180&&(r+=360),(e+r*n+360)%360}const At=Symbol(`@proj-airi/chromatic-hue`);function jt(e,t){return{role:`system`,content:[e,he.map(e=>`- ${e}`).join(`
3
  `),t].join(`
4
 
5
  `)}}var Mt=jt;const Nt=`<|llm_inference_end|>`;var Pt={key:0,class:`flex items-center justify-between`},Ft={class:`text-sm font-medium`},It={class:`text-xs text-neutral-500`},Lt={class:`h-full w-full`},Rt={id:`below-threshold-gradient`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},zt=[`fill`],Bt=[`y`,`height`,`fill`],Vt=[`y1`,`y2`,`stroke`,`fill`],Ht=[`d`,`fill`],Ut=[`d`,`stroke`,`stroke-width`],Wt={key:0,class:`absolute left-2 top-2 flex items-center gap-1.5 border border-primary-200 rounded-md bg-primary-50 px-2 py-1 dark:border-primary-800 dark:bg-primary-900`},Gt={class:`text-xs text-primary-700 font-medium dark:text-primary-300`},Kt={key:1,class:`flex flex-wrap items-center justify-between text-xs text-neutral-500`},qt={class:`flex items-center gap-3`},Jt={class:`flex items-center gap-1 text-nowrap`},Yt={class:`flex items-center gap-1 text-nowrap`},Xt={key:0,class:`text-nowrap`},Zt=Le(r({__name:`TimeSeriesChart`,props:{history:{},currentValue:{},threshold:{default:null},isActive:{type:Boolean},title:{default:`Time Series`},colorsHue:{},lineColor:{},thresholdColor:{},activeColor:{},inactiveColor:{},subtitle:{default:`Recent data`},activeLabel:{default:`Active`},activeLegendLabel:{default:`Active state`},inactiveLegendLabel:{default:`Inactive state`},thresholdLabel:{default:`Threshold`},height:{default:80},lineWidth:{default:1.5},chartHeight:{},minDataPoints:{default:5},precision:{default:0},unit:{default:`%`},showHeader:{type:Boolean,default:!0},showThreshold:{type:Boolean,default:!0},showArea:{type:Boolean,default:!0},showThresholdAreas:{type:Boolean,default:!0},showCurrentValue:{type:Boolean,default:!0},showActiveIndicator:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},formatValue:{}},setup(e){let t=e,n=C(()=>t.height),r=N(),i=c(At,220.44),o=se(()=>t.colorsHue||i||220.44),s=C(()=>Dt(o.value)),l=We(r,{windowResize:!0});ae([o,r],()=>{r.value&&r.value.style.setProperty(`--chromatic-hue`,o.value.toString())},{immediate:!0});let u=se(()=>t.lineColor),d=C(()=>u.value?u.value:s.value.shadeBy(500).toHex()),f=se(()=>t.thresholdColor),h=C(()=>{if(!f.value){let e=s.value.shadeBy(500).withAlpha(.1).color;return`oklch(${e.l} ${e.c} ${e.h} / ${e.alpha})`}return f.value}),g=se(()=>t.activeColor),_=C(()=>g.value?g.value:s.value.shadeBy(600).toHex()),v=se(()=>t.inactiveColor),y=C(()=>v.value?v.value:s.value.shadeBy(400).toHex()),x=Math.random().toString(36).substring(2,9),S=`grid-${x}`,ee=`area-gradient-${x}`,w=`threshold-gradient-${x}`,T=C(()=>t.threshold===null?0:Math.max(0,Math.min(1,t.threshold))),te=C(()=>t.threshold===null?0:n.value-T.value*n.value),ne=C(()=>{let e=t.history;if(e.length<2)return``;let r=l.width.value,i=n.value,a=`M0,${i-e[0]*i}`;for(let t=1;t<e.length;t++){let n=t/(e.length-1)*r,o=i-e[t]*i;if(t===1)a+=` Q${n/2},${i-e[0]*i} ${n},${o}`;else{let s=((t-1)/(e.length-1)*r+n)/2,c=i-e[t-1]*i;a+=` Q${s},${c} ${n},${o}`}}return a}),re=C(()=>{let e=t.history;if(e.length<2)return``;let r=l.width.value,i=n.value,a=`M0,${i} L0,${i-e[0]*i}`;for(let t=1;t<e.length;t++){let n=t/(e.length-1)*r,o=i-e[t]*i;if(t===1)a+=` Q${n/2},${i-e[0]*i} ${n},${o}`;else{let s=((t-1)/(e.length-1)*r+n)/2,c=i-e[t-1]*i;a+=` Q${s},${c} ${n},${o}`}}return a+=` L${r},${i} Z`,a});return(t,i)=>e.history.length>e.minDataPoints?(b(),j(`div`,{key:0,ref_key:`timeSeriesChartRef`,ref:r,class:`time-series-chart space-y-3`},[e.showHeader?(b(),j(`div`,Pt,[M(`div`,Ft,p(e.title),1),M(`div`,It,p(e.subtitle),1)])):a(``,!0),M(`div`,{class:`relative overflow-hidden border border-neutral-200 rounded-lg from-neutral-50 to-neutral-100 bg-gradient-to-b dark:border-neutral-800 dark:from-neutral-800 dark:to-neutral-900`,style:E({height:`${n.value}px`})},[(b(),j(`svg`,Lt,[M(`defs`,null,[M(`pattern`,{id:S,width:`20`,height:`10`,patternUnits:`userSpaceOnUse`},[...i[0]||=[M(`path`,{d:`M 20 0 L 0 0 0 10`,fill:`none`,stroke:`rgb(156 163 175 / 0.1)`,"stroke-width":`0.5`},null,-1)]]),M(`linearGradient`,{id:ee,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[M(`stop`,{offset:`0%`,style:E(`stop-color:${d.value};stop-opacity:0.3`)},null,4),M(`stop`,{offset:`50%`,style:E(`stop-color:${d.value};stop-opacity:0.15`)},null,4),M(`stop`,{offset:`100%`,style:E(`stop-color:${d.value};stop-opacity:0.05`)},null,4)]),M(`linearGradient`,{id:w,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[M(`stop`,{offset:`0%`,style:E(`stop-color:${_.value};stop-opacity:0.3`)},null,4),M(`stop`,{offset:`50%`,style:E(`stop-color:${_.value};stop-opacity:0.15`)},null,4),M(`stop`,{offset:`100%`,style:E(`stop-color:${_.value};stop-opacity:0.05`)},null,4)]),M(`linearGradient`,Rt,[M(`stop`,{offset:`0%`,style:E(`stop-color:${h.value};stop-opacity:0.2`)},null,4),M(`stop`,{offset:`50%`,style:E(`stop-color:${h.value};stop-opacity:0.1`)},null,4),M(`stop`,{offset:`100%`,style:E(`stop-color:${h.value};stop-opacity:0.05`)},null,4)])]),M(`rect`,{width:`100%`,height:`100%`,fill:`url(#${S})`},null,8,zt),e.showThreshold&&e.threshold!==null?(b(),j(`rect`,{key:0,x:`0`,y:te.value,width:`100%`,height:n.value-te.value,fill:h.value,class:`transition-all duration-300`},null,8,Bt)):a(``,!0),e.showThreshold&&e.threshold!==null?(b(),j(`line`,{key:1,x1:`0`,y1:te.value,x2:`100%`,y2:te.value,stroke:h.value,"stroke-width":`1.5`,"stroke-dasharray":`4,4`,fill:h.value,class:`transition-all duration-300`},null,8,Vt)):a(``,!0),re.value&&e.showArea?(b(),j(`path`,{key:2,d:re.value,fill:`url(#${ee})`,class:`transition-all duration-75`},null,8,Ht)):a(``,!0),ne.value?(b(),j(`path`,{key:3,d:ne.value,fill:`none`,stroke:d.value,"stroke-width":e.lineWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`drop-shadow-sm transition-all duration-75`},null,8,Ut)):a(``,!0)])),e.showCurrentValue?(b(),j(`div`,{key:0,class:O([`absolute right-2 top-2 border border-neutral-200 rounded-md bg-white px-2 py-1 shadow-sm transition-all duration-200 dark:border-neutral-700 dark:bg-neutral-800`,e.isActive?`bg-primary-50 dark:bg-primary-900 border-primary-200 dark:border-primary-800`:``])},[M(`div`,{class:O([`text-xs font-medium`,e.isActive?`text-primary-700 dark:text-primary-300`:`text-neutral-600 dark:text-neutral-400`])},p(e.formatValue?e.formatValue(e.currentValue):`${(e.currentValue*100).toFixed(e.precision)}${e.unit}`),3)],2)):a(``,!0),D(ie,{name:`fade`},{default:A(()=>[e.isActive&&e.showActiveIndicator?(b(),j(`div`,Wt,[i[1]||=M(`div`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-500`},null,-1),M(`span`,Gt,p(e.activeLabel),1)])):a(``,!0)]),_:1})],4),e.showLegend?(b(),j(`div`,Kt,[M(`div`,qt,[M(`span`,Jt,[M(`div`,{class:`h-2 w-2 rounded-full`,style:E({backgroundColor:_.value})},null,4),m(` `+p(e.activeLegendLabel),1)]),M(`span`,Yt,[M(`div`,{class:`h-2 w-2 rounded-full`,style:E({backgroundColor:y.value})},null,4),m(` `+p(e.inactiveLegendLabel),1)])]),e.threshold===null?a(``,!0):(b(),j(`span`,Xt,p(e.thresholdLabel)+`: `+p((e.threshold*100).toFixed(0))+`%`,1))])):a(``,!0)],512)):a(``,!0)}}),[[`__scopeId`,`data-v-3b2e411d`]]),{entries:Qt,setPrototypeOf:$t,isFrozen:en,getPrototypeOf:tn,getOwnPropertyDescriptor:nn}=Object,{freeze:rn,seal:an,create:on}=Object,{apply:sn,construct:cn}=typeof Reflect<`u`&&Reflect;rn||=function(e){return e},an||=function(e){return e},sn||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},cn||=function(e){return new e(...[...arguments].slice(1))};var ln=Cn(Array.prototype.forEach),un=Cn(Array.prototype.lastIndexOf),dn=Cn(Array.prototype.pop),fn=Cn(Array.prototype.push),pn=Cn(Array.prototype.splice),mn=Cn(String.prototype.toLowerCase),hn=Cn(String.prototype.toString),gn=Cn(String.prototype.match),_n=Cn(String.prototype.replace),vn=Cn(String.prototype.indexOf),yn=Cn(String.prototype.trim),bn=Cn(Object.prototype.hasOwnProperty),xn=Cn(RegExp.prototype.test),Sn=wn(TypeError);function Cn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return sn(e,t,n)}}function wn(e){return function(){return cn(e,[...arguments])}}function Tn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mn;$t&&$t(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(en(t)||(t[r]=e),i=e)}e[i]=!0}return e}function En(e){for(let t=0;t<e.length;t++)bn(e,t)||(e[t]=null);return e}function Dn(e){let t=on(null);for(let[n,r]of Qt(e))bn(e,n)&&(Array.isArray(r)?t[n]=En(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=Dn(r):t[n]=r);return t}function On(e,t){for(;e!==null;){let n=nn(e,t);if(n){if(n.get)return Cn(n.get);if(typeof n.value==`function`)return Cn(n.value)}e=tn(e)}function n(){return null}return n}var kn=rn(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),An=rn(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),jn=rn([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Mn=rn([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Nn=rn(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Pn=rn([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Fn=rn([`#text`]),In=rn(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),Ln=rn(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Rn=rn(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),zn=rn([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Bn=an(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Vn=an(/<%[\w\W]*|[\w\W]*%>/gm),Hn=an(/\$\{[\w\W]*/gm),Un=an(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wn=an(/^aria-[\-\w]+$/),Gn=an(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Kn=an(/^(?:\w+script|data):/i),qn=an(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jn=an(/^html$/i),Yn=an(/^[a-z][.\w]*(-[.\w]+)+$/i),Xn=Object.freeze({__proto__:null,ARIA_ATTR:Wn,ATTR_WHITESPACE:qn,CUSTOM_ELEMENT:Yn,DATA_ATTR:Un,DOCTYPE_NAME:Jn,ERB_EXPR:Vn,IS_ALLOWED_URI:Gn,IS_SCRIPT_OR_DATA:Kn,MUSTACHE_EXPR:Bn,TMPLIT_EXPR:Hn}),Zn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Qn=function(){return typeof window>`u`?null:window},$n=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},er=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function tr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qn(),t=e=>tr(e);if(t.version=`3.3.0`,t.removed=[],!e||!e.document||e.document.nodeType!==Zn.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=On(m,`cloneNode`),g=On(m,`remove`),_=On(m,`nextSibling`),v=On(m,`childNodes`),y=On(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:ee,getElementsByTagName:w}=n,{importNode:T}=r,E=er();t.isSupported=typeof Qt==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:D,ERB_EXPR:O,TMPLIT_EXPR:te,DATA_ATTR:ne,ARIA_ATTR:re,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:k,CUSTOM_ELEMENT:ae}=Xn,{IS_ALLOWED_URI:oe}=Xn,A=null,j=Tn({},[...kn,...An,...jn,...Nn,...Fn]),se=null,M=Tn({},[...In,...Ln,...Rn,...zn]),N=Object.seal(on(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ce=null,le=null,ue=Object.seal(on(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),de=!0,fe=!0,pe=!1,me=!0,he=!1,ge=!0,_e=!1,ve=!1,ye=!1,be=!1,xe=!1,Se=!1,Ce=!0,we=!1,Te=!0,Ee=!1,De={},Oe=null,ke=Tn({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ae=null,je=Tn({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Me=null,Ne=Tn({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Pe=`http://www.w3.org/1998/Math/MathML`,Fe=`http://www.w3.org/2000/svg`,P=`http://www.w3.org/1999/xhtml`,Ie=P,Le=!1,Re=null,ze=Tn({},[Pe,Fe,P],hn),Be=Tn({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Ve=Tn({},[`annotation-xml`]),He=Tn({},[`title`,`style`,`font`,`a`,`script`]),Ue=null,We=[`application/xhtml+xml`,`text/html`],Ge=null,Ke=null,qe=n.createElement(`form`),Je=function(e){return e instanceof RegExp||e instanceof Function},Ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ke&&Ke===e)){if((!e||typeof e!=`object`)&&(e={}),e=Dn(e),Ue=We.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Ge=Ue===`application/xhtml+xml`?hn:mn,A=bn(e,`ALLOWED_TAGS`)?Tn({},e.ALLOWED_TAGS,Ge):j,se=bn(e,`ALLOWED_ATTR`)?Tn({},e.ALLOWED_ATTR,Ge):M,Re=bn(e,`ALLOWED_NAMESPACES`)?Tn({},e.ALLOWED_NAMESPACES,hn):ze,Me=bn(e,`ADD_URI_SAFE_ATTR`)?Tn(Dn(Ne),e.ADD_URI_SAFE_ATTR,Ge):Ne,Ae=bn(e,`ADD_DATA_URI_TAGS`)?Tn(Dn(je),e.ADD_DATA_URI_TAGS,Ge):je,Oe=bn(e,`FORBID_CONTENTS`)?Tn({},e.FORBID_CONTENTS,Ge):ke,ce=bn(e,`FORBID_TAGS`)?Tn({},e.FORBID_TAGS,Ge):Dn({}),le=bn(e,`FORBID_ATTR`)?Tn({},e.FORBID_ATTR,Ge):Dn({}),De=bn(e,`USE_PROFILES`)?e.USE_PROFILES:!1,de=e.ALLOW_ARIA_ATTR!==!1,fe=e.ALLOW_DATA_ATTR!==!1,pe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,me=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,he=e.SAFE_FOR_TEMPLATES||!1,ge=e.SAFE_FOR_XML!==!1,_e=e.WHOLE_DOCUMENT||!1,be=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Se=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,Ce=e.SANITIZE_DOM!==!1,we=e.SANITIZE_NAMED_PROPS||!1,Te=e.KEEP_CONTENT!==!1,Ee=e.IN_PLACE||!1,oe=e.ALLOWED_URI_REGEXP||Gn,Ie=e.NAMESPACE||P,Be=e.MATHML_TEXT_INTEGRATION_POINTS||Be,Ve=e.HTML_INTEGRATION_POINTS||Ve,N=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Je(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Je(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(N.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),he&&(fe=!1),xe&&(be=!0),De&&(A=Tn({},Fn),se=[],De.html===!0&&(Tn(A,kn),Tn(se,In)),De.svg===!0&&(Tn(A,An),Tn(se,Ln),Tn(se,zn)),De.svgFilters===!0&&(Tn(A,jn),Tn(se,Ln),Tn(se,zn)),De.mathMl===!0&&(Tn(A,Nn),Tn(se,Rn),Tn(se,zn))),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?ue.tagCheck=e.ADD_TAGS:(A===j&&(A=Dn(A)),Tn(A,e.ADD_TAGS,Ge))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?ue.attributeCheck=e.ADD_ATTR:(se===M&&(se=Dn(se)),Tn(se,e.ADD_ATTR,Ge))),e.ADD_URI_SAFE_ATTR&&Tn(Me,e.ADD_URI_SAFE_ATTR,Ge),e.FORBID_CONTENTS&&(Oe===ke&&(Oe=Dn(Oe)),Tn(Oe,e.FORBID_CONTENTS,Ge)),Te&&(A[`#text`]=!0),_e&&Tn(A,[`html`,`head`,`body`]),A.table&&(Tn(A,[`tbody`]),delete ce.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Sn(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Sn(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=$n(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));rn&&rn(e),Ke=e}},Xe=Tn({},[...An,...jn,...Mn]),Ze=Tn({},[...Nn,...Pn]),Qe=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ie,tagName:`template`});let n=mn(e.tagName),r=mn(t.tagName);return Re[e.namespaceURI]?e.namespaceURI===Fe?t.namespaceURI===P?n===`svg`:t.namespaceURI===Pe?n===`svg`&&(r===`annotation-xml`||Be[r]):!!Xe[n]:e.namespaceURI===Pe?t.namespaceURI===P?n===`math`:t.namespaceURI===Fe?n===`math`&&Ve[r]:!!Ze[n]:e.namespaceURI===P?t.namespaceURI===Fe&&!Ve[r]||t.namespaceURI===Pe&&!Be[r]?!1:!Ze[n]&&(He[n]||!Xe[n]):!!(Ue===`application/xhtml+xml`&&Re[e.namespaceURI]):!1},$e=function(e){fn(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},et=function(e,n){try{fn(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{fn(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(be||xe)try{$e(n)}catch{}else try{n.setAttribute(e,``)}catch{}},tt=function(e){let t=null,r=null;if(ye)e=`<remove></remove>`+e;else{let t=gn(e,/^[\r\n\t ]+/);r=t&&t[0]}Ue===`application/xhtml+xml`&&Ie===P&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(Ie===P)try{t=new f().parseFromString(i,Ue)}catch{}if(!t||!t.documentElement){t=S.createDocument(Ie,`template`,null);try{t.documentElement.innerHTML=Le?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ie===P?w.call(t,_e?`html`:`body`)[0]:_e?t.documentElement:a},nt=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},rt=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},it=function(e){return typeof s==`function`&&e instanceof s};function at(e,n,r){ln(e,e=>{e.call(t,n,r,Ke)})}let ot=function(e){let n=null;if(at(E.beforeSanitizeElements,e,null),rt(e))return $e(e),!0;let r=Ge(e.nodeName);if(at(E.uponSanitizeElement,e,{tagName:r,allowedTags:A}),ge&&e.hasChildNodes()&&!it(e.firstElementChild)&&xn(/<[/\w!]/g,e.innerHTML)&&xn(/<[/\w!]/g,e.textContent)||e.nodeType===Zn.progressingInstruction||ge&&e.nodeType===Zn.comment&&xn(/<[/\w]/g,e.data))return $e(e),!0;if(!(ue.tagCheck instanceof Function&&ue.tagCheck(r))&&(!A[r]||ce[r])){if(!ce[r]&&ct(r)&&(N.tagNameCheck instanceof RegExp&&xn(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r)))return!1;if(Te&&!Oe[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return $e(e),!0}return e instanceof c&&!Qe(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&xn(/<\/no(script|embed|frames)/i,e.innerHTML)?($e(e),!0):(he&&e.nodeType===Zn.text&&(n=e.textContent,ln([D,O,te],e=>{n=_n(n,e,` `)}),e.textContent!==n&&(fn(t.removed,{element:e.cloneNode()}),e.textContent=n)),at(E.afterSanitizeElements,e,null),!1)},st=function(e,t,r){if(Ce&&(t===`id`||t===`name`)&&(r in n||r in qe))return!1;if(!(fe&&!le[t]&&xn(ne,t))&&!(de&&xn(re,t))&&!(ue.attributeCheck instanceof Function&&ue.attributeCheck(t,e))){if(!se[t]||le[t]){if(!(ct(e)&&(N.tagNameCheck instanceof RegExp&&xn(N.tagNameCheck,e)||N.tagNameCheck instanceof Function&&N.tagNameCheck(e))&&(N.attributeNameCheck instanceof RegExp&&xn(N.attributeNameCheck,t)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(t,e))||t===`is`&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&xn(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r))))return!1}else if(!Me[t]&&!xn(oe,_n(r,k,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&vn(r,`data:`)===0&&Ae[e])&&!(pe&&!xn(ie,_n(r,k,``)))&&r)return!1}return!0},ct=function(e){return e!==`annotation-xml`&&gn(e,ae)},lt=function(e){at(E.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||rt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:se,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=Ge(a),l=s,u=a===`value`?l:yn(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,at(E.uponSanitizeAttribute,e,r),u=r.attrValue,we&&(c===`id`||c===`name`)&&(et(a,e),u=`user-content-`+u),ge&&xn(/((--!?|])>)|<\/(style|title|textarea)/i,u)){et(a,e);continue}if(c===`attributename`&&gn(u,`href`)){et(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){et(a,e);continue}if(!me&&xn(/\/>/i,u)){et(a,e);continue}he&&ln([D,O,te],e=>{u=_n(u,e,` `)});let d=Ge(e.nodeName);if(!st(d,c,u)){et(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),rt(e)?$e(e):dn(t.removed)}catch{et(a,e)}}at(E.afterSanitizeAttributes,e,null)},ut=function e(t){let n=null,r=nt(t);for(at(E.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)at(E.uponSanitizeShadowNode,n,null),ot(n),lt(n),n.content instanceof a&&e(n.content);at(E.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(Le=!e,Le&&(e=`<!-->`),typeof e!=`string`&&!it(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Sn(`dirty is not a string, aborting`)}else throw Sn(`toString is not a function`);if(!t.isSupported)return e;if(ve||Ye(n),t.removed=[],typeof e==`string`&&(Ee=!1),Ee){if(e.nodeName){let t=Ge(e.nodeName);if(!A[t]||ce[t])throw Sn(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=tt(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===Zn.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!be&&!he&&!_e&&e.indexOf(`<`)===-1)return b&&Se?b.createHTML(e):e;if(i=tt(e),!i)return be?null:Se?x:``}i&&ye&&$e(i.firstChild);let u=nt(Ee?e:i);for(;c=u.nextNode();)ot(c),lt(c),c.content instanceof a&&ut(c.content);if(Ee)return e;if(be){if(xe)for(l=ee.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(se.shadowroot||se.shadowrootmode)&&(l=T.call(r,l,!0)),l}let d=_e?i.outerHTML:i.innerHTML;return _e&&A[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&xn(Jn,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
assets/{consciousness-ArDiPgp6.js → consciousness-knrJPCa_.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,K as r,Mt as i,O as a,S as o,W as s,Y as ee,ct as c,k as l,l as te,m as u,mt as d,rt as f,st as p,w as m,x as h}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as g,l as _}from"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import{I as v}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import{t as y}from"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as ne,Q as re,Tt as ie,wt as ae}from"./components-BoQNNhDi.js";import{n as oe}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as b}from"./route-block-B7Ro39Uj.js";var se={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},x={flex:`~ col gap-4`},S={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},C={text:`neutral-400 dark:neutral-400`},w={"max-w-full":``},T={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},E={key:1},D={key:0},O={flex:`~ col gap-4`},k={class:`text-lg md:text-2xl`},A={text:`neutral-400 dark:neutral-400`},j={key:0,class:`flex items-center justify-center py-4`},M={key:1},N={flex:`~ col gap-4`},P={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},F={text:`neutral-400 dark:neutral-500`},I={class:`flex items-center gap-3 border border-primary-200 rounded-lg bg-primary-50 p-4 dark:border-primary-800 dark:bg-primary-900/20`},ce={class:`flex flex-col`},L={class:`font-medium`},R={class:`text-sm text-primary-600 dark:text-primary-400`},z={class:`mt-2`},B={class:`mb-1 block text-sm font-medium`},V=[`placeholder`],H={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},U=e({__name:`consciousness`,setup(e){let b=ne(),U=re(),{configuredChatProvidersMetadata:W}=v(b),{activeProvider:G,activeModel:K,customModelName:le,modelSearchQuery:q,supportsModelListing:J,providerModels:Y,isLoadingActiveProviderModels:X,activeProviderModelError:Z}=v(U),{t:Q}=oe();f(G,async e=>{await U.loadModelsForProvider(e)},{immediate:!0});function $(e){le.value=e}return(e,f)=>{let v=ee(`motion`);return s(),m(u,null,[h(`div`,se,[h(`div`,null,[h(`div`,x,[h(`div`,null,[h(`h2`,S,i(n(Q)(`settings.pages.providers.title`)),1),h(`div`,C,[h(`span`,null,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),h(`div`,w,[n(W).length>0?(s(),m(`fieldset`,T,[(s(!0),m(u,null,r(n(W),e=>(s(),o(n(ae),{id:e.id,key:e.id,modelValue:n(G),"onUpdate:modelValue":f[0]||=e=>d(G)?G.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128)),l(n(y),{to:`/settings/providers`,border:`2px solid`,class:`border-neutral-100 bg-white dark:border-neutral-900 hover:border-primary-500/30 dark:bg-neutral-900/20 dark:hover:border-primary-400/30`,flex:`~ col items-center justify-center`,transition:`all duration-200 ease-in-out`,relative:``,"min-w-50":``,"w-fit":``,"rounded-xl":``,"p-4":``},{default:p(()=>[...f[4]||=[h(`div`,{"i-solar:add-circle-line-duotone":``,class:`text-2xl text-neutral-500 dark:text-neutral-500`},null,-1),h(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)]]),_:1})])):(s(),m(`div`,E,[l(n(y),{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:p(()=>[...f[5]||=[h(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),h(`div`,{class:`flex flex-col`},[h(`span`,{class:`font-medium`},`No Providers Configured`),h(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),h(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]]),_:1})]))])])]),n(G)&&n(J)?(s(),m(`div`,D,[h(`div`,O,[h(`div`,null,[h(`h2`,k,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),h(`div`,A,[h(`span`,null,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),n(X)?(s(),m(`div`,j,[f[6]||=h(`div`,{class:`mr-2 animate-spin`},[h(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),h(`span`,null,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):n(Z)?(s(),o(n(_),{key:1,title:n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:n(Z)},null,8,[`title`,`error`])):n(Y).length===0&&!n(X)?(s(),o(n(g),{key:2,type:`warning`},{title:p(()=>[a(i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:p(()=>[a(i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):n(Y).length>0?(s(),o(n(ie),{key:3,modelValue:n(K),"onUpdate:modelValue":f[1]||=e=>d(K)?K.value=e:null,"search-query":n(q),"onUpdate:searchQuery":f[2]||=e=>d(q)?q.value=e:null,items:n(Y).sort((e,t)=>e.id===n(K)?-1:t.id===n(K)?1:0),searchable:!0,"search-placeholder":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:n(q)}),"search-results-text":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":$},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`])):t(``,!0)])])):n(G)&&!n(J)?(s(),m(`div`,M,[h(`div`,N,[h(`div`,null,[h(`h2`,P,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),h(`div`,F,[h(`span`,null,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),h(`div`,I,[f[7]||=h(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),h(`div`,ce,[h(`span`,L,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),h(`span`,R,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),h(`div`,z,[h(`label`,B,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),c(h(`input`,{"onUpdate:modelValue":f[3]||=e=>d(K)?K.value=e: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:n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,V),[[te,n(K)]])])])])):t(``,!0)]),c((s(),m(`div`,H,[...f[8]||=[h(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)]])),[[v]])],64)}}});typeof b==`function`&&b(U);var W=U;export{W as default};
 
1
+ import{A as e,C as t,Dt as n,K as r,Mt as i,O as a,S as o,W as s,Y as ee,ct as c,k as l,l as te,m as u,mt as d,rt as f,st as p,w as m,x as h}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as g,l as _}from"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import{I as v}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import{t as y}from"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as ne,Q as re,Tt as ie,wt as ae}from"./components-BaJFFT8H.js";import{n as oe}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as b}from"./route-block-B7Ro39Uj.js";var se={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},x={flex:`~ col gap-4`},S={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},C={text:`neutral-400 dark:neutral-400`},w={"max-w-full":``},T={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},E={key:1},D={key:0},O={flex:`~ col gap-4`},k={class:`text-lg md:text-2xl`},A={text:`neutral-400 dark:neutral-400`},j={key:0,class:`flex items-center justify-center py-4`},M={key:1},N={flex:`~ col gap-4`},P={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},F={text:`neutral-400 dark:neutral-500`},I={class:`flex items-center gap-3 border border-primary-200 rounded-lg bg-primary-50 p-4 dark:border-primary-800 dark:bg-primary-900/20`},ce={class:`flex flex-col`},L={class:`font-medium`},R={class:`text-sm text-primary-600 dark:text-primary-400`},z={class:`mt-2`},B={class:`mb-1 block text-sm font-medium`},V=[`placeholder`],H={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},U=e({__name:`consciousness`,setup(e){let b=ne(),U=re(),{configuredChatProvidersMetadata:W}=v(b),{activeProvider:G,activeModel:K,customModelName:le,modelSearchQuery:q,supportsModelListing:J,providerModels:Y,isLoadingActiveProviderModels:X,activeProviderModelError:Z}=v(U),{t:Q}=oe();f(G,async e=>{await U.loadModelsForProvider(e)},{immediate:!0});function $(e){le.value=e}return(e,f)=>{let v=ee(`motion`);return s(),m(u,null,[h(`div`,se,[h(`div`,null,[h(`div`,x,[h(`div`,null,[h(`h2`,S,i(n(Q)(`settings.pages.providers.title`)),1),h(`div`,C,[h(`span`,null,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),h(`div`,w,[n(W).length>0?(s(),m(`fieldset`,T,[(s(!0),m(u,null,r(n(W),e=>(s(),o(n(ae),{id:e.id,key:e.id,modelValue:n(G),"onUpdate:modelValue":f[0]||=e=>d(G)?G.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128)),l(n(y),{to:`/settings/providers`,border:`2px solid`,class:`border-neutral-100 bg-white dark:border-neutral-900 hover:border-primary-500/30 dark:bg-neutral-900/20 dark:hover:border-primary-400/30`,flex:`~ col items-center justify-center`,transition:`all duration-200 ease-in-out`,relative:``,"min-w-50":``,"w-fit":``,"rounded-xl":``,"p-4":``},{default:p(()=>[...f[4]||=[h(`div`,{"i-solar:add-circle-line-duotone":``,class:`text-2xl text-neutral-500 dark:text-neutral-500`},null,-1),h(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)]]),_:1})])):(s(),m(`div`,E,[l(n(y),{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:p(()=>[...f[5]||=[h(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),h(`div`,{class:`flex flex-col`},[h(`span`,{class:`font-medium`},`No Providers Configured`),h(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),h(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]]),_:1})]))])])]),n(G)&&n(J)?(s(),m(`div`,D,[h(`div`,O,[h(`div`,null,[h(`h2`,k,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),h(`div`,A,[h(`span`,null,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),n(X)?(s(),m(`div`,j,[f[6]||=h(`div`,{class:`mr-2 animate-spin`},[h(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),h(`span`,null,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):n(Z)?(s(),o(n(_),{key:1,title:n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:n(Z)},null,8,[`title`,`error`])):n(Y).length===0&&!n(X)?(s(),o(n(g),{key:2,type:`warning`},{title:p(()=>[a(i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:p(()=>[a(i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):n(Y).length>0?(s(),o(n(ie),{key:3,modelValue:n(K),"onUpdate:modelValue":f[1]||=e=>d(K)?K.value=e:null,"search-query":n(q),"onUpdate:searchQuery":f[2]||=e=>d(q)?q.value=e:null,items:n(Y).sort((e,t)=>e.id===n(K)?-1:t.id===n(K)?1:0),searchable:!0,"search-placeholder":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:n(q)}),"search-results-text":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":$},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`])):t(``,!0)])])):n(G)&&!n(J)?(s(),m(`div`,M,[h(`div`,N,[h(`div`,null,[h(`h2`,P,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),h(`div`,F,[h(`span`,null,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),h(`div`,I,[f[7]||=h(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),h(`div`,ce,[h(`span`,L,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),h(`span`,R,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),h(`div`,z,[h(`label`,B,i(n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),c(h(`input`,{"onUpdate:modelValue":f[3]||=e=>d(K)?K.value=e: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:n(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,V),[[te,n(K)]])])])])):t(``,!0)]),c((s(),m(`div`,H,[...f[8]||=[h(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)]])),[[v]])],64)}}});typeof b==`function`&&b(U);var W=U;export{W as default};
assets/{developer-DO7XE69u.js → developer-pVobF-7Q.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,K as n,S as r,W as i,Y as a,b as o,ct as s,jt as c,k as l,m as u,w as d,x as f}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import{n as p}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{Dt as m,n as h}from"./components-BoQNNhDi.js";import{n as g}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as _}from"./route-block-B7Ro39Uj.js";var v={flex:`~ col gap-4`,"pb-12":``},y={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``},b=e({__name:`developer`,setup(e){let{t:_}=g(),b=p(),x=o(()=>[{title:`Audio Record`,description:`Test Audio related composables`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/audio-record`},{title:`Background Theme color blending`,description:`Test blending & theme`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/background-gradient-blending`},{title:`Background removal (WebGPU required)`,description:`Utility for background removal`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/background-removal`},{title:`Chat`,description:`Chat`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/chat`},{title:`Gesture Circle (Desktop only)`,description:`Test gesture recognition`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/gesture-circle`},{title:`Image`,description:`Image`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/image`},{title:`Polaroid`,description:`Utility for taking shots of models`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/polaroid`},{title:_(`settings.pages.system.sections.section.developer.sections.section.use-magic-keys.title`),description:_(`settings.pages.system.sections.section.developer.sections.section.use-magic-keys.description`),icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/use-magic-keys`},{title:`Color extract`,description:`Test color extraction`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/vibrant`},{title:`Aliyun Real-time Transcriber`,description:`Stream microphone audio to Aliyun NLS and inspect live transcripts`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/providers-transcription-realtime-aliyun-nls`}]);return(e,o)=>{let p=a(`motion`);return i(),d(u,null,[s(l(t(h),{modelValue:t(b).disableTransitions,"onUpdate:modelValue":o[0]||=e=>t(b).disableTransitions=e,"mb-2":``,"icon-on":`i-solar:people-nearby-bold-duotone`,"icon-off":`i-solar:running-2-line-duotone`,text:`settings.animations.stage-transitions.title`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:440,delay:50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[p]]),s(l(t(h),{modelValue:t(b).usePageSpecificTransitions,"onUpdate:modelValue":o[1]||=e=>t(b).usePageSpecificTransitions=e,disabled:t(b).disableTransitions,"icon-on":`i-solar:running-2-line-duotone`,"icon-off":`i-solar:people-nearby-bold-duotone`,text:`settings.animations.use-page-specific-transitions.title`,description:`settings.animations.use-page-specific-transitions.description`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:450,delay:100,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[p]]),f(`div`,v,[(i(!0),d(u,null,n(x.value,(e,n)=>s((i(),r(t(m),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:c({transitionDelay:`${n*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[p]])),128))]),s((i(),d(`div`,y,[...o[2]||=[f(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)]])),[[p]])],64)}}});typeof _==`function`&&_(b);var x=b;export{x as default};
 
1
+ import{A as e,Dt as t,K as n,S as r,W as i,Y as a,b as o,ct as s,jt as c,k as l,m as u,w as d,x as f}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import{n as p}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{Dt as m,n as h}from"./components-BaJFFT8H.js";import{n as g}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as _}from"./route-block-B7Ro39Uj.js";var v={flex:`~ col gap-4`,"pb-12":``},y={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``},b=e({__name:`developer`,setup(e){let{t:_}=g(),b=p(),x=o(()=>[{title:`Audio Record`,description:`Test Audio related composables`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/audio-record`},{title:`Background Theme color blending`,description:`Test blending & theme`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/background-gradient-blending`},{title:`Background removal (WebGPU required)`,description:`Utility for background removal`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/background-removal`},{title:`Chat`,description:`Chat`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/chat`},{title:`Gesture Circle (Desktop only)`,description:`Test gesture recognition`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/gesture-circle`},{title:`Image`,description:`Image`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/image`},{title:`Polaroid`,description:`Utility for taking shots of models`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/polaroid`},{title:_(`settings.pages.system.sections.section.developer.sections.section.use-magic-keys.title`),description:_(`settings.pages.system.sections.section.developer.sections.section.use-magic-keys.description`),icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/use-magic-keys`},{title:`Color extract`,description:`Test color extraction`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/vibrant`},{title:`Aliyun Real-time Transcriber`,description:`Stream microphone audio to Aliyun NLS and inspect live transcripts`,icon:`i-solar:sledgehammer-bold-duotone`,to:`/devtools/providers-transcription-realtime-aliyun-nls`}]);return(e,o)=>{let p=a(`motion`);return i(),d(u,null,[s(l(t(h),{modelValue:t(b).disableTransitions,"onUpdate:modelValue":o[0]||=e=>t(b).disableTransitions=e,"mb-2":``,"icon-on":`i-solar:people-nearby-bold-duotone`,"icon-off":`i-solar:running-2-line-duotone`,text:`settings.animations.stage-transitions.title`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:440,delay:50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[p]]),s(l(t(h),{modelValue:t(b).usePageSpecificTransitions,"onUpdate:modelValue":o[1]||=e=>t(b).usePageSpecificTransitions=e,disabled:t(b).disableTransitions,"icon-on":`i-solar:running-2-line-duotone`,"icon-off":`i-solar:people-nearby-bold-duotone`,text:`settings.animations.use-page-specific-transitions.title`,description:`settings.animations.use-page-specific-transitions.description`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:450,delay:100,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[p]]),f(`div`,v,[(i(!0),d(u,null,n(x.value,(e,n)=>s((i(),r(t(m),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:c({transitionDelay:`${n*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[p]])),128))]),s((i(),d(`div`,y,[...o[2]||=[f(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)]])),[[p]])],64)}}});typeof _==`function`&&_(b);var x=b;export{x as default};
assets/{elevenlabs-bqo4A0-p.js → elevenlabs-BdtpEP_h.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,H as n,S as r,W as i,b as a,k as o,rt as s,st as c,x as l,yt as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import{o as d,u as f}from"./src-BEKjKq3V.js";import{I as p}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,c as h,f as g,l as _}from"./components-BoQNNhDi.js";import{n as v}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as y}from"./route-block-B7Ro39Uj.js";var b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`,C=e({__name:`elevenlabs`,setup(e){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=u(0),w=u(1),T=u(0),E=u(0),D=u(.5),O=u(.75),k=u(!1),A=_(),j=m(),{providers:M}=p(j),{t:N}=v(),P=a(()=>!!M.value[x]?.apiKey),F=a(()=>A.availableVoices[x]||[]);async function I(e,t,n){let r=await j.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=j.getProviderConfig(x),a=i.model||S;return await A.speech(r,a,e,t,{...i,...y})}return n(async()=>{let e=j.getProviderConfig(x);await j.getProviderMetadata(x).validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),s(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),s(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),s(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),s(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),s(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),s(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),s(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),s(M,async()=>{let e=j.getProviderConfig(x);await j.getProviderMetadata(x).validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,n)=>(i(),r(t(h),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":c(()=>[l(`div`,b,[o(t(d),{modelValue:C.value,"onUpdate:modelValue":n[0]||=e=>C.value=e,label:t(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:t(N)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),o(t(d),{modelValue:w.value,"onUpdate:modelValue":n[1]||=e=>w.value=e,label:t(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(d),{modelValue:T.value,"onUpdate:modelValue":n[2]||=e=>T.value=e,label:t(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:t(N)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),o(t(d),{modelValue:E.value,"onUpdate:modelValue":n[3]||=e=>E.value=e,label:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(d),{modelValue:D.value,"onUpdate:modelValue":n[4]||=e=>D.value=e,label:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(d),{modelValue:O.value,"onUpdate:modelValue":n[5]||=e=>O.value=e,label:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(f),{modelValue:k.value,"onUpdate:modelValue":n[6]||=e=>k.value=e,label:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:c(()=>[o(t(g),{"available-voices":F.value,"generate-speech":I,"api-key-configured":P.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default};
 
1
+ import{A as e,Dt as t,H as n,S as r,W as i,b as a,k as o,rt as s,st as c,x as l,yt as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import{o as d,u as f}from"./src-BEKjKq3V.js";import{I as p}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,c as h,f as g,l as _}from"./components-BaJFFT8H.js";import{n as v}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as y}from"./route-block-B7Ro39Uj.js";var b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`,C=e({__name:`elevenlabs`,setup(e){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=u(0),w=u(1),T=u(0),E=u(0),D=u(.5),O=u(.75),k=u(!1),A=_(),j=m(),{providers:M}=p(j),{t:N}=v(),P=a(()=>!!M.value[x]?.apiKey),F=a(()=>A.availableVoices[x]||[]);async function I(e,t,n){let r=await j.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=j.getProviderConfig(x),a=i.model||S;return await A.speech(r,a,e,t,{...i,...y})}return n(async()=>{let e=j.getProviderConfig(x);await j.getProviderMetadata(x).validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),s(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),s(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),s(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),s(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),s(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),s(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),s(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),s(M,async()=>{let e=j.getProviderConfig(x);await j.getProviderMetadata(x).validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,n)=>(i(),r(t(h),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":c(()=>[l(`div`,b,[o(t(d),{modelValue:C.value,"onUpdate:modelValue":n[0]||=e=>C.value=e,label:t(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:t(N)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),o(t(d),{modelValue:w.value,"onUpdate:modelValue":n[1]||=e=>w.value=e,label:t(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(d),{modelValue:T.value,"onUpdate:modelValue":n[2]||=e=>T.value=e,label:t(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:t(N)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),o(t(d),{modelValue:E.value,"onUpdate:modelValue":n[3]||=e=>E.value=e,label:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(d),{modelValue:D.value,"onUpdate:modelValue":n[4]||=e=>D.value=e,label:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(d),{modelValue:O.value,"onUpdate:modelValue":n[5]||=e=>O.value=e,label:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(f),{modelValue:k.value,"onUpdate:modelValue":n[6]||=e=>k.value=e,label:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:t(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:c(()=>[o(t(g),{"available-voices":F.value,"generate-speech":I,"api-key-configured":P.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default};
assets/{gaming-factorio-B7mKyUZ5.js → gaming-factorio-CQUNLQTe.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,S as n,W as r}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{bt as i}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as a}from"./route-block-B7Ro39Uj.js";var o=e({__name:`gaming-factorio`,setup(e){return(e,a)=>(r(),n(t(i)))}});typeof a==`function`&&a(o);var s=o;export{s as default};
 
1
+ import{A as e,Dt as t,S as n,W as r}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{bt as i}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as a}from"./route-block-B7Ro39Uj.js";var o=e({__name:`gaming-factorio`,setup(e){return(e,a)=>(r(),n(t(i)))}});typeof a==`function`&&a(o);var s=o;export{s as default};
assets/{gaming-minecraft-DFjvis0-.js → gaming-minecraft-DQGY8CR-.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,S as n,W as r}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{vt as i}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as a}from"./route-block-B7Ro39Uj.js";var o=e({__name:`gaming-minecraft`,setup(e){return(e,a)=>(r(),n(t(i)))}});typeof a==`function`&&a(o);var s=o;export{s as default};
 
1
+ import{A as e,Dt as t,S as n,W as r}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{vt as i}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as a}from"./route-block-B7Ro39Uj.js";var o=e({__name:`gaming-minecraft`,setup(e){return(e,a)=>(r(),n(t(i)))}});typeof a==`function`&&a(o);var s=o;export{s as default};
assets/{general-CNxitDVY.js → general-BWog0-5k.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,W as n,Y as r,b as i,ct as a,k as o,mt as s,w as c,x as l}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{a as u,u as d}from"./src-BEKjKq3V.js";import{n as f}from"./settings-ckdWvS_B.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import{s as p}from"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{n as m}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as h}from"./route-block-B7Ro39Uj.js";const g={en:`English`,es:`Español`,fr:`Français`,ru:`Русский`,vi:`Tiếng Việt`,"zh-Hans":`简体中文`,"zh-Hant":`繁體中文`};var _={"rounded-lg":``,"bg-neutral-50":``,"p-4":``,"dark:bg-neutral-800":``,flex:`~ col gap-4`},v={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``},y=e({__name:`general`,setup(e){let h=f(),{t:y}=m(),b=p(),x=i(()=>Object.entries(g).map(([e,t])=>({value:e,label:t})));return(e,i)=>{let f=r(`motion`);return n(),c(`div`,_,[a(o(t(d),{modelValue:t(b),"onUpdate:modelValue":i[0]||=e=>s(b)?b.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:100,label:t(y)(`settings.theme.title`),description:t(y)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[f]]),a(o(t(u),{modelValue:t(h).language,"onUpdate:modelValue":i[1]||=e=>t(h).language=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:150,transition:`all ease-in-out duration-250`,label:t(y)(`settings.language.title`),description:t(y)(`settings.language.description`),options:x.value},null,8,[`modelValue`,`label`,`description`,`options`]),[[f]]),a((n(),c(`div`,v,[...i[2]||=[l(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)]])),[[f]])])}}});typeof h==`function`&&h(y);var b=y;export{b as default};
 
1
+ import{A as e,Dt as t,W as n,Y as r,b as i,ct as a,k as o,mt as s,w as c,x as l}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{a as u,u as d}from"./src-BEKjKq3V.js";import{n as f}from"./settings-CVVqd1wK.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import{s as p}from"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{n as m}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as h}from"./route-block-B7Ro39Uj.js";const g={en:`English`,es:`Español`,fr:`Français`,ru:`Русский`,vi:`Tiếng Việt`,"zh-Hans":`简体中文`,"zh-Hant":`繁體中文`};var _={"rounded-lg":``,"bg-neutral-50":``,"p-4":``,"dark:bg-neutral-800":``,flex:`~ col gap-4`},v={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``},y=e({__name:`general`,setup(e){let h=f(),{t:y}=m(),b=p(),x=i(()=>Object.entries(g).map(([e,t])=>({value:e,label:t})));return(e,i)=>{let f=r(`motion`);return n(),c(`div`,_,[a(o(t(d),{modelValue:t(b),"onUpdate:modelValue":i[0]||=e=>s(b)?b.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:100,label:t(y)(`settings.theme.title`),description:t(y)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[f]]),a(o(t(u),{modelValue:t(h).language,"onUpdate:modelValue":i[1]||=e=>t(h).language=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:150,transition:`all ease-in-out duration-250`,label:t(y)(`settings.language.title`),description:t(y)(`settings.language.description`),options:x.value},null,8,[`modelValue`,`label`,`description`,`options`]),[[f]]),a((n(),c(`div`,v,[...i[2]||=[l(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)]])),[[f]])])}}});typeof h==`function`&&h(y);var b=y;export{b as default};
assets/{hearing-DSNTfBAe.js → hearing-CP3k82oL.js} RENAMED
@@ -1 +1 @@
1
- import{b as e,yt as t}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as n,I as r}from"./settings-ckdWvS_B.js";import{f as i}from"./dist-D-gzSpcr.js";import{$ as a,ct as o,lt as s,ot as c,st as l}from"./components-BoQNNhDi.js";var u=async e=>{let t=new FormData;return t.append(`model`,e.model),t.append(`file`,e.file,e.fileName),t.append(`response_format`,e.responseFormat??`json`),e.responseFormat===`verbose_json`&&t.append(`timestamp_granularities[]`,e.timestampGranularities??`segment`),e.language!=null&&t.append(`language`,e.language),e.prompt!=null&&t.append(`prompt`,e.prompt),e.temperature!=null&&t.append(`temperature`,e.temperature),(e.fetch??globalThis.fetch)(l(`audio/transcriptions`,e.baseURL),{body:t,headers:c(e.headers,e.apiKey),method:`POST`,signal:e.abortSignal}).then(o).then(s)};const d=n(`hearing-store`,()=>{let n=a(),{allAudioTranscriptionProvidersMetadata:o}=r(n),s=i(`settings/hearing/active-provider`,``),c=i(`settings/hearing/active-model`,``),l=i(`settings/hearing/active-custom-model`,``),d=t(``),f=e(()=>o.value),p=e(()=>n.getProviderMetadata(s.value)?.capabilities.listModels!==void 0),m=e(()=>n.getModelsForProvider(s.value)),h=e(()=>n.isLoadingModels[s.value]||!1),g=e(()=>n.modelLoadError[s.value]||null);async function _(e){e&&n.getProviderMetadata(e)?.capabilities.listModels!==void 0&&await n.fetchModelsForProvider(e)}async function v(e){return e&&n.getProviderMetadata(e)?.capabilities.listModels!==void 0?n.getModelsForProvider(e):[]}let y=e(()=>!!s.value&&!!c.value);async function b(e,t,n,r){return await u({...e.transcription(t),file:n,responseFormat:r})}return{activeTranscriptionProvider:s,activeTranscriptionModel:c,availableProvidersMetadata:f,activeCustomModelName:l,transcriptionModelSearchQuery:d,supportsModelListing:p,providerModels:m,isLoadingActiveProviderModels:h,activeProviderModelError:g,configured:y,transcription:b,loadModelsForProvider:_,getModelsForProvider:v}}),f=n(`modules:hearing:speech:audio-input-pipeline`,()=>{let e=t(),n=d(),{activeTranscriptionProvider:i,activeTranscriptionModel:o}=r(n),s=a();async function c(t){if(t)try{if(t&&t.size>0){let e=await s.getProviderInstance(i.value);if(!e)throw Error(`Failed to initialize speech provider`);let r=o.value;return(await n.transcription(e,r,new File([t],`recording.wav`))).text}}catch(t){e.value=t instanceof Error?t.message:String(t),console.error(`Error generating transcription:`,e.value)}}return{error:e,transcribeForRecording:c}});export{d as n,f as t};
 
1
+ import{b as e,yt as t}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{F as n,I as r}from"./settings-CVVqd1wK.js";import{f as i}from"./dist-D-gzSpcr.js";import{$ as a,ct as o,lt as s,ot as c,st as l}from"./components-BaJFFT8H.js";var u=async e=>{let t=new FormData;return t.append(`model`,e.model),t.append(`file`,e.file,e.fileName),t.append(`response_format`,e.responseFormat??`json`),e.responseFormat===`verbose_json`&&t.append(`timestamp_granularities[]`,e.timestampGranularities??`segment`),e.language!=null&&t.append(`language`,e.language),e.prompt!=null&&t.append(`prompt`,e.prompt),e.temperature!=null&&t.append(`temperature`,e.temperature),(e.fetch??globalThis.fetch)(l(`audio/transcriptions`,e.baseURL),{body:t,headers:c(e.headers,e.apiKey),method:`POST`,signal:e.abortSignal}).then(o).then(s)};const d=n(`hearing-store`,()=>{let n=a(),{allAudioTranscriptionProvidersMetadata:o}=r(n),s=i(`settings/hearing/active-provider`,``),c=i(`settings/hearing/active-model`,``),l=i(`settings/hearing/active-custom-model`,``),d=t(``),f=e(()=>o.value),p=e(()=>n.getProviderMetadata(s.value)?.capabilities.listModels!==void 0),m=e(()=>n.getModelsForProvider(s.value)),h=e(()=>n.isLoadingModels[s.value]||!1),g=e(()=>n.modelLoadError[s.value]||null);async function _(e){e&&n.getProviderMetadata(e)?.capabilities.listModels!==void 0&&await n.fetchModelsForProvider(e)}async function v(e){return e&&n.getProviderMetadata(e)?.capabilities.listModels!==void 0?n.getModelsForProvider(e):[]}let y=e(()=>!!s.value&&!!c.value);async function b(e,t,n,r){return await u({...e.transcription(t),file:n,responseFormat:r})}return{activeTranscriptionProvider:s,activeTranscriptionModel:c,availableProvidersMetadata:f,activeCustomModelName:l,transcriptionModelSearchQuery:d,supportsModelListing:p,providerModels:m,isLoadingActiveProviderModels:h,activeProviderModelError:g,configured:y,transcription:b,loadModelsForProvider:_,getModelsForProvider:v}}),f=n(`modules:hearing:speech:audio-input-pipeline`,()=>{let e=t(),n=d(),{activeTranscriptionProvider:i,activeTranscriptionModel:o}=r(n),s=a();async function c(t){if(t)try{if(t&&t.size>0){let e=await s.getProviderInstance(i.value);if(!e)throw Error(`Failed to initialize speech provider`);let r=o.value;return(await n.transcription(e,r,new File([t],`recording.wav`))).text}}catch(t){e.value=t instanceof Error?t.message:String(t),console.error(`Error generating transcription:`,e.value)}}return{error:e,transcribeForRecording:c}});export{d as n,f as t};
assets/{hearing-BIevHtny.js → hearing-TtHReWNu.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,H as r,J as ee,K as i,Mt as a,O as o,S as s,U as c,W as l,b as u,k as d,kt as te,m as f,mt as p,rt as ne,st as m,w as h,x as g,yt as _}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as re,l as v,u as ie}from"./widgets-DJ153_lR.js";import{a as ae,o as y,u as oe}from"./src-BEKjKq3V.js";import{I as b,k as se,r as x}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as ce,At as le,Ft as ue,Nt as de,Pt as fe,Tt as pe,o as me,s as he,wt as ge}from"./components-BoQNNhDi.js";import{n as _e}from"./vue-i18n.runtime-Asl2hnl1.js";import"./merge-CTbONeho.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import"./transformers.web-rBhloxpP.js";import{t as S}from"./route-block-B7Ro39Uj.js";import"./llmmarkerParser-CSJQtJvM.js";import{n as ve,t as ye}from"./hearing-DSNTfBAe.js";import{t as be}from"./process.worklet-CJeez0uR.js";import{t as xe}from"./composables-u_GDSDcY.js";var Se={flex:`~ col md:row gap-6`},Ce={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`h-fit w-full md:w-[40%]`},we={flex:`~ col gap-4`},Te={flex:`~ col gap-4`},Ee={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},De={text:`neutral-400 dark:neutral-400`},Oe={"max-w-full":``},C={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},w={key:1},T={key:0},ke={flex:`~ col gap-4`},Ae={class:`text-lg md:text-2xl`},je={text:`neutral-400 dark:neutral-400`},Me={key:0,class:`flex items-center justify-center py-4`},Ne={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Pe={"w-full":``,"rounded-xl":``},Fe={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},Ie={class:`inline-flex items-center gap-4`},Le=[`src`],Re={key:0,class:`mt-2 text-sm text-neutral-500 dark:text-neutral-400`},ze={flex:`~ col gap-4`},Be={class:`space-y-4`},Ve={class:`space-y-3`},He={key:1,class:`space-y-3`},Ue={key:2,class:`space-y-3`},We={class:`flex items-center gap-3`},Ge={class:`text-sm font-medium`},Ke={class:`ml-auto text-xs text-neutral-500`},qe={class:`border-t border-neutral-200 pt-3 dark:border-neutral-700`},Je={key:0,class:`mt-3 space-y-2`},Ye={key:0,class:`flex items-center gap-2 text-primary-600 dark:text-primary-400`},Xe={key:2,class:`flex items-center gap-2 text-green-600 dark:text-green-400`},Ze={class:`ml-auto text-xs text-neutral-500`},E=e({__name:`hearing`,setup(e){let{t:S}=_e(),E=ve(),{activeTranscriptionProvider:D,activeTranscriptionModel:O,providerModels:k,activeProviderModelError:A,isLoadingActiveProviderModels:j,supportsModelListing:Qe,transcriptionModelSearchQuery:M,activeCustomModelName:$e}=b(E),{configuredTranscriptionProvidersMetadata:N}=b(ce()),{stopStream:et,startStream:tt}=x(),{audioInputs:nt,selectedAudioInput:P,stream:F}=b(x()),{startRecord:rt,stopRecord:it,onStopRecord:at}=me(F),{startAnalyzer:ot,stopAnalyzer:st,onAnalyzerUpdate:ct,volumeLevel:lt}=he(),{audioContext:I}=b(se()),{transcribeForRecording:ut}=ye(),L=_(),R=_(``),z=_(!1),B=_([]),V=_([]),H=_([]),dt=u(()=>V.value.map(e=>{let t=URL.createObjectURL(e);return H.value.push(()=>URL.revokeObjectURL(t)),t})),U=_(.6),W=_(!0),{init:ft,dispose:G,isSpeech:pt,isSpeechProb:K,isSpeechHistory:q,inferenceError:J,start:mt,loaded:Y,loading:ht}=xe(be,{threshold:U,onSpeechStart:()=>rt(),onSpeechEnd:()=>it()}),X=_(!1),Z=u(()=>W.value&&Y.value?pt.value:X.value);async function Q(){try{if(!P.value){console.warn(`No audio input device selected`);return}if(await $(),await tt(),!F.value){console.warn(`No audio stream available`);return}let e=I.value.createMediaStreamSource(F.value),t=ot(I.value);ct(e=>{(!W.value||!Y.value)&&(X.value=e>U.value)}),t&&e.connect(t),W.value&&(await ft(),await mt(F.value))}catch(e){console.error(`Error setting up audio monitoring:`,e),J.value=e instanceof Error?e.message:String(e)}}async function $(){L.value&&=(cancelAnimationFrame(L.value),void 0),F.value&&et(),st(),G()}async function gt(){z.value?(await $(),z.value=!1):(await Q(),z.value=!0)}let _t=u(()=>{if(!W.value||!Y.value)return X.value?`bg-green-500 shadow-lg shadow-green-500/50`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`;let e=K.value,t=U.value;return e>t?`bg-green-500 shadow-lg shadow-green-500/50`:e>t*.5?`bg-yellow-500 shadow-lg shadow-yellow-500/30`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`});function vt(e){$e.value=e}return at(async e=>{e&&e.size>0&&V.value.push(e);let t=await ut(e);t&&B.value.push(t)}),ne(P,async()=>z.value&&await Q()),r(async()=>{await E.loadModelsForProvider(D.value)}),c(()=>{$(),G(),H.value.forEach(e=>e())}),(e,r)=>{let c=ee(`RouterLink`);return l(),h(`div`,Se,[g(`div`,Ce,[g(`div`,we,[g(`div`,null,[d(n(ae),{modelValue:n(P),"onUpdate:modelValue":r[0]||=e=>p(P)?P.value=e:null,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:n(nt).map(e=>({label:e.label||e.deviceId,value:e.deviceId})),placeholder:`Select an audio input device`,layout:`vertical`},null,8,[`modelValue`,`options`])]),g(`div`,Te,[g(`div`,null,[g(`h2`,Ee,a(n(S)(`settings.pages.providers.title`)),1),g(`div`,De,[g(`span`,null,a(n(S)(`settings.pages.modules.hearing.sections.section.provider-selection.description`)),1)])]),g(`div`,Oe,[n(N).length>0?(l(),h(`fieldset`,C,[(l(!0),h(f,null,i(n(N),e=>(l(),s(n(ge),{id:e.id,key:e.id,modelValue:n(D),"onUpdate:modelValue":r[1]||=e=>p(D)?D.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128)),d(c,{to:`/settings/providers#transcription`,border:`2px solid`,class:`border-neutral-100 bg-white dark:border-neutral-900 hover:border-primary-500/30 dark:bg-neutral-900/20 dark:hover:border-primary-400/30`,flex:`~ col items-center justify-center`,transition:`all duration-200 ease-in-out`,relative:``,"min-w-50":``,"w-fit":``,"rounded-xl":``,"p-4":``},{default:m(()=>[...r[7]||=[g(`div`,{"i-solar:add-circle-line-duotone":``,class:`text-2xl text-neutral-500 dark:text-neutral-500`},null,-1),g(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)]]),_:1})])):(l(),h(`div`,w,[d(c,{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:m(()=>[...r[8]||=[g(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),g(`div`,{class:`flex flex-col`},[g(`span`,{class:`font-medium`},`No Providers Configured`),g(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your Transcription providers`)],-1),g(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]]),_:1})]))])]),n(D)&&n(Qe)?(l(),h(`div`,T,[g(`div`,ke,[g(`div`,null,[g(`h2`,Ae,a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),g(`div`,je,[g(`span`,null,a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),n(j)?(l(),h(`div`,Me,[r[9]||=g(`div`,{class:`mr-2 animate-spin`},[g(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),g(`span`,null,a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):n(A)?(l(),s(n(v),{key:1,title:n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:n(A)},null,8,[`title`,`error`])):n(k).length===0&&!n(j)?(l(),s(n(re),{key:2,type:`warning`},{title:m(()=>[o(a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:m(()=>[o(a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):n(k).length>0?(l(),s(n(pe),{key:3,modelValue:n(O),"onUpdate:modelValue":r[2]||=e=>p(O)?O.value=e:null,"search-query":n(M),"onUpdate:searchQuery":r[3]||=e=>p(M)?M.value=e:null,items:n(k).sort((e,t)=>e.id===n(O)?-1:t.id===n(O)?1:0),searchable:!0,"search-placeholder":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:n(M)}),"search-results-text":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":vt},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`])):t(``,!0)])])):t(``,!0)])]),g(`div`,Ne,[g(`div`,Pe,[g(`h2`,Fe,[g(`div`,Ie,[d(n(fe)),g(`div`,null,a(n(S)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),R.value?(l(),s(n(v),{key:0,title:`Error occurred`,error:R.value,"mb-4":``},null,8,[`error`])):t(``,!0),d(n(ie),{class:`mb-4`,"w-full":``,onClick:gt},{default:m(()=>[o(a(z.value?`Stop Monitoring`:`Start Monitoring`),1)]),_:1}),g(`div`,null,[(l(!0),h(f,null,i(dt.value,(e,n)=>(l(),h(`div`,{key:n,class:`mb-2`},[g(`audio`,{src:e,controls:``,class:`w-full`},null,8,Le),B.value[n]?(l(),h(`div`,Re,a(B.value[n]),1)):t(``,!0)]))),128))]),g(`div`,ze,[g(`div`,Be,[g(`div`,Ve,[d(n(ue),{level:n(lt),label:`Input Level`},null,8,[`level`]),W.value&&n(Y)?(l(),s(n(de),{key:0,value:n(K),threshold:U.value,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`])):t(``,!0),W.value&&n(Y)?(l(),h(`div`,He,[d(n(y),{modelValue:U.value,"onUpdate:modelValue":r[4]||=e=>U.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:.1,max:.9,step:.05,"format-value":e=>`${(e*100).toFixed(0)}%`},null,8,[`modelValue`,`format-value`])])):(l(),h(`div`,Ue,[d(n(y),{modelValue:U.value,"onUpdate:modelValue":r[5]||=e=>U.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:1,max:80,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])),g(`div`,We,[g(`div`,{class:te([`h-4 w-4 rounded-full transition-all duration-200`,_t.value])},null,2),g(`span`,Ge,a(Z.value?`Speaking Detected`:`Silence`),1),g(`span`,Ke,a(W.value&&n(Y)?`Model Based`:`Volume Based`),1)]),g(`div`,qe,[d(n(oe),{modelValue:W.value,"onUpdate:modelValue":r[6]||=e=>W.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),W.value?(l(),h(`div`,Je,[n(ht)?(l(),h(`div`,Ye,[...r[10]||=[g(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),g(`span`,{class:`text-sm`},`Loading...`,-1)]])):n(J)?(l(),s(n(v),{key:1,title:`Inference error`,error:n(J)},null,8,[`error`])):n(Y)?(l(),h(`div`,Xe,[r[11]||=g(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),r[12]||=g(`span`,{class:`text-sm`},`Activated`,-1),g(`span`,Ze,` Probability: `+a((n(K)*100).toFixed(1))+`% `,1)])):t(``,!0)])):t(``,!0)]),W.value&&n(Y)?(l(),s(n(le),{key:3,history:n(q),"current-value":n(K),threshold:U.value,"is-active":Z.value,title:`Voice Activity`,subtitle:`Last 2 seconds`,"active-label":`Speaking`,"active-legend-label":`Voice detected`,"inactive-legend-label":`Silence`,"threshold-label":`Speech threshold`},null,8,[`history`,`current-value`,`threshold`,`is-active`])):t(``,!0)])])])])])])}}});typeof S==`function`&&S(E);var D=E;export{D as default};
 
1
+ import{A as e,C as t,Dt as n,H as r,J as ee,K as i,Mt as a,O as o,S as s,U as c,W as l,b as u,k as d,kt as te,m as f,mt as p,rt as ne,st as m,w as h,x as g,yt as _}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as re,l as v,u as ie}from"./widgets-Bo0BM5C8.js";import{a as ae,o as y,u as oe}from"./src-BEKjKq3V.js";import{I as b,k as se,r as x}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as ce,At as le,Ft as ue,Nt as de,Pt as fe,Tt as pe,o as me,s as he,wt as ge}from"./components-BaJFFT8H.js";import{n as _e}from"./vue-i18n.runtime-Asl2hnl1.js";import"./merge-CTbONeho.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import"./transformers.web-rBhloxpP.js";import{t as S}from"./route-block-B7Ro39Uj.js";import"./llmmarkerParser-CSJQtJvM.js";import{n as ve,t as ye}from"./hearing-CP3k82oL.js";import{t as be}from"./process.worklet-CJeez0uR.js";import{t as xe}from"./composables-u_GDSDcY.js";var Se={flex:`~ col md:row gap-6`},Ce={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`h-fit w-full md:w-[40%]`},we={flex:`~ col gap-4`},Te={flex:`~ col gap-4`},Ee={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},De={text:`neutral-400 dark:neutral-400`},Oe={"max-w-full":``},C={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},w={key:1},T={key:0},ke={flex:`~ col gap-4`},Ae={class:`text-lg md:text-2xl`},je={text:`neutral-400 dark:neutral-400`},Me={key:0,class:`flex items-center justify-center py-4`},Ne={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Pe={"w-full":``,"rounded-xl":``},Fe={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},Ie={class:`inline-flex items-center gap-4`},Le=[`src`],Re={key:0,class:`mt-2 text-sm text-neutral-500 dark:text-neutral-400`},ze={flex:`~ col gap-4`},Be={class:`space-y-4`},Ve={class:`space-y-3`},He={key:1,class:`space-y-3`},Ue={key:2,class:`space-y-3`},We={class:`flex items-center gap-3`},Ge={class:`text-sm font-medium`},Ke={class:`ml-auto text-xs text-neutral-500`},qe={class:`border-t border-neutral-200 pt-3 dark:border-neutral-700`},Je={key:0,class:`mt-3 space-y-2`},Ye={key:0,class:`flex items-center gap-2 text-primary-600 dark:text-primary-400`},Xe={key:2,class:`flex items-center gap-2 text-green-600 dark:text-green-400`},Ze={class:`ml-auto text-xs text-neutral-500`},E=e({__name:`hearing`,setup(e){let{t:S}=_e(),E=ve(),{activeTranscriptionProvider:D,activeTranscriptionModel:O,providerModels:k,activeProviderModelError:A,isLoadingActiveProviderModels:j,supportsModelListing:Qe,transcriptionModelSearchQuery:M,activeCustomModelName:$e}=b(E),{configuredTranscriptionProvidersMetadata:N}=b(ce()),{stopStream:et,startStream:tt}=x(),{audioInputs:nt,selectedAudioInput:P,stream:F}=b(x()),{startRecord:rt,stopRecord:it,onStopRecord:at}=me(F),{startAnalyzer:ot,stopAnalyzer:st,onAnalyzerUpdate:ct,volumeLevel:lt}=he(),{audioContext:I}=b(se()),{transcribeForRecording:ut}=ye(),L=_(),R=_(``),z=_(!1),B=_([]),V=_([]),H=_([]),dt=u(()=>V.value.map(e=>{let t=URL.createObjectURL(e);return H.value.push(()=>URL.revokeObjectURL(t)),t})),U=_(.6),W=_(!0),{init:ft,dispose:G,isSpeech:pt,isSpeechProb:K,isSpeechHistory:q,inferenceError:J,start:mt,loaded:Y,loading:ht}=xe(be,{threshold:U,onSpeechStart:()=>rt(),onSpeechEnd:()=>it()}),X=_(!1),Z=u(()=>W.value&&Y.value?pt.value:X.value);async function Q(){try{if(!P.value){console.warn(`No audio input device selected`);return}if(await $(),await tt(),!F.value){console.warn(`No audio stream available`);return}let e=I.value.createMediaStreamSource(F.value),t=ot(I.value);ct(e=>{(!W.value||!Y.value)&&(X.value=e>U.value)}),t&&e.connect(t),W.value&&(await ft(),await mt(F.value))}catch(e){console.error(`Error setting up audio monitoring:`,e),J.value=e instanceof Error?e.message:String(e)}}async function $(){L.value&&=(cancelAnimationFrame(L.value),void 0),F.value&&et(),st(),G()}async function gt(){z.value?(await $(),z.value=!1):(await Q(),z.value=!0)}let _t=u(()=>{if(!W.value||!Y.value)return X.value?`bg-green-500 shadow-lg shadow-green-500/50`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`;let e=K.value,t=U.value;return e>t?`bg-green-500 shadow-lg shadow-green-500/50`:e>t*.5?`bg-yellow-500 shadow-lg shadow-yellow-500/30`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`});function vt(e){$e.value=e}return at(async e=>{e&&e.size>0&&V.value.push(e);let t=await ut(e);t&&B.value.push(t)}),ne(P,async()=>z.value&&await Q()),r(async()=>{await E.loadModelsForProvider(D.value)}),c(()=>{$(),G(),H.value.forEach(e=>e())}),(e,r)=>{let c=ee(`RouterLink`);return l(),h(`div`,Se,[g(`div`,Ce,[g(`div`,we,[g(`div`,null,[d(n(ae),{modelValue:n(P),"onUpdate:modelValue":r[0]||=e=>p(P)?P.value=e:null,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:n(nt).map(e=>({label:e.label||e.deviceId,value:e.deviceId})),placeholder:`Select an audio input device`,layout:`vertical`},null,8,[`modelValue`,`options`])]),g(`div`,Te,[g(`div`,null,[g(`h2`,Ee,a(n(S)(`settings.pages.providers.title`)),1),g(`div`,De,[g(`span`,null,a(n(S)(`settings.pages.modules.hearing.sections.section.provider-selection.description`)),1)])]),g(`div`,Oe,[n(N).length>0?(l(),h(`fieldset`,C,[(l(!0),h(f,null,i(n(N),e=>(l(),s(n(ge),{id:e.id,key:e.id,modelValue:n(D),"onUpdate:modelValue":r[1]||=e=>p(D)?D.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128)),d(c,{to:`/settings/providers#transcription`,border:`2px solid`,class:`border-neutral-100 bg-white dark:border-neutral-900 hover:border-primary-500/30 dark:bg-neutral-900/20 dark:hover:border-primary-400/30`,flex:`~ col items-center justify-center`,transition:`all duration-200 ease-in-out`,relative:``,"min-w-50":``,"w-fit":``,"rounded-xl":``,"p-4":``},{default:m(()=>[...r[7]||=[g(`div`,{"i-solar:add-circle-line-duotone":``,class:`text-2xl text-neutral-500 dark:text-neutral-500`},null,-1),g(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)]]),_:1})])):(l(),h(`div`,w,[d(c,{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:m(()=>[...r[8]||=[g(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),g(`div`,{class:`flex flex-col`},[g(`span`,{class:`font-medium`},`No Providers Configured`),g(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your Transcription providers`)],-1),g(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]]),_:1})]))])]),n(D)&&n(Qe)?(l(),h(`div`,T,[g(`div`,ke,[g(`div`,null,[g(`h2`,Ae,a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),g(`div`,je,[g(`span`,null,a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),n(j)?(l(),h(`div`,Me,[r[9]||=g(`div`,{class:`mr-2 animate-spin`},[g(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),g(`span`,null,a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):n(A)?(l(),s(n(v),{key:1,title:n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:n(A)},null,8,[`title`,`error`])):n(k).length===0&&!n(j)?(l(),s(n(re),{key:2,type:`warning`},{title:m(()=>[o(a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:m(()=>[o(a(n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):n(k).length>0?(l(),s(n(pe),{key:3,modelValue:n(O),"onUpdate:modelValue":r[2]||=e=>p(O)?O.value=e:null,"search-query":n(M),"onUpdate:searchQuery":r[3]||=e=>p(M)?M.value=e:null,items:n(k).sort((e,t)=>e.id===n(O)?-1:t.id===n(O)?1:0),searchable:!0,"search-placeholder":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:n(M)}),"search-results-text":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":n(S)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":vt},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`])):t(``,!0)])])):t(``,!0)])]),g(`div`,Ne,[g(`div`,Pe,[g(`h2`,Fe,[g(`div`,Ie,[d(n(fe)),g(`div`,null,a(n(S)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),R.value?(l(),s(n(v),{key:0,title:`Error occurred`,error:R.value,"mb-4":``},null,8,[`error`])):t(``,!0),d(n(ie),{class:`mb-4`,"w-full":``,onClick:gt},{default:m(()=>[o(a(z.value?`Stop Monitoring`:`Start Monitoring`),1)]),_:1}),g(`div`,null,[(l(!0),h(f,null,i(dt.value,(e,n)=>(l(),h(`div`,{key:n,class:`mb-2`},[g(`audio`,{src:e,controls:``,class:`w-full`},null,8,Le),B.value[n]?(l(),h(`div`,Re,a(B.value[n]),1)):t(``,!0)]))),128))]),g(`div`,ze,[g(`div`,Be,[g(`div`,Ve,[d(n(ue),{level:n(lt),label:`Input Level`},null,8,[`level`]),W.value&&n(Y)?(l(),s(n(de),{key:0,value:n(K),threshold:U.value,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`])):t(``,!0),W.value&&n(Y)?(l(),h(`div`,He,[d(n(y),{modelValue:U.value,"onUpdate:modelValue":r[4]||=e=>U.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:.1,max:.9,step:.05,"format-value":e=>`${(e*100).toFixed(0)}%`},null,8,[`modelValue`,`format-value`])])):(l(),h(`div`,Ue,[d(n(y),{modelValue:U.value,"onUpdate:modelValue":r[5]||=e=>U.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:1,max:80,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])),g(`div`,We,[g(`div`,{class:te([`h-4 w-4 rounded-full transition-all duration-200`,_t.value])},null,2),g(`span`,Ge,a(Z.value?`Speaking Detected`:`Silence`),1),g(`span`,Ke,a(W.value&&n(Y)?`Model Based`:`Volume Based`),1)]),g(`div`,qe,[d(n(oe),{modelValue:W.value,"onUpdate:modelValue":r[6]||=e=>W.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),W.value?(l(),h(`div`,Je,[n(ht)?(l(),h(`div`,Ye,[...r[10]||=[g(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),g(`span`,{class:`text-sm`},`Loading...`,-1)]])):n(J)?(l(),s(n(v),{key:1,title:`Inference error`,error:n(J)},null,8,[`error`])):n(Y)?(l(),h(`div`,Xe,[r[11]||=g(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),r[12]||=g(`span`,{class:`text-sm`},`Activated`,-1),g(`span`,Ze,` Probability: `+a((n(K)*100).toFixed(1))+`% `,1)])):t(``,!0)])):t(``,!0)]),W.value&&n(Y)?(l(),s(n(le),{key:3,history:n(q),"current-value":n(K),threshold:U.value,"is-active":Z.value,title:`Voice Activity`,subtitle:`Last 2 seconds`,"active-label":`Speaking`,"active-legend-label":`Voice detected`,"inactive-legend-label":`Silence`,"threshold-label":`Speech threshold`},null,8,[`history`,`current-value`,`threshold`,`is-active`])):t(``,!0)])])])])])])}}});typeof S==`function`&&S(E);var D=E;export{D as default};
assets/{index-CpDsmg27.js → index-Bc-RzF5X.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/{index-Ct6uZcQz.css → index-ZfbyyV3b.css} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/{index-tts-vllm-nctOHKs2.js → index-tts-vllm-CC6rzOox.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,H as n,S as r,W as i,b as a,k as o,rt as s,st as c}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as l,c as u,f as d,l as f}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as p}from"./route-block-B7Ro39Uj.js";var m=`index-tts-vllm`,h=`IndexTTS-1.5`,g=!0,_=e({__name:`index-tts-vllm`,setup(e){let p=f(),_=l(),v=a(()=>p.availableVoices[m]||[]);n(async()=>{await p.loadVoicesForProvider(m)}),s([g],async()=>{await p.loadVoicesForProvider(m)});async function y(e,t){let n=await _.getProviderInstance(m);if(!n)throw Error(`Failed to initialize speech provider`);let r=_.getProviderConfig(m),i=r.model||h,a={...r};return await p.speech(n,i,e,t,a)}return(e,n)=>(i(),r(t(u),{"provider-id":m,"default-model":h},{playground:c(()=>[o(t(d),{"available-voices":v.value,"generate-speech":y,"api-key-configured":g,"use-ssml":!1,"default-text":`Hello! This is a test of the Index TTS Speech synthesis?.`},null,8,[`available-voices`])]),_:1}))}});typeof p==`function`&&p(_);var v=_;export{v as default};
 
1
+ import{A as e,Dt as t,H as n,S as r,W as i,b as a,k as o,rt as s,st as c}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as l,c as u,f as d,l as f}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as p}from"./route-block-B7Ro39Uj.js";var m=`index-tts-vllm`,h=`IndexTTS-1.5`,g=!0,_=e({__name:`index-tts-vllm`,setup(e){let p=f(),_=l(),v=a(()=>p.availableVoices[m]||[]);n(async()=>{await p.loadVoicesForProvider(m)}),s([g],async()=>{await p.loadVoicesForProvider(m)});async function y(e,t){let n=await _.getProviderInstance(m);if(!n)throw Error(`Failed to initialize speech provider`);let r=_.getProviderConfig(m),i=r.model||h,a={...r};return await p.speech(n,i,e,t,a)}return(e,n)=>(i(),r(t(u),{"provider-id":m,"default-model":h},{playground:c(()=>[o(t(d),{"available-voices":v.value,"generate-speech":y,"api-key-configured":g,"use-ssml":!1,"default-text":`Hello! This is a test of the Index TTS Speech synthesis?.`},null,8,[`available-voices`])]),_:1}))}});typeof p==`function`&&p(_);var v=_;export{v as default};
assets/{lm-studio-BSvHf4Dd.js → lm-studio-CKUfVW0w.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,G as h,J as g,K as _,q as v}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as y}from"./route-block-B7Ro39Uj.js";import{t as b}from"./use-provider-validation-CpjXOGL1.js";var x={class:`whitespace-pre-wrap break-all`},S=`lm-studio`,C=e({__name:`lm-studio`,setup(e){let{providers:y}=p(m()),C=c({get:()=>y.value[S]?.baseUrl||``,set:e=>{y.value[S]||(y.value[S]={}),y.value[S].baseUrl=e}}),{t:w,router:T,providerMetadata:E,isValidating:D,isValid:O,validationMessage:k,handleResetSettings:A}=b(S);return(e,c)=>(s(),o(n(h),{"provider-name":n(E)?.localizedName,"provider-icon-color":n(E)?.iconColor,"on-back":()=>n(T).back()},{default:u(()=>[l(n(_),null,{default:u(()=>[l(n(v),{title:n(w)(`settings.pages.providers.common.section.basic.title`),description:n(w)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(A)},{default:u(()=>[l(n(g),{modelValue:C.value,"onUpdate:modelValue":c[0]||=e=>C.value=e,placeholder:`http://localhost:1234/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`,`on-reset`]),!n(O)&&n(D)===0&&n(k)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(w)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(k)?{name:`content`,fn:u(()=>[d(`div`,x,i(n(k)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(O)&&n(D)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(w)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof y==`function`&&y(C);var w=C;export{w as default};
 
1
+ import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,G as h,J as g,K as _,q as v}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as y}from"./route-block-B7Ro39Uj.js";import{t as b}from"./use-provider-validation-CwajWImW.js";var x={class:`whitespace-pre-wrap break-all`},S=`lm-studio`,C=e({__name:`lm-studio`,setup(e){let{providers:y}=p(m()),C=c({get:()=>y.value[S]?.baseUrl||``,set:e=>{y.value[S]||(y.value[S]={}),y.value[S].baseUrl=e}}),{t:w,router:T,providerMetadata:E,isValidating:D,isValid:O,validationMessage:k,handleResetSettings:A}=b(S);return(e,c)=>(s(),o(n(h),{"provider-name":n(E)?.localizedName,"provider-icon-color":n(E)?.iconColor,"on-back":()=>n(T).back()},{default:u(()=>[l(n(_),null,{default:u(()=>[l(n(v),{title:n(w)(`settings.pages.providers.common.section.basic.title`),description:n(w)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(A)},{default:u(()=>[l(n(g),{modelValue:C.value,"onUpdate:modelValue":c[0]||=e=>C.value=e,placeholder:`http://localhost:1234/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`,`on-reset`]),!n(O)&&n(D)===0&&n(k)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(w)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(k)?{name:`content`,fn:u(()=>[d(`div`,x,i(n(k)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(O)&&n(D)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(w)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof y==`function`&&y(C);var w=C;export{w as default};
assets/{memory-CTY6oUkq.js → memory-DYc-ho0c.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,O as n,W as r,Y as i,ct as a,k as o,m as s,st as c,w as l,x as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{h as d}from"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as f}from"./route-block-B7Ro39Uj.js";var p={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},m=e({__name:`index`,setup(e){return(e,f)=>{let m=i(`motion`);return r(),l(s,null,[u(`div`,null,[o(t(d),{label:`In development, needs your help!`,theme:`orange`},{default:c(()=>[...f[0]||=[u(`div`,null,[n(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),u(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),n(`. The source code of this page is located at `),u(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/memory/index.vue`},`here`),n(`. `)],-1)]]),_:1})]),a((r(),l(`div`,p,[...f[1]||=[u(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)]])),[[m]])],64)}}});typeof f==`function`&&f(m);var h=m;export{h as default};
 
1
+ import{A as e,Dt as t,O as n,W as r,Y as i,ct as a,k as o,m as s,st as c,w as l,x as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{h as d}from"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as f}from"./route-block-B7Ro39Uj.js";var p={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},m=e({__name:`index`,setup(e){return(e,f)=>{let m=i(`motion`);return r(),l(s,null,[u(`div`,null,[o(t(d),{label:`In development, needs your help!`,theme:`orange`},{default:c(()=>[...f[0]||=[u(`div`,null,[n(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),u(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),n(`. The source code of this page is located at `),u(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/memory/index.vue`},`here`),n(`. `)],-1)]]),_:1})]),a((r(),l(`div`,p,[...f[1]||=[u(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)]])),[[m]])],64)}}});typeof f==`function`&&f(m);var h=m;export{h as default};
assets/{messaging-discord-i_PwdF3R.js → messaging-discord-BQHwV6j6.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,S as n,W as r}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{gt as i}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as a}from"./route-block-B7Ro39Uj.js";var o=e({__name:`messaging-discord`,setup(e){return(e,a)=>(r(),n(t(i)))}});typeof a==`function`&&a(o);var s=o;export{s as default};
 
1
+ import{A as e,Dt as t,S as n,W as r}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{gt as i}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as a}from"./route-block-B7Ro39Uj.js";var o=e({__name:`messaging-discord`,setup(e){return(e,a)=>(r(),n(t(i)))}});typeof a==`function`&&a(o);var s=o;export{s as default};
assets/{microsoft-speech-Dow8Enfi.js → microsoft-speech-5dyWoYUF.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,H as n,S as r,W as i,b as a,k as o,rt as s,st as c,x as l,yt as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import{c as d,o as f}from"./src-BEKjKq3V.js";import{I as p}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,c as h,f as g,l as _}from"./components-BoQNNhDi.js";import{n as v}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as y}from"./route-block-B7Ro39Uj.js";var b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`,C=e({__name:`microsoft-speech`,setup(e){let{t:y}=v(),C={pitch:0,speed:1,volume:0},w=_(),T=m(),{providers:E}=p(T),D=u(0),O=u(1),k=u(0),A=a({get:()=>E.value[x]?.region||`eastasia`,set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=a(()=>!!E.value[x]?.apiKey),M=a(()=>w.availableVoices[x]||[]);n(async()=>{A.value||=`eastasia`,E.value[x]?.region||(E.value[x]?E.value[x].region=A.value:E.value[x]={region:A.value}),await w.loadVoicesForProvider(x)}),s([j,A],async()=>{await w.loadVoicesForProvider(x)});async function N(e,t,n){let r=await T.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=T.getProviderConfig(x),a=i.model||S,o={...i,region:A.value,disableSsml:!n};if(!n&&t){let n=M.value.find(e=>e.id===t);if(n){let s=w.generateSSML(e,n,{...i,pitch:D.value});return await w.speech(r,a,s,t,o)}}return await w.speech(r,a,e,t,o)}return(e,n)=>(i(),r(t(h),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":c(()=>[o(t(d),{modelValue:A.value,"onUpdate:modelValue":n[0]||=e=>A.value=e,label:t(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:t(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":c(()=>[l(`div`,b,[o(t(f),{modelValue:D.value,"onUpdate:modelValue":n[1]||=e=>D.value=e,label:t(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:t(y)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),o(t(f),{modelValue:O.value,"onUpdate:modelValue":n[2]||=e=>O.value=e,label:t(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(f),{modelValue:k.value,"onUpdate:modelValue":n[3]||=e=>k.value=e,label:t(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:t(y)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:c(()=>[o(t(g),{"available-voices":M.value,"generate-speech":N,"api-key-configured":j.value,"default-text":`Hello! This is a test of the Microsoft Speech synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default};
 
1
+ import{A as e,Dt as t,H as n,S as r,W as i,b as a,k as o,rt as s,st as c,x as l,yt as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import{c as d,o as f}from"./src-BEKjKq3V.js";import{I as p}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as m,c as h,f as g,l as _}from"./components-BaJFFT8H.js";import{n as v}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as y}from"./route-block-B7Ro39Uj.js";var b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`,C=e({__name:`microsoft-speech`,setup(e){let{t:y}=v(),C={pitch:0,speed:1,volume:0},w=_(),T=m(),{providers:E}=p(T),D=u(0),O=u(1),k=u(0),A=a({get:()=>E.value[x]?.region||`eastasia`,set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=a(()=>!!E.value[x]?.apiKey),M=a(()=>w.availableVoices[x]||[]);n(async()=>{A.value||=`eastasia`,E.value[x]?.region||(E.value[x]?E.value[x].region=A.value:E.value[x]={region:A.value}),await w.loadVoicesForProvider(x)}),s([j,A],async()=>{await w.loadVoicesForProvider(x)});async function N(e,t,n){let r=await T.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=T.getProviderConfig(x),a=i.model||S,o={...i,region:A.value,disableSsml:!n};if(!n&&t){let n=M.value.find(e=>e.id===t);if(n){let s=w.generateSSML(e,n,{...i,pitch:D.value});return await w.speech(r,a,s,t,o)}}return await w.speech(r,a,e,t,o)}return(e,n)=>(i(),r(t(h),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":c(()=>[o(t(d),{modelValue:A.value,"onUpdate:modelValue":n[0]||=e=>A.value=e,label:t(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:t(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":c(()=>[l(`div`,b,[o(t(f),{modelValue:D.value,"onUpdate:modelValue":n[1]||=e=>D.value=e,label:t(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:t(y)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),o(t(f),{modelValue:O.value,"onUpdate:modelValue":n[2]||=e=>O.value=e,label:t(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(t(f),{modelValue:k.value,"onUpdate:modelValue":n[3]||=e=>k.value=e,label:t(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:t(y)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:c(()=>[o(t(g),{"available-voices":M.value,"generate-speech":N,"api-key-configured":j.value,"default-text":`Hello! This is a test of the Microsoft Speech synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default};
assets/models-CPPBdq-c.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{A as e,At as t,B as n,C as r,Dt as i,H as a,K as o,L as s,M as c,Mt as l,O as u,R as d,S as f,Tt as p,U as m,W as h,Y as g,b as _,ct as v,d as y,et as b,f as x,jt as S,k as C,kt as w,m as T,mt as E,q as D,rt as O,st as k,w as A,x as j,yt as M,z as N}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./tres-BtRSdtJN.js";import{B as P,C as F,F as ee,G as te,H as I,I as L,J as R,K as z,L as ne,M as re,N as B,P as ie,R as ae,S as oe,T as se,U as ce,V as le,W as ue,a as de,f as fe,h as pe,i as me,j as he,n as ge,p as V,r as _e,t as ve,u as H,w as U,z as ye}from"./widgets-Bo0BM5C8.js";import{A as be,B as xe,C as Se,D as W,E as Ce,F as G,G as we,H as K,I as Te,L as Ee,M as De,N as q,O as Oe,R as J,S as ke,T as Ae,X as je,Z as Y,_ as Me,b as Ne,d as Pe,f as Fe,g as Ie,h as Le,j as Re,k as ze,o as X,p as Be,v as Ve,w as He,x as Ue,y as We,z as Ge}from"./src-BEKjKq3V.js";import{I as Z,M as Ke,a as qe,i as Q,n as Je}from"./settings-CVVqd1wK.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import{d as Ye,h as Xe,m as Ze,v as Qe,y as $e}from"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{n as et}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as tt}from"./browser-BoU2m5e0.js";import{t as nt}from"./route-block-B7Ro39Uj.js";import{a as rt,n as it,o as at,r as ot,t as st}from"./src-AGgZvuP9.js";import"./beat-sync-BNa1wmOR.js";var ct=[`INPUT`,`TEXTAREA`];function lt(e,t,n,r={}){if(!t||r.enableIgnoredElement&&ct.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-reka-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=ut(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function ut(e,t,n,r=e.length){if(--r===0)return null;let i=e.indexOf(t),a=n.goForward?i+1:i-1;if(!n.loop&&(a<0||a>=e.length))return null;let o=e[(a+e.length)%e.length];return o?o.hasAttribute(`disabled`)&&o.getAttribute(`disabled`)!==`false`?ut(e,o,n,r):o:null}var[dt,ft]=Y(`RovingFocusGroup`),pt=e({__name:`RovingFocusGroup`,props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`entryFocus`,`update:currentTabStopId`],setup(e,{expose:t,emit:n}){let r=e,a=n,{loop:o,orientation:s,dir:c}=p(r),l=J(c),u=K(r,`currentTabStopId`,a,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),d=M(!1),m=M(!1),g=M(0),{getItems:_,CollectionSlot:v}=ke({isProvider:!0});function y(e){let t=!m.value;if(e.currentTarget&&e.target===e.currentTarget&&t&&!d.value){let t=new CustomEvent(We,Ne);if(e.currentTarget.dispatchEvent(t),a(`entryFocus`,t),!t.defaultPrevented){let e=_().map(e=>e.ref).filter(e=>e.dataset.disabled!==``);Ue([e.find(e=>e.getAttribute(`data-active`)===``),e.find(e=>e.getAttribute(`data-highlighted`)===``),e.find(e=>e.id===u.value),...e].filter(Boolean),r.preventScrollOnEntryFocus)}}m.value=!1}function b(){setTimeout(()=>{m.value=!1},1)}return t({getItems:_}),ft({loop:o,dir:l,orientation:s,currentTabStopId:u,onItemFocus:e=>{u.value=e},onItemShiftTab:()=>{d.value=!0},onFocusableItemAdd:()=>{g.value++},onFocusableItemRemove:()=>{g.value--}}),(e,t)=>(h(),f(i(v),null,{default:k(()=>[C(i(W),{tabindex:d.value||g.value===0?-1:0,"data-orientation":i(s),as:e.as,"as-child":e.asChild,dir:i(l),style:{outline:`none`},onMousedown:t[0]||=e=>m.value=!0,onMouseup:b,onFocus:y,onBlur:t[1]||=e=>d.value=!1},{default:k(()=>[D(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`as`,`as-child`,`dir`])]),_:3}))}}),mt=e({__name:`MenuAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let n=e;return(e,r)=>(h(),f(i(Le),t(c(n)),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}});function ht(){let e=M(!1);return a(()=>{xe(`keydown`,()=>{e.value=!0},{capture:!0,passive:!0}),xe([`pointerdown`,`pointermove`],()=>{e.value=!1},{capture:!0,passive:!0})}),e}var gt=we(ht),[_t,vt]=Y([`MenuRoot`,`MenuSub`],`MenuContext`),[yt,bt]=Y(`MenuRoot`),xt=e({__name:`MenuRoot`,props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{modal:a,dir:o}=p(n),s=J(o),c=K(n,`open`,r),l=M(),u=gt();return vt({open:c,onOpenChange:e=>{c.value=e},content:l,onContentChange:e=>{l.value=e}}),bt({onClose:()=>{c.value=!1},isUsingKeyboardRef:u,dir:s,modal:a}),(e,t)=>(h(),f(i(Ie),null,{default:k(()=>[D(e.$slots,`default`)]),_:3}))}}),[St,Ct]=Y(`MenuContent`),wt=e({__name:`MenuContentImpl`,props:s({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Fe}),emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,a=_t(),o=yt(),{trapFocus:s,disableOutsidePointerEvents:c,loop:l}=p(n);R(),Ge(c.value);let u=M(``),d=M(0),g=M(0),_=M(null),v=M(`right`),y=M(0),b=M(null),x=M(),{forwardRef:S,currentElement:w}=G(),{handleTypeaheadSearch:T}=ze();O(w,e=>{a.onContentChange(e)}),m(()=>{window.clearTimeout(d.value)});function E(e){return v.value===_.value?.side&&ue(e,_.value?.area)}async function A(e){r(`openAutoFocus`,e),!e.defaultPrevented&&(e.preventDefault(),w.value?.focus({preventScroll:!0}))}function j(e){if(e.defaultPrevented)return;let t=e.target.closest(`[data-reka-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1,i=lt(e,je(),w.value,{loop:l.value,arrowKeyOptions:`vertical`,dir:o?.dir.value,focus:!0,attributeName:`[data-reka-collection-item]:not([data-disabled])`});if(i)return i?.focus();if(e.code===`Space`)return;let a=x.value?.getItems()??[];if(t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&T(e.key,a)),e.target!==w.value||!ne.includes(e.key))return;e.preventDefault();let s=[...a.map(e=>e.ref)];ye.includes(e.key)&&s.reverse(),le(s)}function N(e){e?.currentTarget?.contains?.(e.target)||(window.clearTimeout(d.value),u.value=``)}function P(e){if(!ce(e))return;let t=e.target,n=y.value!==e.clientX;(e?.currentTarget)?.contains(t)&&n&&(v.value=e.clientX>y.value?`right`:`left`,y.value=e.clientX)}return Ct({onItemEnter:e=>!!E(e),onItemLeave:e=>{E(e)||(w.value?.focus(),b.value=null)},onTriggerLeave:e=>!!E(e),searchRef:u,pointerGraceTimerRef:g,onPointerGraceIntentChange:e=>{_.value=e}}),(e,t)=>(h(),f(i(te),{"as-child":``,trapped:i(s),onMountAutoFocus:A,onUnmountAutoFocus:t[7]||=e=>r(`closeAutoFocus`,e)},{default:k(()=>[C(i(Se),{"as-child":``,"disable-outside-pointer-events":i(c),onEscapeKeyDown:t[2]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[3]||=e=>r(`pointerDownOutside`,e),onFocusOutside:t[4]||=e=>r(`focusOutside`,e),onInteractOutside:t[5]||=e=>r(`interactOutside`,e),onDismiss:t[6]||=e=>r(`dismiss`)},{default:k(()=>[C(i(pt),{ref_key:`rovingFocusGroupRef`,ref:x,"current-tab-stop-id":b.value,"onUpdate:currentTabStopId":t[0]||=e=>b.value=e,"as-child":``,orientation:`vertical`,dir:i(o).dir.value,loop:i(l),onEntryFocus:t[1]||=e=>{r(`entryFocus`,e),i(o).isUsingKeyboardRef.value||e.preventDefault()}},{default:k(()=>[C(i(Be),{ref:i(S),role:`menu`,as:e.as,"as-child":e.asChild,"aria-orientation":`vertical`,"data-reka-menu-content":``,"data-state":i(I)(i(a).open.value),dir:i(o).dir.value,side:e.side,"side-offset":e.sideOffset,align:e.align,"align-offset":e.alignOffset,"avoid-collisions":e.avoidCollisions,"collision-boundary":e.collisionBoundary,"collision-padding":e.collisionPadding,"arrow-padding":e.arrowPadding,"prioritize-position":e.prioritizePosition,"position-strategy":e.positionStrategy,"update-position-strategy":e.updatePositionStrategy,sticky:e.sticky,"hide-when-detached":e.hideWhenDetached,reference:e.reference,onKeydown:j,onBlur:N,onPointermove:P},{default:k(()=>[D(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`,`dir`,`side`,`side-offset`,`align`,`align-offset`,`avoid-collisions`,`collision-boundary`,`collision-padding`,`arrow-padding`,`prioritize-position`,`position-strategy`,`update-position-strategy`,`sticky`,`hide-when-detached`,`reference`])]),_:3},8,[`current-tab-stop-id`,`dir`,`loop`])]),_:3},8,[`disable-outside-pointer-events`])]),_:3},8,[`trapped`]))}}),Tt=e({inheritAttrs:!1,__name:`MenuItemImpl`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,r=St(),{forwardRef:a}=G(),{CollectionItem:o}=ke(),s=M(!1);async function c(e){e.defaultPrevented||ce(e)&&(t.disabled?r.onItemLeave(e):r.onItemEnter(e)||e.currentTarget?.focus({preventScroll:!0}))}async function l(e){await n(),!e.defaultPrevented&&ce(e)&&r.onItemLeave(e)}return(e,t)=>(h(),f(i(o),{value:{textValue:e.textValue}},{default:k(()=>[C(i(W),N({ref:i(a),role:`menuitem`,tabindex:`-1`},e.$attrs,{as:e.as,"as-child":e.asChild,"aria-disabled":e.disabled||void 0,"data-disabled":e.disabled?``:void 0,"data-highlighted":s.value?``:void 0,onPointermove:c,onPointerleave:l,onFocus:t[0]||=async t=>{await n(),!(t.defaultPrevented||e.disabled)&&(s.value=!0)},onBlur:t[1]||=async e=>{await n(),!e.defaultPrevented&&(s.value=!1)}}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`as`,`as-child`,`aria-disabled`,`data-disabled`,`data-highlighted`])]),_:3},8,[`value`]))}}),Et=e({__name:`MenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let r=e,a=t,{forwardRef:o,currentElement:s}=G(),c=yt(),l=St(),u=M(!1);async function d(){let e=s.value;if(!r.disabled&&e){let e=new CustomEvent(ae,{bubbles:!0,cancelable:!0});a(`select`,e),await n(),e.defaultPrevented?u.value=!1:c.onClose()}}return(e,t)=>(h(),f(Tt,N(r,{ref:i(o),onClick:d,onPointerdown:t[0]||=()=>{u.value=!0},onPointerup:t[1]||=async e=>{await n(),!e.defaultPrevented&&(u.value||e.currentTarget?.click())},onKeydown:t[2]||=async t=>{let n=i(l).searchRef.value!==``;e.disabled||n&&t.key===` `||i(P).includes(t.key)&&(t.currentTarget.click(),t.preventDefault())}}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),Dt=e({__name:`MenuRootContentModal`,props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,a=q(n,r),o=_t(),{forwardRef:s,currentElement:c}=G();return De(c),(e,t)=>(h(),f(wt,N(i(a),{ref:i(s),"trap-focus":i(o).open.value,"disable-outside-pointer-events":i(o).open.value,"disable-outside-scroll":!0,onDismiss:t[0]||=e=>i(o).onOpenChange(!1),onFocusOutside:t[1]||=x(e=>r(`focusOutside`,e),[`prevent`])}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`]))}}),Ot=e({__name:`MenuRootContentNonModal`,props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=q(e,t),r=_t();return(e,t)=>(h(),f(wt,N(i(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:t[0]||=e=>i(r).onOpenChange(!1)}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),kt=e({__name:`MenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:n}){let r=q(e,n),a=_t(),o=yt();return(e,n)=>(h(),f(i(Oe),{present:e.forceMount||i(a).open.value},{default:k(()=>[i(o).modal.value?(h(),f(Dt,t(N({key:0},{...e.$attrs,...i(r)})),{default:k(()=>[D(e.$slots,`default`)]),_:3},16)):(h(),f(Ot,t(N({key:1},{...e.$attrs,...i(r)})),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),At=e({__name:`MenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let n=e;return(e,r)=>(h(),f(i(ie),t(c(n)),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),[jt,Mt]=Y(`DropdownMenuRoot`),Nt=e({__name:`DropdownMenuRoot`,props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t;G();let a=K(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),o=M(),{modal:s,dir:c}=p(n),l=J(c);return Mt({open:a,onOpenChange:e=>{a.value=e},onOpenToggle:()=>{a.value=!a.value},triggerId:``,triggerElement:o,contentId:``,modal:s,dir:l}),(e,t)=>(h(),f(i(xt),{open:i(a),"onUpdate:open":t[0]||=e=>E(a)?a.value=e:null,dir:i(l),modal:i(s)},{default:k(()=>[D(e.$slots,`default`,{open:i(a)})]),_:3},8,[`open`,`dir`,`modal`]))}}),Pt=e({__name:`DropdownMenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`closeAutoFocus`],setup(e,{emit:t}){let n=q(e,t);G();let r=jt(),a=M(!1);function o(e){e.defaultPrevented||(a.value||setTimeout(()=>{r.triggerElement.value?.focus()},0),a.value=!1,e.preventDefault())}return r.contentId||=Re(void 0,`reka-dropdown-menu-content`),(e,t)=>(h(),f(i(kt),N(i(n),{id:i(r).contentId,"aria-labelledby":i(r)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-dropdown-menu-content-available-width":`var(--reka-popper-available-width)`,"--reka-dropdown-menu-content-available-height":`var(--reka-popper-available-height)`,"--reka-dropdown-menu-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-dropdown-menu-trigger-height":`var(--reka-popper-anchor-height)`},onCloseAutoFocus:o,onInteractOutside:t[0]||=e=>{if(e.defaultPrevented)return;let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,o=t.button===2||n;(!i(r).modal.value||o)&&(a.value=!0),i(r).triggerElement.value?.contains(e.target)&&e.preventDefault()}}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`]))}}),Ft=e({__name:`DropdownMenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:n}){let r=e,a=Ee(n);return G(),(e,n)=>(h(),f(i(Et),t(c({...r,...i(a)})),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),It=e({__name:`DropdownMenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let n=e;return(e,r)=>(h(),f(i(At),t(c(n)),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),Lt=e({__name:`DropdownMenuTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,r=jt(),{forwardRef:o,currentElement:s}=G();return a(()=>{r.triggerElement=s}),r.triggerId||=Re(void 0,`reka-dropdown-menu-trigger`),(e,a)=>(h(),f(i(mt),{"as-child":``},{default:k(()=>[C(i(W),{id:i(r).triggerId,ref:i(o),type:e.as===`button`?`button`:void 0,"as-child":t.asChild,as:e.as,"aria-haspopup":`menu`,"aria-expanded":i(r).open.value,"aria-controls":i(r).open.value?i(r).contentId:void 0,"data-disabled":e.disabled?``:void 0,disabled:e.disabled,"data-state":i(r).open.value?`open`:`closed`,onClick:a[0]||=async t=>{!e.disabled&&t.button===0&&t.ctrlKey===!1&&(i(r)?.onOpenToggle(),await n(),i(r).open.value&&t.preventDefault())},onKeydown:a[1]||=y(t=>{e.disabled||([`Enter`,` `].includes(t.key)&&i(r).onOpenToggle(),t.key===`ArrowDown`&&i(r).onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(t.key)&&t.preventDefault())},[`enter`,`space`,`arrow-down`])},{default:k(()=>[D(e.$slots,`default`)]),_:3},8,[`id`,`type`,`as-child`,`as`,`aria-expanded`,`aria-controls`,`data-disabled`,`disabled`,`data-state`])]),_:3}))}}),[$,Rt]=Y(`EditableRoot`),zt=e({inheritAttrs:!1,__name:`EditableRoot`,props:{defaultValue:{type:String,required:!1},modelValue:{type:[String,null],required:!1},placeholder:{type:[String,Object],required:!1,default:`Enter text...`},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1},activationMode:{type:String,required:!1,default:`focus`},selectOnFocus:{type:Boolean,required:!1,default:!1},submitMode:{type:String,required:!1,default:`blur`},startWithEditMode:{type:Boolean,required:!1},maxLength:{type:Number,required:!1},autoResize:{type:Boolean,required:!1,default:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`},name:{type:String,required:!1},required:{type:Boolean,required:!1,default:!1}},emits:[`update:modelValue`,`submit`,`update:state`],setup(e,{expose:t,emit:n}){let a=e,o=n,{id:s,name:c,defaultValue:l,startWithEditMode:u,placeholder:d,maxLength:m,disabled:g,dir:v,submitMode:y,activationMode:b,selectOnFocus:x,readonly:S,autoResize:C,required:w}=p(a),T=M(),E=J(v),A=M(u.value??!1),j=K(a,`modelValue`,o,{defaultValue:l.value??``,passive:a.modelValue===void 0}),{primitiveElement:P,currentElement:F}=Ce(),ee=Te(F),te=_(()=>typeof d.value==`string`?{edit:d.value,preview:d.value}:d.value),I=M(j.value);O(()=>j.value,()=>{I.value=j.value},{immediate:!0,deep:!0});function L(){A.value=!1,o(`update:state`,`cancel`)}function R(){A.value=!0,I.value=j.value,o(`update:state`,`edit`)}function z(){j.value=I.value,A.value=!1,o(`update:state`,`submit`),o(`submit`,j.value)}function ne(){A.value&&(y.value===`blur`||y.value===`both`?z():L())}let re=Ae(()=>ne(),F,A),B=He(()=>ne(),F,A),ie=_(()=>j.value===``);return t({submit:z,cancel:L,edit:R}),Rt({id:s,name:c,disabled:g,isEditing:A,maxLength:m,modelValue:j,inputValue:I,placeholder:te,edit:R,cancel:L,submit:z,activationMode:b,submitMode:y,selectOnFocus:x,inputRef:T,startWithEditMode:u,isEmpty:ie,readonly:S,autoResize:C}),(e,t)=>(h(),f(i(W),N(e.$attrs,{ref_key:`primitiveElement`,ref:P,as:e.as,"as-child":e.asChild,dir:i(E),"data-dismissable-layer":``,onFocusCapture:i(B).onFocusCapture,onBlurCapture:i(B).onBlurCapture,onPointerdownCapture:i(re).onPointerDownCapture}),{default:k(()=>[D(e.$slots,`default`,{modelValue:i(j),isEditing:A.value,isEmpty:ie.value,submit:z,cancel:L,edit:R}),i(ee)&&i(c)?(h(),f(i(Me),{key:0,type:`text`,value:i(j),name:i(c),disabled:i(g),required:i(w)},null,8,[`value`,`name`,`disabled`,`required`])):r(`v-if`,!0)]),_:3},16,[`as`,`as-child`,`dir`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),Bt=e({__name:`EditableArea`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e,n=$();return(e,r)=>(h(),f(i(W),N(t,{"data-placeholder-shown":i(n).isEditing.value?void 0:``,"data-focus":i(n).isEditing.value?``:void 0,"data-focused":i(n).isEditing.value?``:void 0,"data-empty":i(n).isEmpty.value?``:void 0,"data-readonly":i(n).readonly.value?``:void 0,"data-disabled":i(n).disabled.value?``:void 0,style:i(n).autoResize.value?{display:`inline-grid`}:void 0}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`data-placeholder-shown`,`data-focus`,`data-focused`,`data-empty`,`data-readonly`,`data-disabled`,`style`]))}}),Vt=e({__name:`EditableEditTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=$();return(e,r)=>(h(),f(i(W),N(t,{"aria-label":`edit`,"aria-disabled":i(n).disabled.value?``:void 0,"data-disabled":i(n).disabled.value?``:void 0,disabled:i(n).disabled.value,type:e.as===`button`?`button`:void 0,hidden:i(n).isEditing.value?``:void 0,onClick:i(n).edit}),{default:k(()=>[D(e.$slots,`default`,{},()=>[r[0]||=u(`Edit`)])]),_:3},16,[`aria-disabled`,`data-disabled`,`disabled`,`type`,`hidden`,`onClick`]))}}),Ht=e({__name:`EditableInput`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},setup(e){let t=e,r=be(),o=$(),s=_(()=>o.disabled.value),c=_(()=>o.placeholder.value?.edit),{primitiveElement:l,currentElement:u}=Ce();a(()=>{o.inputRef.value=u.value,o.startWithEditMode.value&&(o.inputRef.value?.focus({preventScroll:!0}),o.selectOnFocus.value&&o.inputRef.value?.select())}),O(o.isEditing,e=>{e&&n(()=>{o.inputRef.value?.focus({preventScroll:!0}),o.selectOnFocus.value&&o.inputRef.value?.select()})});function d(e){(o.submitMode.value===`enter`||o.submitMode.value===`both`)&&e.key===r.ENTER&&!e.shiftKey&&!e.metaKey&&o.submit()}return(e,n)=>(h(),f(i(W),N({ref_key:`primitiveElement`,ref:l},t,{value:i(o).inputValue.value,placeholder:c.value,disabled:s.value,maxlength:i(o).maxLength.value,"data-disabled":s.value?``:void 0,"data-readonly":i(o).readonly.value?``:void 0,readonly:i(o).readonly.value,"aria-label":`editable input`,hidden:i(o).autoResize.value?void 0:!i(o).isEditing.value,style:i(o).autoResize.value?{all:`unset`,gridArea:`1 / 1 / auto / auto`,visibility:i(o).isEditing.value?void 0:`hidden`}:void 0,onInput:n[0]||=e=>i(o).inputValue.value=e.target.value,onKeydown:[y(d,[`enter`,`space`]),y(i(o).cancel,[`esc`])]}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`value`,`placeholder`,`disabled`,`maxlength`,`data-disabled`,`data-readonly`,`readonly`,`hidden`,`style`,`onKeydown`]))}}),Ut=e({__name:`EditablePreview`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=$(),r=_(()=>n.placeholder.value?.preview);function a(){n.activationMode.value===`focus`&&n.edit()}function o(){n.activationMode.value===`dblclick`&&n.edit()}return(e,s)=>(h(),f(i(W),N(t,{tabindex:`0`,"data-placeholder-shown":i(n).isEditing.value?void 0:``,hidden:i(n).autoResize.value?void 0:i(n).isEditing.value,style:i(n).autoResize.value?{whiteSpace:`pre`,userSelect:`none`,gridArea:`1 / 1 / auto / auto`,visibility:i(n).isEditing.value?`hidden`:void 0,overflow:`hidden`,textOverflow:`ellipsis`}:void 0,onFocusin:a,onDblclick:o}),{default:k(()=>[D(e.$slots,`default`,{},()=>[u(l(i(n).modelValue.value||r.value),1)])]),_:3},16,[`data-placeholder-shown`,`hidden`,`style`]))}}),Wt=e({__name:`EditableSubmitTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=$();return(e,r)=>(h(),f(i(W),N(t,{"aria-label":`submit`,"aria-disabled":i(n).disabled.value?``:void 0,"data-disabled":i(n).disabled.value?``:void 0,disabled:i(n).disabled.value,type:e.as===`button`?`button`:void 0,hidden:i(n).isEditing.value?void 0:``,onClick:i(n).submit}),{default:k(()=>[D(e.$slots,`default`,{},()=>[r[0]||=u(`Submit`)])]),_:3},16,[`aria-disabled`,`data-disabled`,`disabled`,`type`,`hidden`,`onClick`]))}}),Gt={flex:``,"items-center":``},Kt={flex:``,"items-center":``},qt={flex:``,"items-center":``},Jt={flex:``,"items-center":``,"justify-between":``},Yt={"mt-4":``,flex:``,"items-center":``,"justify-between":``},Xt={flex:``,"items-center":``},Zt={flex:``,"items-center":``},Qt={flex:``,"items-center":``},$t={flex:``,"items-center":``},en={flex:``,"items-center":``},tn={flex:``,"items-center":``},nn={flex:``,"items-center":``},rn={flex:``,"items-center":``},an={flex:``,"items-center":``},on={flex:``,"items-center":``},sn={flex:``,"items-center":``},cn={flex:``,"items-center":``},ln={flex:``,"items-center":``},un={flex:``,"items-center":``},dn={flex:``,"items-center":``},fn={flex:``,"items-center":``},pn={flex:``,"items-center":``},mn={flex:``,"items-center":``},hn={flex:``,"items-center":``},gn={flex:``,"items-center":``},_n={flex:``,"items-center":``},vn={flex:``,"items-center":``},yn=200,bn=200,xn=e({__name:`Live2D`,props:{palette:{}},emits:[`extractColorsFromModel`],setup(e){let{t}=et(),{live2dDisableFocus:n,live2dIdleAnimationEnabled:r,live2dAutoBlinkEnabled:a}=Z(Je()),{scale:o,position:s,modelParameters:c}=Z(at());function d(){c.value={...rt}}let f=null,p=null,g=yn+bn,_=0,v=1,y=1,b=!1,x=!1,S=null;function D(){f!==null&&(cancelAnimationFrame(f),f=null,b=!1),p!==null&&(clearTimeout(p),p=null),S!==null&&(clearTimeout(S),S=null)}function M(){if(b||p!==null||(D(),!a.value))return;b=!0,_=Date.now(),v=c.value.leftEyeOpen,y=c.value.rightEyeOpen;function e(){if(!a.value){D();return}let t=Date.now()-_,n=Math.min(t/g,1),r,i;if(t<yn){let e=1-(1-t/yn)**2;r=v+(0-v)*e,i=y+(0-y)*e}else{let e=(t-yn)/bn,n=e*e;r=0+(v-0)*n,i=0+(y-0)*n}if(x=!0,c.value.leftEyeOpen=Math.round(r*100)/100,c.value.rightEyeOpen=Math.round(i*100)/100,setTimeout(()=>{x=!1},0),n<1)f=requestAnimationFrame(e);else if(x=!0,c.value.leftEyeOpen=Math.round(v*100)/100,c.value.rightEyeOpen=Math.round(y*100)/100,setTimeout(()=>{x=!1},0),b=!1,f=null,a.value){let e=5e3+Math.random()*5e3;p=setTimeout(()=>{p=null,a.value&&!b&&M()},e)}}f=requestAnimationFrame(e)}return O(a,e=>{e?!b&&p===null&&M():D()}),O(()=>c.value.leftEyeOpen,(e,t)=>{if(!(!a.value||b||x||p!==null)){if(t==null&&e>0){M();return}t!==void 0&&Math.abs(e-t)>.01&&(D(),S!==null&&clearTimeout(S),S=setTimeout(()=>{a.value&&!b&&p===null&&M(),S=null},1e3))}},{immediate:!0}),O(()=>c.value.rightEyeOpen,(e,t)=>{if(!(!a.value||b||x||p!==null)){if(t==null&&e>0){M();return}t!==void 0&&Math.abs(e-t)>.01&&(D(),S!==null&&clearTimeout(S),S=setTimeout(()=>{a.value&&!b&&p===null&&M(),S=null},1e3))}},{immediate:!0}),m(()=>{D()}),(f,p)=>(h(),A(T,null,[C(i(V),{title:i(t)(`settings.live2d.scale-and-position.title`),icon:`i-solar:scale-bold-duotone`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`]),size:`sm`,expand:!0},{default:k(()=>[C(i(X),{modelValue:i(o),"onUpdate:modelValue":p[1]||=e=>E(o)?o.value=e:null,as:`div`,min:.5,max:2,step:.01,label:i(t)(`settings.live2d.scale-and-position.scale`)},{label:k(()=>[j(`div`,Gt,[j(`div`,null,l(i(t)(`settings.live2d.scale-and-position.scale`)),1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[0]||=()=>o.value=1},[...p[54]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`,`label`]),C(i(X),{modelValue:i(s).x,"onUpdate:modelValue":p[3]||=e=>i(s).x=e,as:`div`,min:-100,max:100,step:1,label:i(t)(`settings.live2d.scale-and-position.x`)},{label:k(()=>[j(`div`,Kt,[j(`div`,null,l(i(t)(`settings.live2d.scale-and-position.x`)),1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[2]||=()=>i(s).x=0},[...p[55]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`,`label`]),C(i(X),{modelValue:i(s).y,"onUpdate:modelValue":p[5]||=e=>i(s).y=e,as:`div`,min:-100,max:100,step:1,label:i(t)(`settings.live2d.scale-and-position.y`)},{label:k(()=>[j(`div`,qt,[j(`div`,null,l(i(t)(`settings.live2d.scale-and-position.y`)),1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[4]||=()=>i(s).y=0},[...p[56]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`,`label`])]),_:1},8,[`title`]),C(i(V),{title:i(t)(`settings.live2d.theme-color-from-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`]),size:`sm`,expand:!1},{default:k(()=>[C(i(ve),{class:`mb-4 mt-2`,colors:e.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),C(i(H),{variant:`secondary`,onClick:p[6]||=e=>f.$emit(`extractColorsFromModel`)},{default:k(()=>[u(l(i(t)(`settings.live2d.theme-color-from-model.button-extract.title`)),1)]),_:1})]),_:1},8,[`title`]),C(i(V),{title:i(t)(`settings.live2d.focus.title`),icon:`i-solar:eye-scan-bold-duotone`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`]),size:`sm`,expand:!1},{default:k(()=>[C(i(Pe),{modelValue:i(n),"onUpdate:modelValue":p[7]||=e=>E(n)?n.value=e:null,label:i(t)(`settings.live2d.focus.button-disable.title`)},null,8,[`modelValue`,`label`])]),_:1},8,[`title`]),C(i(V),{title:`Parameters`,icon:`i-solar:settings-bold-duotone`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`]),size:`sm`,expand:!1},{default:k(()=>[j(`div`,Jt,[p[57]||=j(`span`,{"text-sm":``,"text-neutral-600":``,"dark:text-neutral-400":``},`Idle Animation`,-1),C(i(Pe),{modelValue:i(r),"onUpdate:modelValue":p[8]||=e=>E(r)?r.value=e:null},null,8,[`modelValue`])]),j(`div`,Yt,[p[58]||=j(`span`,{"text-sm":``,"text-neutral-600":``,"dark:text-neutral-400":``},`Auto Blink`,-1),C(i(Pe),{modelValue:i(a),"onUpdate:modelValue":p[9]||=e=>E(a)?a.value=e:null},null,8,[`modelValue`])]),j(`button`,{"mt-4":``,"w-full":``,border:``,rounded:``,"bg-neutral-100":``,"px-4":``,"py-2":``,"text-sm":``,"text-neutral-700":``,"font-medium":``,"transition-colors":``,"dark:border-neutral-700":``,"dark:bg-neutral-800":``,"hover:bg-neutral-200":``,"dark:text-neutral-300":``,"dark:hover:bg-neutral-700":``,onClick:d},` Reset To Default Parameters `),p[103]||=j(`div`,{"mb-2":``,"mt-4":``,"text-xs":``,"text-neutral-500":``,"font-semibold":``,"dark:text-neutral-400":``},` Head Rotation `,-1),C(i(X),{modelValue:i(c).angleX,"onUpdate:modelValue":p[11]||=e=>i(c).angleX=e,as:`div`,min:-30,max:30,step:.1,label:`Angle X`},{label:k(()=>[j(`div`,Xt,[p[60]||=j(`div`,null,`Angle X`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[10]||=()=>i(c).angleX=0},[...p[59]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).angleY,"onUpdate:modelValue":p[13]||=e=>i(c).angleY=e,as:`div`,min:-30,max:30,step:.1,label:`Angle Y`},{label:k(()=>[j(`div`,Zt,[p[62]||=j(`div`,null,`Angle Y`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[12]||=()=>i(c).angleY=0},[...p[61]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).angleZ,"onUpdate:modelValue":p[15]||=e=>i(c).angleZ=e,as:`div`,min:-30,max:30,step:.1,label:`Angle Z`},{label:k(()=>[j(`div`,Qt,[p[64]||=j(`div`,null,`Angle Z`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[14]||=()=>i(c).angleZ=0},[...p[63]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),p[104]||=j(`div`,{"mb-2":``,"mt-4":``,"text-xs":``,"text-neutral-500":``,"font-semibold":``,"dark:text-neutral-400":``},` Eyes `,-1),C(i(X),{modelValue:i(c).leftEyeOpen,"onUpdate:modelValue":p[17]||=e=>i(c).leftEyeOpen=e,as:`div`,min:0,max:1,step:.01,label:`Left Eye Open/Close`},{label:k(()=>[j(`div`,$t,[p[66]||=j(`div`,null,`Left Eye Open/Close`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[16]||=()=>i(c).leftEyeOpen=0},[...p[65]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).rightEyeOpen,"onUpdate:modelValue":p[19]||=e=>i(c).rightEyeOpen=e,as:`div`,min:0,max:1,step:.01,label:`Right Eye Open/Close`},{label:k(()=>[j(`div`,en,[p[68]||=j(`div`,null,`Right Eye Open/Close`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[18]||=()=>i(c).rightEyeOpen=0},[...p[67]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).leftEyeSmile,"onUpdate:modelValue":p[21]||=e=>i(c).leftEyeSmile=e,as:`div`,min:0,max:1,step:.01,label:`Left Eye Smiling`},{label:k(()=>[j(`div`,tn,[p[70]||=j(`div`,null,`Left Eye Smiling`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[20]||=()=>i(c).leftEyeSmile=0},[...p[69]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).rightEyeSmile,"onUpdate:modelValue":p[23]||=e=>i(c).rightEyeSmile=e,as:`div`,min:0,max:1,step:.01,label:`Right Eye Smiling`},{label:k(()=>[j(`div`,nn,[p[72]||=j(`div`,null,`Right Eye Smiling`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[22]||=()=>i(c).rightEyeSmile=0},[...p[71]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),p[105]||=j(`div`,{"mb-2":``,"mt-4":``,"text-xs":``,"text-neutral-500":``,"font-semibold":``,"dark:text-neutral-400":``},` Eyebrows `,-1),C(i(X),{modelValue:i(c).leftEyebrowLR,"onUpdate:modelValue":p[25]||=e=>i(c).leftEyebrowLR=e,as:`div`,min:-1,max:1,step:.01,label:`Left eyebrow Left/Right`},{label:k(()=>[j(`div`,rn,[p[74]||=j(`div`,null,`Left eyebrow Left/Right`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[24]||=()=>i(c).leftEyebrowLR=0},[...p[73]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).rightEyebrowLR,"onUpdate:modelValue":p[27]||=e=>i(c).rightEyebrowLR=e,as:`div`,min:-1,max:1,step:.01,label:`Right eyebrow Left/Right`},{label:k(()=>[j(`div`,an,[p[76]||=j(`div`,null,`Right eyebrow Left/Right`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[26]||=()=>i(c).rightEyebrowLR=0},[...p[75]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).leftEyebrowY,"onUpdate:modelValue":p[29]||=e=>i(c).leftEyebrowY=e,as:`div`,min:-1,max:1,step:.01,label:`Left Eyebrow Y (Up/Down)`},{label:k(()=>[j(`div`,on,[p[78]||=j(`div`,null,`Left Eyebrow Y`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[28]||=()=>i(c).leftEyebrowY=0},[...p[77]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).rightEyebrowY,"onUpdate:modelValue":p[31]||=e=>i(c).rightEyebrowY=e,as:`div`,min:-1,max:1,step:.01,label:`Right Eyebrow Y (Up/Down)`},{label:k(()=>[j(`div`,sn,[p[80]||=j(`div`,null,`Right Eyebrow Y`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[30]||=()=>i(c).rightEyebrowY=0},[...p[79]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).leftEyebrowAngle,"onUpdate:modelValue":p[33]||=e=>i(c).leftEyebrowAngle=e,as:`div`,min:-1,max:1,step:.01,label:`Left Eyebrow Angle`},{label:k(()=>[j(`div`,cn,[p[82]||=j(`div`,null,`Left Eyebrow Angle`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[32]||=()=>i(c).leftEyebrowAngle=0},[...p[81]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).rightEyebrowAngle,"onUpdate:modelValue":p[35]||=e=>i(c).rightEyebrowAngle=e,as:`div`,min:-1,max:1,step:.01,label:`Right Eyebrow Angle`},{label:k(()=>[j(`div`,ln,[p[84]||=j(`div`,null,`Right Eyebrow Angle`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[34]||=()=>i(c).rightEyebrowAngle=0},[...p[83]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).leftEyebrowForm,"onUpdate:modelValue":p[37]||=e=>i(c).leftEyebrowForm=e,as:`div`,min:-1,max:1,step:.01,label:`Left Eyebrow Form (Deformation)`},{label:k(()=>[j(`div`,un,[p[86]||=j(`div`,null,`Left Eyebrow Form`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[36]||=()=>i(c).leftEyebrowForm=0},[...p[85]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).rightEyebrowForm,"onUpdate:modelValue":p[39]||=e=>i(c).rightEyebrowForm=e,as:`div`,min:-1,max:1,step:.01,label:`Right Eyebrow Form (Deformation)`},{label:k(()=>[j(`div`,dn,[p[88]||=j(`div`,null,`Right Eyebrow Form`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[38]||=()=>i(c).rightEyebrowForm=0},[...p[87]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),p[106]||=j(`div`,{"mb-2":``,"mt-4":``,"text-xs":``,"text-neutral-500":``,"font-semibold":``,"dark:text-neutral-400":``},` Mouth `,-1),C(i(X),{modelValue:i(c).mouthOpen,"onUpdate:modelValue":p[41]||=e=>i(c).mouthOpen=e,as:`div`,min:0,max:1,step:.01,label:`Mouth Open/Close`},{label:k(()=>[j(`div`,fn,[p[90]||=j(`div`,null,`Mouth Open/Close`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[40]||=()=>i(c).mouthOpen=0},[...p[89]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).mouthForm,"onUpdate:modelValue":p[43]||=e=>i(c).mouthForm=e,as:`div`,min:-1,max:1,step:.01,label:`Mouth Form (Deformation)`},{label:k(()=>[j(`div`,pn,[p[92]||=j(`div`,null,`Mouth Form`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[42]||=()=>i(c).mouthForm=0},[...p[91]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),p[107]||=j(`div`,{"mb-2":``,"mt-4":``,"text-xs":``,"text-neutral-500":``,"font-semibold":``,"dark:text-neutral-400":``},` Face `,-1),C(i(X),{modelValue:i(c).cheek,"onUpdate:modelValue":p[45]||=e=>i(c).cheek=e,as:`div`,min:0,max:1,step:.01,label:`Cheek`},{label:k(()=>[j(`div`,mn,[p[94]||=j(`div`,null,`Cheek`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[44]||=()=>i(c).cheek=0},[...p[93]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),p[108]||=j(`div`,{"mb-2":``,"mt-4":``,"text-xs":``,"text-neutral-500":``,"font-semibold":``,"dark:text-neutral-400":``},` Body `,-1),C(i(X),{modelValue:i(c).bodyAngleX,"onUpdate:modelValue":p[47]||=e=>i(c).bodyAngleX=e,as:`div`,min:-10,max:10,step:.1,label:`Body rotation X`},{label:k(()=>[j(`div`,hn,[p[96]||=j(`div`,null,`Body rotation X`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[46]||=()=>i(c).bodyAngleX=0},[...p[95]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).bodyAngleY,"onUpdate:modelValue":p[49]||=e=>i(c).bodyAngleY=e,as:`div`,min:-10,max:10,step:.1,label:`Body rotation Y`},{label:k(()=>[j(`div`,gn,[p[98]||=j(`div`,null,`Body rotation Y`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[48]||=()=>i(c).bodyAngleY=0},[...p[97]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).bodyAngleZ,"onUpdate:modelValue":p[51]||=e=>i(c).bodyAngleZ=e,as:`div`,min:-10,max:10,step:.1,label:`Body rotation Z`},{label:k(()=>[j(`div`,_n,[p[100]||=j(`div`,null,`Body rotation Z`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[50]||=()=>i(c).bodyAngleZ=0},[...p[99]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`]),C(i(X),{modelValue:i(c).breath,"onUpdate:modelValue":p[53]||=e=>i(c).breath=e,as:`div`,min:0,max:1,step:.01,label:`Breath`},{label:k(()=>[j(`div`,vn,[p[102]||=j(`div`,null,`Breath`,-1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:p[52]||=()=>i(c).breath=0},[...p[101]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`])]),_:1})],64))}}),Sn={grid:`~ cols-5 gap-1`,"p-2":``},Cn={class:`text-xs`},wn={key:0},Tn={grid:`~ cols-5 gap-1`,"p-2":``},En={key:1},Dn={grid:`~ cols-5 gap-1`,"p-2":``},On={class:`text-sm text-neutral-600 space-y-1 dark:text-neutral-400`},kn={class:`flex justify-between`},An={class:`flex justify-between`},jn={class:`flex justify-between`},Mn={class:`text-sm text-neutral-600 space-y-1 dark:text-neutral-400`},Nn=e({__name:`VRM`,props:{palette:{}},emits:[`extractColorsFromModel`],setup(e){let{t}=et(),{modelSize:n,modelOffset:r,cameraFOV:a,modelRotationY:s,cameraDistance:c,trackingMode:d,directionalLightRotation:p,directionalLightIntensity:m,directionalLightColor:g,ambientLightIntensity:v,ambientLightColor:y,hemisphereLightIntensity:b,hemisphereSkyColor:x,hemisphereGroundColor:S,envSelect:D,skyBoxIntensity:O}=Z(it()),M=_(()=>[{value:`camera`,label:t(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.camera`),class:`col-start-3`},{value:`mouse`,label:t(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.mouse`),class:`col-start-4`},{value:`none`,label:t(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.disabled`),class:`col-start-5`}]),N=[{value:`hemisphere`,label:`Hemisphere`,icon:{idle:`i-solar:forbidden-circle-linear rotate-45`,active:`i-solar:forbidden-circle-bold rotate-45`}},{value:`skyBox`,label:`SkyBox`,icon:{idle:`i-solar:gallery-circle-linear`,active:`i-solar:gallery-circle-bold`}}];return(_,P)=>(h(),A(T,null,[C(i(se),{title:i(t)(`settings.pages.models.sections.section.scene`),icon:`i-solar:people-nearby-bold-duotone`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[C(i(ve),{class:`mb-4 mt-2`,colors:e.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),C(i(H),{variant:`secondary`,onClick:P[0]||=e=>_.$emit(`extractColorsFromModel`)},{default:k(()=>[u(l(i(t)(`settings.vrm.theme-color-from-model.button-extract.title`)),1)]),_:1}),j(`div`,Sn,[C(i(oe),{x:i(r).x,"onUpdate:x":P[1]||=e=>i(r).x=e,y:i(r).y,"onUpdate:y":P[2]||=e=>i(r).y=e,z:i(r).z,"onUpdate:z":P[3]||=e=>i(r).z=e,label:`Model Position`,"x-config":{min:-i(n).x*2,max:i(n).x*2,step:i(n).x/100,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{min:-i(n).y*2,max:i(n).y*2,step:i(n).y/100,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{min:-i(n).z*2,max:i(n).z*2,step:i(n).z/100,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),C(i(F),{modelValue:i(a),"onUpdate:modelValue":P[4]||=e=>E(a)?a.value=e:null,config:{min:1,max:180,step:1,label:i(t)(`settings.vrm.scale-and-position.fov`)},label:i(t)(`settings.vrm.scale-and-position.fov`)},null,8,[`modelValue`,`config`,`label`]),C(i(F),{modelValue:i(c),"onUpdate:modelValue":P[5]||=e=>E(c)?c.value=e:null,config:{min:i(n).z,max:i(n).z*20,step:i(n).z/100,label:i(t)(`settings.vrm.scale-and-position.camera-distance`),formatValue:e=>e?.toFixed(4)},label:i(t)(`settings.vrm.scale-and-position.camera-distance`)},null,8,[`modelValue`,`config`,`label`]),C(i(F),{modelValue:i(s),"onUpdate:modelValue":P[6]||=e=>E(s)?s.value=e:null,config:{min:-180,max:180,step:1,label:i(t)(`settings.vrm.scale-and-position.rotation-y`)},label:i(t)(`settings.vrm.scale-and-position.rotation-y`)},null,8,[`modelValue`,`config`,`label`]),j(`div`,Cn,l(i(t)(`settings.vrm.scale-and-position.eye-tracking-mode.title`))+`: `,1),P[18]||=j(`div`,null,null,-1),(h(!0),A(T,null,o(M.value,e=>(h(),f(i(H),{key:e.value,class:w([e.class,`w-auto`]),size:`sm`,variant:i(d)===e.value?`primary`:`secondary`,label:e.label,onClick:t=>d.value=e.value},null,8,[`class`,`variant`,`label`,`onClick`]))),128)),C(i(F),{modelValue:i(p).x,"onUpdate:modelValue":P[7]||=e=>i(p).x=e,config:{min:-180,max:180,step:1,label:`RotationXDeg`,formatValue:e=>e?.toFixed(0)},label:`Directional Light Rotation - X`},null,8,[`modelValue`,`config`]),C(i(F),{modelValue:i(p).y,"onUpdate:modelValue":P[8]||=e=>i(p).y=e,config:{min:-180,max:180,step:1,label:`RotationYDeg`,formatValue:e=>e?.toFixed(0)},label:`Directional Light Rotation - Y`},null,8,[`modelValue`,`config`]),C(i(U),{modelValue:i(g),"onUpdate:modelValue":P[9]||=e=>E(g)?g.value=e:null,label:`Directional Light Color`},null,8,[`modelValue`]),C(i(F),{modelValue:i(m),"onUpdate:modelValue":P[10]||=e=>E(m)?m.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Directional Light Intensity`},null,8,[`modelValue`]),C(i(F),{modelValue:i(v),"onUpdate:modelValue":P[11]||=e=>E(v)?v.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Ambient Light Intensity`},null,8,[`modelValue`]),C(i(U),{modelValue:i(y),"onUpdate:modelValue":P[12]||=e=>E(y)?y.value=e:null,label:`Ambient Light Color`},null,8,[`modelValue`])]),j(`div`,null,[C(i(fe),{modelValue:i(D),"onUpdate:modelValue":P[17]||=e=>E(D)?D.value=e:null,tabs:N,label:`Environment`},{default:k(()=>[i(D)===`hemisphere`?(h(),A(`div`,wn,[j(`div`,Tn,[C(i(F),{modelValue:i(b),"onUpdate:modelValue":P[13]||=e=>E(b)?b.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Hemisphere Light Intensity`},null,8,[`modelValue`]),C(i(U),{modelValue:i(x),"onUpdate:modelValue":P[14]||=e=>E(x)?x.value=e:null,label:`Hemisphere Sky Color`},null,8,[`modelValue`]),C(i(U),{modelValue:i(S),"onUpdate:modelValue":P[15]||=e=>E(S)?S.value=e:null,label:`Hemisphere Ground Color`},null,8,[`modelValue`])])])):(h(),A(`div`,En,[j(`div`,Dn,[C(i(F),{modelValue:i(O),"onUpdate:modelValue":P[16]||=e=>E(O)?O.value=e:null,config:{min:0,max:1,step:.01,label:`Intensity`},label:i(t)(`settings.vrm.skybox.skybox-intensity`)},null,8,[`modelValue`,`label`])])]))]),_:1},8,[`modelValue`])])]),_:1},8,[`title`]),C(i(se),{title:i(t)(`settings.vrm.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[C(i(pe),{label:i(t)(`settings.vrm.scale-and-position.model-info-title`)},{default:k(()=>[j(`div`,null,[j(`div`,On,[j(`div`,kn,[j(`span`,null,l(i(t)(`settings.vrm.scale-and-position.model-info-x`)),1),j(`span`,null,l(i(n).x.toFixed(4)),1)]),j(`div`,An,[j(`span`,null,l(i(t)(`settings.vrm.scale-and-position.model-info-y`)),1),j(`span`,null,l(i(n).y.toFixed(4)),1)]),j(`div`,jn,[j(`span`,null,l(i(t)(`settings.vrm.scale-and-position.model-info-z`)),1),j(`span`,null,l(i(n).z.toFixed(4)),1)])])])]),_:1},8,[`label`]),C(i(pe),{theme:`lime`,label:`Tips!`},{default:k(()=>[j(`div`,Mn,l(i(t)(`settings.vrm.scale-and-position.tips`)),1)]),_:1})]),_:1},8,[`title`])],64))}}),Pn={pt:`4 sm:0`,gap:`4 sm:6`,"h-full":``,flex:``,"flex-col":``},Fn={flex:``,"items-center":``},In={key:0},Ln={class:`flex-1 md:flex-none`,"h-full":``,"w-full":``,"overflow-x-hidden":``,"overflow-y-scroll":``},Rn={class:`grid grid-cols-2 gap-2 lg:max-h-80dvh`},zn=[`onClick`],Bn={absolute:``,"left-3":``,"top-4":``,"z-1":``},Vn=[`onClick`],Hn={class:`min-w-60 lg:min-h-60`,aspect:`12/16`,"px-1":``,"py-2":``},Un=[`src`],Wn={"h-full":``,"w-full":``,flex:``,"flex-col":``},Gn={"w-full":``,"flex-1":``,"p-2":``},Kn={key:1,class:`flex gap-2`},qn={flex:``,"items-center":``,"gap-1":``,text:`neutral-400 dark:neutral-600`},Jn=e({__name:`model-selector`,props:{modelValue:{type:Object,required:!1},modelModifiers:{}},emits:d([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,a=b(e,`modelValue`),s=qe(),{displayModelsFromIndexedDBLoading:c,displayModels:d}=Z(s);function p(e){s.removeDisplayModel(e.id)}let m=M(a.value?.id);function _(e){e===null||e.length===0||e[0].name.endsWith(`.zip`)&&s.addDisplayModel(Q.Live2dZip,e[0])}function y(e){a.value=e,n(`close`,void 0)}function x(){a.value=d.value.find(e=>e.id===m.value),n(`close`,void 0)}function S(e){e===null||e.length===0||e[0].name.endsWith(`.vrm`)&&s.addDisplayModel(Q.VRM,e[0])}let E={[Q.Live2dZip]:`Live2D`,[Q.Live2dDirectory]:`Live2D`,[Q.VRM]:`VRM`,[Q.PMXDirectory]:`MMD`,[Q.PMXZip]:`MMD`,[Q.PMD]:`MMD`},D=Ye({accept:`.zip`,multiple:!1,reset:!0}),O=Ye({accept:`.vrm`,multiple:!1,reset:!0});return D.onChange(_),O.onChange(S),(e,t)=>{let n=g(`auto-animate`);return h(),A(`div`,Pn,[j(`div`,Fn,[t[6]||=j(`div`,{"w-full":``,"flex-1":``,"text-xl":``},` Model Selector `,-1),j(`div`,null,[C(i(Nt),null,{default:k(()=>[C(i(Lt),{bg:`neutral-400/20 hover:neutral-400/45 active:neutral-400/60 dark:neutral-700/50 hover:dark:neutral-700/65 active:dark:neutral-700/90`,flex:``,"items-center":``,"justify-center":``,"gap-1":``,"rounded-lg":``,"px-2":``,"py-1":``,"backdrop-blur-sm":``,transition:`colors duration-200 ease-in-out`,"aria-label":`Options for Display Models`},{default:k(()=>[...t[3]||=[j(`div`,{"i-solar:add-circle-bold":``},null,-1),j(`div`,null,`Add`,-1)]]),_:1}),C(i(It),null,{default:k(()=>[C(i(Pt),{class:`will-change-[opacity,transform] z-10000 max-w-45 rounded-lg p-0.5 shadow-md outline-none data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade data-[side=right]:animate-slideLeftAndFade data-[side=top]:animate-slideDownAndFade`,bg:`neutral-100/50 dark:neutral-950/50`,transition:`colors duration-200 ease-in-out`,"backdrop-blur-sm":``,align:`end`,side:`bottom`,"side-offset":8},{default:k(()=>[C(i(Ft),{class:`data-[disabled]:text-mauve8 relative flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-base leading-none outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-primary-100/20 sm:text-sm data-[highlighted]:text-primary-200`,transition:`colors duration-200 ease-in-out`,onClick:t[0]||=e=>i(D).open()},{default:k(()=>[...t[4]||=[u(` Live2D `,-1)]]),_:1}),C(i(Ft),{class:`data-[disabled]:text-mauve8 relative flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-base leading-none outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-primary-100/20 sm:text-sm data-[highlighted]:text-primary-200`,transition:`colors duration-200 ease-in-out`,onClick:t[1]||=e=>i(O).open()},{default:k(()=>[...t[5]||=[u(` VRM `,-1)]]),_:1})]),_:1})]),_:1})]),_:1})])]),i(c)?(h(),A(`div`,In,` Loading display models... `)):r(``,!0),j(`div`,Ln,[j(`div`,Rn,[(h(!0),A(T,null,o(i(d),e=>v((h(),A(`div`,{key:e.id,relative:``,"w-full":``,flex:`~ col md:row`,"gap-2":``,onClick:()=>m.value=e.id},[j(`div`,Bn,[C(i(Nt),null,{default:k(()=>[C(i(Lt),{bg:`neutral-900/20 hover:neutral-900/45 active:neutral-900/60 dark:neutral-950/50 hover:dark:neutral-900/65 active:dark:neutral-900/90`,text:`white`,"h-7":``,"w-7":``,flex:``,"items-center":``,"justify-center":``,"rounded-lg":``,"backdrop-blur-sm":``,transition:`colors duration-200 ease-in-out`,"aria-label":`Options for Display Models`},{default:k(()=>[...t[7]||=[j(`div`,{"i-solar:menu-dots-bold":``},null,-1)]]),_:1}),C(i(It),null,{default:k(()=>[C(i(Pt),{class:`will-change-[opacity,transform] z-10000 max-w-45 rounded-lg p-0.5 text-white shadow-md outline-none data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade data-[side=right]:animate-slideLeftAndFade data-[side=top]:animate-slideDownAndFade dark:text-black`,bg:`neutral-700/50 dark:neutral-950/50`,transition:`colors duration-200 ease-in-out`,"backdrop-blur-sm":``,align:`start`,side:`bottom`,"side-offset":4},{default:k(()=>[C(i(Ft),{class:`data-[disabled]:text-mauve8 relative flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-base leading-none outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-red-100/20 sm:text-sm data-[highlighted]:text-red-200`,transition:`colors duration-200 ease-in-out`},{default:k(()=>[j(`button`,{flex:``,"items-center":``,"gap-1":``,"outline-none":``,onClick:t=>p(e)},[...t[8]||=[j(`div`,{"i-solar:trash-bin-minimalistic-bold-duotone":``},null,-1),j(`div`,null,`Remove`,-1)]],8,Vn)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),j(`div`,Hn,[e.previewImage?(h(),A(`img`,{key:0,src:i(Ke)(e.previewImage),"h-full":``,"w-full":``,"rounded-lg":``,"object-cover":``,class:w([m.value&&m.value===e.id?`ring-3 ring-primary-400`:`ring-0 ring-transparent`]),transition:`all duration-200 ease-in-out`},null,10,Un)):(h(),A(`div`,{key:1,bg:`neutral-100 dark:neutral-900`,relative:``,"h-full":``,"w-full":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``,"gap-2":``,"overflow-hidden":``,"rounded-lg":``,class:w([m.value&&m.value===e.id?`ring-3 ring-primary-400`:`ring-0 ring-transparent`]),transition:`all duration-200 ease-in-out`},[...t[9]||=[j(`div`,{"i-solar:question-square-bold-duotone":``,"text-4xl":``,"opacity-75":``},null,-1),j(`div`,{"translate-y":`100%`,absolute:``,"top-0":``,flex:``,"flex-col":``,"translate-x--7":``,"rotate-45":``,"scale-250":``,"gap-0":``,"opacity-5":``},[j(`div`,{text:`sm sm:sm`,"translate-x-7":``,"translate-y--2":``,"text-nowrap":``},` unavailable Preview unavailable Preview `),j(`div`,{text:`sm sm:sm`,"translate-x-0":``,"translate-y--0":``,"text-nowrap":``},` Preview unavailable Preview unavailable `),j(`div`,{text:`sm sm:sm`,"translate-x--7":``,"translate-y-2":``,"text-nowrap":``},` unavailable Preview unavailable Preview `)],-1)]],2))]),j(`div`,Wn,[j(`div`,Gn,[C(i(zt),{"default-value":e.name,placeholder:`Model Name...`,class:`flex gap-2`,"auto-resize":``},{default:k(({isEditing:e})=>[C(i(Bt),{class:`w-[calc(100%-8px-1rem)] dark:text-white`},{default:k(()=>[C(i(Ut),{class:`line-clamp-1 w-[calc(100%-8px)] overflow-hidden text-ellipsis`}),C(i(Ht),{class:`w-[calc(100%-8px)]! placeholder:text-neutral-700 dark:placeholder:text-neutral-600`})]),_:1}),e?(h(),A(`div`,Kn,[C(i(Wt),null,{default:k(()=>[...t[11]||=[j(`div`,{"i-solar:check-read-line-duotone":``,"opacity-50":``},null,-1)]]),_:1})])):(h(),f(i(Vt),{key:0},{default:k(()=>[...t[10]||=[j(`div`,{"i-solar:pen-2-line-duotone":``,"opacity-50":``},null,-1)]]),_:1}))]),_:1},8,[`default-value`]),j(`div`,qn,[t[12]||=j(`div`,{"i-solar:tag-horizontal-bold":``},null,-1),j(`div`,null,l(E[e.format]),1)])]),C(H,{class:`hidden md:block`,variant:`secondary`,onClick:t=>y(e)},{default:k(()=>[...t[13]||=[u(` Pick `,-1)]]),_:1},8,[`onClick`])])],8,zn)),[[n]])),128))])]),C(H,{class:`block md:hidden`,onClick:t[2]||=e=>x()},{default:k(()=>[...t[14]||=[u(` Confirm `,-1)]]),_:1})])}}}),Yn=e({__name:`model-selector-dialog`,props:{show:{type:Boolean,default:!1,required:!1},showModifiers:{},modelValue:{type:Object,required:!1},modelModifiers:{}},emits:[`update:show`,`update:modelValue`],setup(e){let t=b(e,`show`),n=b(e,`modelValue`),r=Ze(`(min-width: 768px)`),o=$e();return Qe(document.documentElement,()=>o.update()),a(()=>o.update()),(e,a)=>i(r)?(h(),f(i(z),{key:0,open:t.value,"onUpdate:open":a[2]||=e=>t.value=e},{default:k(()=>[C(i(he),{"as-child":``},{default:k(()=>[D(e.$slots,`default`)]),_:3}),C(i(B),null,{default:k(()=>[C(i(ee),{class:`fixed inset-0 z-[9999] bg-black/50 backdrop-blur-sm data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn`}),C(i(L),{class:`fixed left-1/2 top-1/2 z-[9999] max-h-full max-w-5xl w-[92dvw] transform overflow-y-scroll rounded-2xl bg-white p-6 shadow-xl outline-none backdrop-blur-md scrollbar-none -translate-x-1/2 -translate-y-1/2 data-[state=closed]:animate-contentHide data-[state=open]:animate-contentShow dark:bg-neutral-900`},{default:k(()=>[C(i(Ve),null,{default:k(()=>[C(i(re),null,{default:k(()=>[...a[6]||=[u(`Models`,-1)]]),_:1})]),_:1}),C(Jn,{modelValue:n.value,"onUpdate:modelValue":a[0]||=e=>n.value=e,onClose:a[1]||=e=>t.value=!1},null,8,[`modelValue`])]),_:1})]),_:1})]),_:3},8,[`open`])):(h(),f(i(de),{key:1,open:t.value,"should-scale-background":``,"onUpdate:open":a[5]||=e=>t.value=e},{default:k(()=>[C(i(he),{"as-child":``},{default:k(()=>[D(e.$slots,`default`)]),_:3}),C(i(B),null,{default:k(()=>[C(i(ge),{class:`fixed inset-0`}),C(i(_e),{class:`fixed bottom-0 left-0 right-0 z-1000 mt-20 h-full max-h-[96%] flex flex-col rounded-t-2xl bg-neutral-50 px-4 pt-4 outline-none backdrop-blur-md dark:bg-neutral-900/95`,style:S({paddingBottom:`${Math.max(Number.parseFloat(i(o).bottom.value.replace(`px`,``)),24)}px`})},{default:k(()=>[C(i(me)),C(Jn,{modelValue:n.value,"onUpdate:modelValue":a[3]||=e=>n.value=e,onClose:a[4]||=e=>t.value=!1},null,8,[`modelValue`])]),_:1},8,[`style`])]),_:1})]),_:3},8,[`open`]))}}),Xn=e({__name:`index`,props:{palette:{},settingsClass:{},live2dSceneClass:{},vrmSceneClass:{}},emits:[`extractColorsFromModel`],setup(e){let t=e,n=M(),a=Xe(),o=Je(),{live2dDisableFocus:s,stageModelSelectedUrl:c,stageModelSelected:l,stageModelRenderer:d}=Z(o);return O(n,async()=>{if(l.value=n.value?.id,await o.updateStageModel(),n.value)switch(n.value.format){case Q.Live2dZip:at().shouldUpdateView();break;case Q.VRM:it().shouldUpdateView();break}},{deep:!0}),(o,l)=>(h(),A(T,null,[j(`div`,{flex:`~ col gap-2`,"z-10":``,"overflow-y-scroll":``,"p-2":``,class:w([...t.settingsClass?typeof t.settingsClass==`string`?[t.settingsClass]:t.settingsClass:[]])},[C(pe,{label:`We support both 2D and 3D models`},{default:k(()=>[...l[3]||=[j(`p`,null,[u(` Click `),j(`strong`,null,`Select Model`),u(` to import different formats of models into catalog, currently, `),j(`code`,null,`.zip`),u(` (Live2D) and `),j(`code`,null,`.vrm`),u(` (VRM) are supported. `)],-1),j(`p`,null,` Neuro-sama uses 2D model driven by Live2D Inc. developed framework. While Grok Ani (first female character announced in Grok Companion) uses 3D model that is driven by VRM / MMD open formats. `,-1)]]),_:1}),C(i(Yn),{modelValue:n.value,"onUpdate:modelValue":l[0]||=e=>n.value=e},{default:k(()=>[C(H,{variant:`secondary`},{default:k(()=>[...l[4]||=[u(` Select Model `,-1)]]),_:1})]),_:1},8,[`modelValue`]),i(d)===`live2d`?(h(),f(xn,{key:0,palette:e.palette,onExtractColorsFromModel:l[1]||=e=>o.$emit(`extractColorsFromModel`)},null,8,[`palette`])):r(``,!0),i(d)===`vrm`?(h(),f(Nn,{key:1,palette:e.palette,onExtractColorsFromModel:l[2]||=e=>o.$emit(`extractColorsFromModel`)},null,8,[`palette`])):r(``,!0)],2),i(d)===`live2d`?(h(),A(`div`,{key:0,class:w([...t.live2dSceneClass?typeof t.live2dSceneClass==`string`?[t.live2dSceneClass]:t.live2dSceneClass:[]])},[C(ot,{"focus-at":{x:i(a).x.value,y:i(a).y.value},"model-src":i(c),"disable-focus-at":i(s)},null,8,[`focus-at`,`model-src`,`disable-focus-at`])],2)):r(``,!0),i(d)===`vrm`?(h(),A(`div`,{key:1,class:w([...t.vrmSceneClass?typeof t.vrmSceneClass==`string`?[t.vrmSceneClass]:t.vrmSceneClass:[]])},[C(i(st),{"model-src":i(c)},null,8,[`model-src`])],2)):r(``,!0)],64))}}),Zn={flex:``,class:`relative h-full flex-col-reverse md:flex-row`},Qn={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},$n=e({__name:`index`,setup(e){let t=M(),n=M([]);async function r(){if(!t.value)return;let e=await t.value.captureFrame();if(!e){console.error(`No frame captured`);return}let r=URL.createObjectURL(e);try{let e=await new tt(r).getPalette();n.value=Object.values(e).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(r)}}return(e,t)=>{let a=g(`motion`);return h(),A(T,null,[j(`div`,Zn,[C(i(Xn),{"settings-class":`w-100% md:w-40% lg:w-40% xl:w-25% 2xl:w-30% h-fit sm:max-h-80dvh overflow-y-scroll relative`,"live-2d-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,"vrm-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,palette:n.value,onExtractColorsFromModel:r},null,8,[`palette`])]),v((h(),A(`div`,Qn,[...t[0]||=[j(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)]])),[[a]])],64)}}});typeof nt==`function`&&nt($n);var er=$n;export{er as default};
assets/models-HggxzGo_.js DELETED
@@ -1 +0,0 @@
1
- import{A as e,At as t,B as n,C as r,Dt as i,H as a,K as o,L as s,M as c,Mt as l,O as u,R as d,S as f,Tt as p,U as m,W as h,Y as g,b as _,ct as v,d as y,et as b,f as x,jt as S,k as C,kt as w,m as T,mt as E,q as D,rt as O,st as k,w as A,x as j,yt as M,z as N}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./tres-Dg4AKlcm.js";import{B as P,C as F,F as ee,G as te,H as I,I as L,J as R,K as z,L as ne,M as re,N as B,P as ie,R as ae,S as oe,T as se,U as ce,V as le,W as ue,a as de,f as fe,h as V,i as pe,j as me,n as he,p as ge,r as _e,t as ve,u as H,w as U,z as ye}from"./widgets-DJ153_lR.js";import{A as be,B as xe,C as Se,D as W,E as Ce,F as G,G as we,H as K,I as Te,L as Ee,M as De,N as q,O as Oe,R as J,S as ke,T as Ae,X as je,Z as Y,_ as Me,b as Ne,d as Pe,f as Fe,g as Ie,h as Le,j as Re,k as ze,o as Be,p as Ve,v as He,w as Ue,x as We,y as Ge,z as Ke}from"./src-BEKjKq3V.js";import{I as X,M as qe,a as Je,i as Z,n as Ye}from"./settings-ckdWvS_B.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import{d as Xe,h as Ze,m as Qe,v as $e,y as et}from"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{n as tt}from"./vue-i18n.runtime-Asl2hnl1.js";import{t as nt}from"./browser-BoU2m5e0.js";import{t as rt}from"./route-block-B7Ro39Uj.js";import{a as it,n as at,r as ot,t as st}from"./src-CmKk7VdW.js";import"./beat-sync-D0DTRDRF.js";var ct=[`INPUT`,`TEXTAREA`];function lt(e,t,n,r={}){if(!t||r.enableIgnoredElement&&ct.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-reka-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=ut(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function ut(e,t,n,r=e.length){if(--r===0)return null;let i=e.indexOf(t),a=n.goForward?i+1:i-1;if(!n.loop&&(a<0||a>=e.length))return null;let o=e[(a+e.length)%e.length];return o?o.hasAttribute(`disabled`)&&o.getAttribute(`disabled`)!==`false`?ut(e,o,n,r):o:null}var[dt,ft]=Y(`RovingFocusGroup`),pt=e({__name:`RovingFocusGroup`,props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`entryFocus`,`update:currentTabStopId`],setup(e,{expose:t,emit:n}){let r=e,a=n,{loop:o,orientation:s,dir:c}=p(r),l=J(c),u=K(r,`currentTabStopId`,a,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),d=M(!1),m=M(!1),g=M(0),{getItems:_,CollectionSlot:v}=ke({isProvider:!0});function y(e){let t=!m.value;if(e.currentTarget&&e.target===e.currentTarget&&t&&!d.value){let t=new CustomEvent(Ge,Ne);if(e.currentTarget.dispatchEvent(t),a(`entryFocus`,t),!t.defaultPrevented){let e=_().map(e=>e.ref).filter(e=>e.dataset.disabled!==``);We([e.find(e=>e.getAttribute(`data-active`)===``),e.find(e=>e.getAttribute(`data-highlighted`)===``),e.find(e=>e.id===u.value),...e].filter(Boolean),r.preventScrollOnEntryFocus)}}m.value=!1}function b(){setTimeout(()=>{m.value=!1},1)}return t({getItems:_}),ft({loop:o,dir:l,orientation:s,currentTabStopId:u,onItemFocus:e=>{u.value=e},onItemShiftTab:()=>{d.value=!0},onFocusableItemAdd:()=>{g.value++},onFocusableItemRemove:()=>{g.value--}}),(e,t)=>(h(),f(i(v),null,{default:k(()=>[C(i(W),{tabindex:d.value||g.value===0?-1:0,"data-orientation":i(s),as:e.as,"as-child":e.asChild,dir:i(l),style:{outline:`none`},onMousedown:t[0]||=e=>m.value=!0,onMouseup:b,onFocus:y,onBlur:t[1]||=e=>d.value=!1},{default:k(()=>[D(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`as`,`as-child`,`dir`])]),_:3}))}}),mt=e({__name:`MenuAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let n=e;return(e,r)=>(h(),f(i(Le),t(c(n)),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}});function ht(){let e=M(!1);return a(()=>{xe(`keydown`,()=>{e.value=!0},{capture:!0,passive:!0}),xe([`pointerdown`,`pointermove`],()=>{e.value=!1},{capture:!0,passive:!0})}),e}var gt=we(ht),[Q,_t]=Y([`MenuRoot`,`MenuSub`],`MenuContext`),[vt,yt]=Y(`MenuRoot`),bt=e({__name:`MenuRoot`,props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{modal:a,dir:o}=p(n),s=J(o),c=K(n,`open`,r),l=M(),u=gt();return _t({open:c,onOpenChange:e=>{c.value=e},content:l,onContentChange:e=>{l.value=e}}),yt({onClose:()=>{c.value=!1},isUsingKeyboardRef:u,dir:s,modal:a}),(e,t)=>(h(),f(i(Ie),null,{default:k(()=>[D(e.$slots,`default`)]),_:3}))}}),[xt,St]=Y(`MenuContent`),Ct=e({__name:`MenuContentImpl`,props:s({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Fe}),emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,a=Q(),o=vt(),{trapFocus:s,disableOutsidePointerEvents:c,loop:l}=p(n);R(),Ke(c.value);let u=M(``),d=M(0),g=M(0),_=M(null),v=M(`right`),y=M(0),b=M(null),x=M(),{forwardRef:S,currentElement:w}=G(),{handleTypeaheadSearch:T}=ze();O(w,e=>{a.onContentChange(e)}),m(()=>{window.clearTimeout(d.value)});function E(e){return v.value===_.value?.side&&ue(e,_.value?.area)}async function A(e){r(`openAutoFocus`,e),!e.defaultPrevented&&(e.preventDefault(),w.value?.focus({preventScroll:!0}))}function j(e){if(e.defaultPrevented)return;let t=e.target.closest(`[data-reka-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1,i=lt(e,je(),w.value,{loop:l.value,arrowKeyOptions:`vertical`,dir:o?.dir.value,focus:!0,attributeName:`[data-reka-collection-item]:not([data-disabled])`});if(i)return i?.focus();if(e.code===`Space`)return;let a=x.value?.getItems()??[];if(t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&T(e.key,a)),e.target!==w.value||!ne.includes(e.key))return;e.preventDefault();let s=[...a.map(e=>e.ref)];ye.includes(e.key)&&s.reverse(),le(s)}function N(e){e?.currentTarget?.contains?.(e.target)||(window.clearTimeout(d.value),u.value=``)}function P(e){if(!ce(e))return;let t=e.target,n=y.value!==e.clientX;(e?.currentTarget)?.contains(t)&&n&&(v.value=e.clientX>y.value?`right`:`left`,y.value=e.clientX)}return St({onItemEnter:e=>!!E(e),onItemLeave:e=>{E(e)||(w.value?.focus(),b.value=null)},onTriggerLeave:e=>!!E(e),searchRef:u,pointerGraceTimerRef:g,onPointerGraceIntentChange:e=>{_.value=e}}),(e,t)=>(h(),f(i(te),{"as-child":``,trapped:i(s),onMountAutoFocus:A,onUnmountAutoFocus:t[7]||=e=>r(`closeAutoFocus`,e)},{default:k(()=>[C(i(Se),{"as-child":``,"disable-outside-pointer-events":i(c),onEscapeKeyDown:t[2]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[3]||=e=>r(`pointerDownOutside`,e),onFocusOutside:t[4]||=e=>r(`focusOutside`,e),onInteractOutside:t[5]||=e=>r(`interactOutside`,e),onDismiss:t[6]||=e=>r(`dismiss`)},{default:k(()=>[C(i(pt),{ref_key:`rovingFocusGroupRef`,ref:x,"current-tab-stop-id":b.value,"onUpdate:currentTabStopId":t[0]||=e=>b.value=e,"as-child":``,orientation:`vertical`,dir:i(o).dir.value,loop:i(l),onEntryFocus:t[1]||=e=>{r(`entryFocus`,e),i(o).isUsingKeyboardRef.value||e.preventDefault()}},{default:k(()=>[C(i(Ve),{ref:i(S),role:`menu`,as:e.as,"as-child":e.asChild,"aria-orientation":`vertical`,"data-reka-menu-content":``,"data-state":i(I)(i(a).open.value),dir:i(o).dir.value,side:e.side,"side-offset":e.sideOffset,align:e.align,"align-offset":e.alignOffset,"avoid-collisions":e.avoidCollisions,"collision-boundary":e.collisionBoundary,"collision-padding":e.collisionPadding,"arrow-padding":e.arrowPadding,"prioritize-position":e.prioritizePosition,"position-strategy":e.positionStrategy,"update-position-strategy":e.updatePositionStrategy,sticky:e.sticky,"hide-when-detached":e.hideWhenDetached,reference:e.reference,onKeydown:j,onBlur:N,onPointermove:P},{default:k(()=>[D(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`,`dir`,`side`,`side-offset`,`align`,`align-offset`,`avoid-collisions`,`collision-boundary`,`collision-padding`,`arrow-padding`,`prioritize-position`,`position-strategy`,`update-position-strategy`,`sticky`,`hide-when-detached`,`reference`])]),_:3},8,[`current-tab-stop-id`,`dir`,`loop`])]),_:3},8,[`disable-outside-pointer-events`])]),_:3},8,[`trapped`]))}}),wt=e({inheritAttrs:!1,__name:`MenuItemImpl`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,r=xt(),{forwardRef:a}=G(),{CollectionItem:o}=ke(),s=M(!1);async function c(e){e.defaultPrevented||ce(e)&&(t.disabled?r.onItemLeave(e):r.onItemEnter(e)||e.currentTarget?.focus({preventScroll:!0}))}async function l(e){await n(),!e.defaultPrevented&&ce(e)&&r.onItemLeave(e)}return(e,t)=>(h(),f(i(o),{value:{textValue:e.textValue}},{default:k(()=>[C(i(W),N({ref:i(a),role:`menuitem`,tabindex:`-1`},e.$attrs,{as:e.as,"as-child":e.asChild,"aria-disabled":e.disabled||void 0,"data-disabled":e.disabled?``:void 0,"data-highlighted":s.value?``:void 0,onPointermove:c,onPointerleave:l,onFocus:t[0]||=async t=>{await n(),!(t.defaultPrevented||e.disabled)&&(s.value=!0)},onBlur:t[1]||=async e=>{await n(),!e.defaultPrevented&&(s.value=!1)}}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`as`,`as-child`,`aria-disabled`,`data-disabled`,`data-highlighted`])]),_:3},8,[`value`]))}}),Tt=e({__name:`MenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let r=e,a=t,{forwardRef:o,currentElement:s}=G(),c=vt(),l=xt(),u=M(!1);async function d(){let e=s.value;if(!r.disabled&&e){let e=new CustomEvent(ae,{bubbles:!0,cancelable:!0});a(`select`,e),await n(),e.defaultPrevented?u.value=!1:c.onClose()}}return(e,t)=>(h(),f(wt,N(r,{ref:i(o),onClick:d,onPointerdown:t[0]||=()=>{u.value=!0},onPointerup:t[1]||=async e=>{await n(),!e.defaultPrevented&&(u.value||e.currentTarget?.click())},onKeydown:t[2]||=async t=>{let n=i(l).searchRef.value!==``;e.disabled||n&&t.key===` `||i(P).includes(t.key)&&(t.currentTarget.click(),t.preventDefault())}}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),Et=e({__name:`MenuRootContentModal`,props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,a=q(n,r),o=Q(),{forwardRef:s,currentElement:c}=G();return De(c),(e,t)=>(h(),f(Ct,N(i(a),{ref:i(s),"trap-focus":i(o).open.value,"disable-outside-pointer-events":i(o).open.value,"disable-outside-scroll":!0,onDismiss:t[0]||=e=>i(o).onOpenChange(!1),onFocusOutside:t[1]||=x(e=>r(`focusOutside`,e),[`prevent`])}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`]))}}),Dt=e({__name:`MenuRootContentNonModal`,props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=q(e,t),r=Q();return(e,t)=>(h(),f(Ct,N(i(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:t[0]||=e=>i(r).onOpenChange(!1)}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),Ot=e({__name:`MenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:n}){let r=q(e,n),a=Q(),o=vt();return(e,n)=>(h(),f(i(Oe),{present:e.forceMount||i(a).open.value},{default:k(()=>[i(o).modal.value?(h(),f(Et,t(N({key:0},{...e.$attrs,...i(r)})),{default:k(()=>[D(e.$slots,`default`)]),_:3},16)):(h(),f(Dt,t(N({key:1},{...e.$attrs,...i(r)})),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),kt=e({__name:`MenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let n=e;return(e,r)=>(h(),f(i(ie),t(c(n)),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),[At,jt]=Y(`DropdownMenuRoot`),Mt=e({__name:`DropdownMenuRoot`,props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t;G();let a=K(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),o=M(),{modal:s,dir:c}=p(n),l=J(c);return jt({open:a,onOpenChange:e=>{a.value=e},onOpenToggle:()=>{a.value=!a.value},triggerId:``,triggerElement:o,contentId:``,modal:s,dir:l}),(e,t)=>(h(),f(i(bt),{open:i(a),"onUpdate:open":t[0]||=e=>E(a)?a.value=e:null,dir:i(l),modal:i(s)},{default:k(()=>[D(e.$slots,`default`,{open:i(a)})]),_:3},8,[`open`,`dir`,`modal`]))}}),Nt=e({__name:`DropdownMenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`closeAutoFocus`],setup(e,{emit:t}){let n=q(e,t);G();let r=At(),a=M(!1);function o(e){e.defaultPrevented||(a.value||setTimeout(()=>{r.triggerElement.value?.focus()},0),a.value=!1,e.preventDefault())}return r.contentId||=Re(void 0,`reka-dropdown-menu-content`),(e,t)=>(h(),f(i(Ot),N(i(n),{id:i(r).contentId,"aria-labelledby":i(r)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-dropdown-menu-content-available-width":`var(--reka-popper-available-width)`,"--reka-dropdown-menu-content-available-height":`var(--reka-popper-available-height)`,"--reka-dropdown-menu-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-dropdown-menu-trigger-height":`var(--reka-popper-anchor-height)`},onCloseAutoFocus:o,onInteractOutside:t[0]||=e=>{if(e.defaultPrevented)return;let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,o=t.button===2||n;(!i(r).modal.value||o)&&(a.value=!0),i(r).triggerElement.value?.contains(e.target)&&e.preventDefault()}}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`]))}}),Pt=e({__name:`DropdownMenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:n}){let r=e,a=Ee(n);return G(),(e,n)=>(h(),f(i(Tt),t(c({...r,...i(a)})),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),Ft=e({__name:`DropdownMenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let n=e;return(e,r)=>(h(),f(i(kt),t(c(n)),{default:k(()=>[D(e.$slots,`default`)]),_:3},16))}}),It=e({__name:`DropdownMenuTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,r=At(),{forwardRef:o,currentElement:s}=G();return a(()=>{r.triggerElement=s}),r.triggerId||=Re(void 0,`reka-dropdown-menu-trigger`),(e,a)=>(h(),f(i(mt),{"as-child":``},{default:k(()=>[C(i(W),{id:i(r).triggerId,ref:i(o),type:e.as===`button`?`button`:void 0,"as-child":t.asChild,as:e.as,"aria-haspopup":`menu`,"aria-expanded":i(r).open.value,"aria-controls":i(r).open.value?i(r).contentId:void 0,"data-disabled":e.disabled?``:void 0,disabled:e.disabled,"data-state":i(r).open.value?`open`:`closed`,onClick:a[0]||=async t=>{!e.disabled&&t.button===0&&t.ctrlKey===!1&&(i(r)?.onOpenToggle(),await n(),i(r).open.value&&t.preventDefault())},onKeydown:a[1]||=y(t=>{e.disabled||([`Enter`,` `].includes(t.key)&&i(r).onOpenToggle(),t.key===`ArrowDown`&&i(r).onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(t.key)&&t.preventDefault())},[`enter`,`space`,`arrow-down`])},{default:k(()=>[D(e.$slots,`default`)]),_:3},8,[`id`,`type`,`as-child`,`as`,`aria-expanded`,`aria-controls`,`data-disabled`,`disabled`,`data-state`])]),_:3}))}}),[$,Lt]=Y(`EditableRoot`),Rt=e({inheritAttrs:!1,__name:`EditableRoot`,props:{defaultValue:{type:String,required:!1},modelValue:{type:[String,null],required:!1},placeholder:{type:[String,Object],required:!1,default:`Enter text...`},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1},activationMode:{type:String,required:!1,default:`focus`},selectOnFocus:{type:Boolean,required:!1,default:!1},submitMode:{type:String,required:!1,default:`blur`},startWithEditMode:{type:Boolean,required:!1},maxLength:{type:Number,required:!1},autoResize:{type:Boolean,required:!1,default:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`},name:{type:String,required:!1},required:{type:Boolean,required:!1,default:!1}},emits:[`update:modelValue`,`submit`,`update:state`],setup(e,{expose:t,emit:n}){let a=e,o=n,{id:s,name:c,defaultValue:l,startWithEditMode:u,placeholder:d,maxLength:m,disabled:g,dir:v,submitMode:y,activationMode:b,selectOnFocus:x,readonly:S,autoResize:C,required:w}=p(a),T=M(),E=J(v),A=M(u.value??!1),j=K(a,`modelValue`,o,{defaultValue:l.value??``,passive:a.modelValue===void 0}),{primitiveElement:P,currentElement:F}=Ce(),ee=Te(F),te=_(()=>typeof d.value==`string`?{edit:d.value,preview:d.value}:d.value),I=M(j.value);O(()=>j.value,()=>{I.value=j.value},{immediate:!0,deep:!0});function L(){A.value=!1,o(`update:state`,`cancel`)}function R(){A.value=!0,I.value=j.value,o(`update:state`,`edit`)}function z(){j.value=I.value,A.value=!1,o(`update:state`,`submit`),o(`submit`,j.value)}function ne(){A.value&&(y.value===`blur`||y.value===`both`?z():L())}let re=Ae(()=>ne(),F,A),B=Ue(()=>ne(),F,A),ie=_(()=>j.value===``);return t({submit:z,cancel:L,edit:R}),Lt({id:s,name:c,disabled:g,isEditing:A,maxLength:m,modelValue:j,inputValue:I,placeholder:te,edit:R,cancel:L,submit:z,activationMode:b,submitMode:y,selectOnFocus:x,inputRef:T,startWithEditMode:u,isEmpty:ie,readonly:S,autoResize:C}),(e,t)=>(h(),f(i(W),N(e.$attrs,{ref_key:`primitiveElement`,ref:P,as:e.as,"as-child":e.asChild,dir:i(E),"data-dismissable-layer":``,onFocusCapture:i(B).onFocusCapture,onBlurCapture:i(B).onBlurCapture,onPointerdownCapture:i(re).onPointerDownCapture}),{default:k(()=>[D(e.$slots,`default`,{modelValue:i(j),isEditing:A.value,isEmpty:ie.value,submit:z,cancel:L,edit:R}),i(ee)&&i(c)?(h(),f(i(Me),{key:0,type:`text`,value:i(j),name:i(c),disabled:i(g),required:i(w)},null,8,[`value`,`name`,`disabled`,`required`])):r(`v-if`,!0)]),_:3},16,[`as`,`as-child`,`dir`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),zt=e({__name:`EditableArea`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e,n=$();return(e,r)=>(h(),f(i(W),N(t,{"data-placeholder-shown":i(n).isEditing.value?void 0:``,"data-focus":i(n).isEditing.value?``:void 0,"data-focused":i(n).isEditing.value?``:void 0,"data-empty":i(n).isEmpty.value?``:void 0,"data-readonly":i(n).readonly.value?``:void 0,"data-disabled":i(n).disabled.value?``:void 0,style:i(n).autoResize.value?{display:`inline-grid`}:void 0}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`data-placeholder-shown`,`data-focus`,`data-focused`,`data-empty`,`data-readonly`,`data-disabled`,`style`]))}}),Bt=e({__name:`EditableEditTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=$();return(e,r)=>(h(),f(i(W),N(t,{"aria-label":`edit`,"aria-disabled":i(n).disabled.value?``:void 0,"data-disabled":i(n).disabled.value?``:void 0,disabled:i(n).disabled.value,type:e.as===`button`?`button`:void 0,hidden:i(n).isEditing.value?``:void 0,onClick:i(n).edit}),{default:k(()=>[D(e.$slots,`default`,{},()=>[r[0]||=u(`Edit`)])]),_:3},16,[`aria-disabled`,`data-disabled`,`disabled`,`type`,`hidden`,`onClick`]))}}),Vt=e({__name:`EditableInput`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},setup(e){let t=e,r=be(),o=$(),s=_(()=>o.disabled.value),c=_(()=>o.placeholder.value?.edit),{primitiveElement:l,currentElement:u}=Ce();a(()=>{o.inputRef.value=u.value,o.startWithEditMode.value&&(o.inputRef.value?.focus({preventScroll:!0}),o.selectOnFocus.value&&o.inputRef.value?.select())}),O(o.isEditing,e=>{e&&n(()=>{o.inputRef.value?.focus({preventScroll:!0}),o.selectOnFocus.value&&o.inputRef.value?.select()})});function d(e){(o.submitMode.value===`enter`||o.submitMode.value===`both`)&&e.key===r.ENTER&&!e.shiftKey&&!e.metaKey&&o.submit()}return(e,n)=>(h(),f(i(W),N({ref_key:`primitiveElement`,ref:l},t,{value:i(o).inputValue.value,placeholder:c.value,disabled:s.value,maxlength:i(o).maxLength.value,"data-disabled":s.value?``:void 0,"data-readonly":i(o).readonly.value?``:void 0,readonly:i(o).readonly.value,"aria-label":`editable input`,hidden:i(o).autoResize.value?void 0:!i(o).isEditing.value,style:i(o).autoResize.value?{all:`unset`,gridArea:`1 / 1 / auto / auto`,visibility:i(o).isEditing.value?void 0:`hidden`}:void 0,onInput:n[0]||=e=>i(o).inputValue.value=e.target.value,onKeydown:[y(d,[`enter`,`space`]),y(i(o).cancel,[`esc`])]}),{default:k(()=>[D(e.$slots,`default`)]),_:3},16,[`value`,`placeholder`,`disabled`,`maxlength`,`data-disabled`,`data-readonly`,`readonly`,`hidden`,`style`,`onKeydown`]))}}),Ht=e({__name:`EditablePreview`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=$(),r=_(()=>n.placeholder.value?.preview);function a(){n.activationMode.value===`focus`&&n.edit()}function o(){n.activationMode.value===`dblclick`&&n.edit()}return(e,s)=>(h(),f(i(W),N(t,{tabindex:`0`,"data-placeholder-shown":i(n).isEditing.value?void 0:``,hidden:i(n).autoResize.value?void 0:i(n).isEditing.value,style:i(n).autoResize.value?{whiteSpace:`pre`,userSelect:`none`,gridArea:`1 / 1 / auto / auto`,visibility:i(n).isEditing.value?`hidden`:void 0,overflow:`hidden`,textOverflow:`ellipsis`}:void 0,onFocusin:a,onDblclick:o}),{default:k(()=>[D(e.$slots,`default`,{},()=>[u(l(i(n).modelValue.value||r.value),1)])]),_:3},16,[`data-placeholder-shown`,`hidden`,`style`]))}}),Ut=e({__name:`EditableSubmitTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=$();return(e,r)=>(h(),f(i(W),N(t,{"aria-label":`submit`,"aria-disabled":i(n).disabled.value?``:void 0,"data-disabled":i(n).disabled.value?``:void 0,disabled:i(n).disabled.value,type:e.as===`button`?`button`:void 0,hidden:i(n).isEditing.value?void 0:``,onClick:i(n).submit}),{default:k(()=>[D(e.$slots,`default`,{},()=>[r[0]||=u(`Submit`)])]),_:3},16,[`aria-disabled`,`data-disabled`,`disabled`,`type`,`hidden`,`onClick`]))}}),Wt={flex:``,"items-center":``},Gt={flex:``,"items-center":``},Kt={flex:``,"items-center":``},qt=e({__name:`Live2D`,props:{palette:{}},emits:[`extractColorsFromModel`],setup(e){let{t}=tt(),{live2dDisableFocus:n}=X(Ye()),{scale:r,position:a}=X(it());return(o,s)=>(h(),A(T,null,[C(i(ge),{title:i(t)(`settings.live2d.scale-and-position.title`),icon:`i-solar:scale-bold-duotone`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`]),size:`sm`,expand:!0},{default:k(()=>[C(i(Be),{modelValue:i(r),"onUpdate:modelValue":s[1]||=e=>E(r)?r.value=e:null,as:`div`,min:.5,max:2,step:.01,label:i(t)(`settings.live2d.scale-and-position.scale`)},{label:k(()=>[j(`div`,Wt,[j(`div`,null,l(i(t)(`settings.live2d.scale-and-position.scale`)),1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:s[0]||=()=>r.value=1},[...s[8]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`,`label`]),C(i(Be),{modelValue:i(a).x,"onUpdate:modelValue":s[3]||=e=>i(a).x=e,as:`div`,min:-100,max:100,step:1,label:i(t)(`settings.live2d.scale-and-position.x`)},{label:k(()=>[j(`div`,Gt,[j(`div`,null,l(i(t)(`settings.live2d.scale-and-position.x`)),1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:s[2]||=()=>i(a).x=0},[...s[9]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`,`label`]),C(i(Be),{modelValue:i(a).y,"onUpdate:modelValue":s[5]||=e=>i(a).y=e,as:`div`,min:-100,max:100,step:1,label:i(t)(`settings.live2d.scale-and-position.y`)},{label:k(()=>[j(`div`,Kt,[j(`div`,null,l(i(t)(`settings.live2d.scale-and-position.y`)),1),j(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:s[4]||=()=>i(a).y=0},[...s[10]||=[j(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)]])])]),_:1},8,[`modelValue`,`label`])]),_:1},8,[`title`]),C(i(ge),{title:i(t)(`settings.live2d.theme-color-from-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`]),size:`sm`,expand:!1},{default:k(()=>[C(i(ve),{class:`mb-4 mt-2`,colors:e.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),C(i(H),{variant:`secondary`,onClick:s[6]||=e=>o.$emit(`extractColorsFromModel`)},{default:k(()=>[u(l(i(t)(`settings.live2d.theme-color-from-model.button-extract.title`)),1)]),_:1})]),_:1},8,[`title`]),C(i(ge),{title:i(t)(`settings.live2d.focus.title`),icon:`i-solar:eye-scan-bold-duotone`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`]),size:`sm`,expand:!1},{default:k(()=>[C(i(Pe),{modelValue:i(n),"onUpdate:modelValue":s[7]||=e=>E(n)?n.value=e:null,label:i(t)(`settings.live2d.focus.button-disable.title`)},null,8,[`modelValue`,`label`])]),_:1},8,[`title`])],64))}}),Jt={grid:`~ cols-5 gap-1`,"p-2":``},Yt={class:`text-xs`},Xt={key:0},Zt={grid:`~ cols-5 gap-1`,"p-2":``},Qt={key:1},$t={grid:`~ cols-5 gap-1`,"p-2":``},en={class:`text-sm text-neutral-600 space-y-1 dark:text-neutral-400`},tn={class:`flex justify-between`},nn={class:`flex justify-between`},rn={class:`flex justify-between`},an={class:`text-sm text-neutral-600 space-y-1 dark:text-neutral-400`},on=e({__name:`VRM`,props:{palette:{}},emits:[`extractColorsFromModel`],setup(e){let{t}=tt(),{modelSize:n,modelOffset:r,cameraFOV:a,modelRotationY:s,cameraDistance:c,trackingMode:d,directionalLightRotation:p,directionalLightIntensity:m,directionalLightColor:g,ambientLightIntensity:v,ambientLightColor:y,hemisphereLightIntensity:b,hemisphereSkyColor:x,hemisphereGroundColor:S,envSelect:D,skyBoxIntensity:O}=X(at()),M=_(()=>[{value:`camera`,label:t(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.camera`),class:`col-start-3`},{value:`mouse`,label:t(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.mouse`),class:`col-start-4`},{value:`none`,label:t(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.disabled`),class:`col-start-5`}]),N=[{value:`hemisphere`,label:`Hemisphere`,icon:{idle:`i-solar:forbidden-circle-linear rotate-45`,active:`i-solar:forbidden-circle-bold rotate-45`}},{value:`skyBox`,label:`SkyBox`,icon:{idle:`i-solar:gallery-circle-linear`,active:`i-solar:gallery-circle-bold`}}];return(_,P)=>(h(),A(T,null,[C(i(se),{title:i(t)(`settings.pages.models.sections.section.scene`),icon:`i-solar:people-nearby-bold-duotone`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[C(i(ve),{class:`mb-4 mt-2`,colors:e.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),C(i(H),{variant:`secondary`,onClick:P[0]||=e=>_.$emit(`extractColorsFromModel`)},{default:k(()=>[u(l(i(t)(`settings.vrm.theme-color-from-model.button-extract.title`)),1)]),_:1}),j(`div`,Jt,[C(i(oe),{x:i(r).x,"onUpdate:x":P[1]||=e=>i(r).x=e,y:i(r).y,"onUpdate:y":P[2]||=e=>i(r).y=e,z:i(r).z,"onUpdate:z":P[3]||=e=>i(r).z=e,label:`Model Position`,"x-config":{min:-i(n).x*2,max:i(n).x*2,step:i(n).x/100,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{min:-i(n).y*2,max:i(n).y*2,step:i(n).y/100,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{min:-i(n).z*2,max:i(n).z*2,step:i(n).z/100,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),C(i(F),{modelValue:i(a),"onUpdate:modelValue":P[4]||=e=>E(a)?a.value=e:null,config:{min:1,max:180,step:1,label:i(t)(`settings.vrm.scale-and-position.fov`)},label:i(t)(`settings.vrm.scale-and-position.fov`)},null,8,[`modelValue`,`config`,`label`]),C(i(F),{modelValue:i(c),"onUpdate:modelValue":P[5]||=e=>E(c)?c.value=e:null,config:{min:i(n).z,max:i(n).z*20,step:i(n).z/100,label:i(t)(`settings.vrm.scale-and-position.camera-distance`),formatValue:e=>e?.toFixed(4)},label:i(t)(`settings.vrm.scale-and-position.camera-distance`)},null,8,[`modelValue`,`config`,`label`]),C(i(F),{modelValue:i(s),"onUpdate:modelValue":P[6]||=e=>E(s)?s.value=e:null,config:{min:-180,max:180,step:1,label:i(t)(`settings.vrm.scale-and-position.rotation-y`)},label:i(t)(`settings.vrm.scale-and-position.rotation-y`)},null,8,[`modelValue`,`config`,`label`]),j(`div`,Yt,l(i(t)(`settings.vrm.scale-and-position.eye-tracking-mode.title`))+`: `,1),P[18]||=j(`div`,null,null,-1),(h(!0),A(T,null,o(M.value,e=>(h(),f(i(H),{key:e.value,class:w([e.class,`w-auto`]),size:`sm`,variant:i(d)===e.value?`primary`:`secondary`,label:e.label,onClick:t=>d.value=e.value},null,8,[`class`,`variant`,`label`,`onClick`]))),128)),C(i(F),{modelValue:i(p).x,"onUpdate:modelValue":P[7]||=e=>i(p).x=e,config:{min:-180,max:180,step:1,label:`RotationXDeg`,formatValue:e=>e?.toFixed(0)},label:`Directional Light Rotation - X`},null,8,[`modelValue`,`config`]),C(i(F),{modelValue:i(p).y,"onUpdate:modelValue":P[8]||=e=>i(p).y=e,config:{min:-180,max:180,step:1,label:`RotationYDeg`,formatValue:e=>e?.toFixed(0)},label:`Directional Light Rotation - Y`},null,8,[`modelValue`,`config`]),C(i(U),{modelValue:i(g),"onUpdate:modelValue":P[9]||=e=>E(g)?g.value=e:null,label:`Directional Light Color`},null,8,[`modelValue`]),C(i(F),{modelValue:i(m),"onUpdate:modelValue":P[10]||=e=>E(m)?m.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Directional Light Intensity`},null,8,[`modelValue`]),C(i(F),{modelValue:i(v),"onUpdate:modelValue":P[11]||=e=>E(v)?v.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Ambient Light Intensity`},null,8,[`modelValue`]),C(i(U),{modelValue:i(y),"onUpdate:modelValue":P[12]||=e=>E(y)?y.value=e:null,label:`Ambient Light Color`},null,8,[`modelValue`])]),j(`div`,null,[C(i(fe),{modelValue:i(D),"onUpdate:modelValue":P[17]||=e=>E(D)?D.value=e:null,tabs:N,label:`Environment`},{default:k(()=>[i(D)===`hemisphere`?(h(),A(`div`,Xt,[j(`div`,Zt,[C(i(F),{modelValue:i(b),"onUpdate:modelValue":P[13]||=e=>E(b)?b.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Hemisphere Light Intensity`},null,8,[`modelValue`]),C(i(U),{modelValue:i(x),"onUpdate:modelValue":P[14]||=e=>E(x)?x.value=e:null,label:`Hemisphere Sky Color`},null,8,[`modelValue`]),C(i(U),{modelValue:i(S),"onUpdate:modelValue":P[15]||=e=>E(S)?S.value=e:null,label:`Hemisphere Ground Color`},null,8,[`modelValue`])])])):(h(),A(`div`,Qt,[j(`div`,$t,[C(i(F),{modelValue:i(O),"onUpdate:modelValue":P[16]||=e=>E(O)?O.value=e:null,config:{min:0,max:1,step:.01,label:`Intensity`},label:i(t)(`settings.vrm.skybox.skybox-intensity`)},null,8,[`modelValue`,`label`])])]))]),_:1},8,[`modelValue`])])]),_:1},8,[`title`]),C(i(se),{title:i(t)(`settings.vrm.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:w([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[C(i(V),{label:i(t)(`settings.vrm.scale-and-position.model-info-title`)},{default:k(()=>[j(`div`,null,[j(`div`,en,[j(`div`,tn,[j(`span`,null,l(i(t)(`settings.vrm.scale-and-position.model-info-x`)),1),j(`span`,null,l(i(n).x.toFixed(4)),1)]),j(`div`,nn,[j(`span`,null,l(i(t)(`settings.vrm.scale-and-position.model-info-y`)),1),j(`span`,null,l(i(n).y.toFixed(4)),1)]),j(`div`,rn,[j(`span`,null,l(i(t)(`settings.vrm.scale-and-position.model-info-z`)),1),j(`span`,null,l(i(n).z.toFixed(4)),1)])])])]),_:1},8,[`label`]),C(i(V),{theme:`lime`,label:`Tips!`},{default:k(()=>[j(`div`,an,l(i(t)(`settings.vrm.scale-and-position.tips`)),1)]),_:1})]),_:1},8,[`title`])],64))}}),sn={pt:`4 sm:0`,gap:`4 sm:6`,"h-full":``,flex:``,"flex-col":``},cn={flex:``,"items-center":``},ln={key:0},un={class:`flex-1 md:flex-none`,"h-full":``,"w-full":``,"overflow-x-hidden":``,"overflow-y-scroll":``},dn={class:`grid grid-cols-2 gap-2 lg:max-h-80dvh`},fn=[`onClick`],pn={absolute:``,"left-3":``,"top-4":``,"z-1":``},mn=[`onClick`],hn={class:`min-w-60 lg:min-h-60`,aspect:`12/16`,"px-1":``,"py-2":``},gn=[`src`],_n={"h-full":``,"w-full":``,flex:``,"flex-col":``},vn={"w-full":``,"flex-1":``,"p-2":``},yn={key:1,class:`flex gap-2`},bn={flex:``,"items-center":``,"gap-1":``,text:`neutral-400 dark:neutral-600`},xn=e({__name:`model-selector`,props:{modelValue:{type:Object,required:!1},modelModifiers:{}},emits:d([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,a=b(e,`modelValue`),s=Je(),{displayModelsFromIndexedDBLoading:c,displayModels:d}=X(s);function p(e){s.removeDisplayModel(e.id)}let m=M(a.value?.id);function _(e){e===null||e.length===0||e[0].name.endsWith(`.zip`)&&s.addDisplayModel(Z.Live2dZip,e[0])}function y(e){a.value=e,n(`close`,void 0)}function x(){a.value=d.value.find(e=>e.id===m.value),n(`close`,void 0)}function S(e){e===null||e.length===0||e[0].name.endsWith(`.vrm`)&&s.addDisplayModel(Z.VRM,e[0])}let E={[Z.Live2dZip]:`Live2D`,[Z.Live2dDirectory]:`Live2D`,[Z.VRM]:`VRM`,[Z.PMXDirectory]:`MMD`,[Z.PMXZip]:`MMD`,[Z.PMD]:`MMD`},D=Xe({accept:`.zip`,multiple:!1,reset:!0}),O=Xe({accept:`.vrm`,multiple:!1,reset:!0});return D.onChange(_),O.onChange(S),(e,t)=>{let n=g(`auto-animate`);return h(),A(`div`,sn,[j(`div`,cn,[t[6]||=j(`div`,{"w-full":``,"flex-1":``,"text-xl":``},` Model Selector `,-1),j(`div`,null,[C(i(Mt),null,{default:k(()=>[C(i(It),{bg:`neutral-400/20 hover:neutral-400/45 active:neutral-400/60 dark:neutral-700/50 hover:dark:neutral-700/65 active:dark:neutral-700/90`,flex:``,"items-center":``,"justify-center":``,"gap-1":``,"rounded-lg":``,"px-2":``,"py-1":``,"backdrop-blur-sm":``,transition:`colors duration-200 ease-in-out`,"aria-label":`Options for Display Models`},{default:k(()=>[...t[3]||=[j(`div`,{"i-solar:add-circle-bold":``},null,-1),j(`div`,null,`Add`,-1)]]),_:1}),C(i(Ft),null,{default:k(()=>[C(i(Nt),{class:`will-change-[opacity,transform] z-10000 max-w-45 rounded-lg p-0.5 shadow-md outline-none data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade data-[side=right]:animate-slideLeftAndFade data-[side=top]:animate-slideDownAndFade`,bg:`neutral-100/50 dark:neutral-950/50`,transition:`colors duration-200 ease-in-out`,"backdrop-blur-sm":``,align:`end`,side:`bottom`,"side-offset":8},{default:k(()=>[C(i(Pt),{class:`data-[disabled]:text-mauve8 relative flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-base leading-none outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-primary-100/20 sm:text-sm data-[highlighted]:text-primary-200`,transition:`colors duration-200 ease-in-out`,onClick:t[0]||=e=>i(D).open()},{default:k(()=>[...t[4]||=[u(` Live2D `,-1)]]),_:1}),C(i(Pt),{class:`data-[disabled]:text-mauve8 relative flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-base leading-none outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-primary-100/20 sm:text-sm data-[highlighted]:text-primary-200`,transition:`colors duration-200 ease-in-out`,onClick:t[1]||=e=>i(O).open()},{default:k(()=>[...t[5]||=[u(` VRM `,-1)]]),_:1})]),_:1})]),_:1})]),_:1})])]),i(c)?(h(),A(`div`,ln,` Loading display models... `)):r(``,!0),j(`div`,un,[j(`div`,dn,[(h(!0),A(T,null,o(i(d),e=>v((h(),A(`div`,{key:e.id,relative:``,"w-full":``,flex:`~ col md:row`,"gap-2":``,onClick:()=>m.value=e.id},[j(`div`,pn,[C(i(Mt),null,{default:k(()=>[C(i(It),{bg:`neutral-900/20 hover:neutral-900/45 active:neutral-900/60 dark:neutral-950/50 hover:dark:neutral-900/65 active:dark:neutral-900/90`,text:`white`,"h-7":``,"w-7":``,flex:``,"items-center":``,"justify-center":``,"rounded-lg":``,"backdrop-blur-sm":``,transition:`colors duration-200 ease-in-out`,"aria-label":`Options for Display Models`},{default:k(()=>[...t[7]||=[j(`div`,{"i-solar:menu-dots-bold":``},null,-1)]]),_:1}),C(i(Ft),null,{default:k(()=>[C(i(Nt),{class:`will-change-[opacity,transform] z-10000 max-w-45 rounded-lg p-0.5 text-white shadow-md outline-none data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade data-[side=right]:animate-slideLeftAndFade data-[side=top]:animate-slideDownAndFade dark:text-black`,bg:`neutral-700/50 dark:neutral-950/50`,transition:`colors duration-200 ease-in-out`,"backdrop-blur-sm":``,align:`start`,side:`bottom`,"side-offset":4},{default:k(()=>[C(i(Pt),{class:`data-[disabled]:text-mauve8 relative flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-base leading-none outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-red-100/20 sm:text-sm data-[highlighted]:text-red-200`,transition:`colors duration-200 ease-in-out`},{default:k(()=>[j(`button`,{flex:``,"items-center":``,"gap-1":``,"outline-none":``,onClick:t=>p(e)},[...t[8]||=[j(`div`,{"i-solar:trash-bin-minimalistic-bold-duotone":``},null,-1),j(`div`,null,`Remove`,-1)]],8,mn)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),j(`div`,hn,[e.previewImage?(h(),A(`img`,{key:0,src:i(qe)(e.previewImage),"h-full":``,"w-full":``,"rounded-lg":``,"object-cover":``,class:w([m.value&&m.value===e.id?`ring-3 ring-primary-400`:`ring-0 ring-transparent`]),transition:`all duration-200 ease-in-out`},null,10,gn)):(h(),A(`div`,{key:1,bg:`neutral-100 dark:neutral-900`,relative:``,"h-full":``,"w-full":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``,"gap-2":``,"overflow-hidden":``,"rounded-lg":``,class:w([m.value&&m.value===e.id?`ring-3 ring-primary-400`:`ring-0 ring-transparent`]),transition:`all duration-200 ease-in-out`},[...t[9]||=[j(`div`,{"i-solar:question-square-bold-duotone":``,"text-4xl":``,"opacity-75":``},null,-1),j(`div`,{"translate-y":`100%`,absolute:``,"top-0":``,flex:``,"flex-col":``,"translate-x--7":``,"rotate-45":``,"scale-250":``,"gap-0":``,"opacity-5":``},[j(`div`,{text:`sm sm:sm`,"translate-x-7":``,"translate-y--2":``,"text-nowrap":``},` unavailable Preview unavailable Preview `),j(`div`,{text:`sm sm:sm`,"translate-x-0":``,"translate-y--0":``,"text-nowrap":``},` Preview unavailable Preview unavailable `),j(`div`,{text:`sm sm:sm`,"translate-x--7":``,"translate-y-2":``,"text-nowrap":``},` unavailable Preview unavailable Preview `)],-1)]],2))]),j(`div`,_n,[j(`div`,vn,[C(i(Rt),{"default-value":e.name,placeholder:`Model Name...`,class:`flex gap-2`,"auto-resize":``},{default:k(({isEditing:e})=>[C(i(zt),{class:`w-[calc(100%-8px-1rem)] dark:text-white`},{default:k(()=>[C(i(Ht),{class:`line-clamp-1 w-[calc(100%-8px)] overflow-hidden text-ellipsis`}),C(i(Vt),{class:`w-[calc(100%-8px)]! placeholder:text-neutral-700 dark:placeholder:text-neutral-600`})]),_:1}),e?(h(),A(`div`,yn,[C(i(Ut),null,{default:k(()=>[...t[11]||=[j(`div`,{"i-solar:check-read-line-duotone":``,"opacity-50":``},null,-1)]]),_:1})])):(h(),f(i(Bt),{key:0},{default:k(()=>[...t[10]||=[j(`div`,{"i-solar:pen-2-line-duotone":``,"opacity-50":``},null,-1)]]),_:1}))]),_:1},8,[`default-value`]),j(`div`,bn,[t[12]||=j(`div`,{"i-solar:tag-horizontal-bold":``},null,-1),j(`div`,null,l(E[e.format]),1)])]),C(H,{class:`hidden md:block`,variant:`secondary`,onClick:t=>y(e)},{default:k(()=>[...t[13]||=[u(` Pick `,-1)]]),_:1},8,[`onClick`])])],8,fn)),[[n]])),128))])]),C(H,{class:`block md:hidden`,onClick:t[2]||=e=>x()},{default:k(()=>[...t[14]||=[u(` Confirm `,-1)]]),_:1})])}}}),Sn=e({__name:`model-selector-dialog`,props:{show:{type:Boolean,default:!1,required:!1},showModifiers:{},modelValue:{type:Object,required:!1},modelModifiers:{}},emits:[`update:show`,`update:modelValue`],setup(e){let t=b(e,`show`),n=b(e,`modelValue`),r=Qe(`(min-width: 768px)`),o=et();return $e(document.documentElement,()=>o.update()),a(()=>o.update()),(e,a)=>i(r)?(h(),f(i(z),{key:0,open:t.value,"onUpdate:open":a[2]||=e=>t.value=e},{default:k(()=>[C(i(me),{"as-child":``},{default:k(()=>[D(e.$slots,`default`)]),_:3}),C(i(B),null,{default:k(()=>[C(i(ee),{class:`fixed inset-0 z-[9999] bg-black/50 backdrop-blur-sm data-[state=closed]:animate-fadeOut data-[state=open]:animate-fadeIn`}),C(i(L),{class:`fixed left-1/2 top-1/2 z-[9999] max-h-full max-w-5xl w-[92dvw] transform overflow-y-scroll rounded-2xl bg-white p-6 shadow-xl outline-none backdrop-blur-md scrollbar-none -translate-x-1/2 -translate-y-1/2 data-[state=closed]:animate-contentHide data-[state=open]:animate-contentShow dark:bg-neutral-900`},{default:k(()=>[C(i(He),null,{default:k(()=>[C(i(re),null,{default:k(()=>[...a[6]||=[u(`Models`,-1)]]),_:1})]),_:1}),C(xn,{modelValue:n.value,"onUpdate:modelValue":a[0]||=e=>n.value=e,onClose:a[1]||=e=>t.value=!1},null,8,[`modelValue`])]),_:1})]),_:1})]),_:3},8,[`open`])):(h(),f(i(de),{key:1,open:t.value,"should-scale-background":``,"onUpdate:open":a[5]||=e=>t.value=e},{default:k(()=>[C(i(me),{"as-child":``},{default:k(()=>[D(e.$slots,`default`)]),_:3}),C(i(B),null,{default:k(()=>[C(i(he),{class:`fixed inset-0`}),C(i(_e),{class:`fixed bottom-0 left-0 right-0 z-1000 mt-20 h-full max-h-[96%] flex flex-col rounded-t-2xl bg-neutral-50 px-4 pt-4 outline-none backdrop-blur-md dark:bg-neutral-900/95`,style:S({paddingBottom:`${Math.max(Number.parseFloat(i(o).bottom.value.replace(`px`,``)),24)}px`})},{default:k(()=>[C(i(pe)),C(xn,{modelValue:n.value,"onUpdate:modelValue":a[3]||=e=>n.value=e,onClose:a[4]||=e=>t.value=!1},null,8,[`modelValue`])]),_:1},8,[`style`])]),_:1})]),_:3},8,[`open`]))}}),Cn=e({__name:`index`,props:{palette:{},settingsClass:{},live2dSceneClass:{},vrmSceneClass:{}},emits:[`extractColorsFromModel`],setup(e){let t=e,n=M(),a=Ze(),o=Ye(),{live2dDisableFocus:s,stageModelSelectedUrl:c,stageModelSelected:l,stageModelRenderer:d}=X(o);return O(n,async()=>{if(l.value=n.value?.id,await o.updateStageModel(),n.value)switch(n.value.format){case Z.Live2dZip:it().shouldUpdateView();break;case Z.VRM:at().shouldUpdateView();break}},{deep:!0}),(o,l)=>(h(),A(T,null,[j(`div`,{flex:`~ col gap-2`,"z-10":``,"overflow-y-scroll":``,"p-2":``,class:w([...t.settingsClass?typeof t.settingsClass==`string`?[t.settingsClass]:t.settingsClass:[]])},[C(V,{label:`We support both 2D and 3D models`},{default:k(()=>[...l[3]||=[j(`p`,null,[u(` Click `),j(`strong`,null,`Select Model`),u(` to import different formats of models into catalog, currently, `),j(`code`,null,`.zip`),u(` (Live2D) and `),j(`code`,null,`.vrm`),u(` (VRM) are supported. `)],-1),j(`p`,null,` Neuro-sama uses 2D model driven by Live2D Inc. developed framework. While Grok Ani (first female character announced in Grok Companion) uses 3D model that is driven by VRM / MMD open formats. `,-1)]]),_:1}),C(i(Sn),{modelValue:n.value,"onUpdate:modelValue":l[0]||=e=>n.value=e},{default:k(()=>[C(H,{variant:`secondary`},{default:k(()=>[...l[4]||=[u(` Select Model `,-1)]]),_:1})]),_:1},8,[`modelValue`]),i(d)===`live2d`?(h(),f(qt,{key:0,palette:e.palette,onExtractColorsFromModel:l[1]||=e=>o.$emit(`extractColorsFromModel`)},null,8,[`palette`])):r(``,!0),i(d)===`vrm`?(h(),f(on,{key:1,palette:e.palette,onExtractColorsFromModel:l[2]||=e=>o.$emit(`extractColorsFromModel`)},null,8,[`palette`])):r(``,!0)],2),i(d)===`live2d`?(h(),A(`div`,{key:0,class:w([...t.live2dSceneClass?typeof t.live2dSceneClass==`string`?[t.live2dSceneClass]:t.live2dSceneClass:[]])},[C(ot,{"focus-at":{x:i(a).x.value,y:i(a).y.value},"model-src":i(c),"disable-focus-at":i(s)},null,8,[`focus-at`,`model-src`,`disable-focus-at`])],2)):r(``,!0),i(d)===`vrm`?(h(),A(`div`,{key:1,class:w([...t.vrmSceneClass?typeof t.vrmSceneClass==`string`?[t.vrmSceneClass]:t.vrmSceneClass:[]])},[C(i(st),{"model-src":i(c)},null,8,[`model-src`])],2)):r(``,!0)],64))}}),wn={flex:``,class:`relative h-full flex-col-reverse md:flex-row`},Tn={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},En=e({__name:`index`,setup(e){let t=M(),n=M([]);async function r(){if(!t.value)return;let e=await t.value.captureFrame();if(!e){console.error(`No frame captured`);return}let r=URL.createObjectURL(e);try{let e=await new nt(r).getPalette();n.value=Object.values(e).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(r)}}return(e,t)=>{let a=g(`motion`);return h(),A(T,null,[j(`div`,wn,[C(i(Cn),{"settings-class":`w-100% md:w-40% lg:w-40% xl:w-25% 2xl:w-30% h-fit sm:max-h-80dvh overflow-y-scroll relative`,"live-2d-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,"vrm-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,palette:n.value,onExtractColorsFromModel:r},null,8,[`palette`])]),v((h(),A(`div`,Tn,[...t[0]||=[j(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)]])),[[a]])],64)}}});typeof rt==`function`&&rt(En);var Dn=En;export{Dn as default};
 
 
assets/{modules-CNIKa2X6.js → modules-OamrgFS1.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,K as n,S as r,W as i,Y as a,b as o,ct as s,m as c,w as l,x as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{Et as d,Q as f,_t as p,ht as m,l as h,xt as g,yt as _}from"./components-BoQNNhDi.js";import{n as v}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as y}from"./route-block-B7Ro39Uj.js";import{t as b}from"./beat-sync-D0DTRDRF.js";function x(){let{t:e}=v(),t=f(),n=h(),r=p(),i=m(),a=_(),s=g(),c=b(),l=o(()=>[{id:`consciousness`,name:e(`settings.pages.modules.consciousness.title`),description:e(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:t.configured,category:`essential`},{id:`speech`,name:e(`settings.pages.modules.speech.title`),description:e(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:n.configured,category:`essential`},{id:`hearing`,name:e(`settings.pages.modules.hearing.title`),description:e(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:`/settings/modules/hearing`,configured:!1,category:`essential`},{id:`vision`,name:e(`settings.pages.modules.vision.title`),description:e(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:`/settings/modules/vision`,configured:!1,category:`essential`},{id:`memory-short-term`,name:e(`settings.pages.modules.memory-short-term.title`),description:e(`settings.pages.modules.memory-short-term.description`),icon:`i-solar:bookmark-bold-duotone`,to:`/settings/modules/memory-short-term`,configured:!1,category:`essential`},{id:`memory-long-term`,name:e(`settings.pages.modules.memory-long-term.title`),description:e(`settings.pages.modules.memory-long-term.description`),icon:`i-solar:book-bookmark-bold-duotone`,to:`/settings/modules/memory-long-term`,configured:!1,category:`essential`},{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:`/settings/modules/messaging-discord`,configured:r.configured,category:`messaging`},{id:`x`,name:e(`settings.pages.modules.x.title`),description:e(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:`/settings/modules/x`,configured:i.configured,category:`messaging`},{id:`gaming-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:`/settings/modules/gaming-minecraft`,configured:a.configured,category:`gaming`},{id:`gaming-factorio`,name:e(`settings.pages.modules.gaming-factorio.title`),description:e(`settings.pages.modules.gaming-factorio.description`),to:`/settings/modules/gaming-factorio`,configured:s.configured,category:`gaming`},{id:`mcp-server`,name:e(`settings.pages.modules.mcp-server.title`),description:e(`settings.pages.modules.mcp-server.description`),icon:`i-solar:server-bold-duotone`,to:`/settings/modules/mcp`,configured:!1,category:`essential`},{id:`beat-sync`,name:e(`settings.pages.modules.beat_sync.title`),description:e(`settings.pages.modules.beat_sync.description`),icon:`i-solar:music-notes-bold-duotone`,to:`/settings/modules/beat-sync`,configured:c.isActive,category:`essential`}]);return{modulesList:l,categorizedModules:o(()=>l.value.reduce((e,t)=>{let{category:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e},{})),categoryNames:o(()=>({essential:e(`settings.pages.modules.categories.essential`),messaging:e(`settings.pages.modules.categories.messaging`),gaming:e(`settings.pages.modules.categories.gaming`)}))}}var S={grid:`~ cols-1 sm:cols-2 gap-4`},C={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},w=e({__name:`index`,setup(e){let{modulesList:o}=x();return(e,f)=>{let p=a(`motion`);return i(),l(c,null,[u(`div`,S,[(i(!0),l(c,null,n(t(o),(e,n)=>s((i(),r(t(d),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:e.name,description:e.description,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:e.to,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[p]])),128))]),s((i(),l(`div`,C,[...f[0]||=[u(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)]])),[[p]])],64)}}});typeof y==`function`&&y(w);var T=w;export{T as default};
 
1
+ import{A as e,Dt as t,K as n,S as r,W as i,Y as a,b as o,ct as s,m as c,w as l,x as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{Et as d,Q as f,_t as p,ht as m,l as h,xt as g,yt as _}from"./components-BaJFFT8H.js";import{n as v}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as y}from"./route-block-B7Ro39Uj.js";import{t as b}from"./beat-sync-BNa1wmOR.js";function x(){let{t:e}=v(),t=f(),n=h(),r=p(),i=m(),a=_(),s=g(),c=b(),l=o(()=>[{id:`consciousness`,name:e(`settings.pages.modules.consciousness.title`),description:e(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:t.configured,category:`essential`},{id:`speech`,name:e(`settings.pages.modules.speech.title`),description:e(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:n.configured,category:`essential`},{id:`hearing`,name:e(`settings.pages.modules.hearing.title`),description:e(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:`/settings/modules/hearing`,configured:!1,category:`essential`},{id:`vision`,name:e(`settings.pages.modules.vision.title`),description:e(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:`/settings/modules/vision`,configured:!1,category:`essential`},{id:`memory-short-term`,name:e(`settings.pages.modules.memory-short-term.title`),description:e(`settings.pages.modules.memory-short-term.description`),icon:`i-solar:bookmark-bold-duotone`,to:`/settings/modules/memory-short-term`,configured:!1,category:`essential`},{id:`memory-long-term`,name:e(`settings.pages.modules.memory-long-term.title`),description:e(`settings.pages.modules.memory-long-term.description`),icon:`i-solar:book-bookmark-bold-duotone`,to:`/settings/modules/memory-long-term`,configured:!1,category:`essential`},{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:`/settings/modules/messaging-discord`,configured:r.configured,category:`messaging`},{id:`x`,name:e(`settings.pages.modules.x.title`),description:e(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:`/settings/modules/x`,configured:i.configured,category:`messaging`},{id:`gaming-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:`/settings/modules/gaming-minecraft`,configured:a.configured,category:`gaming`},{id:`gaming-factorio`,name:e(`settings.pages.modules.gaming-factorio.title`),description:e(`settings.pages.modules.gaming-factorio.description`),to:`/settings/modules/gaming-factorio`,configured:s.configured,category:`gaming`},{id:`mcp-server`,name:e(`settings.pages.modules.mcp-server.title`),description:e(`settings.pages.modules.mcp-server.description`),icon:`i-solar:server-bold-duotone`,to:`/settings/modules/mcp`,configured:!1,category:`essential`},{id:`beat-sync`,name:e(`settings.pages.modules.beat_sync.title`),description:e(`settings.pages.modules.beat_sync.description`),icon:`i-solar:music-notes-bold-duotone`,to:`/settings/modules/beat-sync`,configured:c.isActive,category:`essential`}]);return{modulesList:l,categorizedModules:o(()=>l.value.reduce((e,t)=>{let{category:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e},{})),categoryNames:o(()=>({essential:e(`settings.pages.modules.categories.essential`),messaging:e(`settings.pages.modules.categories.messaging`),gaming:e(`settings.pages.modules.categories.gaming`)}))}}var S={grid:`~ cols-1 sm:cols-2 gap-4`},C={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},w=e({__name:`index`,setup(e){let{modulesList:o}=x();return(e,f)=>{let p=a(`motion`);return i(),l(c,null,[u(`div`,S,[(i(!0),l(c,null,n(t(o),(e,n)=>s((i(),r(t(d),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:e.name,description:e.description,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:e.to,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[p]])),128))]),s((i(),l(`div`,C,[...f[0]||=[u(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)]])),[[p]])],64)}}});typeof y==`function`&&y(w);var T=w;export{T as default};
assets/{ollama-D-qLXlYt.js → ollama-Cm4YMI7F.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,E as r,H as i,Mt as a,O as o,S as s,W as c,b as l,k as u,rt as d,st as f,x as p,yt as m}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as h}from"./widgets-DJ153_lR.js";import{s as g}from"./src-BEKjKq3V.js";import{I as _}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as v,G as y,J as b,K as x,X as S,q as C}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as w}from"./route-block-B7Ro39Uj.js";import{t as T}from"./use-provider-validation-CpjXOGL1.js";var E={class:`whitespace-pre-wrap break-all`},D=`ollama`,O=e({__name:`ollama`,setup(e){let w=v(),{providers:O}=_(w),k=l({get:()=>O.value[D]?.baseUrl||`http://localhost:11434/v1/`,set:e=>{O.value[D]||(O.value[D]={}),O.value[D].baseUrl=e}}),{t:A,router:j,providerMetadata:M,isValidating:N,isValid:P,validationMessage:F,handleResetSettings:I}=T(D),L=m(Object.entries(O.value[D]?.headers||{}).map(([e,t])=>({key:e,value:t}))||[{key:``,value:``}]);function R(e,t,n){e&&e.push({key:t,value:n})}function z(e,t){t&&(t.length===1?(t[0].key=``,t[0].value=``):t.splice(e,1))}d(L,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``}),O.value[D].headers=e.filter(e=>e.key!==``).reduce((e,t)=>(e[t.key]=t.value,e),{})},{deep:!0,immediate:!0});async function B(){try{let e=await M.value.validators.validateProviderConfig({baseUrl:k.value,headers:L.value.filter(e=>e.key!==``).reduce((e,t)=>(e[t.key]=t.value,e),{})});e.valid||(F.value=A(`settings.dialogs.onboarding.validationError`,{error:e.reason}))}catch(e){F.value=A(`settings.dialogs.onboarding.validationError`,{error:e instanceof Error?e.message:String(e)})}}return d([k,L],B,{immediate:!0}),d(L,B,{deep:!0}),i(()=>{w.initializeProvider(D),k.value=O.value[D]?.baseUrl||M.value?.defaultOptions?.().baseUrl||``,O.value[D]?.headers||(O.value[D].headers={}),L.value.length===0&&(L.value=[{key:``,value:``}])}),(e,i)=>(c(),s(n(y),{"provider-name":n(M)?.localizedName,"provider-icon-color":n(M)?.iconColor,"on-back":()=>n(j).back()},{default:f(()=>[u(n(x),null,{default:f(()=>[u(n(C),{title:n(A)(`settings.pages.providers.common.section.basic.title`),description:n(A)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(I)},{default:f(()=>[u(n(b),{modelValue:k.value,"onUpdate:modelValue":i[0]||=e=>k.value=e,placeholder:`http://localhost:11434/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`,`on-reset`]),u(n(S),{title:n(A)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[u(n(g),{modelValue:L.value,"onUpdate:modelValue":i[1]||=e=>L.value=e,label:n(A)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:n(A)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":n(A)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":n(A)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:i[2]||=(e,t)=>R(L.value,e,t),onRemove:i[3]||=e=>z(e,L.value)},null,8,[`modelValue`,`label`,`description`,`key-placeholder`,`value-placeholder`])]),_:1},8,[`title`]),!n(P)&&n(N)===0&&n(F)?(c(),s(n(h),{key:0,type:`error`},r({title:f(()=>[o(a(n(A)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(F)?{name:`content`,fn:f(()=>[p(`div`,E,a(n(F)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(P)&&n(N)===0?(c(),s(n(h),{key:1,type:`success`},{title:f(()=>[o(a(n(A)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof w==`function`&&w(O);var k=O;export{k as default};
 
1
+ import{A as e,C as t,Dt as n,E as r,H as i,Mt as a,O as o,S as s,W as c,b as l,k as u,rt as d,st as f,x as p,yt as m}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as h}from"./widgets-Bo0BM5C8.js";import{s as g}from"./src-BEKjKq3V.js";import{I as _}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as v,G as y,J as b,K as x,X as S,q as C}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as w}from"./route-block-B7Ro39Uj.js";import{t as T}from"./use-provider-validation-CwajWImW.js";var E={class:`whitespace-pre-wrap break-all`},D=`ollama`,O=e({__name:`ollama`,setup(e){let w=v(),{providers:O}=_(w),k=l({get:()=>O.value[D]?.baseUrl||`http://localhost:11434/v1/`,set:e=>{O.value[D]||(O.value[D]={}),O.value[D].baseUrl=e}}),{t:A,router:j,providerMetadata:M,isValidating:N,isValid:P,validationMessage:F,handleResetSettings:I}=T(D),L=m(Object.entries(O.value[D]?.headers||{}).map(([e,t])=>({key:e,value:t}))||[{key:``,value:``}]);function R(e,t,n){e&&e.push({key:t,value:n})}function z(e,t){t&&(t.length===1?(t[0].key=``,t[0].value=``):t.splice(e,1))}d(L,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``}),O.value[D].headers=e.filter(e=>e.key!==``).reduce((e,t)=>(e[t.key]=t.value,e),{})},{deep:!0,immediate:!0});async function B(){try{let e=await M.value.validators.validateProviderConfig({baseUrl:k.value,headers:L.value.filter(e=>e.key!==``).reduce((e,t)=>(e[t.key]=t.value,e),{})});e.valid||(F.value=A(`settings.dialogs.onboarding.validationError`,{error:e.reason}))}catch(e){F.value=A(`settings.dialogs.onboarding.validationError`,{error:e instanceof Error?e.message:String(e)})}}return d([k,L],B,{immediate:!0}),d(L,B,{deep:!0}),i(()=>{w.initializeProvider(D),k.value=O.value[D]?.baseUrl||M.value?.defaultOptions?.().baseUrl||``,O.value[D]?.headers||(O.value[D].headers={}),L.value.length===0&&(L.value=[{key:``,value:``}])}),(e,i)=>(c(),s(n(y),{"provider-name":n(M)?.localizedName,"provider-icon-color":n(M)?.iconColor,"on-back":()=>n(j).back()},{default:f(()=>[u(n(x),null,{default:f(()=>[u(n(C),{title:n(A)(`settings.pages.providers.common.section.basic.title`),description:n(A)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(I)},{default:f(()=>[u(n(b),{modelValue:k.value,"onUpdate:modelValue":i[0]||=e=>k.value=e,placeholder:`http://localhost:11434/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`,`on-reset`]),u(n(S),{title:n(A)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[u(n(g),{modelValue:L.value,"onUpdate:modelValue":i[1]||=e=>L.value=e,label:n(A)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:n(A)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":n(A)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":n(A)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:i[2]||=(e,t)=>R(L.value,e,t),onRemove:i[3]||=e=>z(e,L.value)},null,8,[`modelValue`,`label`,`description`,`key-placeholder`,`value-placeholder`])]),_:1},8,[`title`]),!n(P)&&n(N)===0&&n(F)?(c(),s(n(h),{key:0,type:`error`},r({title:f(()=>[o(a(n(A)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(F)?{name:`content`,fn:f(()=>[p(`div`,E,a(n(F)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(P)&&n(N)===0?(c(),s(n(h),{key:1,type:`success`},{title:f(()=>[o(a(n(A)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof w==`function`&&w(O);var k=O;export{k as default};
assets/{openai-audio-speech-daRxKyoQ.js → openai-audio-speech-CXOiu7dz.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,S as n,W as r,b as i,k as a,rt as o,st as s,yt as c}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import{o as l}from"./src-BEKjKq3V.js";import{I as u}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as d,c as f,f as p,l as m}from"./components-BoQNNhDi.js";import{n as h}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as g}from"./route-block-B7Ro39Uj.js";var _=`openai-audio-speech`,v=`gpt-4o-mini-tts`,y=e({__name:`openai-audio-speech`,setup(e){let g=m(),y=d(),{providers:b}=u(y),{t:x}=h(),S={speed:1},C=c(1),w=i(()=>!!b.value[_]?.apiKey),T=i(()=>g.availableVoices[_]||[]);async function E(e,t,n){let r=await y.getProviderInstance(_);if(!r)throw Error(`Failed to initialize speech provider`);let i=y.getProviderConfig(_),a=i.model||v;return await g.speech(r,a,e,t,{...i,...S})}return o(C,async()=>{let e=y.getProviderConfig(_);e.speed=C.value}),(e,i)=>(r(),n(t(f),{"provider-id":_,"default-model":v,"additional-settings":S},{"voice-settings":s(()=>[a(t(l),{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:t(x)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(x)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:s(()=>[a(t(p),{"available-voices":T.value,"generate-speech":E,"api-key-configured":w.value,"default-text":`Hello! This is a test of the OpenAI Speech.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof g==`function`&&g(y);var b=y;export{b as default};
 
1
+ import{A as e,Dt as t,S as n,W as r,b as i,k as a,rt as o,st as s,yt as c}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import{o as l}from"./src-BEKjKq3V.js";import{I as u}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as d,c as f,f as p,l as m}from"./components-BaJFFT8H.js";import{n as h}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as g}from"./route-block-B7Ro39Uj.js";var _=`openai-audio-speech`,v=`gpt-4o-mini-tts`,y=e({__name:`openai-audio-speech`,setup(e){let g=m(),y=d(),{providers:b}=u(y),{t:x}=h(),S={speed:1},C=c(1),w=i(()=>!!b.value[_]?.apiKey),T=i(()=>g.availableVoices[_]||[]);async function E(e,t,n){let r=await y.getProviderInstance(_);if(!r)throw Error(`Failed to initialize speech provider`);let i=y.getProviderConfig(_),a=i.model||v;return await g.speech(r,a,e,t,{...i,...S})}return o(C,async()=>{let e=y.getProviderConfig(_);e.speed=C.value}),(e,i)=>(r(),n(t(f),{"provider-id":_,"default-model":v,"additional-settings":S},{"voice-settings":s(()=>[a(t(l),{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:t(x)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:t(x)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:s(()=>[a(t(p),{"available-voices":T.value,"generate-speech":E,"api-key-configured":w.value,"default-text":`Hello! This is a test of the OpenAI Speech.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof g==`function`&&g(y);var b=y;export{b as default};
assets/{openai-audio-transcription-Cje_YdxX.js → openai-audio-transcription-BgmG61-9.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,S as n,W as r,b as i,k as a,st as o}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import{I as s}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as c,a as l,i as u}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as d}from"./route-block-B7Ro39Uj.js";import{n as f}from"./hearing-DSNTfBAe.js";var p=`openai-audio-transcription`,m=`whisper-1`,h=e({__name:`openai-audio-transcription`,setup(e){let d=f(),h=c(),{providers:g}=s(h),_=i(()=>!!g.value[p]?.apiKey);async function v(e){let t=await h.getProviderInstance(p);if(!t)throw Error(`Failed to initialize speech provider`);let n=h.getProviderConfig(p).model||m;return await d.transcription(t,n,e,`json`)}return(e,i)=>(r(),n(t(u),{"provider-id":p,"default-model":m},{playground:o(()=>[a(t(l),{"generate-transcription":v,"api-key-configured":_.value},null,8,[`api-key-configured`])]),_:1}))}});typeof d==`function`&&d(h);var g=h;export{g as default};
 
1
+ import{A as e,Dt as t,S as n,W as r,b as i,k as a,st as o}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import{I as s}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as c,a as l,i as u}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as d}from"./route-block-B7Ro39Uj.js";import{n as f}from"./hearing-CP3k82oL.js";var p=`openai-audio-transcription`,m=`whisper-1`,h=e({__name:`openai-audio-transcription`,setup(e){let d=f(),h=c(),{providers:g}=s(h),_=i(()=>!!g.value[p]?.apiKey);async function v(e){let t=await h.getProviderInstance(p);if(!t)throw Error(`Failed to initialize speech provider`);let n=h.getProviderConfig(p).model||m;return await d.transcription(t,n,e,`json`)}return(e,i)=>(r(),n(t(u),{"provider-id":p,"default-model":m},{playground:o(()=>[a(t(l),{"generate-transcription":v,"api-key-configured":_.value},null,8,[`api-key-configured`])]),_:1}))}});typeof d==`function`&&d(h);var g=h;export{g as default};
assets/{openai-compatible-audio-speech-tfIdLsNC.js → openai-compatible-audio-speech-CgQ-Yph_.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d,yt as f}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as p}from"./widgets-DJ153_lR.js";import{o as m}from"./src-BEKjKq3V.js";import{I as h}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as g,G as _,J as v,K as y,X as b,Y as x,d as S,l as C,q as w}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as T}from"./route-block-B7Ro39Uj.js";import{t as E}from"./use-provider-validation-CpjXOGL1.js";var D={class:`whitespace-pre-wrap break-all`},O=`openai-compatible-audio-speech`,k=e({__name:`openai-compatible-audio-speech`,setup(e){let T=C(),k=g(),{providers:A}=h(k),j={speed:1},M=c({get:()=>A.value[O]?.apiKey||``,set:e=>{A.value[O]&&(A.value[O].apiKey=e)}}),N=c({get:()=>A.value[O]?.baseUrl||``,set:e=>{A.value[O]&&(A.value[O].baseUrl=e)}}),P=c({get:()=>A.value[O]?.model||`tts-1`,set:e=>{A.value[O]&&(A.value[O].model=e)}}),F=c({get:()=>A.value[O]?.voice||`alloy`,set:e=>{A.value[O]&&(A.value[O].voice=e)}}),I=f(1),L=c(()=>!!A.value[O]?.apiKey);async function R(e,t,n,r){let i=await k.getProviderInstance(O);if(!i)throw Error(`Failed to initialize speech provider`);let a=k.getProviderConfig(O);return await T.speech(i,r||P.value,e,t||F.value,{...a,...j,speed:I.value})}let{t:z,router:B,providerMetadata:V,isValidating:H,isValid:U,validationMessage:W,handleResetSettings:G}=E(O);return(e,c)=>(s(),o(n(_),{"provider-name":n(V)?.localizedName,"provider-icon-color":n(V)?.iconColor,"on-back":()=>n(B).back()},{default:u(()=>[l(n(y),null,{default:u(()=>[l(n(w),{title:n(z)(`settings.pages.providers.common.section.basic.title`),description:n(z)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(G)},{default:u(()=>[l(n(x),{modelValue:M.value,"onUpdate:modelValue":c[0]||=e=>M.value=e,required:!1,"provider-name":n(V)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(b),{title:n(z)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(v),{modelValue:N.value,"onUpdate:modelValue":c[1]||=e=>N.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`]),l(n(m),{modelValue:I.value,"onUpdate:modelValue":c[2]||=e=>I.value=e,label:n(z)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:n(z)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),_:1},8,[`title`]),!n(U)&&n(H)===0&&n(W)?(s(),o(n(p),{key:0,type:`error`},r({title:u(()=>[a(i(n(z)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(W)?{name:`content`,fn:u(()=>[d(`div`,D,i(n(W)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(U)&&n(H)===0?(s(),o(n(p),{key:1,type:`success`},{title:u(()=>[a(i(n(z)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1}),l(n(S),{"model-value":P.value,"onUpdate:modelValue":c[3]||=e=>P.value=e,voice:F.value,"onUpdate:voice":c[4]||=e=>F.value=e,"generate-speech":R,"api-key-configured":L.value,"default-text":`Hello! This is a test of the OpenAI Compatible Speech.`},null,8,[`model-value`,`voice`,`api-key-configured`])]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof T==`function`&&T(k);var A=k;export{A as default};
 
1
+ import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d,yt as f}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as p}from"./widgets-Bo0BM5C8.js";import{o as m}from"./src-BEKjKq3V.js";import{I as h}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as g,G as _,J as v,K as y,X as b,Y as x,d as S,l as C,q as w}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as T}from"./route-block-B7Ro39Uj.js";import{t as E}from"./use-provider-validation-CwajWImW.js";var D={class:`whitespace-pre-wrap break-all`},O=`openai-compatible-audio-speech`,k=e({__name:`openai-compatible-audio-speech`,setup(e){let T=C(),k=g(),{providers:A}=h(k),j={speed:1},M=c({get:()=>A.value[O]?.apiKey||``,set:e=>{A.value[O]&&(A.value[O].apiKey=e)}}),N=c({get:()=>A.value[O]?.baseUrl||``,set:e=>{A.value[O]&&(A.value[O].baseUrl=e)}}),P=c({get:()=>A.value[O]?.model||`tts-1`,set:e=>{A.value[O]&&(A.value[O].model=e)}}),F=c({get:()=>A.value[O]?.voice||`alloy`,set:e=>{A.value[O]&&(A.value[O].voice=e)}}),I=f(1),L=c(()=>!!A.value[O]?.apiKey);async function R(e,t,n,r){let i=await k.getProviderInstance(O);if(!i)throw Error(`Failed to initialize speech provider`);let a=k.getProviderConfig(O);return await T.speech(i,r||P.value,e,t||F.value,{...a,...j,speed:I.value})}let{t:z,router:B,providerMetadata:V,isValidating:H,isValid:U,validationMessage:W,handleResetSettings:G}=E(O);return(e,c)=>(s(),o(n(_),{"provider-name":n(V)?.localizedName,"provider-icon-color":n(V)?.iconColor,"on-back":()=>n(B).back()},{default:u(()=>[l(n(y),null,{default:u(()=>[l(n(w),{title:n(z)(`settings.pages.providers.common.section.basic.title`),description:n(z)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(G)},{default:u(()=>[l(n(x),{modelValue:M.value,"onUpdate:modelValue":c[0]||=e=>M.value=e,required:!1,"provider-name":n(V)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(b),{title:n(z)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(v),{modelValue:N.value,"onUpdate:modelValue":c[1]||=e=>N.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`]),l(n(m),{modelValue:I.value,"onUpdate:modelValue":c[2]||=e=>I.value=e,label:n(z)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:n(z)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),_:1},8,[`title`]),!n(U)&&n(H)===0&&n(W)?(s(),o(n(p),{key:0,type:`error`},r({title:u(()=>[a(i(n(z)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(W)?{name:`content`,fn:u(()=>[d(`div`,D,i(n(W)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(U)&&n(H)===0?(s(),o(n(p),{key:1,type:`success`},{title:u(()=>[a(i(n(z)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1}),l(n(S),{"model-value":P.value,"onUpdate:modelValue":c[3]||=e=>P.value=e,voice:F.value,"onUpdate:voice":c[4]||=e=>F.value=e,"generate-speech":R,"api-key-configured":L.value,"default-text":`Hello! This is a test of the OpenAI Compatible Speech.`},null,8,[`model-value`,`voice`,`api-key-configured`])]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof T==`function`&&T(k);var A=k;export{A as default};
assets/{openai-compatible-audio-transcription-CME3o1Xy.js → openai-compatible-audio-transcription-BHT9RryS.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-DJ153_lR.js";import{c as p}from"./src-BEKjKq3V.js";import{I as m}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as h,G as g,J as _,K as v,X as y,Y as b,a as x,q as S}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as C}from"./route-block-B7Ro39Uj.js";import{n as w}from"./hearing-DSNTfBAe.js";import{t as T}from"./use-provider-validation-CpjXOGL1.js";var E={class:`whitespace-pre-wrap break-all`},D=`openai-compatible-audio-transcription`,O=e({__name:`openai-compatible-audio-transcription`,setup(e){let C=w(),O=h(),{providers:k}=m(O),A=c({get:()=>k.value[D]?.apiKey||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].apiKey=e}}),j=c({get:()=>k.value[D]?.baseUrl||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].baseUrl=e}}),M=c({get:()=>k.value[D]?.model||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].model=e}}),N=c(()=>!!k.value[D]?.apiKey);async function P(e){let t=await O.getProviderInstance(D);if(!t)throw Error(`Failed to initialize transcription provider`);return await C.transcription(t,M.value,e,`json`)}let{t:F,router:I,providerMetadata:L,isValidating:R,isValid:z,validationMessage:B,handleResetSettings:V}=T(D);return(e,c)=>(s(),o(n(g),{"provider-name":n(L)?.localizedName,"provider-icon-color":n(L)?.iconColor,"on-back":()=>n(I).back()},{default:u(()=>[l(n(v),null,{default:u(()=>[l(n(S),{title:n(F)(`settings.pages.providers.common.section.basic.title`),description:n(F)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(V)},{default:u(()=>[l(n(b),{modelValue:A.value,"onUpdate:modelValue":c[0]||=e=>A.value=e,"provider-name":n(L)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`]),l(n(p),{modelValue:M.value,"onUpdate:modelValue":c[1]||=e=>M.value=e,label:n(F)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`),placeholder:n(F)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,[`modelValue`,`label`,`placeholder`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(y),{title:n(F)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(_),{modelValue:j.value,"onUpdate:modelValue":c[2]||=e=>j.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`]),!n(z)&&n(R)===0&&n(B)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(F)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(B)?{name:`content`,fn:u(()=>[d(`div`,E,i(n(B)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(z)&&n(R)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(F)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1}),l(n(x),{"generate-transcription":P,"api-key-configured":N.value},null,8,[`api-key-configured`])]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof C==`function`&&C(O);var k=O;export{k as default};
 
1
+ import{A as e,C as t,Dt as n,E as r,Mt as i,O as a,S as o,W as s,b as c,k as l,st as u,x as d}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as f}from"./widgets-Bo0BM5C8.js";import{c as p}from"./src-BEKjKq3V.js";import{I as m}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as h,G as g,J as _,K as v,X as y,Y as b,a as x,q as S}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as C}from"./route-block-B7Ro39Uj.js";import{n as w}from"./hearing-CP3k82oL.js";import{t as T}from"./use-provider-validation-CwajWImW.js";var E={class:`whitespace-pre-wrap break-all`},D=`openai-compatible-audio-transcription`,O=e({__name:`openai-compatible-audio-transcription`,setup(e){let C=w(),O=h(),{providers:k}=m(O),A=c({get:()=>k.value[D]?.apiKey||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].apiKey=e}}),j=c({get:()=>k.value[D]?.baseUrl||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].baseUrl=e}}),M=c({get:()=>k.value[D]?.model||``,set:e=>{k.value[D]||(k.value[D]={}),k.value[D].model=e}}),N=c(()=>!!k.value[D]?.apiKey);async function P(e){let t=await O.getProviderInstance(D);if(!t)throw Error(`Failed to initialize transcription provider`);return await C.transcription(t,M.value,e,`json`)}let{t:F,router:I,providerMetadata:L,isValidating:R,isValid:z,validationMessage:B,handleResetSettings:V}=T(D);return(e,c)=>(s(),o(n(g),{"provider-name":n(L)?.localizedName,"provider-icon-color":n(L)?.iconColor,"on-back":()=>n(I).back()},{default:u(()=>[l(n(v),null,{default:u(()=>[l(n(S),{title:n(F)(`settings.pages.providers.common.section.basic.title`),description:n(F)(`settings.pages.providers.common.section.basic.description`),"on-reset":n(V)},{default:u(()=>[l(n(b),{modelValue:A.value,"onUpdate:modelValue":c[0]||=e=>A.value=e,"provider-name":n(L)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`]),l(n(p),{modelValue:M.value,"onUpdate:modelValue":c[1]||=e=>M.value=e,label:n(F)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`),placeholder:n(F)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,[`modelValue`,`label`,`placeholder`])]),_:1},8,[`title`,`description`,`on-reset`]),l(n(y),{title:n(F)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[l(n(_),{modelValue:j.value,"onUpdate:modelValue":c[2]||=e=>j.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`]),!n(z)&&n(R)===0&&n(B)?(s(),o(n(f),{key:0,type:`error`},r({title:u(()=>[a(i(n(F)(`settings.dialogs.onboarding.validationFailed`)),1)]),_:2},[n(B)?{name:`content`,fn:u(()=>[d(`div`,E,i(n(B)),1)]),key:`0`}:void 0]),1024)):t(``,!0),n(z)&&n(R)===0?(s(),o(n(f),{key:1,type:`success`},{title:u(()=>[a(i(n(F)(`settings.dialogs.onboarding.validationSuccess`)),1)]),_:1})):t(``,!0)]),_:1}),l(n(x),{"generate-transcription":P,"api-key-configured":N.value},null,8,[`api-key-configured`])]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof C==`function`&&C(O);var k=O;export{k as default};
assets/{pages-nCEBY9h2.js → pages-oqAPIc5F.js} RENAMED
@@ -1,3 +1,3 @@
1
- import{A as e,B as t,C as n,Dt as r,H as i,K as a,Mt as o,O as s,R as c,S as l,U as u,W as d,Y as f,b as p,ct as m,et as h,h as g,jt as _,k as v,kt as y,m as b,mt as x,n as S,nt as C,q as w,rt as T,st as E,w as D,x as O,yt as k}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./tres-Dg4AKlcm.js";import{A,D as j,O as M,k as N,u as P}from"./widgets-DJ153_lR.js";import{a as F,n as I}from"./src-BEKjKq3V.js";import{I as L,k as R,n as z,r as B}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import{t as V}from"./vue-router-DbGkV_8v.js";import{t as H}from"./_plugin-vue_export-helper-CdbDUOI-.js";import{h as U,i as W,s as G,t as K,v as ee,y as te}from"./dist-D-gzSpcr.js";import{t as ne}from"./Basic-Brbs07_a.js";import"./src-B2sntzra.js";import{$ as re,Ot as q,Q as ie,dt as ae,ft as J,o as Y,s as oe}from"./components-BoQNNhDi.js";import{n as X}from"./vue-i18n.runtime-Asl2hnl1.js";import"./merge-CTbONeho.js";import"./sleep-scadwjYE.js";import{r as se,t as ce}from"./theme-color-CLlOWR8B.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{n as Z,r as le,t as ue}from"./HeaderLink-XbkrhYnz.js";import"./transformers.web-rBhloxpP.js";import{t as de}from"./route-block-B7Ro39Uj.js";import{a as fe,n as pe}from"./src-CmKk7VdW.js";import"./beat-sync-D0DTRDRF.js";import{n as Q,t as me}from"./scenes-Df2sxhq9.js";import{i as he,n as $,r as ge}from"./format-m0ZevNYD.js";import"./import-url-browser-hbSvYVEt.js";import"./duckdb-mvp-PRWRVg6v.js";import"./llmmarkerParser-CSJQtJvM.js";import"./index-CLFto6T2-Bt5qxznY.js";import"./core-DSb-OcZo.js";import"./airi-card-jd5RKZ9L.js";import{t as _e}from"./hearing-DSNTfBAe.js";import{t as ve}from"./process.worklet-CJeez0uR.js";import{t as ye}from"./composables-u_GDSDcY.js";import{n as be}from"./utc-CCUrA73r.js";function xe(e,t){let n=he(e,t?.in);if(!ge(n))throw RangeError(`Invalid time value`);let r=t?.format??`extended`,i=t?.representation??`complete`,a=``,o=r===`extended`?`-`:``,s=r===`extended`?`:`:``;if(i!==`time`){let e=$(n.getDate(),2),t=$(n.getMonth()+1,2);a=`${$(n.getFullYear(),4)}${o}${t}${o}${e}`}if(i!==`date`){let e=$(n.getHours(),2),t=$(n.getMinutes(),2),r=$(n.getSeconds(),2);a=`${a}${a===``?``:` `}${e}${s}${t}${s}${r}`}return a}var Se={},Ce={class:`cross-background-container`};function we(e,t){return d(),D(`div`,Ce,[w(e.$slots,`default`,{},void 0,!0)])}var Te=H(Se,[[`render`,we],[`__scopeId`,`data-v-455eb62c`]]),Ee={"mb-1":``,"w-full":``,"gap-2":``},De={"w-full":``},Oe=e({__name:`Header`,setup(e){return(e,t)=>(d(),D(`header`,Ee,[O(`div`,De,[v(ue)]),v(r(V),{class:`m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-neutral-100 p-2 text-lg text-neutral-500 outline-none dark:bg-neutral-800 dark:text-neutral-400`,to:`/settings`},{default:E(()=>[...t[0]||=[O(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]]),_:1})]))}}),ke={py:`<sm:2`,flex:`~ col`,rounded:`lg`,relative:``,"overflow-hidden":``,"py-4":``},Ae={key:0,flex:``,mr:`12`},je={flex:`~ col`,shadow:`md violet-900/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,class:`bg-violet-50/80 <md:bg-violet-500/25 dark:bg-violet-900/80`},Me={flex:`~ row`,"gap-2":``},Ne={"flex-1":``},Pe={"text-xs":``,text:`violet-400/90 dark:violet-600/90`,"font-normal":``,class:`inline <sm:hidden`},Fe={key:0,"i-eos-icons:three-dots-loading":``},Ie={key:1,flex:``,mr:`12`},Le={flex:`~ col`,shadow:`sm primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,class:`bg-primary-50/80 <md:bg-primary-500/25 dark:bg-primary-900/80`},Re={"text-xs":``,text:`primary-400/90 dark:primary-600/90`,"font-normal":``,class:`inline <sm:hidden`},ze={key:0,class:`break-words`,text:`primary-700 dark:primary-200`},Be={key:0},Ve={p:`1`,border:`1 solid primary-200`,"rounded-lg":``,m:`y-1`,bg:`primary-100`},He={key:1},Ue={key:1,"i-eos-icons:three-dots-loading":``},We={key:2,flex:`~ row-reverse`,ml:`12`},Ge={flex:`~ col`,shadow:`sm cyan-200/50 dark:none`,px:`2`,h:`unset <sm:fit`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,class:`bg-cyan-50/80 <md:bg-cyan-500/25 dark:bg-cyan-900/80`},Ke={"text-xs":``,text:`cyan-400/90 dark:cyan-600/90`,"font-normal":``,class:`inline <sm:hidden`},qe={key:1},Je={key:0,flex:``,mr:`12`},Ye={flex:`~ col`,shadow:`sm primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,class:`bg-primary-50/80 <md:bg-primary-500/25 dark:bg-primary-900/80`},Xe={"text-xs":``,text:`primary-400/90 dark:primary-600/90`,"font-normal":``,class:`inline <sm:hidden`},Ze={key:0,class:`break-words`,text:`primary-700 dark:primary-200`},Qe={key:0},$e={p:`1`,border:`1 solid primary-200`,"rounded-lg":``,m:`y-1`,bg:`primary-100`},et={key:1},tt={key:1,"i-eos-icons:three-dots-loading":``},nt=e({__name:`ChatHistory`,setup(e){let t=k(),{t:i}=X(),{messages:c,sending:u,streamingMessage:p}=L(Q()),{onBeforeMessageComposed:h,onTokenLiteral:g}=Q();function _(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})})}return h(async()=>{await _()}),g(async()=>{await _()}),T(u,()=>{_()},{flush:`post`}),(e,h)=>{let g=f(`auto-animate`);return d(),D(`div`,ke,[h[4]||=O(`div`,{"flex-1":``},null,-1),m((d(),D(`div`,{ref_key:`chatHistoryRef`,ref:t,px:`<sm:2`,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,"px-4":``},[h[3]||=O(`div`,{"flex-1":``},null,-1),(d(!0),D(b,null,a(r(c),(e,t)=>(d(),D(`div`,{key:t,"mb-2":``},[e.role===`error`?(d(),D(`div`,Ae,[O(`div`,je,[O(`div`,Me,[O(`div`,Ne,[O(`span`,Pe,o(r(i)(`stage.chat.message.character-name.core-system`)),1)]),h[0]||=O(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),r(u)&&t===r(c).length-1?(d(),D(`div`,Fe)):(d(),l(r(q),{key:1,content:e.content,class:`break-words text-violet-500`,text:`base <sm:xs`},null,8,[`content`]))])])):n(``,!0),e.role===`assistant`?(d(),D(`div`,Ie,[O(`div`,Le,[O(`div`,null,[O(`span`,Re,o(r(i)(`stage.chat.message.character-name.airi`)),1)]),e.content?(d(),D(`div`,ze,[(d(!0),D(b,null,a(e.slices,(e,t)=>(d(),D(`div`,{key:t},[e.type===`tool-call`?(d(),D(`div`,Be,[O(`div`,Ve,[h[1]||=s(` Called: `,-1),O(`code`,null,o(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(d(),D(`div`,He)):(d(),l(r(q),{key:2,content:e.text},null,8,[`content`]))]))),128))])):t===r(c).length-1&&!e.content?(d(),D(`div`,Ue)):n(``,!0)])])):e.role===`user`?(d(),D(`div`,We,[O(`div`,Ge,[O(`div`,null,[O(`span`,Ke,o(r(i)(`stage.chat.message.character-name.you`)),1)]),e.content?(d(),l(r(q),{key:0,content:e.content,class:`break-words`,text:`base <sm:xs`},null,8,[`content`])):(d(),D(`div`,qe))])])):n(``,!0)]))),128)),r(u)?(d(),D(`div`,Je,[O(`div`,Ye,[O(`div`,null,[O(`span`,Xe,o(r(i)(`stage.chat.message.character-name.airi`)),1)]),r(p).content?(d(),D(`div`,Ze,[(d(!0),D(b,null,a(r(p).slices,(e,t)=>(d(),D(`div`,{key:t},[e.type===`tool-call`?(d(),D(`div`,Qe,[O(`div`,$e,[h[2]||=s(` Called: `,-1),O(`code`,null,o(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(d(),D(`div`,et)):(d(),l(r(q),{key:2,content:e.text},null,8,[`content`]))]))),128))])):(d(),D(`div`,tt))])])):n(``,!0)])),[[g]])])}}}),rt={width:`24`,height:`24`,viewBox:`0 0 256 256`,"aria-hidden":`true`},it={id:`micLevel`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},at=[`offset`],ot=[`offset`],st=e({__name:`IndicatorMicVolume`,props:{colorClass:{default:`text-primary-500 dark:text-primary-200`}},setup(e){let t=e,{stream:n,enabled:r}=L(B()),{audioContext:a}=L(R()),{startAnalyzer:o,stopAnalyzer:s,volumeLevel:c}=oe(),l,f=p(()=>Math.min(1,(c.value??0)/100));function m(){try{l?.disconnect()}catch{}l=void 0,s()}async function h(){if(m(),!r.value||!n.value)return;let e=a.value;e.state===`suspended`&&await e.resume();let t=o(e);t&&(l=e.createMediaStreamSource(n.value),l.connect(t))}return i(()=>{T([r,n],()=>h(),{immediate:!0})}),u(()=>m()),(e,n)=>(d(),D(`div`,{class:y([`flex items-center justify-center`,t.colorClass])},[(d(),D(`svg`,rt,[O(`defs`,null,[O(`linearGradient`,it,[n[0]||=O(`stop`,{offset:`0%`,"stop-color":`currentColor`,"stop-opacity":`0`},null,-1),O(`stop`,{offset:`${100-Math.round(f.value*100)}%`,"stop-color":`currentColor`,"stop-opacity":`0`},null,8,at),O(`stop`,{offset:`${100-Math.round(f.value*100)}%`,"stop-color":`currentColor`,"stop-opacity":`0.95`},null,8,ot),n[1]||=O(`stop`,{offset:`100%`,"stop-color":`currentColor`,"stop-opacity":`0.95`},null,-1)])]),n[2]||=O(`path`,{fill:`url(#micLevel)`,d:`M128 176a48.05 48.05 0 0 0 48-48V64a48 48 0 0 0-96 0v64a48.05 48.05 0 0 0 48 48M96 64a32 32 0 0 1 64 0v64a32 32 0 0 1-64 0Zm40 143.6V240a8 8 0 0 1-16 0v-32.4A80.11 80.11 0 0 1 48 128a8 8 0 0 1 16 0a64 64 0 0 0 128 0a8 8 0 0 1 16 0a80.11 80.11 0 0 1-72 79.6`},null,-1),n[3]||=O(`path`,{fill:`none`,stroke:`currentColor`,"stroke-opacity":`1`,"stroke-width":`2`,d:`M128 176a48.05 48.05 0 0 0 48-48V64a48 48 0 0 0-96 0v64a48.05 48.05 0 0 0 48 48M96 64a32 32 0 0 1 64 0v64a32 32 0 0 1-64 0Zm40 143.6V240a8 8 0 0 1-16 0v-32.4A80.11 80.11 0 0 1 48 128a8 8 0 0 1 16 0a64 64 0 0 0 128 0a8 8 0 0 1 16 0a80.11 80.11 0 0 1-72 79.6`},null,-1)]))],2))}}),ct={flex:`col`,"items-center":``,"pt-4":``},lt={"h-full":``,"max-h":`[85vh]`,"w-full":``,py:`4`},ut={flex:`~ col`,border:`solid 4 primary-200/20 dark:primary-400/20`,"h-full":``,"w-full":``,"rounded-xl":``,bg:`primary-50/50 dark:primary-950/70`,"backdrop-blur-md":``},dt={h:`<md:full`,flex:``,"gap-2":``},ft={class:y([`relative`,`w-full`,`bg-primary-200/20 dark:bg-primary-400/20`])},pt=[`title`],mt={key:1,class:`i-ph:microphone-slash`},ht={class:`flex flex-col items-center justify-center`},gt={class:`relative h-28 w-28 select-none`},_t={class:`mt-3 text-xs text-neutral-500 dark:text-neutral-400`},vt={absolute:``,"bottom--8":``,"right-0":``,flex:``,"gap-2":``},yt={key:0,"i-solar:moon-bold":``},bt={key:1,"i-solar:sun-2-bold":``},xt=e({__name:`InteractiveArea`,setup(e){let t=k(``),n=k(!1),i=k(!1),a=re(),{activeProvider:s,activeModel:c}=L(ie()),{themeColorsHueDynamic:f}=L(z()),{askPermission:m}=B(),{enabled:h,selectedAudioInput:g,stream:b,audioInputs:C}=L(B()),{send:w,onAfterMessageComposed:P,discoverToolsCompatibility:I,cleanupMessages:V}=Q(),{messages:H}=L(Q()),{audioContext:U}=R(),{t:W}=X(),K=G({disableTransition:!1});async function ee(){if(!(!t.value.trim()||i.value))try{let e=a.getProviderConfig(s.value);await w(t.value,{chatProvider:await a.getProviderInstance(s.value),model:c.value,providerConfig:e})}catch(e){H.value.pop(),H.value.push({role:`error`,content:e.message})}}T(n,async e=>{e&&await m()}),T([s,c],async()=>{s.value&&c.value&&await I(c.value,await a.getProviderInstance(s.value),[])}),P(async()=>{t.value=``});let{startAnalyzer:te,stopAnalyzer:q,volumeLevel:ae}=oe(),J=p(()=>Math.min(1,Math.max(0,(ae.value??0)/100))),Y;function se(){try{Y?.disconnect()}catch{}Y=void 0,q()}async function ce(){if(se(),!n.value||!h.value||!b.value)return;U.state===`suspended`&&await U.resume();let e=te(U);e&&(Y=U.createMediaStreamSource(b.value),Y.connect(e))}return T([n,h,b],()=>{ce()},{immediate:!0}),u(()=>{se()}),(e,a)=>(d(),D(`div`,ct,[O(`div`,lt,[O(`div`,ut,[v(nt,{"h-full":``,"flex-1":``,w:`full`,"max-h":`<md:[60%]`}),O(`div`,dt,[O(`div`,ft,[v(r(ne),{modelValue:t.value,"onUpdate:modelValue":a[0]||=e=>t.value=e,placeholder:r(W)(`stage.message`),text:`primary-500 hover:primary-600 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`transparent`,"min-h":`[100px]`,"max-h":`[300px]`,"w-full":``,"rounded-t-xl":``,"p-4":``,"font-medium":``,"outline-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:y({"transition-colors-none placeholder:transition-colors-none":r(f)}),onSubmit:ee,onCompositionstart:a[1]||=e=>i.value=!0,onCompositionend:a[2]||=e=>i.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),O(`div`,null,[v(r(A),{"delay-duration":0,"skip-delay-duration":0},{default:E(()=>[v(r(N),{open:n.value,"onUpdate:open":a[5]||=e=>n.value=e},{default:E(()=>[v(r(j),{"as-child":``},{default:E(()=>[O(`button`,{class:`max-h-[10lh] min-h-[1lh]`,text:`lg neutral-500 dark:neutral-400`,flex:``,"items-center":``,"justify-center":``,"rounded-md":``,"p-2":``,"outline-none":``,transition:`colors duration-200, transform duration-100`,"active:scale-95":``,title:r(W)(`settings.hearing.title`)},[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(h)?(d(),l(st,{key:0})):(d(),D(`div`,mt))]),_:1})],8,pt)]),_:1}),v(S,{name:`fade`},{default:E(()=>[v(r(M),{side:`top`,"side-offset":8,class:y([`w-72 max-w-[18rem] rounded-xl border border-neutral-200/60 bg-neutral-50/90 p-4`,`shadow-lg backdrop-blur-md dark:border-neutral-800/30 dark:bg-neutral-900/80`,`flex flex-col gap-3`])},{default:E(()=>[O(`div`,ht,[O(`div`,gt,[O(`div`,{class:y([`absolute left-1/2 top-1/2 h-20 w-20 rounded-full transition-all duration-150 -translate-x-1/2 -translate-y-1/2`,r(h)?`bg-primary-500/15 dark:bg-primary-600/20`:`bg-neutral-300/20 dark:bg-neutral-700/20`]),style:_({transform:`translate(-50%, -50%) scale(${1+J.value*.35})`,opacity:String(.25+J.value*.25)})},null,6),O(`div`,{class:y([`absolute left-1/2 top-1/2 h-24 w-24 rounded-full transition-all duration-200 -translate-x-1/2 -translate-y-1/2`,r(h)?`bg-primary-500/10 dark:bg-primary-600/15`:`bg-neutral-300/10 dark:bg-neutral-700/10`]),style:_({transform:`translate(-50%, -50%) scale(${1.2+J.value*.55})`,opacity:String(.15+J.value*.2)})},null,6),O(`div`,{class:y([`absolute left-1/2 top-1/2 h-28 w-28 rounded-full transition-all duration-300 -translate-x-1/2 -translate-y-1/2`,r(h)?`bg-primary-500/5 dark:bg-primary-600/10`:`bg-neutral-300/5 dark:bg-neutral-700/5`]),style:_({transform:`translate(-50%, -50%) scale(${1.5+J.value*.8})`,opacity:String(.08+J.value*.15)})},null,6),O(`button`,{class:y([`absolute left-1/2 top-1/2 grid h-16 w-16 place-items-center rounded-full shadow-md outline-none transition-all duration-200 -translate-x-1/2 -translate-y-1/2`,r(h)?`bg-primary-500 text-white hover:bg-primary-600 active:scale-95`:`bg-neutral-200 text-neutral-600 hover:bg-neutral-300 active:scale-95 dark:bg-neutral-700 dark:text-neutral-200`]),onClick:a[3]||=e=>h.value=!r(h)},[O(`div`,{class:y([r(h)?`i-ph:microphone`:`i-ph:microphone-slash`,`h-6 w-6`])},null,2)],2)]),O(`p`,_t,o(r(h)?`Microphone enabled`:`Microphone disabled`),1)]),v(r(F),{modelValue:r(g),"onUpdate:modelValue":a[4]||=e=>x(g)?g.value=e:null,label:`Input device`,description:`Select the microphone you want to use.`,options:r(C).map(e=>({label:e.label||`Unknown Device`,value:e.deviceId})),layout:`vertical`,placeholder:`Select microphone`},null,8,[`modelValue`,`options`])]),_:1})]),_:1})]),_:1},8,[`open`])]),_:1})])])])])]),O(`div`,vt,[O(`button`,{class:`max-h-[10lh] min-h-[1lh]`,bg:`neutral-100 dark:neutral-800`,text:`lg neutral-500 dark:neutral-400`,"hover:text":`red-500 dark:red-400`,flex:``,"items-center":``,"justify-center":``,"rounded-md":``,"p-2":``,"outline-none":``,"transition-colors":``,"transition-transform":``,"active:scale-95":``,onClick:a[6]||=(...e)=>r(V)&&r(V)(...e)},[...a[8]||=[O(`div`,{class:`i-solar:trash-bin-2-bold-duotone`},null,-1)]]),O(`button`,{class:`max-h-[10lh] min-h-[1lh]`,bg:`neutral-100 dark:neutral-800`,text:`lg neutral-500 dark:neutral-400`,flex:``,"items-center":``,"justify-center":``,"rounded-md":``,"p-2":``,"outline-none":``,"transition-colors":``,"transition-transform":``,"active:scale-95":``,onClick:a[7]||=e=>K.value=!r(K)},[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(K)?(d(),D(`div`,yt)):(d(),D(`div`,bt))]),_:1})])])]))}}),St=[`src`],Ct=[`src`],wt=H(e({__name:`MobileHeaderLink`,setup(e){let t=G();return(e,n)=>(d(),l(r(V),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:E(()=>[r(t)?(d(),D(`img`,{key:0,src:r(le),"h-8":``,"w-8":``,class:`theme-colored`},null,8,St)):(d(),D(`img`,{key:1,src:r(Z),"h-8":``,"w-8":``,class:`theme-colored`},null,8,Ct))]),_:1}))}}),[[`__scopeId`,`data-v-9c3d67a4`]]),Tt={"mb-1":``,"w-full":``,"gap-2":``},Et={"w-full":``,flex:``,"justify-center":``},Dt=e({__name:`MobileHeader`,setup(e){return(e,t)=>(d(),D(`header`,Tt,[O(`div`,Et,[v(wt)])]))}}),Ot={flex:`~ col`,rounded:`lg`,"overflow-hidden":``},kt={key:0,flex:``,mr:`12`},At={flex:`~ col`,shadow:`sm violet-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset <sm:fit`,bg:`violet-100 dark:violet-800`,"backdrop-blur-sm":``},jt={flex:`~ row`,"items-center":``,"justify-between":``,"gap-2":``},Mt={"text-xs":``,text:`violet-400/90 dark:violet-600/90`,"font-normal":``},Nt={key:1,"i-eos-icons:three-dots-loading":``},Pt={key:1,flex:``,mr:`12`},Ft={flex:`~ col`,shadow:`sm primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset <sm:fit`,"backdrop-blur-md":``,class:`bg-primary-50 dark:bg-primary-900`},It={text:`primary-400/90 dark:primary-600/90`,"text-xs":``,"font-normal":``,class:`inline <sm:hidden`},Lt={key:1,"i-eos-icons:three-dots-loading":``},Rt={key:2,flex:`~`},zt={flex:`~ col`,shadow:`sm cyan-200/50 dark:none`,px:`2`,h:`unset <sm:fit`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,bg:`white dark:neutral-800`,"backdrop-blur-md":``},Bt={"text-xs":``,text:`cyan-400/90 dark:cyan-600/90`,"font-normal":``,class:`inline <sm:hidden`},Vt={key:1},Ht=H(e({__name:`MobileChatHistory`,setup(e){let i=k(),{t:s}=X(),{messages:c}=L(Q()),{onBeforeMessageComposed:u,onTokenLiteral:p}=Q();return u(async()=>{t().then(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})}),p(async()=>{t().then(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})}),(e,t)=>{let u=f(`auto-animate`);return d(),D(`div`,Ot,[m((d(),D(`div`,{ref_key:`chatHistoryRef`,ref:i,"max-h":`35dvh`,"z-5":``,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,class:`chat-history`},[(d(!0),D(b,null,a(r(c),(e,i)=>(d(),D(`div`,{key:i,"mb-2":``},[e.role===`error`?(d(),D(`div`,kt,[O(`div`,At,[O(`div`,jt,[O(`div`,null,[O(`span`,Mt,o(r(s)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=O(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(d(),l(r(q),{key:0,content:e.content,class:`break-words`,text:`base <sm:xs`},null,8,[`content`])):(d(),D(`div`,Nt))])])):n(``,!0),e.role===`assistant`?(d(),D(`div`,Pt,[O(`div`,Ft,[O(`div`,null,[O(`span`,It,o(r(s)(`stage.chat.message.character-name.airi`)),1)]),e.content?(d(),l(r(q),{key:0,content:e.content,class:`break-words`,text:`base <sm:xs`},null,8,[`content`])):(d(),D(`div`,Lt))])])):e.role===`user`?(d(),D(`div`,Rt,[O(`div`,zt,[O(`div`,null,[O(`span`,Bt,o(r(s)(`stage.chat.message.character-name.you`)),1)]),e.content?(d(),l(r(q),{key:0,content:e.content,class:`break-words`,text:`base <sm:xs`},null,8,[`content`])):(d(),D(`div`,Vt))])])):n(``,!0)]))),128))])),[[u]])])}}}),[[`__scopeId`,`data-v-c0292b1a`]]),Ut={"max-w":`calc[100%-2rem]`,"mx-auto":``,"h-full":``,flex:``,"flex-col":``,"pt-14":``},Wt={"flex-1":``},Gt={grid:`~ cols-[70px_1fr]`,"mt-4":``,"gap-2":``,"text-sm":``},Kt={"font-mono":``},qt={"font-mono":``},Jt={"font-mono":``},Yt=e({__name:`About`,setup(e){let t=k(!1),n=xe(new be(`Wed Nov 5 03:49:58 2025 +0800`));return(e,i)=>(d(),D(b,null,[O(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`About`,onClick:i[0]||=e=>t.value=!t.value},[...i[2]||=[O(`div`,{"i-solar:info-circle-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]]),v(r(J),{modelValue:t.value,"onUpdate:modelValue":i[1]||=e=>t.value=e},{default:E(()=>[O(`div`,Ut,[i[7]||=O(`div`,{"mb-14":``,"text-center":``,"text-5xl":``,"font-sans-rounded":``},[O(`span`,{text:`neutral-400 dark:neutral-100/65`},`Project`),s(),O(`span`,{text:`pink-400 dark:pink-300/90`},`AIRI`),O(`div`,{"mt-2":``,"text-base":``},` Web ver. `)],-1),O(`div`,Wt,[i[6]||=O(`div`,{text:`neutral-500 dark:neutral-400`},` Application build information `,-1),O(`div`,Gt,[i[3]||=O(`div`,{text:`neutral-500 dark:neutral-400`},` Branch `,-1),O(`div`,Kt,o(r(`main`)),1),i[4]||=O(`div`,{text:`neutral-500 dark:neutral-400`},` Commit `,-1),O(`div`,qt,o(r(`51081dc4df`).substring(0,7)),1),i[5]||=O(`div`,{text:`neutral-500 dark:neutral-400`},` Built on `,-1),O(`div`,Jt,o(r(n)),1)])]),i[8]||=O(`div`,{"my-10":``},[O(`div`,{text:`neutral-500 dark:neutral-400`},` About `),O(`div`,{"mt-4":``,flex:``,"flex-col":``,"gap-2":``},[O(`a`,{class:y([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,href:`https://airi.moeru.ai/docs/`,target:`_blank`},[O(`div`,{"i-solar:home-smile-outline":``}),O(`div`,null,`Home`)]),O(`a`,{href:`https://airi.moeru.ai/docs/en/docs/overview/`,class:y([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,target:`_blank`},[O(`div`,{"i-solar:document-add-outline":``}),O(`div`,null,`Documentations`)]),O(`a`,{href:`https://github.com/moeru-ai/airi`,class:y([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,target:`_blank`},[O(`div`,{"i-simple-icons:github":``}),O(`div`,null,`GitHub`)])])],-1)])]),_:1},8,[`modelValue`])],64))}}),Xt={"w-full":``,flex:``,"flex-1":``,"items-center":``,"self-end":``,"justify-end":``,"gap-2":``},Zt={key:0,"w-full":``,flex:``,"justify-between":``,"gap-2":``},Qt={key:0,"i-solar:tuning-outline":``,"size-5":``},$t={key:1,"i-solar:alt-arrow-right-outline":``,"size-5":``},en=H(e({__name:`ViewControls`,props:{modelValue:{required:!0},modelModifiers:{}},emits:c([`reset`],[`update:modelValue`]),setup(e,{emit:t}){let i=t,{stageModelRenderer:a,stageViewControlsEnabled:o}=L(z()),c=h(e,`modelValue`);function u(e){if(c.value===e){i(`reset`);return}c.value=e}return(e,t)=>(d(),D(`div`,Xt,[v(S,{name:`fade`},{default:E(()=>[r(o)?(d(),D(`div`,Zt,[v(r(P),{variant:`secondary-muted`,toggled:c.value===`x`,"w-full":``,onClick:t[0]||=e=>u(`x`)},{default:E(()=>[...t[5]||=[s(` X `,-1)]]),_:1},8,[`toggled`]),v(r(P),{variant:`secondary-muted`,toggled:c.value===`y`,"w-full":``,onClick:t[1]||=e=>u(`y`)},{default:E(()=>[...t[6]||=[s(` Y `,-1)]]),_:1},8,[`toggled`]),r(a)===`vrm`?(d(),l(r(P),{key:0,variant:`secondary-muted`,toggled:c.value===`z`,"w-full":``,onClick:t[2]||=e=>u(`z`)},{default:E(()=>[...t[7]||=[s(` Z `,-1)]]),_:1},8,[`toggled`])):n(``,!0),v(r(P),{variant:`secondary-muted`,toggled:c.value===`scale`,"w-full":``,onClick:t[3]||=e=>u(`scale`)},{default:E(()=>[...t[8]||=[s(` Scale `,-1)]]),_:1},8,[`toggled`])])):n(``,!0)]),_:1}),O(`button`,{"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"justify-self-end":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,title:`View`,text:`neutral-500 dark:neutral-400`,onClick:t[4]||=e=>o.value=!r(o)},[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(o)?(d(),D(`div`,$t)):(d(),D(`div`,Qt))]),_:1})])]))}}),[[`__scopeId`,`data-v-4fe382a1`]]),tn={key:0},nn={key:0,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},rn={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},an={key:1,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},on={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},sn={key:2,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},cn={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},ln={key:3,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},un={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},dn=H(e({__name:`Inputs`,props:{mode:{}},setup(e,{expose:t}){let i=e,{stageModelRenderer:a,stageViewControlsEnabled:s}=L(z()),{scale:c,modelOffset:u,modelSize:f}=L(pe()),{scale:m,position:h}=L(fe()),g=p({get:()=>{switch(a.value){case`live2d`:return h.value.x;case`vrm`:return u.value.x;default:return 0}},set:e=>{switch(a.value){case`live2d`:h.value.x=e;break;case`vrm`:u.value.x=e;break;default:break}}}),_=p(()=>a.value===`live2d`?-500:-f.value.x-10),y=p(()=>a.value===`vrm`?500:f.value.x+10),b=p({get:()=>{switch(a.value){case`live2d`:return h.value.y;case`vrm`:return u.value.y;default:return 0}},set:e=>{switch(a.value){case`live2d`:h.value.y=e;break;case`vrm`:u.value.y=e;break;default:break}}}),x=p(()=>a.value===`live2d`?-500:-f.value.y-10),C=p(()=>a.value===`vrm`?500:f.value.y+10),w=p({get:()=>{switch(a.value){case`live2d`:return 0;case`vrm`:return u.value.z;default:return 0}},set:e=>{switch(a.value){case`live2d`:break;case`vrm`:u.value.z=e;break;default:break}}}),T=p(()=>a.value===`live2d`?-500:-f.value.z-10),k=p(()=>a.value===`live2d`?500:f.value.z+10),A=p({get:()=>a.value===`live2d`?m.value:c.value,set:e=>{a.value===`live2d`?m.value=e:c.value=e}});function j(){switch(i.mode){case`x`:g.value=0;break;case`y`:b.value=0;break;case`z`:w.value=0;break;case`scale`:A.value=1;break}}return t({resetOnMode:j}),(e,t)=>(d(),l(S,{name:`fade-side-pops-in`},{default:E(()=>[r(s)?(d(),D(`div`,tn,[v(S,{name:`fade-side-pops-in`,mode:`out-in`},{default:E(()=>[i.mode===`x`?(d(),D(`div`,nn,[v(r(I),{modelValue:g.value,"onUpdate:modelValue":t[0]||=e=>g.value=e,min:_.value,max:y.value,step:.01,"data-direction":`vertical`,h:`50%`,"write-vertical-left":``},null,8,[`modelValue`,`min`,`max`]),O(`div`,rn,o(g.value.toFixed(2)),1)])):i.mode===`y`?(d(),D(`div`,an,[v(r(I),{modelValue:b.value,"onUpdate:modelValue":t[1]||=e=>b.value=e,min:x.value,max:C.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),O(`div`,on,o(b.value.toFixed(2)),1)])):r(a)===`vrm`&&i.mode===`z`?(d(),D(`div`,sn,[v(r(I),{modelValue:w.value,"onUpdate:modelValue":t[2]||=e=>w.value=e,min:T.value,max:k.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),O(`div`,cn,o(w.value.toFixed(2)),1)])):i.mode===`scale`?(d(),D(`div`,ln,[v(r(I),{modelValue:A.value,"onUpdate:modelValue":t[3]||=e=>A.value=e,min:0,max:3,step:1e-4,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`]),O(`div`,un,o(A.value.toFixed(2)),1)])):n(``,!0)]),_:1})])):n(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-011f6495`]]),fn={fixed:``,"bottom-0":``,"w-full":``,flex:``,"flex-col":``},pn={relative:``,"w-full":``,"self-end":``},mn={top:`50%`,"translate-y":`[-50%]`,fixed:``,"z-15":``,"px-3":``},hn={"translate-y":`[-100%]`,absolute:``,"right-0":``,"w-full":``,"px-3":``,"pb-3":``,"font-sans":``},gn={flex:`~ col`,"w-full":``,"gap-1":``},_n={border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Hearing`},vn={key:1,"i-solar:microphone-3-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},yn={key:0,"i-solar:moon-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},bn={key:1,"i-solar:sun-2-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},xn=e({__name:`MobileInteractiveArea`,setup(e){let t=G({disableTransition:!1}),a=k(!1),o=k(`scale`),s=C(`viewControlsInputs`),c=k(``),f=k(!1),p=te(),m=re(),{activeProvider:h,activeModel:b}=L(ie());ee(document.documentElement,()=>p.update());let{themeColorsHueDynamic:w,stageViewControlsEnabled:A}=L(z()),j=B(),{enabled:M,selectedAudioInput:N,stream:P,audioInputs:F}=L(j),{send:I,onAfterMessageComposed:H,discoverToolsCompatibility:U,cleanupMessages:W}=Q(),{messages:K}=L(Q()),{t:q}=X(),{audioContext:J}=R(),{startAnalyzer:Y,stopAnalyzer:se,volumeLevel:ce}=oe(),Z;function le(){return/Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}async function ue(){le()||await de()}async function de(){if(!(!c.value.trim()||f.value))try{let e=m.getProviderConfig(h.value);await I(c.value,{chatProvider:await m.getProviderInstance(h.value),model:b.value,providerConfig:e})}catch(e){K.value.pop(),K.value.push({role:`error`,content:e.message})}}function fe(){try{Z?.disconnect()}catch{}Z=void 0,se()}async function pe(){if(fe(),!a.value||!M.value||!P.value)return;J.state===`suspended`&&await J.resume();let e=Y(J);e&&(Z=J.createMediaStreamSource(P.value),Z.connect(e))}return T([a,M,P],()=>{pe()},{immediate:!0}),T(a,e=>{e&&j.askPermission()}),H(async()=>{c.value=``}),T([h,b],async()=>{h.value&&b.value&&await U(b.value,await m.getProviderInstance(h.value),[])}),u(()=>{fe()}),i(()=>{p.update()}),(e,i)=>(d(),D(`div`,fn,[(d(),l(g,null,[v(S,{name:`fade`},{default:E(()=>[r(A)?n(``,!0):(d(),l(Ht,{key:0,"max-w":`[calc(100%-3.5rem)]`,"w-full":``,"self-start":``,"pl-3":``}))]),_:1})],1024)),O(`div`,pn,[O(`div`,mn,[v(dn,{ref:`viewControlsInputs`,mode:o.value},null,8,[`mode`])]),O(`div`,hn,[O(`div`,gn,[v(Yt),v(r(ae),{show:a.value,"onUpdate:show":i[0]||=e=>a.value=e,enabled:r(M),"onUpdate:enabled":i[1]||=e=>x(M)?M.value=e:null,"selected-audio-input":r(N),"onUpdate:selectedAudioInput":i[2]||=e=>x(N)?N.value=e:null,"audio-inputs":r(F),"volume-level":r(ce),granted:!0},{default:E(()=>[O(`button`,_n,[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(M)?(d(),l(st,{key:0,"size-5":``,"color-class":`text-neutral-500 dark:text-neutral-400`})):(d(),D(`div`,vn))]),_:1})])]),_:1},8,[`show`,`enabled`,`selected-audio-input`,`audio-inputs`,`volume-level`]),O(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Theme`,onClick:i[3]||=e=>t.value=!r(t)},[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(t)?(d(),D(`div`,yn)):(d(),D(`div`,bn))]),_:1})]),v(r(V),{to:`/settings`,border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Settings`},{default:E(()=>[...i[10]||=[O(`div`,{"i-solar:settings-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]]),_:1}),v(en,{modelValue:o.value,"onUpdate:modelValue":i[4]||=e=>o.value=e,onReset:i[5]||=()=>s.value?.resetOnMode()},null,8,[`modelValue`]),O(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Cleanup Messages`,onClick:i[6]||=(...e)=>r(W)&&r(W)(...e)},[...i[11]||=[O(`div`,{class:`i-solar:trash-bin-2-bold-duotone`},null,-1)]])])]),O(`div`,{bg:`white dark:neutral-800`,"max-h-100dvh":``,"max-w-100dvw":``,"w-full":``,flex:``,"gap-1":``,"overflow-auto":``,"px-3":``,"pt-2":``,style:_({paddingBottom:`${Math.max(Number.parseFloat(r(p).bottom.value.replace(`px`,``)),12)}px`})},[v(r(ne),{modelValue:c.value,"onUpdate:modelValue":i[7]||=e=>c.value=e,placeholder:r(q)(`stage.message`),border:`solid 2 neutral-200/60 dark:neutral-700/60`,text:`neutral-500 hover:neutral-600 dark:neutral-100 dark:hover:neutral-200 placeholder:neutral-400 placeholder:hover:neutral-500 placeholder:dark:neutral-300 placeholder:dark:hover:neutral-400`,bg:`neutral-100/80 dark:neutral-950/80`,"max-h":`[10lh]`,"min-h":`[calc(1lh+4px+4px)]`,"w-full":``,"resize-none":``,"overflow-y-scroll":``,rounded:`[1lh]`,"px-4":``,"py-0.5":``,"outline-none":``,"backdrop-blur-md":``,"scrollbar-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:y([r(w)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:ue,onCompositionstart:i[8]||=e=>f.value=!0,onCompositionend:i[9]||=e=>f.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),c.value.trim()||f.value?(d(),D(`button`,{key:0,w:`[calc(1lh+4px+4px)]`,h:`[calc(1lh+4px+4px)]`,"aspect-square":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-full":``,"outline-none":``,"backdrop-blur-md":``,text:`neutral-500 hover:neutral-600 dark:neutral-900 dark:hover:neutral-800`,bg:`primary-50/80 dark:neutral-100/80 hover:neutral-50`,transition:`all duration-250 ease-in-out`,onClick:de},[...i[12]||=[O(`div`,{"i-solar:arrow-up-outline":``},null,-1)]])):n(``,!0)],4)])]))}}),Sn={class:`relative`},Cn={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``},wn=H(e({__name:`AnimatedWave`,props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:`oklch(95% 0.10 var(--chromatic-hue))`},direction:{default:`down`},movementDirection:{default:`left`},animationSpeed:{default:50}},setup(e){let t=e,n=k(t.height),r=k(t.amplitude),i=k(t.waveLength),a=k(t.fillColor),o=k(t.direction),s=k(t.movementDirection);function c(e,t,n,r,i){let a=[],o=Math.ceil(e/r)*r,s=i===`up`?n:t-n;a.push(`M 0 ${s}`);let c=Math.PI*2/r;for(let e=0;e<=o;e+=1){let t=n*Math.sin(c*e),r=i===`up`?s-t:s+t;a.push(`L ${e} ${r}`)}let l=i===`up`?t:0;return a.push(`L ${o} ${l}`),a.push(`L 0 ${l} Z`),a.join(` `)}let l=p(()=>n.value+r.value*2),u=p(()=>{let e=`<svg width="${i.value}" height="${l.value}" xmlns="http://www.w3.org/2000/svg">
2
  <path d="${c(i.value,l.value,r.value,i.value,o.value)}"/>
3
- </svg>`;return`url(data:image/svg+xml;base64,${btoa(e)})`});return T(()=>[t.height,t.amplitude,t.waveLength,t.fillColor,t.direction,t.movementDirection],()=>{n.value=t.height,r.value=t.amplitude,i.value=t.waveLength,a.value=t.fillColor,o.value=t.direction,s.value=t.movementDirection},{immediate:!0}),(t,n)=>(d(),D(`div`,Sn,[w(t.$slots,`default`,{},void 0,!0),O(`div`,Cn,[O(`div`,{class:`colored-area wave`,style:_({background:a.value,height:`${l.value}px`,maskImage:u.value,WebkitMaskImage:u.value,"--wave-translate":`${-i.value}px`,"--animation-duration":`${i.value/e.animationSpeed}s`,"animation-direction":s.value===`left`?`normal`:`reverse`})},null,4)])]))}}),[[`__scopeId`,`data-v-33a54ad1`]]),Tn={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},En={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``},Dn={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 <md:col`},On=e({__name:`index`,setup(e){let t=G(),a=k(!1);function o(e){a.value=e}let s=U(),{scale:c,position:f,positionInPercentageString:p}=L(fe()),m=W(K).smaller(`md`),{updateThemeColor:h}=se(ce(`.widgets.top-widgets .colored-area`,`background-color`));T(t,()=>h(),{immediate:!0}),i(()=>h());let{stream:g,enabled:_}=L(B()),{startRecord:y,stopRecord:b,onStopRecord:x}=Y(g),{transcribeForRecording:S}=_e(),C=re(),{activeProvider:w,activeModel:D}=L(ie()),A=Q(),{init:j,dispose:M,start:N,loaded:P}=ye(ve,{threshold:k(.6),onSpeechStart:()=>y(),onSpeechEnd:()=>b()}),F;async function I(){try{await j(),g.value&&await N(g.value),F=x(async e=>{let t=await S(e);if(!(!t||!t.trim()))try{let e=await C.getProviderInstance(w.value);if(!e||!D.value)return;await A.send(t,{model:D.value,chatProvider:e})}catch(e){console.error(`Failed to send chat from voice:`,e)}})}catch(e){console.error(`Audio interaction init failed:`,e)}}function R(){try{F?.(),F=void 0,M()}catch{}}return T(_,async e=>{e?await I():R()},{immediate:!0}),u(()=>{R()}),T([g,()=>P.value],async([e,t])=>{if(_.value&&t&&e)try{await N(e)}catch(e){console.error(`Failed to start VAD with stream:`,e)}}),(e,i)=>(d(),l(Te,null,{default:E(()=>[v(wn,{class:`widgets top-widgets`,"fill-color":r(t)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:E(()=>[O(`div`,Tn,[O(`div`,En,[v(Oe,{class:`hidden md:flex`}),v(Dt,{class:`flex md:hidden`})]),O(`div`,Dn,[v(r(me),{"flex-1":``,"min-w":`1/2`,paused:a.value,"focus-at":{x:r(s).x.value,y:r(s).y.value},"x-offset":`${r(m)?r(f).x:r(f).x-10}%`,"y-offset":r(p).y,scale:r(c)},null,8,[`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`]),r(m)?n(``,!0):(d(),l(xt,{key:0,h:`85dvh`,absolute:``,"right-4":``,flex:``,"flex-1":``,"flex-col":``,"max-w":`500px`,"min-w":`30%`})),r(m)?(d(),l(xn,{key:1,onSettingsOpen:o})):n(``,!0)])])]),_:1},8,[`fill-color`])]),_:1}))}});typeof de==`function`&&de(On);var kn=On;export{kn as default};
 
1
+ import{A as e,B as t,C as n,Dt as r,H as i,K as a,Mt as o,O as s,R as c,S as l,U as u,W as d,Y as f,b as p,ct as m,et as h,h as g,jt as _,k as v,kt as y,m as b,mt as x,n as S,nt as C,q as w,rt as T,st as E,w as D,x as O,yt as k}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./tres-BtRSdtJN.js";import{A,D as j,O as M,k as N,u as P}from"./widgets-Bo0BM5C8.js";import{a as F,n as I}from"./src-BEKjKq3V.js";import{I as L,k as R,n as z,r as B}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import{t as V}from"./vue-router-DbGkV_8v.js";import{t as H}from"./_plugin-vue_export-helper-CdbDUOI-.js";import{h as U,i as W,s as G,t as K,v as ee,y as te}from"./dist-D-gzSpcr.js";import{t as ne}from"./Basic-Brbs07_a.js";import"./src-B2sntzra.js";import{$ as re,Ot as q,Q as ie,dt as ae,ft as J,o as Y,s as oe}from"./components-BaJFFT8H.js";import{n as X}from"./vue-i18n.runtime-Asl2hnl1.js";import"./merge-CTbONeho.js";import"./sleep-scadwjYE.js";import{r as se,t as ce}from"./theme-color-CLlOWR8B.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{n as Z,r as le,t as ue}from"./HeaderLink-XbkrhYnz.js";import"./transformers.web-rBhloxpP.js";import{t as de}from"./route-block-B7Ro39Uj.js";import{n as fe,o as pe}from"./src-AGgZvuP9.js";import"./beat-sync-BNa1wmOR.js";import{n as Q,t as me}from"./scenes-DvE-uMcR.js";import{i as he,n as $,r as ge}from"./format-m0ZevNYD.js";import"./import-url-browser-hbSvYVEt.js";import"./duckdb-mvp-PRWRVg6v.js";import"./llmmarkerParser-CSJQtJvM.js";import"./index-CLFto6T2-Bt5qxznY.js";import"./core-DSb-OcZo.js";import"./airi-card-CMRWvgk7.js";import{t as _e}from"./hearing-CP3k82oL.js";import{t as ve}from"./process.worklet-CJeez0uR.js";import{t as ye}from"./composables-u_GDSDcY.js";import{n as be}from"./utc-CCUrA73r.js";function xe(e,t){let n=he(e,t?.in);if(!ge(n))throw RangeError(`Invalid time value`);let r=t?.format??`extended`,i=t?.representation??`complete`,a=``,o=r===`extended`?`-`:``,s=r===`extended`?`:`:``;if(i!==`time`){let e=$(n.getDate(),2),t=$(n.getMonth()+1,2);a=`${$(n.getFullYear(),4)}${o}${t}${o}${e}`}if(i!==`date`){let e=$(n.getHours(),2),t=$(n.getMinutes(),2),r=$(n.getSeconds(),2);a=`${a}${a===``?``:` `}${e}${s}${t}${s}${r}`}return a}var Se={},Ce={class:`cross-background-container`};function we(e,t){return d(),D(`div`,Ce,[w(e.$slots,`default`,{},void 0,!0)])}var Te=H(Se,[[`render`,we],[`__scopeId`,`data-v-455eb62c`]]),Ee={"mb-1":``,"w-full":``,"gap-2":``},De={"w-full":``},Oe=e({__name:`Header`,setup(e){return(e,t)=>(d(),D(`header`,Ee,[O(`div`,De,[v(ue)]),v(r(V),{class:`m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-neutral-100 p-2 text-lg text-neutral-500 outline-none dark:bg-neutral-800 dark:text-neutral-400`,to:`/settings`},{default:E(()=>[...t[0]||=[O(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]]),_:1})]))}}),ke={py:`<sm:2`,flex:`~ col`,rounded:`lg`,relative:``,"overflow-hidden":``,"py-4":``},Ae={key:0,flex:``,mr:`12`},je={flex:`~ col`,shadow:`md violet-900/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,class:`bg-violet-50/80 <md:bg-violet-500/25 dark:bg-violet-900/80`},Me={flex:`~ row`,"gap-2":``},Ne={"flex-1":``},Pe={"text-xs":``,text:`violet-400/90 dark:violet-600/90`,"font-normal":``,class:`inline <sm:hidden`},Fe={key:0,"i-eos-icons:three-dots-loading":``},Ie={key:1,flex:``,mr:`12`},Le={flex:`~ col`,shadow:`sm primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,class:`bg-primary-50/80 <md:bg-primary-500/25 dark:bg-primary-900/80`},Re={"text-xs":``,text:`primary-400/90 dark:primary-600/90`,"font-normal":``,class:`inline <sm:hidden`},ze={key:0,class:`break-words`,text:`primary-700 dark:primary-200`},Be={key:0},Ve={p:`1`,border:`1 solid primary-200`,"rounded-lg":``,m:`y-1`,bg:`primary-100`},He={key:1},Ue={key:1,"i-eos-icons:three-dots-loading":``},We={key:2,flex:`~ row-reverse`,ml:`12`},Ge={flex:`~ col`,shadow:`sm cyan-200/50 dark:none`,px:`2`,h:`unset <sm:fit`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,class:`bg-cyan-50/80 <md:bg-cyan-500/25 dark:bg-cyan-900/80`},Ke={"text-xs":``,text:`cyan-400/90 dark:cyan-600/90`,"font-normal":``,class:`inline <sm:hidden`},qe={key:1},Je={key:0,flex:``,mr:`12`},Ye={flex:`~ col`,shadow:`sm primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,class:`bg-primary-50/80 <md:bg-primary-500/25 dark:bg-primary-900/80`},Xe={"text-xs":``,text:`primary-400/90 dark:primary-600/90`,"font-normal":``,class:`inline <sm:hidden`},Ze={key:0,class:`break-words`,text:`primary-700 dark:primary-200`},Qe={key:0},$e={p:`1`,border:`1 solid primary-200`,"rounded-lg":``,m:`y-1`,bg:`primary-100`},et={key:1},tt={key:1,"i-eos-icons:three-dots-loading":``},nt=e({__name:`ChatHistory`,setup(e){let t=k(),{t:i}=X(),{messages:c,sending:u,streamingMessage:p}=L(Q()),{onBeforeMessageComposed:h,onTokenLiteral:g}=Q();function _(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})})}return h(async()=>{await _()}),g(async()=>{await _()}),T(u,()=>{_()},{flush:`post`}),(e,h)=>{let g=f(`auto-animate`);return d(),D(`div`,ke,[h[4]||=O(`div`,{"flex-1":``},null,-1),m((d(),D(`div`,{ref_key:`chatHistoryRef`,ref:t,px:`<sm:2`,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,"px-4":``},[h[3]||=O(`div`,{"flex-1":``},null,-1),(d(!0),D(b,null,a(r(c),(e,t)=>(d(),D(`div`,{key:t,"mb-2":``},[e.role===`error`?(d(),D(`div`,Ae,[O(`div`,je,[O(`div`,Me,[O(`div`,Ne,[O(`span`,Pe,o(r(i)(`stage.chat.message.character-name.core-system`)),1)]),h[0]||=O(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),r(u)&&t===r(c).length-1?(d(),D(`div`,Fe)):(d(),l(r(q),{key:1,content:e.content,class:`break-words text-violet-500`,text:`base <sm:xs`},null,8,[`content`]))])])):n(``,!0),e.role===`assistant`?(d(),D(`div`,Ie,[O(`div`,Le,[O(`div`,null,[O(`span`,Re,o(r(i)(`stage.chat.message.character-name.airi`)),1)]),e.content?(d(),D(`div`,ze,[(d(!0),D(b,null,a(e.slices,(e,t)=>(d(),D(`div`,{key:t},[e.type===`tool-call`?(d(),D(`div`,Be,[O(`div`,Ve,[h[1]||=s(` Called: `,-1),O(`code`,null,o(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(d(),D(`div`,He)):(d(),l(r(q),{key:2,content:e.text},null,8,[`content`]))]))),128))])):t===r(c).length-1&&!e.content?(d(),D(`div`,Ue)):n(``,!0)])])):e.role===`user`?(d(),D(`div`,We,[O(`div`,Ge,[O(`div`,null,[O(`span`,Ke,o(r(i)(`stage.chat.message.character-name.you`)),1)]),e.content?(d(),l(r(q),{key:0,content:e.content,class:`break-words`,text:`base <sm:xs`},null,8,[`content`])):(d(),D(`div`,qe))])])):n(``,!0)]))),128)),r(u)?(d(),D(`div`,Je,[O(`div`,Ye,[O(`div`,null,[O(`span`,Xe,o(r(i)(`stage.chat.message.character-name.airi`)),1)]),r(p).content?(d(),D(`div`,Ze,[(d(!0),D(b,null,a(r(p).slices,(e,t)=>(d(),D(`div`,{key:t},[e.type===`tool-call`?(d(),D(`div`,Qe,[O(`div`,$e,[h[2]||=s(` Called: `,-1),O(`code`,null,o(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(d(),D(`div`,et)):(d(),l(r(q),{key:2,content:e.text},null,8,[`content`]))]))),128))])):(d(),D(`div`,tt))])])):n(``,!0)])),[[g]])])}}}),rt={width:`24`,height:`24`,viewBox:`0 0 256 256`,"aria-hidden":`true`},it={id:`micLevel`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},at=[`offset`],ot=[`offset`],st=e({__name:`IndicatorMicVolume`,props:{colorClass:{default:`text-primary-500 dark:text-primary-200`}},setup(e){let t=e,{stream:n,enabled:r}=L(B()),{audioContext:a}=L(R()),{startAnalyzer:o,stopAnalyzer:s,volumeLevel:c}=oe(),l,f=p(()=>Math.min(1,(c.value??0)/100));function m(){try{l?.disconnect()}catch{}l=void 0,s()}async function h(){if(m(),!r.value||!n.value)return;let e=a.value;e.state===`suspended`&&await e.resume();let t=o(e);t&&(l=e.createMediaStreamSource(n.value),l.connect(t))}return i(()=>{T([r,n],()=>h(),{immediate:!0})}),u(()=>m()),(e,n)=>(d(),D(`div`,{class:y([`flex items-center justify-center`,t.colorClass])},[(d(),D(`svg`,rt,[O(`defs`,null,[O(`linearGradient`,it,[n[0]||=O(`stop`,{offset:`0%`,"stop-color":`currentColor`,"stop-opacity":`0`},null,-1),O(`stop`,{offset:`${100-Math.round(f.value*100)}%`,"stop-color":`currentColor`,"stop-opacity":`0`},null,8,at),O(`stop`,{offset:`${100-Math.round(f.value*100)}%`,"stop-color":`currentColor`,"stop-opacity":`0.95`},null,8,ot),n[1]||=O(`stop`,{offset:`100%`,"stop-color":`currentColor`,"stop-opacity":`0.95`},null,-1)])]),n[2]||=O(`path`,{fill:`url(#micLevel)`,d:`M128 176a48.05 48.05 0 0 0 48-48V64a48 48 0 0 0-96 0v64a48.05 48.05 0 0 0 48 48M96 64a32 32 0 0 1 64 0v64a32 32 0 0 1-64 0Zm40 143.6V240a8 8 0 0 1-16 0v-32.4A80.11 80.11 0 0 1 48 128a8 8 0 0 1 16 0a64 64 0 0 0 128 0a8 8 0 0 1 16 0a80.11 80.11 0 0 1-72 79.6`},null,-1),n[3]||=O(`path`,{fill:`none`,stroke:`currentColor`,"stroke-opacity":`1`,"stroke-width":`2`,d:`M128 176a48.05 48.05 0 0 0 48-48V64a48 48 0 0 0-96 0v64a48.05 48.05 0 0 0 48 48M96 64a32 32 0 0 1 64 0v64a32 32 0 0 1-64 0Zm40 143.6V240a8 8 0 0 1-16 0v-32.4A80.11 80.11 0 0 1 48 128a8 8 0 0 1 16 0a64 64 0 0 0 128 0a8 8 0 0 1 16 0a80.11 80.11 0 0 1-72 79.6`},null,-1)]))],2))}}),ct={flex:`col`,"items-center":``,"pt-4":``},lt={"h-full":``,"max-h":`[85vh]`,"w-full":``,py:`4`},ut={flex:`~ col`,border:`solid 4 primary-200/20 dark:primary-400/20`,"h-full":``,"w-full":``,"rounded-xl":``,bg:`primary-50/50 dark:primary-950/70`,"backdrop-blur-md":``},dt={h:`<md:full`,flex:``,"gap-2":``},ft={class:y([`relative`,`w-full`,`bg-primary-200/20 dark:bg-primary-400/20`])},pt=[`title`],mt={key:1,class:`i-ph:microphone-slash`},ht={class:`flex flex-col items-center justify-center`},gt={class:`relative h-28 w-28 select-none`},_t={class:`mt-3 text-xs text-neutral-500 dark:text-neutral-400`},vt={absolute:``,"bottom--8":``,"right-0":``,flex:``,"gap-2":``},yt={key:0,"i-solar:moon-bold":``},bt={key:1,"i-solar:sun-2-bold":``},xt=e({__name:`InteractiveArea`,setup(e){let t=k(``),n=k(!1),i=k(!1),a=re(),{activeProvider:s,activeModel:c}=L(ie()),{themeColorsHueDynamic:f}=L(z()),{askPermission:m}=B(),{enabled:h,selectedAudioInput:g,stream:b,audioInputs:C}=L(B()),{send:w,onAfterMessageComposed:P,discoverToolsCompatibility:I,cleanupMessages:V}=Q(),{messages:H}=L(Q()),{audioContext:U}=R(),{t:W}=X(),K=G({disableTransition:!1});async function ee(){if(!(!t.value.trim()||i.value))try{let e=a.getProviderConfig(s.value);await w(t.value,{chatProvider:await a.getProviderInstance(s.value),model:c.value,providerConfig:e})}catch(e){H.value.pop(),H.value.push({role:`error`,content:e.message})}}T(n,async e=>{e&&await m()}),T([s,c],async()=>{s.value&&c.value&&await I(c.value,await a.getProviderInstance(s.value),[])}),P(async()=>{t.value=``});let{startAnalyzer:te,stopAnalyzer:q,volumeLevel:ae}=oe(),J=p(()=>Math.min(1,Math.max(0,(ae.value??0)/100))),Y;function se(){try{Y?.disconnect()}catch{}Y=void 0,q()}async function ce(){if(se(),!n.value||!h.value||!b.value)return;U.state===`suspended`&&await U.resume();let e=te(U);e&&(Y=U.createMediaStreamSource(b.value),Y.connect(e))}return T([n,h,b],()=>{ce()},{immediate:!0}),u(()=>{se()}),(e,a)=>(d(),D(`div`,ct,[O(`div`,lt,[O(`div`,ut,[v(nt,{"h-full":``,"flex-1":``,w:`full`,"max-h":`<md:[60%]`}),O(`div`,dt,[O(`div`,ft,[v(r(ne),{modelValue:t.value,"onUpdate:modelValue":a[0]||=e=>t.value=e,placeholder:r(W)(`stage.message`),text:`primary-500 hover:primary-600 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`transparent`,"min-h":`[100px]`,"max-h":`[300px]`,"w-full":``,"rounded-t-xl":``,"p-4":``,"font-medium":``,"outline-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:y({"transition-colors-none placeholder:transition-colors-none":r(f)}),onSubmit:ee,onCompositionstart:a[1]||=e=>i.value=!0,onCompositionend:a[2]||=e=>i.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),O(`div`,null,[v(r(A),{"delay-duration":0,"skip-delay-duration":0},{default:E(()=>[v(r(N),{open:n.value,"onUpdate:open":a[5]||=e=>n.value=e},{default:E(()=>[v(r(j),{"as-child":``},{default:E(()=>[O(`button`,{class:`max-h-[10lh] min-h-[1lh]`,text:`lg neutral-500 dark:neutral-400`,flex:``,"items-center":``,"justify-center":``,"rounded-md":``,"p-2":``,"outline-none":``,transition:`colors duration-200, transform duration-100`,"active:scale-95":``,title:r(W)(`settings.hearing.title`)},[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(h)?(d(),l(st,{key:0})):(d(),D(`div`,mt))]),_:1})],8,pt)]),_:1}),v(S,{name:`fade`},{default:E(()=>[v(r(M),{side:`top`,"side-offset":8,class:y([`w-72 max-w-[18rem] rounded-xl border border-neutral-200/60 bg-neutral-50/90 p-4`,`shadow-lg backdrop-blur-md dark:border-neutral-800/30 dark:bg-neutral-900/80`,`flex flex-col gap-3`])},{default:E(()=>[O(`div`,ht,[O(`div`,gt,[O(`div`,{class:y([`absolute left-1/2 top-1/2 h-20 w-20 rounded-full transition-all duration-150 -translate-x-1/2 -translate-y-1/2`,r(h)?`bg-primary-500/15 dark:bg-primary-600/20`:`bg-neutral-300/20 dark:bg-neutral-700/20`]),style:_({transform:`translate(-50%, -50%) scale(${1+J.value*.35})`,opacity:String(.25+J.value*.25)})},null,6),O(`div`,{class:y([`absolute left-1/2 top-1/2 h-24 w-24 rounded-full transition-all duration-200 -translate-x-1/2 -translate-y-1/2`,r(h)?`bg-primary-500/10 dark:bg-primary-600/15`:`bg-neutral-300/10 dark:bg-neutral-700/10`]),style:_({transform:`translate(-50%, -50%) scale(${1.2+J.value*.55})`,opacity:String(.15+J.value*.2)})},null,6),O(`div`,{class:y([`absolute left-1/2 top-1/2 h-28 w-28 rounded-full transition-all duration-300 -translate-x-1/2 -translate-y-1/2`,r(h)?`bg-primary-500/5 dark:bg-primary-600/10`:`bg-neutral-300/5 dark:bg-neutral-700/5`]),style:_({transform:`translate(-50%, -50%) scale(${1.5+J.value*.8})`,opacity:String(.08+J.value*.15)})},null,6),O(`button`,{class:y([`absolute left-1/2 top-1/2 grid h-16 w-16 place-items-center rounded-full shadow-md outline-none transition-all duration-200 -translate-x-1/2 -translate-y-1/2`,r(h)?`bg-primary-500 text-white hover:bg-primary-600 active:scale-95`:`bg-neutral-200 text-neutral-600 hover:bg-neutral-300 active:scale-95 dark:bg-neutral-700 dark:text-neutral-200`]),onClick:a[3]||=e=>h.value=!r(h)},[O(`div`,{class:y([r(h)?`i-ph:microphone`:`i-ph:microphone-slash`,`h-6 w-6`])},null,2)],2)]),O(`p`,_t,o(r(h)?`Microphone enabled`:`Microphone disabled`),1)]),v(r(F),{modelValue:r(g),"onUpdate:modelValue":a[4]||=e=>x(g)?g.value=e:null,label:`Input device`,description:`Select the microphone you want to use.`,options:r(C).map(e=>({label:e.label||`Unknown Device`,value:e.deviceId})),layout:`vertical`,placeholder:`Select microphone`},null,8,[`modelValue`,`options`])]),_:1})]),_:1})]),_:1},8,[`open`])]),_:1})])])])])]),O(`div`,vt,[O(`button`,{class:`max-h-[10lh] min-h-[1lh]`,bg:`neutral-100 dark:neutral-800`,text:`lg neutral-500 dark:neutral-400`,"hover:text":`red-500 dark:red-400`,flex:``,"items-center":``,"justify-center":``,"rounded-md":``,"p-2":``,"outline-none":``,"transition-colors":``,"transition-transform":``,"active:scale-95":``,onClick:a[6]||=(...e)=>r(V)&&r(V)(...e)},[...a[8]||=[O(`div`,{class:`i-solar:trash-bin-2-bold-duotone`},null,-1)]]),O(`button`,{class:`max-h-[10lh] min-h-[1lh]`,bg:`neutral-100 dark:neutral-800`,text:`lg neutral-500 dark:neutral-400`,flex:``,"items-center":``,"justify-center":``,"rounded-md":``,"p-2":``,"outline-none":``,"transition-colors":``,"transition-transform":``,"active:scale-95":``,onClick:a[7]||=e=>K.value=!r(K)},[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(K)?(d(),D(`div`,yt)):(d(),D(`div`,bt))]),_:1})])])]))}}),St=[`src`],Ct=[`src`],wt=H(e({__name:`MobileHeaderLink`,setup(e){let t=G();return(e,n)=>(d(),l(r(V),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:E(()=>[r(t)?(d(),D(`img`,{key:0,src:r(le),"h-8":``,"w-8":``,class:`theme-colored`},null,8,St)):(d(),D(`img`,{key:1,src:r(Z),"h-8":``,"w-8":``,class:`theme-colored`},null,8,Ct))]),_:1}))}}),[[`__scopeId`,`data-v-9c3d67a4`]]),Tt={"mb-1":``,"w-full":``,"gap-2":``},Et={"w-full":``,flex:``,"justify-center":``},Dt=e({__name:`MobileHeader`,setup(e){return(e,t)=>(d(),D(`header`,Tt,[O(`div`,Et,[v(wt)])]))}}),Ot={flex:`~ col`,rounded:`lg`,"overflow-hidden":``},kt={key:0,flex:``,mr:`12`},At={flex:`~ col`,shadow:`sm violet-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset <sm:fit`,bg:`violet-100 dark:violet-800`,"backdrop-blur-sm":``},jt={flex:`~ row`,"items-center":``,"justify-between":``,"gap-2":``},Mt={"text-xs":``,text:`violet-400/90 dark:violet-600/90`,"font-normal":``},Nt={key:1,"i-eos-icons:three-dots-loading":``},Pt={key:1,flex:``,mr:`12`},Ft={flex:`~ col`,shadow:`sm primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset <sm:fit`,"backdrop-blur-md":``,class:`bg-primary-50 dark:bg-primary-900`},It={text:`primary-400/90 dark:primary-600/90`,"text-xs":``,"font-normal":``,class:`inline <sm:hidden`},Lt={key:1,"i-eos-icons:three-dots-loading":``},Rt={key:2,flex:`~`},zt={flex:`~ col`,shadow:`sm cyan-200/50 dark:none`,px:`2`,h:`unset <sm:fit`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,bg:`white dark:neutral-800`,"backdrop-blur-md":``},Bt={"text-xs":``,text:`cyan-400/90 dark:cyan-600/90`,"font-normal":``,class:`inline <sm:hidden`},Vt={key:1},Ht=H(e({__name:`MobileChatHistory`,setup(e){let i=k(),{t:s}=X(),{messages:c}=L(Q()),{onBeforeMessageComposed:u,onTokenLiteral:p}=Q();return u(async()=>{t().then(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})}),p(async()=>{t().then(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})}),(e,t)=>{let u=f(`auto-animate`);return d(),D(`div`,Ot,[m((d(),D(`div`,{ref_key:`chatHistoryRef`,ref:i,"max-h":`35dvh`,"z-5":``,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,class:`chat-history`},[(d(!0),D(b,null,a(r(c),(e,i)=>(d(),D(`div`,{key:i,"mb-2":``},[e.role===`error`?(d(),D(`div`,kt,[O(`div`,At,[O(`div`,jt,[O(`div`,null,[O(`span`,Mt,o(r(s)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=O(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(d(),l(r(q),{key:0,content:e.content,class:`break-words`,text:`base <sm:xs`},null,8,[`content`])):(d(),D(`div`,Nt))])])):n(``,!0),e.role===`assistant`?(d(),D(`div`,Pt,[O(`div`,Ft,[O(`div`,null,[O(`span`,It,o(r(s)(`stage.chat.message.character-name.airi`)),1)]),e.content?(d(),l(r(q),{key:0,content:e.content,class:`break-words`,text:`base <sm:xs`},null,8,[`content`])):(d(),D(`div`,Lt))])])):e.role===`user`?(d(),D(`div`,Rt,[O(`div`,zt,[O(`div`,null,[O(`span`,Bt,o(r(s)(`stage.chat.message.character-name.you`)),1)]),e.content?(d(),l(r(q),{key:0,content:e.content,class:`break-words`,text:`base <sm:xs`},null,8,[`content`])):(d(),D(`div`,Vt))])])):n(``,!0)]))),128))])),[[u]])])}}}),[[`__scopeId`,`data-v-c0292b1a`]]),Ut={"max-w":`calc[100%-2rem]`,"mx-auto":``,"h-full":``,flex:``,"flex-col":``,"pt-14":``},Wt={"flex-1":``},Gt={grid:`~ cols-[70px_1fr]`,"mt-4":``,"gap-2":``,"text-sm":``},Kt={"font-mono":``},qt={"font-mono":``},Jt={"font-mono":``},Yt=e({__name:`About`,setup(e){let t=k(!1),n=xe(new be(`Wed Nov 5 05:36:44 2025 +0800`));return(e,i)=>(d(),D(b,null,[O(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`About`,onClick:i[0]||=e=>t.value=!t.value},[...i[2]||=[O(`div`,{"i-solar:info-circle-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]]),v(r(J),{modelValue:t.value,"onUpdate:modelValue":i[1]||=e=>t.value=e},{default:E(()=>[O(`div`,Ut,[i[7]||=O(`div`,{"mb-14":``,"text-center":``,"text-5xl":``,"font-sans-rounded":``},[O(`span`,{text:`neutral-400 dark:neutral-100/65`},`Project`),s(),O(`span`,{text:`pink-400 dark:pink-300/90`},`AIRI`),O(`div`,{"mt-2":``,"text-base":``},` Web ver. `)],-1),O(`div`,Wt,[i[6]||=O(`div`,{text:`neutral-500 dark:neutral-400`},` Application build information `,-1),O(`div`,Gt,[i[3]||=O(`div`,{text:`neutral-500 dark:neutral-400`},` Branch `,-1),O(`div`,Kt,o(r(`main`)),1),i[4]||=O(`div`,{text:`neutral-500 dark:neutral-400`},` Commit `,-1),O(`div`,qt,o(r(`ecaee565c6`).substring(0,7)),1),i[5]||=O(`div`,{text:`neutral-500 dark:neutral-400`},` Built on `,-1),O(`div`,Jt,o(r(n)),1)])]),i[8]||=O(`div`,{"my-10":``},[O(`div`,{text:`neutral-500 dark:neutral-400`},` About `),O(`div`,{"mt-4":``,flex:``,"flex-col":``,"gap-2":``},[O(`a`,{class:y([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,href:`https://airi.moeru.ai/docs/`,target:`_blank`},[O(`div`,{"i-solar:home-smile-outline":``}),O(`div`,null,`Home`)]),O(`a`,{href:`https://airi.moeru.ai/docs/en/docs/overview/`,class:y([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,target:`_blank`},[O(`div`,{"i-solar:document-add-outline":``}),O(`div`,null,`Documentations`)]),O(`a`,{href:`https://github.com/moeru-ai/airi`,class:y([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,target:`_blank`},[O(`div`,{"i-simple-icons:github":``}),O(`div`,null,`GitHub`)])])],-1)])]),_:1},8,[`modelValue`])],64))}}),Xt={"w-full":``,flex:``,"flex-1":``,"items-center":``,"self-end":``,"justify-end":``,"gap-2":``},Zt={key:0,"w-full":``,flex:``,"justify-between":``,"gap-2":``},Qt={key:0,"i-solar:tuning-outline":``,"size-5":``},$t={key:1,"i-solar:alt-arrow-right-outline":``,"size-5":``},en=H(e({__name:`ViewControls`,props:{modelValue:{required:!0},modelModifiers:{}},emits:c([`reset`],[`update:modelValue`]),setup(e,{emit:t}){let i=t,{stageModelRenderer:a,stageViewControlsEnabled:o}=L(z()),c=h(e,`modelValue`);function u(e){if(c.value===e){i(`reset`);return}c.value=e}return(e,t)=>(d(),D(`div`,Xt,[v(S,{name:`fade`},{default:E(()=>[r(o)?(d(),D(`div`,Zt,[v(r(P),{variant:`secondary-muted`,toggled:c.value===`x`,"w-full":``,onClick:t[0]||=e=>u(`x`)},{default:E(()=>[...t[5]||=[s(` X `,-1)]]),_:1},8,[`toggled`]),v(r(P),{variant:`secondary-muted`,toggled:c.value===`y`,"w-full":``,onClick:t[1]||=e=>u(`y`)},{default:E(()=>[...t[6]||=[s(` Y `,-1)]]),_:1},8,[`toggled`]),r(a)===`vrm`?(d(),l(r(P),{key:0,variant:`secondary-muted`,toggled:c.value===`z`,"w-full":``,onClick:t[2]||=e=>u(`z`)},{default:E(()=>[...t[7]||=[s(` Z `,-1)]]),_:1},8,[`toggled`])):n(``,!0),v(r(P),{variant:`secondary-muted`,toggled:c.value===`scale`,"w-full":``,onClick:t[3]||=e=>u(`scale`)},{default:E(()=>[...t[8]||=[s(` Scale `,-1)]]),_:1},8,[`toggled`])])):n(``,!0)]),_:1}),O(`button`,{"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"justify-self-end":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,title:`View`,text:`neutral-500 dark:neutral-400`,onClick:t[4]||=e=>o.value=!r(o)},[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(o)?(d(),D(`div`,$t)):(d(),D(`div`,Qt))]),_:1})])]))}}),[[`__scopeId`,`data-v-4fe382a1`]]),tn={key:0},nn={key:0,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},rn={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},an={key:1,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},on={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},sn={key:2,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},cn={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},ln={key:3,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},un={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},dn=H(e({__name:`Inputs`,props:{mode:{}},setup(e,{expose:t}){let i=e,{stageModelRenderer:a,stageViewControlsEnabled:s}=L(z()),{scale:c,modelOffset:u,modelSize:f}=L(fe()),{scale:m,position:h}=L(pe()),g=p({get:()=>{switch(a.value){case`live2d`:return h.value.x;case`vrm`:return u.value.x;default:return 0}},set:e=>{switch(a.value){case`live2d`:h.value.x=e;break;case`vrm`:u.value.x=e;break;default:break}}}),_=p(()=>a.value===`live2d`?-500:-f.value.x-10),y=p(()=>a.value===`vrm`?500:f.value.x+10),b=p({get:()=>{switch(a.value){case`live2d`:return h.value.y;case`vrm`:return u.value.y;default:return 0}},set:e=>{switch(a.value){case`live2d`:h.value.y=e;break;case`vrm`:u.value.y=e;break;default:break}}}),x=p(()=>a.value===`live2d`?-500:-f.value.y-10),C=p(()=>a.value===`vrm`?500:f.value.y+10),w=p({get:()=>{switch(a.value){case`live2d`:return 0;case`vrm`:return u.value.z;default:return 0}},set:e=>{switch(a.value){case`live2d`:break;case`vrm`:u.value.z=e;break;default:break}}}),T=p(()=>a.value===`live2d`?-500:-f.value.z-10),k=p(()=>a.value===`live2d`?500:f.value.z+10),A=p({get:()=>a.value===`live2d`?m.value:c.value,set:e=>{a.value===`live2d`?m.value=e:c.value=e}});function j(){switch(i.mode){case`x`:g.value=0;break;case`y`:b.value=0;break;case`z`:w.value=0;break;case`scale`:A.value=1;break}}return t({resetOnMode:j}),(e,t)=>(d(),l(S,{name:`fade-side-pops-in`},{default:E(()=>[r(s)?(d(),D(`div`,tn,[v(S,{name:`fade-side-pops-in`,mode:`out-in`},{default:E(()=>[i.mode===`x`?(d(),D(`div`,nn,[v(r(I),{modelValue:g.value,"onUpdate:modelValue":t[0]||=e=>g.value=e,min:_.value,max:y.value,step:.01,"data-direction":`vertical`,h:`50%`,"write-vertical-left":``},null,8,[`modelValue`,`min`,`max`]),O(`div`,rn,o(g.value.toFixed(2)),1)])):i.mode===`y`?(d(),D(`div`,an,[v(r(I),{modelValue:b.value,"onUpdate:modelValue":t[1]||=e=>b.value=e,min:x.value,max:C.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),O(`div`,on,o(b.value.toFixed(2)),1)])):r(a)===`vrm`&&i.mode===`z`?(d(),D(`div`,sn,[v(r(I),{modelValue:w.value,"onUpdate:modelValue":t[2]||=e=>w.value=e,min:T.value,max:k.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),O(`div`,cn,o(w.value.toFixed(2)),1)])):i.mode===`scale`?(d(),D(`div`,ln,[v(r(I),{modelValue:A.value,"onUpdate:modelValue":t[3]||=e=>A.value=e,min:0,max:3,step:1e-4,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`]),O(`div`,un,o(A.value.toFixed(2)),1)])):n(``,!0)]),_:1})])):n(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-011f6495`]]),fn={fixed:``,"bottom-0":``,"w-full":``,flex:``,"flex-col":``},pn={relative:``,"w-full":``,"self-end":``},mn={top:`50%`,"translate-y":`[-50%]`,fixed:``,"z-15":``,"px-3":``},hn={"translate-y":`[-100%]`,absolute:``,"right-0":``,"w-full":``,"px-3":``,"pb-3":``,"font-sans":``},gn={flex:`~ col`,"w-full":``,"gap-1":``},_n={border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Hearing`},vn={key:1,"i-solar:microphone-3-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},yn={key:0,"i-solar:moon-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},bn={key:1,"i-solar:sun-2-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},xn=e({__name:`MobileInteractiveArea`,setup(e){let t=G({disableTransition:!1}),a=k(!1),o=k(`scale`),s=C(`viewControlsInputs`),c=k(``),f=k(!1),p=te(),m=re(),{activeProvider:h,activeModel:b}=L(ie());ee(document.documentElement,()=>p.update());let{themeColorsHueDynamic:w,stageViewControlsEnabled:A}=L(z()),j=B(),{enabled:M,selectedAudioInput:N,stream:P,audioInputs:F}=L(j),{send:I,onAfterMessageComposed:H,discoverToolsCompatibility:U,cleanupMessages:W}=Q(),{messages:K}=L(Q()),{t:q}=X(),{audioContext:J}=R(),{startAnalyzer:Y,stopAnalyzer:se,volumeLevel:ce}=oe(),Z;function le(){return/Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}async function ue(){le()||await de()}async function de(){if(!(!c.value.trim()||f.value))try{let e=m.getProviderConfig(h.value);await I(c.value,{chatProvider:await m.getProviderInstance(h.value),model:b.value,providerConfig:e})}catch(e){K.value.pop(),K.value.push({role:`error`,content:e.message})}}function fe(){try{Z?.disconnect()}catch{}Z=void 0,se()}async function pe(){if(fe(),!a.value||!M.value||!P.value)return;J.state===`suspended`&&await J.resume();let e=Y(J);e&&(Z=J.createMediaStreamSource(P.value),Z.connect(e))}return T([a,M,P],()=>{pe()},{immediate:!0}),T(a,e=>{e&&j.askPermission()}),H(async()=>{c.value=``}),T([h,b],async()=>{h.value&&b.value&&await U(b.value,await m.getProviderInstance(h.value),[])}),u(()=>{fe()}),i(()=>{p.update()}),(e,i)=>(d(),D(`div`,fn,[(d(),l(g,null,[v(S,{name:`fade`},{default:E(()=>[r(A)?n(``,!0):(d(),l(Ht,{key:0,"max-w":`[calc(100%-3.5rem)]`,"w-full":``,"self-start":``,"pl-3":``}))]),_:1})],1024)),O(`div`,pn,[O(`div`,mn,[v(dn,{ref:`viewControlsInputs`,mode:o.value},null,8,[`mode`])]),O(`div`,hn,[O(`div`,gn,[v(Yt),v(r(ae),{show:a.value,"onUpdate:show":i[0]||=e=>a.value=e,enabled:r(M),"onUpdate:enabled":i[1]||=e=>x(M)?M.value=e:null,"selected-audio-input":r(N),"onUpdate:selectedAudioInput":i[2]||=e=>x(N)?N.value=e:null,"audio-inputs":r(F),"volume-level":r(ce),granted:!0},{default:E(()=>[O(`button`,_n,[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(M)?(d(),l(st,{key:0,"size-5":``,"color-class":`text-neutral-500 dark:text-neutral-400`})):(d(),D(`div`,vn))]),_:1})])]),_:1},8,[`show`,`enabled`,`selected-audio-input`,`audio-inputs`,`volume-level`]),O(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Theme`,onClick:i[3]||=e=>t.value=!r(t)},[v(S,{name:`fade`,mode:`out-in`},{default:E(()=>[r(t)?(d(),D(`div`,yn)):(d(),D(`div`,bn))]),_:1})]),v(r(V),{to:`/settings`,border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Settings`},{default:E(()=>[...i[10]||=[O(`div`,{"i-solar:settings-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]]),_:1}),v(en,{modelValue:o.value,"onUpdate:modelValue":i[4]||=e=>o.value=e,onReset:i[5]||=()=>s.value?.resetOnMode()},null,8,[`modelValue`]),O(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Cleanup Messages`,onClick:i[6]||=(...e)=>r(W)&&r(W)(...e)},[...i[11]||=[O(`div`,{class:`i-solar:trash-bin-2-bold-duotone`},null,-1)]])])]),O(`div`,{bg:`white dark:neutral-800`,"max-h-100dvh":``,"max-w-100dvw":``,"w-full":``,flex:``,"gap-1":``,"overflow-auto":``,"px-3":``,"pt-2":``,style:_({paddingBottom:`${Math.max(Number.parseFloat(r(p).bottom.value.replace(`px`,``)),12)}px`})},[v(r(ne),{modelValue:c.value,"onUpdate:modelValue":i[7]||=e=>c.value=e,placeholder:r(q)(`stage.message`),border:`solid 2 neutral-200/60 dark:neutral-700/60`,text:`neutral-500 hover:neutral-600 dark:neutral-100 dark:hover:neutral-200 placeholder:neutral-400 placeholder:hover:neutral-500 placeholder:dark:neutral-300 placeholder:dark:hover:neutral-400`,bg:`neutral-100/80 dark:neutral-950/80`,"max-h":`[10lh]`,"min-h":`[calc(1lh+4px+4px)]`,"w-full":``,"resize-none":``,"overflow-y-scroll":``,rounded:`[1lh]`,"px-4":``,"py-0.5":``,"outline-none":``,"backdrop-blur-md":``,"scrollbar-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:y([r(w)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:ue,onCompositionstart:i[8]||=e=>f.value=!0,onCompositionend:i[9]||=e=>f.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),c.value.trim()||f.value?(d(),D(`button`,{key:0,w:`[calc(1lh+4px+4px)]`,h:`[calc(1lh+4px+4px)]`,"aspect-square":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-full":``,"outline-none":``,"backdrop-blur-md":``,text:`neutral-500 hover:neutral-600 dark:neutral-900 dark:hover:neutral-800`,bg:`primary-50/80 dark:neutral-100/80 hover:neutral-50`,transition:`all duration-250 ease-in-out`,onClick:de},[...i[12]||=[O(`div`,{"i-solar:arrow-up-outline":``},null,-1)]])):n(``,!0)],4)])]))}}),Sn={class:`relative`},Cn={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``},wn=H(e({__name:`AnimatedWave`,props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:`oklch(95% 0.10 var(--chromatic-hue))`},direction:{default:`down`},movementDirection:{default:`left`},animationSpeed:{default:50}},setup(e){let t=e,n=k(t.height),r=k(t.amplitude),i=k(t.waveLength),a=k(t.fillColor),o=k(t.direction),s=k(t.movementDirection);function c(e,t,n,r,i){let a=[],o=Math.ceil(e/r)*r,s=i===`up`?n:t-n;a.push(`M 0 ${s}`);let c=Math.PI*2/r;for(let e=0;e<=o;e+=1){let t=n*Math.sin(c*e),r=i===`up`?s-t:s+t;a.push(`L ${e} ${r}`)}let l=i===`up`?t:0;return a.push(`L ${o} ${l}`),a.push(`L 0 ${l} Z`),a.join(` `)}let l=p(()=>n.value+r.value*2),u=p(()=>{let e=`<svg width="${i.value}" height="${l.value}" xmlns="http://www.w3.org/2000/svg">
2
  <path d="${c(i.value,l.value,r.value,i.value,o.value)}"/>
3
+ </svg>`;return`url(data:image/svg+xml;base64,${btoa(e)})`});return T(()=>[t.height,t.amplitude,t.waveLength,t.fillColor,t.direction,t.movementDirection],()=>{n.value=t.height,r.value=t.amplitude,i.value=t.waveLength,a.value=t.fillColor,o.value=t.direction,s.value=t.movementDirection},{immediate:!0}),(t,n)=>(d(),D(`div`,Sn,[w(t.$slots,`default`,{},void 0,!0),O(`div`,Cn,[O(`div`,{class:`colored-area wave`,style:_({background:a.value,height:`${l.value}px`,maskImage:u.value,WebkitMaskImage:u.value,"--wave-translate":`${-i.value}px`,"--animation-duration":`${i.value/e.animationSpeed}s`,"animation-direction":s.value===`left`?`normal`:`reverse`})},null,4)])]))}}),[[`__scopeId`,`data-v-33a54ad1`]]),Tn={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},En={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``},Dn={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 <md:col`},On=e({__name:`index`,setup(e){let t=G(),a=k(!1);function o(e){a.value=e}let s=U(),{scale:c,position:f,positionInPercentageString:p}=L(pe()),m=W(K).smaller(`md`),{updateThemeColor:h}=se(ce(`.widgets.top-widgets .colored-area`,`background-color`));T(t,()=>h(),{immediate:!0}),i(()=>h());let{stream:g,enabled:_}=L(B()),{startRecord:y,stopRecord:b,onStopRecord:x}=Y(g),{transcribeForRecording:S}=_e(),C=re(),{activeProvider:w,activeModel:D}=L(ie()),A=Q(),{init:j,dispose:M,start:N,loaded:P}=ye(ve,{threshold:k(.6),onSpeechStart:()=>y(),onSpeechEnd:()=>b()}),F;async function I(){try{await j(),g.value&&await N(g.value),F=x(async e=>{let t=await S(e);if(!(!t||!t.trim()))try{let e=await C.getProviderInstance(w.value);if(!e||!D.value)return;await A.send(t,{model:D.value,chatProvider:e})}catch(e){console.error(`Failed to send chat from voice:`,e)}})}catch(e){console.error(`Audio interaction init failed:`,e)}}function R(){try{F?.(),F=void 0,M()}catch{}}return T(_,async e=>{e?await I():R()},{immediate:!0}),u(()=>{R()}),T([g,()=>P.value],async([e,t])=>{if(_.value&&t&&e)try{await N(e)}catch(e){console.error(`Failed to start VAD with stream:`,e)}}),(e,i)=>(d(),l(Te,null,{default:E(()=>[v(wn,{class:`widgets top-widgets`,"fill-color":r(t)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:E(()=>[O(`div`,Tn,[O(`div`,En,[v(Oe,{class:`hidden md:flex`}),v(Dt,{class:`flex md:hidden`})]),O(`div`,Dn,[v(r(me),{"flex-1":``,"min-w":`1/2`,paused:a.value,"focus-at":{x:r(s).x.value,y:r(s).y.value},"x-offset":`${r(m)?r(f).x:r(f).x-10}%`,"y-offset":r(p).y,scale:r(c)},null,8,[`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`]),r(m)?n(``,!0):(d(),l(xt,{key:0,h:`85dvh`,absolute:``,"right-4":``,flex:``,"flex-1":``,"flex-col":``,"max-w":`500px`,"min-w":`30%`})),r(m)?(d(),l(xn,{key:1,onSettingsOpen:o})):n(``,!0)])])]),_:1},8,[`fill-color`])]),_:1}))}});typeof de==`function`&&de(On);var kn=On;export{kn as default};
assets/{player2-speech-B0i8ANiC.js → player2-speech-DBWEKEdv.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,H as r,Mt as i,O as a,S as o,W as s,b as c,k as l,m as u,rt as d,st as f,w as p,x as m,yt as h}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as g}from"./widgets-DJ153_lR.js";import{o as _}from"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as v,c as y,f as b,l as x}from"./components-BoQNNhDi.js";import{n as S}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as C}from"./route-block-B7Ro39Uj.js";var w=`player2-speech`,T=`v1`,E=e({__name:`player2-speech`,setup(e){let C=h(1),E=x(),D=v(),{t:O}=S(),k=c(()=>E.availableVoices[w]||[]);async function A(e,t,n){let r=await D.getProviderInstance(w);if(!r)throw Error(`Failed to initialize speech provider`);let i=D.getProviderConfig(w),a=i.model||T;return await E.speech(r,a,e,t,{...i})}let j=h(!0);return r(async()=>{let e=D.getProviderConfig(w);await D.getProviderMetadata(w).validators.validateProviderConfig(e)?await E.loadVoicesForProvider(w):console.error(`Failed to validate provider config`,e);try{let t=e.baseUrl??``;j.value=(await fetch(`${t.endsWith(`/`)?t.slice(0,-1):t}/health`,{method:`GET`,headers:{"player2-game-key":`airi`}})).status===200}catch(e){console.error(e),j.value=!1}}),d(C,async()=>{let e=D.getProviderConfig(w);e.speed=C.value}),(e,r)=>(s(),p(u,null,[l(n(y),{"provider-id":w,"default-model":T},{"voice-settings":f(()=>[l(n(_),{modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,label:n(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:n(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:f(()=>[l(n(b),{"available-voices":k.value,"generate-speech":A,"api-key-configured":!0,"default-text":`Hello! This is a test of the Player 2 voice synthesis.`},null,8,[`available-voices`])]),_:1}),j.value?t(``,!0):(s(),o(n(g),{key:0,type:`error`},{title:f(()=>[a(i(n(O)(`settings.dialogs.onboarding.validationFailed`)),1)]),content:f(()=>[...r[1]||=[m(`div`,{class:`whitespace-pre-wrap break-all`},[m(`div`,null,[a(` Please download and run the Player2 App: `),m(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),m(`div`,null,[a(` After downloading, if you still are having trouble, please reach out to us on Discord: `),m(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),a(`. `)])])],-1)]]),_:1}))],64))}});typeof C==`function`&&C(E);var D=E;export{D as default};
 
1
+ import{A as e,C as t,Dt as n,H as r,Mt as i,O as a,S as o,W as s,b as c,k as l,m as u,rt as d,st as f,w as p,x as m,yt as h}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{d as g}from"./widgets-Bo0BM5C8.js";import{o as _}from"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as v,c as y,f as b,l as x}from"./components-BaJFFT8H.js";import{n as S}from"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as C}from"./route-block-B7Ro39Uj.js";var w=`player2-speech`,T=`v1`,E=e({__name:`player2-speech`,setup(e){let C=h(1),E=x(),D=v(),{t:O}=S(),k=c(()=>E.availableVoices[w]||[]);async function A(e,t,n){let r=await D.getProviderInstance(w);if(!r)throw Error(`Failed to initialize speech provider`);let i=D.getProviderConfig(w),a=i.model||T;return await E.speech(r,a,e,t,{...i})}let j=h(!0);return r(async()=>{let e=D.getProviderConfig(w);await D.getProviderMetadata(w).validators.validateProviderConfig(e)?await E.loadVoicesForProvider(w):console.error(`Failed to validate provider config`,e);try{let t=e.baseUrl??``;j.value=(await fetch(`${t.endsWith(`/`)?t.slice(0,-1):t}/health`,{method:`GET`,headers:{"player2-game-key":`airi`}})).status===200}catch(e){console.error(e),j.value=!1}}),d(C,async()=>{let e=D.getProviderConfig(w);e.speed=C.value}),(e,r)=>(s(),p(u,null,[l(n(y),{"provider-id":w,"default-model":T},{"voice-settings":f(()=>[l(n(_),{modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,label:n(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:n(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:f(()=>[l(n(b),{"available-voices":k.value,"generate-speech":A,"api-key-configured":!0,"default-text":`Hello! This is a test of the Player 2 voice synthesis.`},null,8,[`available-voices`])]),_:1}),j.value?t(``,!0):(s(),o(n(g),{key:0,type:`error`},{title:f(()=>[a(i(n(O)(`settings.dialogs.onboarding.validationFailed`)),1)]),content:f(()=>[...r[1]||=[m(`div`,{class:`whitespace-pre-wrap break-all`},[m(`div`,null,[a(` Please download and run the Player2 App: `),m(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),m(`div`,null,[a(` After downloading, if you still are having trouble, please reach out to us on Discord: `),m(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),a(`. `)])])],-1)]]),_:1}))],64))}});typeof C==`function`&&C(E);var D=E;export{D as default};
assets/{polaroid-BOEJ-8Lm.js → polaroid-CqKiATNr.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,K as n,Mt as r,W as i,c as a,ct as o,k as s,m as c,rt as l,st as u,w as d,x as f,yt as p}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./tres-Dg4AKlcm.js";import{c as m}from"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import{I as h,n as g}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{i as _,o as v}from"./src-CmKk7VdW.js";import"./beat-sync-D0DTRDRF.js";import"./scenes-Df2sxhq9.js";import"./format-m0ZevNYD.js";import"./import-url-browser-hbSvYVEt.js";import"./duckdb-mvp-PRWRVg6v.js";import"./llmmarkerParser-CSJQtJvM.js";import"./index-CLFto6T2-Bt5qxznY.js";import"./core-DSb-OcZo.js";import"./airi-card-jd5RKZ9L.js";import"./hearing-DSNTfBAe.js";var y={flex:``,"flex-col":``,"items-center":``,"gap-4":``},b={"h-full":``,"w-full":``},x=[`value`],S=e({__name:`polaroid`,setup(e){let S=p(),C=p(),{stageModelSelectedUrl:w}=h(g()),T=p(`idle`),E=p([]);function D(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function O(e){C.value?.setMotion(e)}l(C,e=>{E.value=e?.listMotionGroups()||[]},{immediate:!0});function k(){C.value&&(C.value?.setMotion(T.value),E.value=C.value.listMotionGroups())}function A(){!S.value||!C.value||D(S.value.canvasElement().toDataURL(`image/png`),`live2d-screenshot.png`)}return(e,l)=>(i(),d(`div`,y,[f(`div`,b,[s(t(m),{relative:``,"min-h-70dvh":``},{default:u(({width:e,height:n})=>[s(t(v),{ref_key:`live2dCanvasRef`,ref:S,width:e,height:n,resolution:3,"rounded-full":``},{default:u(({app:r})=>[s(t(_),{ref_key:`live2dModelRef`,ref:C,"model-src":t(w),app:r,width:e,height:n,"focus-at":{x:e/2,y:n/2},onModelLoaded:k},null,8,[`model-src`,`app`,`width`,`height`,`focus-at`])]),_:2},1032,[`width`,`height`])]),_:1})]),f(`div`,null,[o(f(`select`,{"onUpdate:modelValue":l[0]||=e=>T.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:l[1]||=e=>O(T.value)},[(i(!0),d(c,null,n(E.value,e=>(i(),d(`option`,{key:e.motionIndex,value:e.motionName},r(e.fileName),9,x))),128))],544),[[a,T.value]])]),f(`div`,{border:`2px solid black dark:white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[f(`button`,{class:`h-15 w-15 md:h-18 md:w-18`,bg:`black active:neutral-950 dark:white dark:active:neutral-50`,"rounded-full":``,"outline-none":``,"transition-colors":``,"duration-200":``,"ease-in-out":``,onClick:A})])]))}});export{S as default};
 
1
+ import{A as e,Dt as t,K as n,Mt as r,W as i,c as a,ct as o,k as s,m as c,rt as l,st as u,w as d,x as f,yt as p}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./tres-BtRSdtJN.js";import{c as m}from"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import{I as h,n as g}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{i as _,s as v}from"./src-AGgZvuP9.js";import"./beat-sync-BNa1wmOR.js";import"./scenes-DvE-uMcR.js";import"./format-m0ZevNYD.js";import"./import-url-browser-hbSvYVEt.js";import"./duckdb-mvp-PRWRVg6v.js";import"./llmmarkerParser-CSJQtJvM.js";import"./index-CLFto6T2-Bt5qxznY.js";import"./core-DSb-OcZo.js";import"./airi-card-CMRWvgk7.js";import"./hearing-CP3k82oL.js";var y={flex:``,"flex-col":``,"items-center":``,"gap-4":``},b={"h-full":``,"w-full":``},x=[`value`],S=e({__name:`polaroid`,setup(e){let S=p(),C=p(),{stageModelSelectedUrl:w}=h(g()),T=p(`idle`),E=p([]);function D(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function O(e){C.value?.setMotion(e)}l(C,e=>{E.value=e?.listMotionGroups()||[]},{immediate:!0});function k(){C.value&&(C.value?.setMotion(T.value),E.value=C.value.listMotionGroups())}function A(){!S.value||!C.value||D(S.value.canvasElement().toDataURL(`image/png`),`live2d-screenshot.png`)}return(e,l)=>(i(),d(`div`,y,[f(`div`,b,[s(t(m),{relative:``,"min-h-70dvh":``},{default:u(({width:e,height:n})=>[s(t(v),{ref_key:`live2dCanvasRef`,ref:S,width:e,height:n,resolution:3,"rounded-full":``},{default:u(({app:r})=>[s(t(_),{ref_key:`live2dModelRef`,ref:C,"model-src":t(w),app:r,width:e,height:n,"focus-at":{x:e/2,y:n/2},onModelLoaded:k},null,8,[`model-src`,`app`,`width`,`height`,`focus-at`])]),_:2},1032,[`width`,`height`])]),_:1})]),f(`div`,null,[o(f(`select`,{"onUpdate:modelValue":l[0]||=e=>T.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:l[1]||=e=>O(T.value)},[(i(!0),d(c,null,n(E.value,e=>(i(),d(`option`,{key:e.motionIndex,value:e.motionName},r(e.fileName),9,x))),128))],544),[[a,T.value]])]),f(`div`,{border:`2px solid black dark:white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[f(`button`,{class:`h-15 w-15 md:h-18 md:w-18`,bg:`black active:neutral-950 dark:white dark:active:neutral-50`,"rounded-full":``,"outline-none":``,"transition-colors":``,"duration-200":``,"ease-in-out":``,onClick:A})])]))}});export{S as default};
assets/{providers-B4bTFnXo.js → providers-BlEXvCwn.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,K as n,O as r,S as i,V as a,W as o,Y as s,ct as c,m as l,rt as u,w as d,x as f}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import{a as m}from"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as h,Et as g}from"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as _}from"./route-block-B7Ro39Uj.js";function v(e,n={}){let{offset:r=16,behavior:i=`smooth`,maxRetries:o=10,retryDelay:s=100,scrollContainer:c=null,auto:l=!1}=n,d,f=()=>{if(!c)return window;if(typeof c==`string`){let e=document.querySelector(c);return e instanceof HTMLElement?e:window}return c},p=(e,t=0)=>{e&&(d&&=(clearTimeout(d),void 0),requestAnimationFrame(()=>{let n=e.length>1?document.getElementById(e.slice(1)):null;if(n){let e=f();if(e instanceof Window){let e=n.getBoundingClientRect().top+window.scrollY-r;window.scrollTo({top:e,behavior:i})}else{let t=e.getBoundingClientRect(),a=n.getBoundingClientRect().top-t.top+e.scrollTop-r;e.scrollTo({top:a,behavior:i})}return}t<o&&(d=window.setTimeout(()=>p(e,t+1),s))}))};return l&&e&&u(()=>typeof e==`function`?e():t(e),e=>{e&&p(e)},{immediate:!0}),a(()=>{d&&clearTimeout(d)}),{scrollToHash:p}}var y={"mb-6":``,flex:``,"flex-col":``,"gap-5":``},b={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},x={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},S={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},C={text:`neutral-500/5 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},w=e({__name:`index`,setup(e){let a=m(),{allChatProvidersMetadata:u,allAudioSpeechProvidersMetadata:_,allAudioTranscriptionProvidersMetadata:w}=p(h());return v(()=>a.hash,{auto:!0,offset:16,behavior:`smooth`,maxRetries:15,retryDelay:150}),(e,a)=>{let p=s(`motion`);return o(),d(l,null,[f(`div`,y,[a[0]||=f(`div`,{bg:`primary-500/10 dark:primary-800/25`,"rounded-lg":``,"p-4":``},[f(`div`,{"mb-2":``,"text-xl":``,"font-normal":``,text:`primary-800 dark:primary-100`},` First time here? `),f(`div`,{text:`primary-700 dark:primary-300`},[r(` AIRI requires at least one `),f(`div`,{bg:`primary-500/10 dark:primary-800/25`,"inline-flex":``,"items-center":``,"gap-1":``,"rounded-lg":``,"px-2":``,"py-0.5":``,"translate-y":`[0.25lh]`},[f(`div`,{"i-solar:chat-square-like-bold-duotone":``}),f(`strong`,{"font-normal":``},`Chat`)]),r(` provider to be configured to think, and behave properly. You could think of it as the brain of the characters living in AIRI system. `)])],-1),a[1]||=f(`div`,{flex:`~ row items-center gap-2`},[f(`div`,{id:`chat`,"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`}),f(`div`,null,[f(`div`,null,[f(`span`,{text:`neutral-300 dark:neutral-500 sm sm:base`},`Text generation model providers. e.g. OpenRouter, OpenAI, Ollama.`)]),f(`div`,{flex:``,"text-nowrap":``,text:`2xl sm:3xl`,"font-normal":``},[f(`div`,null,` Chat `)])])],-1),f(`div`,b,[(o(!0),d(l,null,n(t(u),(e,n)=>c((o(),i(t(g),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.category}/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[p]])),128))]),a[2]||=f(`div`,{flex:`~ row items-center gap-2`,"my-5":``},[f(`div`,{id:`speech`,"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`}),f(`div`,null,[f(`div`,null,[f(`span`,{text:`neutral-300 dark:neutral-500 sm sm:base`},`Speech (text-to-speech) model providers. e.g. ElevenLabs, Azure Speech.`)]),f(`div`,{flex:``,"text-nowrap":``,text:`2xl sm:3xl`,"font-normal":``},[f(`div`,null,` Speech `)])])],-1),f(`div`,x,[(o(!0),d(l,null,n(t(_),(e,n)=>c((o(),i(t(g),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(t(u).length+n)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.category}/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[p]])),128))]),a[3]||=f(`div`,{flex:`~ row items-center gap-2`,"my-5":``},[f(`div`,{id:`transcription`,"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`}),f(`div`,null,[f(`div`,null,[f(`span`,{text:`neutral-300 dark:neutral-500 sm sm:base`},`Transcription (speech-to-text) model providers. e.g. Whisper.cpp, OpenAI, Azure Speech`)]),f(`div`,{flex:``,"text-nowrap":``,text:`2xl sm:3xl`,"font-normal":``},[f(`div`,null,` Transcription `)])])],-1),f(`div`,S,[(o(!0),d(l,null,n(t(w),(e,n)=>c((o(),i(t(g),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(t(u).length+t(_).length+n)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.category}/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[p]])),128))])]),c((o(),d(`div`,C,[...a[4]||=[f(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)]])),[[p]])],64)}}});typeof _==`function`&&_(w);var T=w;export{T as default};
 
1
+ import{A as e,Dt as t,K as n,O as r,S as i,V as a,W as o,Y as s,ct as c,m as l,rt as u,w as d,x as f}from"./vue.runtime.esm-bundler-BODQtTc2.js";import"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import{I as p}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import{a as m}from"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import{$ as h,Et as g}from"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as _}from"./route-block-B7Ro39Uj.js";function v(e,n={}){let{offset:r=16,behavior:i=`smooth`,maxRetries:o=10,retryDelay:s=100,scrollContainer:c=null,auto:l=!1}=n,d,f=()=>{if(!c)return window;if(typeof c==`string`){let e=document.querySelector(c);return e instanceof HTMLElement?e:window}return c},p=(e,t=0)=>{e&&(d&&=(clearTimeout(d),void 0),requestAnimationFrame(()=>{let n=e.length>1?document.getElementById(e.slice(1)):null;if(n){let e=f();if(e instanceof Window){let e=n.getBoundingClientRect().top+window.scrollY-r;window.scrollTo({top:e,behavior:i})}else{let t=e.getBoundingClientRect(),a=n.getBoundingClientRect().top-t.top+e.scrollTop-r;e.scrollTo({top:a,behavior:i})}return}t<o&&(d=window.setTimeout(()=>p(e,t+1),s))}))};return l&&e&&u(()=>typeof e==`function`?e():t(e),e=>{e&&p(e)},{immediate:!0}),a(()=>{d&&clearTimeout(d)}),{scrollToHash:p}}var y={"mb-6":``,flex:``,"flex-col":``,"gap-5":``},b={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},x={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},S={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},C={text:`neutral-500/5 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},w=e({__name:`index`,setup(e){let a=m(),{allChatProvidersMetadata:u,allAudioSpeechProvidersMetadata:_,allAudioTranscriptionProvidersMetadata:w}=p(h());return v(()=>a.hash,{auto:!0,offset:16,behavior:`smooth`,maxRetries:15,retryDelay:150}),(e,a)=>{let p=s(`motion`);return o(),d(l,null,[f(`div`,y,[a[0]||=f(`div`,{bg:`primary-500/10 dark:primary-800/25`,"rounded-lg":``,"p-4":``},[f(`div`,{"mb-2":``,"text-xl":``,"font-normal":``,text:`primary-800 dark:primary-100`},` First time here? `),f(`div`,{text:`primary-700 dark:primary-300`},[r(` AIRI requires at least one `),f(`div`,{bg:`primary-500/10 dark:primary-800/25`,"inline-flex":``,"items-center":``,"gap-1":``,"rounded-lg":``,"px-2":``,"py-0.5":``,"translate-y":`[0.25lh]`},[f(`div`,{"i-solar:chat-square-like-bold-duotone":``}),f(`strong`,{"font-normal":``},`Chat`)]),r(` provider to be configured to think, and behave properly. You could think of it as the brain of the characters living in AIRI system. `)])],-1),a[1]||=f(`div`,{flex:`~ row items-center gap-2`},[f(`div`,{id:`chat`,"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`}),f(`div`,null,[f(`div`,null,[f(`span`,{text:`neutral-300 dark:neutral-500 sm sm:base`},`Text generation model providers. e.g. OpenRouter, OpenAI, Ollama.`)]),f(`div`,{flex:``,"text-nowrap":``,text:`2xl sm:3xl`,"font-normal":``},[f(`div`,null,` Chat `)])])],-1),f(`div`,b,[(o(!0),d(l,null,n(t(u),(e,n)=>c((o(),i(t(g),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.category}/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[p]])),128))]),a[2]||=f(`div`,{flex:`~ row items-center gap-2`,"my-5":``},[f(`div`,{id:`speech`,"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`}),f(`div`,null,[f(`div`,null,[f(`span`,{text:`neutral-300 dark:neutral-500 sm sm:base`},`Speech (text-to-speech) model providers. e.g. ElevenLabs, Azure Speech.`)]),f(`div`,{flex:``,"text-nowrap":``,text:`2xl sm:3xl`,"font-normal":``},[f(`div`,null,` Speech `)])])],-1),f(`div`,x,[(o(!0),d(l,null,n(t(_),(e,n)=>c((o(),i(t(g),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(t(u).length+n)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.category}/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[p]])),128))]),a[3]||=f(`div`,{flex:`~ row items-center gap-2`,"my-5":``},[f(`div`,{id:`transcription`,"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`}),f(`div`,null,[f(`div`,null,[f(`span`,{text:`neutral-300 dark:neutral-500 sm sm:base`},`Transcription (speech-to-text) model providers. e.g. Whisper.cpp, OpenAI, Azure Speech`)]),f(`div`,{flex:``,"text-nowrap":``,text:`2xl sm:3xl`,"font-normal":``},[f(`div`,null,` Transcription `)])])],-1),f(`div`,S,[(o(!0),d(l,null,n(t(w),(e,n)=>c((o(),i(t(g),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(t(u).length+t(_).length+n)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.category}/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[p]])),128))])]),c((o(),d(`div`,C,[...a[4]||=[f(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)]])),[[p]])],64)}}});typeof _==`function`&&_(w);var T=w;export{T as default};
assets/{providers-transcription-realtime-aliyun-nls-DQYvaLps.js → providers-transcription-realtime-aliyun-nls-C4LmGRje.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,B as t,C as n,Dt as r,K as i,Mt as a,O as o,St as s,V as c,W as l,_t as u,b as d,k as f,kt as p,m as ee,rt as te,st as m,w as h,x as g,yt as _}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{u as v}from"./widgets-DJ153_lR.js";import{a as ne,c as y}from"./src-BEKjKq3V.js";import{l as b}from"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import{t as x}from"./merge-CTbONeho.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as S}from"./route-block-B7Ro39Uj.js";import{i as C,t as w}from"./format-m0ZevNYD.js";import{t as re}from"./process.worklet-CJeez0uR.js";import{t as T}from"./utc-CCUrA73r.js";var E=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),D=e=>{let t=typeof e;return t===`object`?e===null?`null`:e?.constructor?.name??`object`:t},O=e=>{if(typeof e==`string`)return new TextEncoder().encode(e);if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);throw TypeError(`The input must be a Uint8Array, a string, or an ArrayBuffer. Received a value of the type ${D(e)}.`)},k=e=>{let t=O(e),n=``,r,i=t.length;for(r=2;r<i;r+=3)n+=E[t[r-2]>>2],n+=E[(t[r-2]&3)<<4|t[r-1]>>4],n+=E[(t[r-1]&15)<<2|t[r]>>6],n+=E[t[r]&63];return r===i+1&&(n+=E[t[r-2]>>2],n+=E[(t[r-2]&3)<<4],n+=`==`),r===i&&(n+=E[t[r-2]>>2],n+=E[(t[r-2]&3)<<4|t[r-1]>>4],n+=E[(t[r-1]&15)<<2],n+=`=`),n};function A(e,t){return+C(e)<+C(t)}var j=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,M=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,N=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function P(e,t){if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){ie(e);return}return t}function ie(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function ae(e,t={}){if(typeof e!=`string`)return e;if(e[0]===`"`&&e[e.length-1]===`"`&&e.indexOf(`\\`)===-1)return e.slice(1,-1);let n=e.trim();if(n.length<=9)switch(n.toLowerCase()){case`true`:return!0;case`false`:return!1;case`undefined`:return;case`null`:return null;case`nan`:return NaN;case`infinity`:return 1/0;case`-infinity`:return-1/0}if(!N.test(e)){if(t.strict)throw SyntaxError(`[destr] Invalid JSON`);return e}try{if(j.test(e)||M.test(e)){if(t.strict)throw Error(`[destr] Possible prototype pollution`);return JSON.parse(e,P)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}String.fromCharCode;var oe=/#/g,F=/&/g,se=/\//g,ce=/=/g,I=/\+/g,L=/%5e/gi,R=/%60/gi,z=/%7c/gi,le=/%20/gi;function B(e){return encodeURI(``+e).replace(z,`|`)}function V(e){return B(typeof e==`string`?e:JSON.stringify(e)).replace(I,`%2B`).replace(le,`+`).replace(oe,`%23`).replace(F,`%26`).replace(R,"`").replace(L,`^`).replace(se,`%2F`)}function H(e){return V(e).replace(ce,`%3D`)}function U(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function W(e){return U(e.replace(I,` `))}function ue(e){return U(e.replace(I,` `))}function G(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=W(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=ue(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function de(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${H(e)}=${V(t)}`).join(`&`):`${H(e)}=${V(t)}`:H(e)}function K(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>de(t,e[t])).filter(Boolean).join(`&`)}var q=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,fe=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,pe=/^([/\\]\s*){2,}[^/\\]/,me=/\/$|\/\?|\/#/,he=/^\.?\//;function ge(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?q.test(e):fe.test(e)||(t.acceptRelative?pe.test(e):!1)}function J(e=``,t){return t?me.test(e):e.endsWith(`/`)}function _e(e=``,t){if(!t)return(J(e)?e.slice(0,-1):e)||`/`;if(!J(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function ve(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(J(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function ye(e,t){if(xe(t)||ge(e))return e;let n=_e(t);return e.startsWith(n)?e:Ce(n,e)}function be(e,t){let n=Te(e);return n.search=K({...G(n.search),...t}),De(n)}function xe(e){return!e||e===`/`}function Se(e){return e&&e!==`/`}function Ce(e,...t){let n=e||``;for(let e of t.filter(e=>Se(e)))if(n){let t=e.replace(he,``);n=ve(n)+t}else n=e;return n}var we=Symbol.for(`ufo:protocolRelative`);function Te(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!ge(e,{acceptRelative:!0}))return t?Te(t+e):Ee(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=Ee(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[we]:!r}}function Ee(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function De(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[we]?(e.protocol||``)+`//`:``)+i+a+t+n+r}var Oe=class extends Error{constructor(e,t){super(e,t),this.name=`FetchError`,t?.cause&&!this.cause&&(this.cause=t.cause)}};function ke(e){let t=e.error?.message||e.error?.toString()||``,n=e.request?.method||e.options?.method||`GET`,r=e.request?.url||String(e.request)||`/`,i=new Oe(`${`[${n}] ${JSON.stringify(r)}`}: ${e.response?`${e.response.status} ${e.response.statusText}`:`<no response>`}${t?` ${t}`:``}`,e.error?{cause:e.error}:void 0);for(let t of[`request`,`options`,`response`])Object.defineProperty(i,t,{get(){return e[t]}});for(let[t,n]of[[`data`,`_data`],[`status`,`status`],[`statusCode`,`status`],[`statusText`,`statusText`],[`statusMessage`,`statusText`]])Object.defineProperty(i,t,{get(){return e.response&&e.response[n]}});return i}var Ae=new Set(Object.freeze([`PATCH`,`POST`,`PUT`,`DELETE`]));function je(e=`GET`){return Ae.has(e.toUpperCase())}function Me(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}var Ne=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]),Pe=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Fe(e=``){if(!e)return`json`;let t=e.split(`;`).shift()||``;return Pe.test(t)?`json`:t===`text/event-stream`?`stream`:Ne.has(t)||t.startsWith(`text/`)?`text`:`blob`}function Ie(e,t,n,r){let i=Le(t?.headers??e?.headers,n?.headers,r),a;return(n?.query||n?.params||t?.params||t?.query)&&(a={...n?.params,...n?.query,...t?.params,...t?.query}),{...n,...t,query:a,params:a,headers:i}}function Le(e,t,n){if(!t)return new n(e);let r=new n(t);if(e)for(let[t,i]of Symbol.iterator in e||Array.isArray(e)?e:new n(e))r.set(t,i);return r}async function Y(e,t){if(t)if(Array.isArray(t))for(let n of t)await n(e);else await t(e)}var Re=new Set([408,409,425,429,500,502,503,504]),ze=new Set([101,204,205,304]);function Be(e={}){let{fetch:t=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function i(e){let t=e.error&&e.error.name===`AbortError`&&!e.options.timeout||!1;if(e.options.retry!==!1&&!t){let t;t=typeof e.options.retry==`number`?e.options.retry:je(e.options.method)?0:1;let n=e.response&&e.response.status||500;if(t>0&&(Array.isArray(e.options.retryStatusCodes)?e.options.retryStatusCodes.includes(n):Re.has(n))){let n=typeof e.options.retryDelay==`function`?e.options.retryDelay(e):e.options.retryDelay||0;return n>0&&await new Promise(e=>setTimeout(e,n)),a(e.request,{...e.options,retry:t-1})}}let n=ke(e);throw Error.captureStackTrace&&Error.captureStackTrace(n,a),n}let a=async function(a,o={}){let s={request:a,options:Ie(a,o,e.defaults,n),response:void 0,error:void 0};if(s.options.method&&(s.options.method=s.options.method.toUpperCase()),s.options.onRequest&&await Y(s,s.options.onRequest),typeof s.request==`string`&&(s.options.baseURL&&(s.request=ye(s.request,s.options.baseURL)),s.options.query&&(s.request=be(s.request,s.options.query),delete s.options.query),`query`in s.options&&delete s.options.query,`params`in s.options&&delete s.options.params),s.options.body&&je(s.options.method))if(Me(s.options.body)){let e=s.options.headers.get(`content-type`);typeof s.options.body!=`string`&&(s.options.body=e===`application/x-www-form-urlencoded`?new URLSearchParams(s.options.body).toString():JSON.stringify(s.options.body)),s.options.headers=new n(s.options.headers||{}),e||s.options.headers.set(`content-type`,`application/json`),s.options.headers.has(`accept`)||s.options.headers.set(`accept`,`application/json`)}else (`pipeTo`in s.options.body&&typeof s.options.body.pipeTo==`function`||typeof s.options.body.pipe==`function`)&&(`duplex`in s.options||(s.options.duplex=`half`));let c;if(!s.options.signal&&s.options.timeout){let e=new r;c=setTimeout(()=>{let t=Error(`[TimeoutError]: The operation was aborted due to timeout`);t.name=`TimeoutError`,t.code=23,e.abort(t)},s.options.timeout),s.options.signal=e.signal}try{s.response=await t(s.request,s.options)}catch(e){return s.error=e,s.options.onRequestError&&await Y(s,s.options.onRequestError),await i(s)}finally{c&&clearTimeout(c)}if((s.response.body||s.response._bodyInit)&&!ze.has(s.response.status)&&s.options.method!==`HEAD`){let e=(s.options.parseResponse?`json`:s.options.responseType)||Fe(s.response.headers.get(`content-type`)||``);switch(e){case`json`:{let e=await s.response.text(),t=s.options.parseResponse||ae;s.response._data=t(e);break}case`stream`:s.response._data=s.response.body||s.response._bodyInit;break;default:s.response._data=await s.response[e]()}}return s.options.onResponse&&await Y(s,s.options.onResponse),!s.options.ignoreResponseError&&s.response.status>=400&&s.response.status<600?(s.options.onResponseError&&await Y(s,s.options.onResponseError),await i(s)):s.response},o=async function(e,t){return(await a(e,t))._data};return o.raw=a,o.native=(...e)=>t(...e),o.create=(t={},n={})=>Be({...e,...n,defaults:{...e.defaults,...n.defaults,...t}}),o}var X=(function(){if(typeof globalThis<`u`)return globalThis;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`unable to locate global object`)})(),Ve=X.fetch?(...e)=>X.fetch(...e):()=>Promise.reject(Error(`[ofetch] global.fetch is not supported!`)),He=X.Headers,Ue=X.AbortController,We=Be({fetch:Ve,Headers:He,AbortController:Ue}),Ge=globalThis.crypto.subtle,Z=[];for(let e=0;e<256;++e)Z.push((e+256).toString(16).slice(1));function Ke(e,t=0){return(Z[e[t+0]]+Z[e[t+1]]+Z[e[t+2]]+Z[e[t+3]]+`-`+Z[e[t+4]]+Z[e[t+5]]+`-`+Z[e[t+6]]+Z[e[t+7]]+`-`+Z[e[t+8]]+Z[e[t+9]]+`-`+Z[e[t+10]]+Z[e[t+11]]+Z[e[t+12]]+Z[e[t+13]]+Z[e[t+14]]+Z[e[t+15]]).toLowerCase()}var Q,qe=new Uint8Array(16);function Je(){if(!Q){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Q=crypto.getRandomValues.bind(crypto)}return Q(qe)}var Ye={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Xe(e,t,n){e||={};let r=e.random??e.rng?.()??Je();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Ke(r)}function Ze(e,t,n){return Ye.randomUUID&&!t&&!e?Ye.randomUUID():Xe(e,t,n)}var Qe=Ze;function $e(e){return new URL(`http://nls-meta.${e}.aliyuncs.com`)}function et(e=`cn-shanghai`){let t=new URL(`/ws/v1`,`https://example.com`);switch(e){case`cn-shanghai`:case`cn-beijing`:case`cn-shenzhen`:t.protocol=`wss:`,t.hostname=`nls-gateway-${e}.aliyuncs.com`;break;case`cn-shanghai-internal`:case`cn-beijing-internal`:case`cn-shenzhen-internal`:t.protocol=`wss:`,t.hostname=`nls-gateway-${e}-internal.aliyuncs.com:80`}return t}var tt=`HMAC-SHA1`,nt=`1.0`,rt=`2019-02-28`;function it(e){return Object.keys(e).sort().map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join(`&`)}function at(e,t,n){return`${e}&${encodeURIComponent(t)}&${encodeURIComponent(n)}`}async function ot(e,t){let n=new TextEncoder().encode(`${t}&`),r=await Ge.importKey(`raw`,n,{name:`HMAC`,hash:{name:`SHA-1`}},!1,[`sign`]),i=new TextEncoder().encode(e);return k(await Ge.sign(`HMAC`,r,i))}async function st(e,t,n){let r=w(T(x({timestamp:new Date},n).timestamp),`yyyy-MM-dd'T'HH:mm:ssXX`),i=n?.signatureNonce??Qe(),a={AccessKeyId:e,Action:`CreateToken`,Format:`JSON`,RegionId:n?.regionId??`cn-shanghai`,SignatureMethod:tt,SignatureNonce:i,SignatureVersion:nt,Timestamp:r,Version:rt,...n?.extraQuery},o=it(a),s=at(`POST`,`/`,o),c=await ot(s,t),l=encodeURIComponent(c),u=`Signature=${l}&${o}`,d=(n?.endpoint??$e(n?.regionId??`cn-shanghai`).toString()).replace(/\/$/,``),f=`${d}/?${u}`;return{endpoint:d,canonicalQuery:o,stringToSign:s,signature:c,encodedSignature:l,signedQuery:u,params:{Signature:c,...a},url:f}}async function ct(e,t,n){let r=await We((await st(e,t,n)).url,{method:`POST`});if(`Token`in r&&typeof r.Token==`object`&&`Id`in r.Token)return{token:r.Token.Id,expiresAt:r.Token.ExpireTime*1e3};throw Error(`Failed to create token: ${JSON.stringify(r)||`Unknown error`}`)}var $=b(`0123456789abcdef`,32);function lt(e,t,n,r){let i=ut(e,t,n,r),a=$();function o(e,t){let n=x({sessionId:a},t);e.send(JSON.stringify({header:{appkey:i.appKey,message_id:$(),task_id:n.sessionId,namespace:`SpeechTranscriber`,name:`StartTranscription`},payload:{format:`wav`}}))}function s(e,t){let n=x({sessionId:a},t);e.send(JSON.stringify({header:{appkey:i.appKey,message_id:$(),task_id:n.sessionId,namespace:`SpeechTranscriber`,name:`StopTranscription`},payload:void 0}))}function c(e,t){t(e)}return{...i,sessionId:a,start:o,stop:s,onEvent:c}}function ut(e,t,n,r){let i=``,a=T(new Date).getTime();async function o(){if(!i||A(new Date(a),T(new Date))){let n=await ct(e,t,{regionId:r?.region??`cn-shanghai`});i=n.token,a=n.expiresAt}let n=et(r?.region??`cn-shanghai`);return n.searchParams.set(`token`,i),n.toString()}return{websocketUrl:o,appKey:n}}var dt={class:`space-y-6`},ft={class:`space-y-4`},pt={class:`grid gap-4 md:grid-cols-2`},mt={class:`flex flex-wrap items-center gap-4`},ht={class:`text-sm`},gt={key:0,class:`ml-2 rounded bg-red-500/10 px-2 py-0.5 text-xs text-red-500`},_t={class:`flex flex-wrap gap-3`},vt={class:`space-y-3`},yt={class:`border border-neutral-200/80 rounded bg-neutral-50/60 p-4 text-sm dark:border-neutral-700 dark:bg-neutral-900/50`},bt={key:0,class:`mb-3 text-neutral-500 dark:text-neutral-400`},xt={class:`mt-1 font-medium`},St={key:1,class:`text-neutral-400 dark:text-neutral-600`},Ct={class:`space-y-2`},wt={class:`mt-0.5 rounded bg-neutral-200/80 px-2 py-0.5 text-xs text-neutral-700 dark:bg-neutral-800/70 dark:text-neutral-200`},Tt={key:0,class:`text-xs text-neutral-400`},Et={class:`space-y-3`},Dt=e({__name:`providers-transcription-realtime-aliyun-nls`,setup(e){let b=u({accessKeyId:``,accessKeySecret:``,appKey:``,region:`cn-shanghai`}),x=_(`idle`),S=_(!1),C=_(!1),w=_(``),T=_([]),E=s(),D=s(),O=_(``),k=s(),A=s(),j=s(),M=s(),N=_([]),P=_(),ie=[{label:`cn-shanghai`,value:`cn-shanghai`},{label:`cn-beijing`,value:`cn-beijing`},{label:`cn-shenzhen`,value:`cn-shenzhen`},{label:`cn-shanghai (internal)`,value:`cn-shanghai-internal`},{label:`cn-beijing (internal)`,value:`cn-beijing-internal`},{label:`cn-shenzhen (internal)`,value:`cn-shenzhen-internal`}],ae=d(()=>{switch(x.value){case`connecting`:return`Connecting`;case`connected`:return`Connected`;case`error`:return`Error`;case`closed`:return`Disconnected`;default:return`Idle`}}),oe=d(()=>{switch(x.value){case`connected`:return`text-green-500`;case`connecting`:return`text-blue-500`;case`error`:return`text-red-500`;default:return`text-neutral-500 dark:text-neutral-400`}}),F=d(()=>!!b.accessKeyId&&!!b.accessKeySecret&&!!b.appKey&&x.value!==`connecting`&&x.value!==`connected`),se=d(()=>x.value===`connected`&&S.value&&!C.value),ce=d(()=>C.value),I=d(()=>E.value&&E.value.readyState!==WebSocket.CLOSED),L=0,R=0;te(N,()=>{t(()=>{let e=P.value;e&&(e.scrollTop=e.scrollHeight)})});function z(e,t=`info`){N.value.push({id:Date.now()+Math.random(),level:t,text:`[${new Date().toLocaleTimeString()}] ${e}`})}function le(e){let t=new Int16Array(e.length);for(let n=0;n<e.length;n++){let r=Math.max(-1,Math.min(1,e[n]));t[n]=r<0?r*32768:r*32767}return t}function B(){return E.value&&E.value.readyState===WebSocket.OPEN}function V(){S.value=!1,w.value=``,T.value=[],L=0,R=0}async function H(e){let t=new AudioContext({sampleRate:16e3,latencyHint:`interactive`});await t.audioWorklet.addModule(re);let n=new AudioWorkletNode(t,`vad-audio-worklet-processor`);n.port.onmessage=({data:e})=>{let t=e.buffer;if(!t||!B())return;L+=1,(L===1||L-R>=50)&&(z(`Streaming audio chunk #${L}`),R=L);let n=le(t);E.value?.send(n.buffer)};let r=t.createMediaStreamSource(e);r.connect(n);let i=t.createGain();i.gain.value=0,n.connect(i),i.connect(t.destination),k.value=t,A.value=n,j.value=r}async function U(){if(!B()){z(`WebSocket is not ready. Connect before starting recording.`,`error`);return}if(!C.value)try{let e=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:16e3,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});M.value=e,await H(e),k.value?.state===`suspended`&&await k.value.resume(),C.value=!0,z(`Recording started`)}catch(e){z(`Failed to start recording: ${e instanceof Error?e.message:String(e)}`,`error`),await W()}}async function W(){if(C.value){try{A.value?.port.postMessage({type:`stop`})}catch{}if(j.value&&=(j.value.disconnect(),void 0),A.value&&=(A.value.port.onmessage=null,A.value.disconnect(),void 0),M.value&&=(M.value.getTracks().forEach(e=>e.stop()),void 0),k.value){try{await k.value.close()}catch(e){console.error(`Failed to close audio context`,e)}k.value=void 0}C.value=!1,z(`Recording stopped`)}}function ue(e){switch(e.header.name){case`TranscriptionStarted`:{let t=e.payload;S.value=!0,z(`Transcription started. Session: ${t.session_id}`);break}case`TranscriptionResultChanged`:{let t=e.payload;w.value=t.result,G(t.index,t.result,!1);break}case`SentenceEnd`:{let t=e.payload;w.value=``,G(t.index,t.result,!0),z(`Sentence #${t.index} (${t.time}ms): ${t.result}`);break}case`TranscriptionCompleted`:z(`Transcription completed`);break;default:z(`Server event: ${e.header.name}`);break}}function G(e,t,n){let r=T.value.findIndex(t=>t.index===e);if(r>=0){let i=T.value[r];T.value.splice(r,1,{index:e,text:t,final:i.final||n})}else T.value.push({index:e,text:t,final:n});T.value.sort((e,t)=>e.index-t.index)}async function de(){if(F.value){V(),x.value=`connecting`;try{D.value=lt(b.accessKeyId.trim(),b.accessKeySecret.trim(),b.appKey.trim(),{region:b.region}),O.value=D.value.sessionId;let e=await D.value.websocketUrl();z(`Connecting to ${e}`);let t=new WebSocket(e);t.binaryType=`arraybuffer`,t.onopen=()=>{x.value=`connected`,z(`WebSocket connected`),D.value?.start(t,{enable_intermediate_result:!0,enable_punctuation_prediction:!0})},t.onerror=e=>{x.value=`error`,z(`WebSocket error: ${JSON.stringify(e)}`,`error`)},t.onmessage=e=>{try{let t=JSON.parse(e.data);D.value?.onEvent(t,ue)}catch{z(`Server message: ${e.data}`)}},t.onclose=()=>{x.value=`closed`,z(`WebSocket closed by server`),q()},E.value=t}catch(e){x.value=`error`,z(`Failed to connect: ${e instanceof Error?e.message:String(e)}`,`error`),q()}}}async function K(){if(await W(),E.value&&E.value.readyState===WebSocket.OPEN){try{D.value?.stop(E.value)}catch(e){z(`Failed to send stop event: ${e instanceof Error?e.message:String(e)}`,`error`)}E.value.close()}else q(),x.value=`closed`}function q(){W(),E.value=void 0,D.value=void 0,V()}return c(async()=>{await K()}),(e,t)=>(l(),h(`div`,dt,[t[12]||=g(`div`,null,[g(`h1`,{class:`text-2xl font-semibold`},` Aliyun NLS Realtime Transcription `),g(`p`,{class:`mt-1 text-sm text-neutral-500 dark:text-neutral-400`},` Access Key ID and Secret with SpeechTranscriber permissions are required. `)],-1),g(`section`,ft,[g(`div`,pt,[f(r(y),{modelValue:b.accessKeyId,"onUpdate:modelValue":t[0]||=e=>b.accessKeyId=e,label:`Access Key ID`,description:`RAM AccessKey ID with SpeechTranscriber permissions.`,placeholder:`LTAI...`},null,8,[`modelValue`]),f(r(y),{modelValue:b.accessKeySecret,"onUpdate:modelValue":t[1]||=e=>b.accessKeySecret=e,label:`Access Key Secret`,description:`Keep this secret safe; it never leaves this page.`,placeholder:`****************`,type:`password`},null,8,[`modelValue`]),f(r(y),{modelValue:b.appKey,"onUpdate:modelValue":t[2]||=e=>b.appKey=e,label:`App Key`,description:`NLS project AppKey to bind the transcription session.`,placeholder:`请输入 AppKey`},null,8,[`modelValue`]),f(r(ne),{modelValue:b.region,"onUpdate:modelValue":t[3]||=e=>b.region=e,label:`Region`,description:`Match the region used when issuing the token.`,options:ie,placeholder:`cn-shanghai`,layout:`vertical`},null,8,[`modelValue`])]),g(`div`,mt,[g(`div`,ht,[t[4]||=g(`span`,{class:`text-neutral-500 dark:text-neutral-400`},`Status:`,-1),g(`span`,{class:p([`ml-2 font-medium`,oe.value])},a(ae.value),3),C.value?(l(),h(`span`,gt,` Recording `)):n(``,!0)]),g(`div`,_t,[f(r(v),{disabled:!F.value,variant:`primary`,onClick:de},{default:m(()=>[...t[5]||=[o(` Connect `,-1)]]),_:1},8,[`disabled`]),f(r(v),{disabled:!se.value,variant:`primary`,onClick:U},{default:m(()=>[...t[6]||=[o(` Listen `,-1)]]),_:1},8,[`disabled`]),f(r(v),{disabled:!ce.value,variant:`danger`,onClick:W},{default:m(()=>[...t[7]||=[o(` Stop `,-1)]]),_:1},8,[`disabled`]),f(r(v),{disabled:!I.value,variant:`secondary`,onClick:K},{default:m(()=>[...t[8]||=[o(` Disconnect `,-1)]]),_:1},8,[`disabled`])])])]),g(`section`,vt,[t[10]||=g(`h2`,{class:`text-lg font-semibold`},` Transcripts `,-1),g(`div`,yt,[w.value?(l(),h(`div`,bt,[t[9]||=g(`div`,{class:`text-xs text-neutral-400 tracking-wide uppercase dark:text-neutral-500`},` Partial `,-1),g(`div`,xt,a(w.value),1)])):n(``,!0),!T.value.length&&!w.value?(l(),h(`div`,St,` Waiting for server... `)):n(``,!0),g(`ul`,Ct,[(l(!0),h(ee,null,i(T.value,e=>(l(),h(`li`,{key:e.index,class:`flex items-start gap-2`},[g(`span`,wt,` #`+a(e.index),1),g(`div`,null,[g(`div`,{class:p([`font-medium`,e.final?``:`italic text-neutral-500 dark:text-neutral-400`])},a(e.text),3),e.final?n(``,!0):(l(),h(`div`,Tt,` Waiting for final result... `))])]))),128))])])]),g(`section`,Et,[t[11]||=g(`h2`,{class:`text-lg font-semibold`},` Logs `,-1),g(`div`,{ref_key:`logsContainer`,ref:P,class:`h-64 overflow-y-auto border border-neutral-200/80 rounded bg-neutral-50/60 p-3 text-xs leading-5 dark:border-neutral-700 dark:bg-neutral-900/50`},[(l(!0),h(ee,null,i(N.value,e=>(l(),h(`div`,{key:e.id,class:p(e.level===`error`?`text-red-500`:`text-neutral-700 dark:text-neutral-200`)},a(e.text),3))),128))],512)])]))}});typeof S==`function`&&S(Dt);var Ot=Dt;export{Ot as default};
 
1
+ import{A as e,B as t,C as n,Dt as r,K as i,Mt as a,O as o,St as s,V as c,W as l,_t as u,b as d,k as f,kt as p,m as ee,rt as te,st as m,w as h,x as g,yt as _}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{u as v}from"./widgets-Bo0BM5C8.js";import{a as ne,c as y}from"./src-BEKjKq3V.js";import{l as b}from"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import{t as x}from"./merge-CTbONeho.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as S}from"./route-block-B7Ro39Uj.js";import{i as C,t as w}from"./format-m0ZevNYD.js";import{t as re}from"./process.worklet-CJeez0uR.js";import{t as T}from"./utc-CCUrA73r.js";var E=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),D=e=>{let t=typeof e;return t===`object`?e===null?`null`:e?.constructor?.name??`object`:t},O=e=>{if(typeof e==`string`)return new TextEncoder().encode(e);if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);throw TypeError(`The input must be a Uint8Array, a string, or an ArrayBuffer. Received a value of the type ${D(e)}.`)},k=e=>{let t=O(e),n=``,r,i=t.length;for(r=2;r<i;r+=3)n+=E[t[r-2]>>2],n+=E[(t[r-2]&3)<<4|t[r-1]>>4],n+=E[(t[r-1]&15)<<2|t[r]>>6],n+=E[t[r]&63];return r===i+1&&(n+=E[t[r-2]>>2],n+=E[(t[r-2]&3)<<4],n+=`==`),r===i&&(n+=E[t[r-2]>>2],n+=E[(t[r-2]&3)<<4|t[r-1]>>4],n+=E[(t[r-1]&15)<<2],n+=`=`),n};function A(e,t){return+C(e)<+C(t)}var j=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,M=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,N=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function P(e,t){if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){ie(e);return}return t}function ie(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function ae(e,t={}){if(typeof e!=`string`)return e;if(e[0]===`"`&&e[e.length-1]===`"`&&e.indexOf(`\\`)===-1)return e.slice(1,-1);let n=e.trim();if(n.length<=9)switch(n.toLowerCase()){case`true`:return!0;case`false`:return!1;case`undefined`:return;case`null`:return null;case`nan`:return NaN;case`infinity`:return 1/0;case`-infinity`:return-1/0}if(!N.test(e)){if(t.strict)throw SyntaxError(`[destr] Invalid JSON`);return e}try{if(j.test(e)||M.test(e)){if(t.strict)throw Error(`[destr] Possible prototype pollution`);return JSON.parse(e,P)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}String.fromCharCode;var oe=/#/g,F=/&/g,se=/\//g,ce=/=/g,I=/\+/g,L=/%5e/gi,R=/%60/gi,z=/%7c/gi,le=/%20/gi;function B(e){return encodeURI(``+e).replace(z,`|`)}function V(e){return B(typeof e==`string`?e:JSON.stringify(e)).replace(I,`%2B`).replace(le,`+`).replace(oe,`%23`).replace(F,`%26`).replace(R,"`").replace(L,`^`).replace(se,`%2F`)}function H(e){return V(e).replace(ce,`%3D`)}function U(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function W(e){return U(e.replace(I,` `))}function ue(e){return U(e.replace(I,` `))}function G(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=W(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=ue(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function de(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${H(e)}=${V(t)}`).join(`&`):`${H(e)}=${V(t)}`:H(e)}function K(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>de(t,e[t])).filter(Boolean).join(`&`)}var q=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,fe=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,pe=/^([/\\]\s*){2,}[^/\\]/,me=/\/$|\/\?|\/#/,he=/^\.?\//;function ge(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?q.test(e):fe.test(e)||(t.acceptRelative?pe.test(e):!1)}function J(e=``,t){return t?me.test(e):e.endsWith(`/`)}function _e(e=``,t){if(!t)return(J(e)?e.slice(0,-1):e)||`/`;if(!J(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function ve(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(J(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function ye(e,t){if(xe(t)||ge(e))return e;let n=_e(t);return e.startsWith(n)?e:Ce(n,e)}function be(e,t){let n=Te(e);return n.search=K({...G(n.search),...t}),De(n)}function xe(e){return!e||e===`/`}function Se(e){return e&&e!==`/`}function Ce(e,...t){let n=e||``;for(let e of t.filter(e=>Se(e)))if(n){let t=e.replace(he,``);n=ve(n)+t}else n=e;return n}var we=Symbol.for(`ufo:protocolRelative`);function Te(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!ge(e,{acceptRelative:!0}))return t?Te(t+e):Ee(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=Ee(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[we]:!r}}function Ee(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function De(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[we]?(e.protocol||``)+`//`:``)+i+a+t+n+r}var Oe=class extends Error{constructor(e,t){super(e,t),this.name=`FetchError`,t?.cause&&!this.cause&&(this.cause=t.cause)}};function ke(e){let t=e.error?.message||e.error?.toString()||``,n=e.request?.method||e.options?.method||`GET`,r=e.request?.url||String(e.request)||`/`,i=new Oe(`${`[${n}] ${JSON.stringify(r)}`}: ${e.response?`${e.response.status} ${e.response.statusText}`:`<no response>`}${t?` ${t}`:``}`,e.error?{cause:e.error}:void 0);for(let t of[`request`,`options`,`response`])Object.defineProperty(i,t,{get(){return e[t]}});for(let[t,n]of[[`data`,`_data`],[`status`,`status`],[`statusCode`,`status`],[`statusText`,`statusText`],[`statusMessage`,`statusText`]])Object.defineProperty(i,t,{get(){return e.response&&e.response[n]}});return i}var Ae=new Set(Object.freeze([`PATCH`,`POST`,`PUT`,`DELETE`]));function je(e=`GET`){return Ae.has(e.toUpperCase())}function Me(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}var Ne=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]),Pe=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Fe(e=``){if(!e)return`json`;let t=e.split(`;`).shift()||``;return Pe.test(t)?`json`:t===`text/event-stream`?`stream`:Ne.has(t)||t.startsWith(`text/`)?`text`:`blob`}function Ie(e,t,n,r){let i=Le(t?.headers??e?.headers,n?.headers,r),a;return(n?.query||n?.params||t?.params||t?.query)&&(a={...n?.params,...n?.query,...t?.params,...t?.query}),{...n,...t,query:a,params:a,headers:i}}function Le(e,t,n){if(!t)return new n(e);let r=new n(t);if(e)for(let[t,i]of Symbol.iterator in e||Array.isArray(e)?e:new n(e))r.set(t,i);return r}async function Y(e,t){if(t)if(Array.isArray(t))for(let n of t)await n(e);else await t(e)}var Re=new Set([408,409,425,429,500,502,503,504]),ze=new Set([101,204,205,304]);function Be(e={}){let{fetch:t=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function i(e){let t=e.error&&e.error.name===`AbortError`&&!e.options.timeout||!1;if(e.options.retry!==!1&&!t){let t;t=typeof e.options.retry==`number`?e.options.retry:je(e.options.method)?0:1;let n=e.response&&e.response.status||500;if(t>0&&(Array.isArray(e.options.retryStatusCodes)?e.options.retryStatusCodes.includes(n):Re.has(n))){let n=typeof e.options.retryDelay==`function`?e.options.retryDelay(e):e.options.retryDelay||0;return n>0&&await new Promise(e=>setTimeout(e,n)),a(e.request,{...e.options,retry:t-1})}}let n=ke(e);throw Error.captureStackTrace&&Error.captureStackTrace(n,a),n}let a=async function(a,o={}){let s={request:a,options:Ie(a,o,e.defaults,n),response:void 0,error:void 0};if(s.options.method&&(s.options.method=s.options.method.toUpperCase()),s.options.onRequest&&await Y(s,s.options.onRequest),typeof s.request==`string`&&(s.options.baseURL&&(s.request=ye(s.request,s.options.baseURL)),s.options.query&&(s.request=be(s.request,s.options.query),delete s.options.query),`query`in s.options&&delete s.options.query,`params`in s.options&&delete s.options.params),s.options.body&&je(s.options.method))if(Me(s.options.body)){let e=s.options.headers.get(`content-type`);typeof s.options.body!=`string`&&(s.options.body=e===`application/x-www-form-urlencoded`?new URLSearchParams(s.options.body).toString():JSON.stringify(s.options.body)),s.options.headers=new n(s.options.headers||{}),e||s.options.headers.set(`content-type`,`application/json`),s.options.headers.has(`accept`)||s.options.headers.set(`accept`,`application/json`)}else (`pipeTo`in s.options.body&&typeof s.options.body.pipeTo==`function`||typeof s.options.body.pipe==`function`)&&(`duplex`in s.options||(s.options.duplex=`half`));let c;if(!s.options.signal&&s.options.timeout){let e=new r;c=setTimeout(()=>{let t=Error(`[TimeoutError]: The operation was aborted due to timeout`);t.name=`TimeoutError`,t.code=23,e.abort(t)},s.options.timeout),s.options.signal=e.signal}try{s.response=await t(s.request,s.options)}catch(e){return s.error=e,s.options.onRequestError&&await Y(s,s.options.onRequestError),await i(s)}finally{c&&clearTimeout(c)}if((s.response.body||s.response._bodyInit)&&!ze.has(s.response.status)&&s.options.method!==`HEAD`){let e=(s.options.parseResponse?`json`:s.options.responseType)||Fe(s.response.headers.get(`content-type`)||``);switch(e){case`json`:{let e=await s.response.text(),t=s.options.parseResponse||ae;s.response._data=t(e);break}case`stream`:s.response._data=s.response.body||s.response._bodyInit;break;default:s.response._data=await s.response[e]()}}return s.options.onResponse&&await Y(s,s.options.onResponse),!s.options.ignoreResponseError&&s.response.status>=400&&s.response.status<600?(s.options.onResponseError&&await Y(s,s.options.onResponseError),await i(s)):s.response},o=async function(e,t){return(await a(e,t))._data};return o.raw=a,o.native=(...e)=>t(...e),o.create=(t={},n={})=>Be({...e,...n,defaults:{...e.defaults,...n.defaults,...t}}),o}var X=(function(){if(typeof globalThis<`u`)return globalThis;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`unable to locate global object`)})(),Ve=X.fetch?(...e)=>X.fetch(...e):()=>Promise.reject(Error(`[ofetch] global.fetch is not supported!`)),He=X.Headers,Ue=X.AbortController,We=Be({fetch:Ve,Headers:He,AbortController:Ue}),Ge=globalThis.crypto.subtle,Z=[];for(let e=0;e<256;++e)Z.push((e+256).toString(16).slice(1));function Ke(e,t=0){return(Z[e[t+0]]+Z[e[t+1]]+Z[e[t+2]]+Z[e[t+3]]+`-`+Z[e[t+4]]+Z[e[t+5]]+`-`+Z[e[t+6]]+Z[e[t+7]]+`-`+Z[e[t+8]]+Z[e[t+9]]+`-`+Z[e[t+10]]+Z[e[t+11]]+Z[e[t+12]]+Z[e[t+13]]+Z[e[t+14]]+Z[e[t+15]]).toLowerCase()}var Q,qe=new Uint8Array(16);function Je(){if(!Q){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Q=crypto.getRandomValues.bind(crypto)}return Q(qe)}var Ye={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Xe(e,t,n){e||={};let r=e.random??e.rng?.()??Je();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Ke(r)}function Ze(e,t,n){return Ye.randomUUID&&!t&&!e?Ye.randomUUID():Xe(e,t,n)}var Qe=Ze;function $e(e){return new URL(`http://nls-meta.${e}.aliyuncs.com`)}function et(e=`cn-shanghai`){let t=new URL(`/ws/v1`,`https://example.com`);switch(e){case`cn-shanghai`:case`cn-beijing`:case`cn-shenzhen`:t.protocol=`wss:`,t.hostname=`nls-gateway-${e}.aliyuncs.com`;break;case`cn-shanghai-internal`:case`cn-beijing-internal`:case`cn-shenzhen-internal`:t.protocol=`wss:`,t.hostname=`nls-gateway-${e}-internal.aliyuncs.com:80`}return t}var tt=`HMAC-SHA1`,nt=`1.0`,rt=`2019-02-28`;function it(e){return Object.keys(e).sort().map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join(`&`)}function at(e,t,n){return`${e}&${encodeURIComponent(t)}&${encodeURIComponent(n)}`}async function ot(e,t){let n=new TextEncoder().encode(`${t}&`),r=await Ge.importKey(`raw`,n,{name:`HMAC`,hash:{name:`SHA-1`}},!1,[`sign`]),i=new TextEncoder().encode(e);return k(await Ge.sign(`HMAC`,r,i))}async function st(e,t,n){let r=w(T(x({timestamp:new Date},n).timestamp),`yyyy-MM-dd'T'HH:mm:ssXX`),i=n?.signatureNonce??Qe(),a={AccessKeyId:e,Action:`CreateToken`,Format:`JSON`,RegionId:n?.regionId??`cn-shanghai`,SignatureMethod:tt,SignatureNonce:i,SignatureVersion:nt,Timestamp:r,Version:rt,...n?.extraQuery},o=it(a),s=at(`POST`,`/`,o),c=await ot(s,t),l=encodeURIComponent(c),u=`Signature=${l}&${o}`,d=(n?.endpoint??$e(n?.regionId??`cn-shanghai`).toString()).replace(/\/$/,``),f=`${d}/?${u}`;return{endpoint:d,canonicalQuery:o,stringToSign:s,signature:c,encodedSignature:l,signedQuery:u,params:{Signature:c,...a},url:f}}async function ct(e,t,n){let r=await We((await st(e,t,n)).url,{method:`POST`});if(`Token`in r&&typeof r.Token==`object`&&`Id`in r.Token)return{token:r.Token.Id,expiresAt:r.Token.ExpireTime*1e3};throw Error(`Failed to create token: ${JSON.stringify(r)||`Unknown error`}`)}var $=b(`0123456789abcdef`,32);function lt(e,t,n,r){let i=ut(e,t,n,r),a=$();function o(e,t){let n=x({sessionId:a},t);e.send(JSON.stringify({header:{appkey:i.appKey,message_id:$(),task_id:n.sessionId,namespace:`SpeechTranscriber`,name:`StartTranscription`},payload:{format:`wav`}}))}function s(e,t){let n=x({sessionId:a},t);e.send(JSON.stringify({header:{appkey:i.appKey,message_id:$(),task_id:n.sessionId,namespace:`SpeechTranscriber`,name:`StopTranscription`},payload:void 0}))}function c(e,t){t(e)}return{...i,sessionId:a,start:o,stop:s,onEvent:c}}function ut(e,t,n,r){let i=``,a=T(new Date).getTime();async function o(){if(!i||A(new Date(a),T(new Date))){let n=await ct(e,t,{regionId:r?.region??`cn-shanghai`});i=n.token,a=n.expiresAt}let n=et(r?.region??`cn-shanghai`);return n.searchParams.set(`token`,i),n.toString()}return{websocketUrl:o,appKey:n}}var dt={class:`space-y-6`},ft={class:`space-y-4`},pt={class:`grid gap-4 md:grid-cols-2`},mt={class:`flex flex-wrap items-center gap-4`},ht={class:`text-sm`},gt={key:0,class:`ml-2 rounded bg-red-500/10 px-2 py-0.5 text-xs text-red-500`},_t={class:`flex flex-wrap gap-3`},vt={class:`space-y-3`},yt={class:`border border-neutral-200/80 rounded bg-neutral-50/60 p-4 text-sm dark:border-neutral-700 dark:bg-neutral-900/50`},bt={key:0,class:`mb-3 text-neutral-500 dark:text-neutral-400`},xt={class:`mt-1 font-medium`},St={key:1,class:`text-neutral-400 dark:text-neutral-600`},Ct={class:`space-y-2`},wt={class:`mt-0.5 rounded bg-neutral-200/80 px-2 py-0.5 text-xs text-neutral-700 dark:bg-neutral-800/70 dark:text-neutral-200`},Tt={key:0,class:`text-xs text-neutral-400`},Et={class:`space-y-3`},Dt=e({__name:`providers-transcription-realtime-aliyun-nls`,setup(e){let b=u({accessKeyId:``,accessKeySecret:``,appKey:``,region:`cn-shanghai`}),x=_(`idle`),S=_(!1),C=_(!1),w=_(``),T=_([]),E=s(),D=s(),O=_(``),k=s(),A=s(),j=s(),M=s(),N=_([]),P=_(),ie=[{label:`cn-shanghai`,value:`cn-shanghai`},{label:`cn-beijing`,value:`cn-beijing`},{label:`cn-shenzhen`,value:`cn-shenzhen`},{label:`cn-shanghai (internal)`,value:`cn-shanghai-internal`},{label:`cn-beijing (internal)`,value:`cn-beijing-internal`},{label:`cn-shenzhen (internal)`,value:`cn-shenzhen-internal`}],ae=d(()=>{switch(x.value){case`connecting`:return`Connecting`;case`connected`:return`Connected`;case`error`:return`Error`;case`closed`:return`Disconnected`;default:return`Idle`}}),oe=d(()=>{switch(x.value){case`connected`:return`text-green-500`;case`connecting`:return`text-blue-500`;case`error`:return`text-red-500`;default:return`text-neutral-500 dark:text-neutral-400`}}),F=d(()=>!!b.accessKeyId&&!!b.accessKeySecret&&!!b.appKey&&x.value!==`connecting`&&x.value!==`connected`),se=d(()=>x.value===`connected`&&S.value&&!C.value),ce=d(()=>C.value),I=d(()=>E.value&&E.value.readyState!==WebSocket.CLOSED),L=0,R=0;te(N,()=>{t(()=>{let e=P.value;e&&(e.scrollTop=e.scrollHeight)})});function z(e,t=`info`){N.value.push({id:Date.now()+Math.random(),level:t,text:`[${new Date().toLocaleTimeString()}] ${e}`})}function le(e){let t=new Int16Array(e.length);for(let n=0;n<e.length;n++){let r=Math.max(-1,Math.min(1,e[n]));t[n]=r<0?r*32768:r*32767}return t}function B(){return E.value&&E.value.readyState===WebSocket.OPEN}function V(){S.value=!1,w.value=``,T.value=[],L=0,R=0}async function H(e){let t=new AudioContext({sampleRate:16e3,latencyHint:`interactive`});await t.audioWorklet.addModule(re);let n=new AudioWorkletNode(t,`vad-audio-worklet-processor`);n.port.onmessage=({data:e})=>{let t=e.buffer;if(!t||!B())return;L+=1,(L===1||L-R>=50)&&(z(`Streaming audio chunk #${L}`),R=L);let n=le(t);E.value?.send(n.buffer)};let r=t.createMediaStreamSource(e);r.connect(n);let i=t.createGain();i.gain.value=0,n.connect(i),i.connect(t.destination),k.value=t,A.value=n,j.value=r}async function U(){if(!B()){z(`WebSocket is not ready. Connect before starting recording.`,`error`);return}if(!C.value)try{let e=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:16e3,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});M.value=e,await H(e),k.value?.state===`suspended`&&await k.value.resume(),C.value=!0,z(`Recording started`)}catch(e){z(`Failed to start recording: ${e instanceof Error?e.message:String(e)}`,`error`),await W()}}async function W(){if(C.value){try{A.value?.port.postMessage({type:`stop`})}catch{}if(j.value&&=(j.value.disconnect(),void 0),A.value&&=(A.value.port.onmessage=null,A.value.disconnect(),void 0),M.value&&=(M.value.getTracks().forEach(e=>e.stop()),void 0),k.value){try{await k.value.close()}catch(e){console.error(`Failed to close audio context`,e)}k.value=void 0}C.value=!1,z(`Recording stopped`)}}function ue(e){switch(e.header.name){case`TranscriptionStarted`:{let t=e.payload;S.value=!0,z(`Transcription started. Session: ${t.session_id}`);break}case`TranscriptionResultChanged`:{let t=e.payload;w.value=t.result,G(t.index,t.result,!1);break}case`SentenceEnd`:{let t=e.payload;w.value=``,G(t.index,t.result,!0),z(`Sentence #${t.index} (${t.time}ms): ${t.result}`);break}case`TranscriptionCompleted`:z(`Transcription completed`);break;default:z(`Server event: ${e.header.name}`);break}}function G(e,t,n){let r=T.value.findIndex(t=>t.index===e);if(r>=0){let i=T.value[r];T.value.splice(r,1,{index:e,text:t,final:i.final||n})}else T.value.push({index:e,text:t,final:n});T.value.sort((e,t)=>e.index-t.index)}async function de(){if(F.value){V(),x.value=`connecting`;try{D.value=lt(b.accessKeyId.trim(),b.accessKeySecret.trim(),b.appKey.trim(),{region:b.region}),O.value=D.value.sessionId;let e=await D.value.websocketUrl();z(`Connecting to ${e}`);let t=new WebSocket(e);t.binaryType=`arraybuffer`,t.onopen=()=>{x.value=`connected`,z(`WebSocket connected`),D.value?.start(t,{enable_intermediate_result:!0,enable_punctuation_prediction:!0})},t.onerror=e=>{x.value=`error`,z(`WebSocket error: ${JSON.stringify(e)}`,`error`)},t.onmessage=e=>{try{let t=JSON.parse(e.data);D.value?.onEvent(t,ue)}catch{z(`Server message: ${e.data}`)}},t.onclose=()=>{x.value=`closed`,z(`WebSocket closed by server`),q()},E.value=t}catch(e){x.value=`error`,z(`Failed to connect: ${e instanceof Error?e.message:String(e)}`,`error`),q()}}}async function K(){if(await W(),E.value&&E.value.readyState===WebSocket.OPEN){try{D.value?.stop(E.value)}catch(e){z(`Failed to send stop event: ${e instanceof Error?e.message:String(e)}`,`error`)}E.value.close()}else q(),x.value=`closed`}function q(){W(),E.value=void 0,D.value=void 0,V()}return c(async()=>{await K()}),(e,t)=>(l(),h(`div`,dt,[t[12]||=g(`div`,null,[g(`h1`,{class:`text-2xl font-semibold`},` Aliyun NLS Realtime Transcription `),g(`p`,{class:`mt-1 text-sm text-neutral-500 dark:text-neutral-400`},` Access Key ID and Secret with SpeechTranscriber permissions are required. `)],-1),g(`section`,ft,[g(`div`,pt,[f(r(y),{modelValue:b.accessKeyId,"onUpdate:modelValue":t[0]||=e=>b.accessKeyId=e,label:`Access Key ID`,description:`RAM AccessKey ID with SpeechTranscriber permissions.`,placeholder:`LTAI...`},null,8,[`modelValue`]),f(r(y),{modelValue:b.accessKeySecret,"onUpdate:modelValue":t[1]||=e=>b.accessKeySecret=e,label:`Access Key Secret`,description:`Keep this secret safe; it never leaves this page.`,placeholder:`****************`,type:`password`},null,8,[`modelValue`]),f(r(y),{modelValue:b.appKey,"onUpdate:modelValue":t[2]||=e=>b.appKey=e,label:`App Key`,description:`NLS project AppKey to bind the transcription session.`,placeholder:`请输入 AppKey`},null,8,[`modelValue`]),f(r(ne),{modelValue:b.region,"onUpdate:modelValue":t[3]||=e=>b.region=e,label:`Region`,description:`Match the region used when issuing the token.`,options:ie,placeholder:`cn-shanghai`,layout:`vertical`},null,8,[`modelValue`])]),g(`div`,mt,[g(`div`,ht,[t[4]||=g(`span`,{class:`text-neutral-500 dark:text-neutral-400`},`Status:`,-1),g(`span`,{class:p([`ml-2 font-medium`,oe.value])},a(ae.value),3),C.value?(l(),h(`span`,gt,` Recording `)):n(``,!0)]),g(`div`,_t,[f(r(v),{disabled:!F.value,variant:`primary`,onClick:de},{default:m(()=>[...t[5]||=[o(` Connect `,-1)]]),_:1},8,[`disabled`]),f(r(v),{disabled:!se.value,variant:`primary`,onClick:U},{default:m(()=>[...t[6]||=[o(` Listen `,-1)]]),_:1},8,[`disabled`]),f(r(v),{disabled:!ce.value,variant:`danger`,onClick:W},{default:m(()=>[...t[7]||=[o(` Stop `,-1)]]),_:1},8,[`disabled`]),f(r(v),{disabled:!I.value,variant:`secondary`,onClick:K},{default:m(()=>[...t[8]||=[o(` Disconnect `,-1)]]),_:1},8,[`disabled`])])])]),g(`section`,vt,[t[10]||=g(`h2`,{class:`text-lg font-semibold`},` Transcripts `,-1),g(`div`,yt,[w.value?(l(),h(`div`,bt,[t[9]||=g(`div`,{class:`text-xs text-neutral-400 tracking-wide uppercase dark:text-neutral-500`},` Partial `,-1),g(`div`,xt,a(w.value),1)])):n(``,!0),!T.value.length&&!w.value?(l(),h(`div`,St,` Waiting for server... `)):n(``,!0),g(`ul`,Ct,[(l(!0),h(ee,null,i(T.value,e=>(l(),h(`li`,{key:e.index,class:`flex items-start gap-2`},[g(`span`,wt,` #`+a(e.index),1),g(`div`,null,[g(`div`,{class:p([`font-medium`,e.final?``:`italic text-neutral-500 dark:text-neutral-400`])},a(e.text),3),e.final?n(``,!0):(l(),h(`div`,Tt,` Waiting for final result... `))])]))),128))])])]),g(`section`,Et,[t[11]||=g(`h2`,{class:`text-lg font-semibold`},` Logs `,-1),g(`div`,{ref_key:`logsContainer`,ref:P,class:`h-64 overflow-y-auto border border-neutral-200/80 rounded bg-neutral-50/60 p-3 text-xs leading-5 dark:border-neutral-700 dark:bg-neutral-900/50`},[(l(!0),h(ee,null,i(N.value,e=>(l(),h(`div`,{key:e.id,class:p(e.level===`error`?`text-red-500`:`text-neutral-700 dark:text-neutral-200`)},a(e.text),3))),128))],512)])]))}});typeof S==`function`&&S(Dt);var Ot=Dt;export{Ot as default};
assets/{scene-CwhSr_On.js → scene-OA_P31Ke.js} RENAMED
@@ -1 +1 @@
1
- import{A as e,Dt as t,O as n,W as r,Y as i,ct as a,k as o,m as s,st as c,w as l,x as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{h as d}from"./widgets-DJ153_lR.js";import"./src-BEKjKq3V.js";import"./settings-ckdWvS_B.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BoQNNhDi.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as f}from"./route-block-B7Ro39Uj.js";var p={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},m=e({__name:`index`,setup(e){return(e,f)=>{let m=i(`motion`);return r(),l(s,null,[u(`div`,null,[o(t(d),{label:`In development, needs your help!`,theme:`orange`},{default:c(()=>[...f[0]||=[u(`div`,null,[n(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),u(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),n(`. The source code of this page is located at `),u(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/scene/index.vue`},`here`),n(`. `)],-1)]]),_:1})]),a((r(),l(`div`,p,[...f[1]||=[u(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)]])),[[m]])],64)}}});typeof f==`function`&&f(m);var h=m;export{h as default};
 
1
+ import{A as e,Dt as t,O as n,W as r,Y as i,ct as a,k as o,m as s,st as c,w as l,x as u}from"./vue.runtime.esm-bundler-BODQtTc2.js";import{h as d}from"./widgets-Bo0BM5C8.js";import"./src-BEKjKq3V.js";import"./settings-CVVqd1wK.js";import"./preload-helper-C_mzgxuZ.js";import"./vue-router-DbGkV_8v.js";import"./_plugin-vue_export-helper-CdbDUOI-.js";import"./dist-D-gzSpcr.js";import"./src-B2sntzra.js";import"./components-BaJFFT8H.js";import"./vue-i18n.runtime-Asl2hnl1.js";import"./sleep-scadwjYE.js";import"./webgpu-D1xql1eX.js";import"./output-KkRq_Mb9.js";import"./__vite-browser-external-qSVDfb5s.js";import{t as f}from"./route-block-B7Ro39Uj.js";var p={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},m=e({__name:`index`,setup(e){return(e,f)=>{let m=i(`motion`);return r(),l(s,null,[u(`div`,null,[o(t(d),{label:`In development, needs your help!`,theme:`orange`},{default:c(()=>[...f[0]||=[u(`div`,null,[n(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),u(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),n(`. The source code of this page is located at `),u(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/scene/index.vue`},`here`),n(`. `)],-1)]]),_:1})]),a((r(),l(`div`,p,[...f[1]||=[u(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)]])),[[m]])],64)}}});typeof f==`function`&&f(m);var h=m;export{h as default};