Commit
·
413a848
1
Parent(s):
e7e53eb
release: build 4fb878e78a29c8b5d8f71a84f961dacf28718398
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +1 -0
- assets/{AnimatedWave-WPDAzn7y.js → AnimatedWave-ysGy7D51.js} +2 -2
- assets/{Basic-DqZH4ccC.js → Basic-i6dKFYXW.js} +1 -1
- assets/{BasicInputFile-BpKQbl4s.js → BasicInputFile-CE2dQPco.js} +1 -1
- assets/CardCreate-0CgHn4pe.js +0 -1
- assets/{CardCreate-BKWO-6Cc.js → CardCreate-BHVHUBHO.js} +1 -1
- assets/CardCreate-C2hnBFDC.js +1 -0
- assets/CardCreationDialog-CqLdYE1B.js +1 -0
- assets/{CardCreationDialog-CyMszlB6.js → CardCreationDialog-Cs6jehZt.js} +2 -2
- assets/CardCreationDialog-Ctd_P3OS.js +0 -1
- assets/{CardDetailDialog-DJH5FQFU.js → CardDetailDialog-BFh-RIKw.js} +1 -1
- assets/CardDetailDialog-BH9jXwx0.js +1 -0
- assets/CardDetailDialog-CoOsVBZq.js +0 -1
- assets/CardListItem-CmjDq6oT.js +1 -0
- assets/{CardListItem-Bf_aIu-g.js → CardListItem-DUrsLYpl.js} +1 -1
- assets/CardListItem-juaBI4OZ.js +0 -1
- assets/DeleteCardDialog-BXra5W4m.js +1 -0
- assets/{DeleteCardDialog-OlwxkCQV.js → DeleteCardDialog-DK9pHTYG.js} +1 -1
- assets/DeleteCardDialog-FoFFubkY.js +0 -1
- assets/{HeaderLink-DYjzqPXM.js → HeaderLink-lBHYTbjo.js} +1 -1
- assets/{IconAnimation-Dh5WqWOg.js → IconAnimation-CbzgKu4z.js} +1 -1
- assets/{InputFile-BCVv6DXo.js → InputFile-1iWiDDXD.js} +1 -1
- assets/{Scenes-UHLwN41j.js → Scenes-NPrm1JTa.js} +0 -0
- assets/{Textarea-996FU_k1.js → Textarea-Bs3dDFBW.js} +1 -1
- assets/_...all_-CK6MkbIo.js +0 -1
- assets/_...all_-CKwVDcbd.js +1 -0
- assets/{__vite-browser-external-Dr3SJRIM.js → __vite-browser-external-vNgQ4ZKm.js} +1 -1
- assets/{airi-card-CooYORDj.js → airi-card-CGFJp01Q.js} +1 -1
- assets/{alibaba-cloud-model-studio-DnJc58m-.js → alibaba-cloud-model-studio-DEeGe0YV.js} +1 -1
- assets/{anthropic-XeWZREjS.js → anthropic-BrpI8Zfd.js} +1 -1
- assets/{appearance-BWcJggRu.js → appearance-Cws_Hm5P.js} +1 -1
- assets/{audio-BO3k15P2.js → audio-BW8HaNY6.js} +1 -1
- assets/{audio-record-QnosxCYD.js → audio-record-CLGIYkKz.js} +1 -1
- assets/{azure-ai-foundry-B6NkPA82.js → azure-ai-foundry-v6AJ70ME.js} +1 -1
- assets/{background-gradient-blending-lo2DKvjb.js → background-gradient-blending-CKRNnZ8N.js} +2 -2
- assets/{background-remove-XV3Q3VDI.js → background-remove-DJQTlQ2j.js} +1 -1
- assets/{chat-DVTmv4F-.js → chat-B8qU7lMa.js} +2 -2
- assets/{cloudflare-workers-ai-DUaW50rh.js → cloudflare-workers-ai-BZyG5JaO.js} +1 -1
- assets/{color-scheme-B1nTqxNP.js → color-scheme-DIbhSfnd.js} +1 -1
- assets/{consciousness-BRGy5-ue.js → consciousness-K169XQMI.js} +1 -1
- assets/core-DUQNFnRE.js +0 -1
- assets/core-DwBaktBr.js +1 -0
- assets/{deepseek-CQlomwi-.js → deepseek-BhEIX9aM.js} +1 -1
- assets/{default-B9w9uvy6.js → default-ZM1vW7ty.js} +1 -1
- assets/{default-node-EfZTletR.js → default-node-CpWjZ3Ux.js} +2 -2
- assets/{delays-BY5FPO4G.js → delays-UZUvEnrl.js} +1 -1
- assets/{developer-BWVOPWBi.js → developer-Dkf2yq78.js} +1 -1
- assets/{effect--zg3C1LQ-D9KtGoly.js → effect--zg3C1LQ-4lsxt-_9.js} +1 -1
- assets/{elevenlabs-DjPDAPqc.js → elevenlabs-C-2yi9F8.js} +1 -1
- assets/{emotions-DgUrsGtC.js → emotions-DD0zbvQb.js} +1 -1
.gitattributes
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
*.vrm filter=lfs diff=lfs merge=lfs -text
|
2 |
*.vrma filter=lfs diff=lfs merge=lfs -text
|
|
|
3 |
*.cmo3 filter=lfs diff=lfs merge=lfs -text
|
4 |
*.png filter=lfs diff=lfs merge=lfs -text
|
5 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
|
|
1 |
*.vrm filter=lfs diff=lfs merge=lfs -text
|
2 |
*.vrma filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.hdr filter=lfs diff=lfs merge=lfs -text
|
4 |
*.cmo3 filter=lfs diff=lfs merge=lfs -text
|
5 |
*.png filter=lfs diff=lfs merge=lfs -text
|
6 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
assets/{AnimatedWave-WPDAzn7y.js → AnimatedWave-ysGy7D51.js}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
import{b as e}from"./Basic-DqZH4ccC.js";import{A as t,bT as n,c6 as r,c7 as i,c9 as a,cK as o,cP as s,cc as c,ce as l,cj as u,d5 as d,da as f,de as p,dm as m,dn as h,e$ as g,eL as _,eR as v,eS as y,eU as b,eV as x,eW as S,eX as C,eY as w,eZ as T,e_ as E,f2 as D,f4 as O,f5 as k,f7 as A,f9 as j,fa as M,fc as N,fd as P,fe as F,ff as I,fh as L,fi as R,fk as z,fo as B,fp as V,fr as ee,fs as H,n as U,o as W,p as G,q as K,s as q,x as J,y as Y}from"./index-xk_G3uGf.js";import{b as X,c as Z,d as Q}from"./HeaderLink-DYjzqPXM.js";import{d as $,e as te,f as ne}from"./Scenes-UHLwN41j.js";function re(e,t){let n=ne(e,t?.in);if(!te(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),r=$(n.getFullYear(),4);a=`${r}${o}${t}${o}${e}`}if(i!==`date`){let e=$(n.getHours(),2),t=$(n.getMinutes(),2),r=$(n.getSeconds(),2),i=a===``?``:` `;a=`${a}${i}${e}${s}${t}${s}${r}`}return a}const ie={},ae={class:`cross-background-container`};function oe(e,t){return A(),w(`div`,ae,[M(e.$slots,`default`,{},void 0,!0)])}var se=s(ie,[[`render`,oe],[`__scopeId`,`data-v-455eb62c`]]);const ce={"mb-1":``,"w-full":``,"gap-2":``},le={"w-full":``};var ue=g({__name:`Header`,setup(e){return(e,t)=>(A(),w(`header`,ce,[x(`div`,le,[E(X)]),E(B(d),{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:L(()=>t[0]||=[x(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),de=ue,fe=`/assets/worker-_4r9VDQB.js`;const pe={relative:``,px:`<sm:2`,py:`<sm:2`,flex:`~ col`,rounded:`lg`,"overflow-hidden":``},me={key:0,flex:``,mr:`12`},he={flex:`~ col`,border:`2 solid violet-200/50 dark:violet-500/50`,shadow:`md violet-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,bg:`<md:violet-500/25`},ge={flex:`~ row`,"gap-2":``},_e={"flex-1":``},ve={"text-xs":``,text:`violet-400/90 dark:violet-600/90`,"font-normal":``,class:`inline <sm:hidden`},ye={key:0,"i-eos-icons:three-dots-loading":``},be=[`innerHTML`],xe={key:1,flex:``,mr:`12`},Se={flex:`~ col`,border:`2 solid primary-200/50 dark:primary-500/50`,shadow:`md primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,bg:`<md:primary-500/25`},Ce={"text-xs":``,text:`primary-400/90 dark:primary-600/90`,"font-normal":``,class:`inline <sm:hidden`},we={key:0,class:`markdown-content break-words`,text:`xs primary-400`},Te={key:0},Ee={p:`1`,border:`1 solid primary-200`,"rounded-lg":``,m:`y-1`,bg:`primary-100`},De={key:1},Oe=[`innerHTML`],ke={key:1,"i-eos-icons:three-dots-loading":``},Ae={key:2,flex:`~ row-reverse`,ml:`12`},je={flex:`~ col`,border:`2 solid cyan-200/50 dark:cyan-500/50`,shadow:`md cyan-200/50 dark:none`,px:`2`,h:`unset <sm:fit`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,bg:`<md:cyan-500/25`},Me={"text-xs":``,text:`cyan-400/90 dark:cyan-600/90`,"font-normal":``,class:`inline <sm:hidden`},Ne=[`innerHTML`],Pe={key:1};var Fe=g({__name:`ChatHistory`,setup(e){let n=z(),{t:r}=t(),{messages:a,sending:o}=f(q()),{process:s}=i(),{onBeforeMessageComposed:c,onTokenLiteral:l}=q();return c(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),l(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),(e,t)=>{let i=N(`auto-animate`);return A(),w(`div`,pe,[t[3]||=x(`div`,{"flex-1":``},null,-1),R((A(),w(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[t[2]||=x(`div`,{"flex-1":``},null,-1),(A(!0),w(v,null,j(B(a),(e,n)=>(A(),w(`div`,{key:n,"mb-2":``},[e.role===`error`?(A(),w(`div`,me,[x(`div`,he,[x(`div`,ge,[x(`div`,_e,[x(`span`,ve,H(B(r)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=x(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),B(o)&&n===B(a).length-1?(A(),w(`div`,ye)):(A(),w(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base <sm:xs`,innerHTML:B(s)(e.content)},null,8,be))])])):C(``,!0),e.role===`assistant`?(A(),w(`div`,xe,[x(`div`,Se,[x(`div`,null,[x(`span`,Ce,H(B(r)(`stage.chat.message.character-name.airi`)),1)]),e.content?(A(),w(`div`,we,[(A(!0),w(v,null,j(e.slices,(e,n)=>(A(),w(`div`,{key:n},[e.type===`tool-call`?(A(),w(`div`,Te,[x(`div`,Ee,[t[1]||=T(` Called: `,-1),x(`code`,null,H(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(A(),w(`div`,De)):(A(),w(`div`,{key:2,innerHTML:B(s)(e.text)},null,8,Oe))]))),128))])):n===B(a).length-1&&!e.content?(A(),w(`div`,ke)):C(``,!0)])])):e.role===`user`?(A(),w(`div`,Ae,[x(`div`,je,[x(`div`,null,[x(`span`,Me,H(B(r)(`stage.chat.message.character-name.you`)),1)]),e.content?(A(),w(`div`,{key:0,class:`markdown-content break-words`,text:`base <sm:xs`,innerHTML:B(s)(e.content)},null,8,Ne)):(A(),w(`div`,Pe))])])):C(``,!0)]))),128))])),[[i]])])}}}),Ie=Fe;const Le={flex:`col`,"items-center":``,"pt-4":``},Re={"h-full":``,"max-h":`[85vh]`,"w-full":``,py:`4`},ze={flex:`~ col`,border:`solid 4 primary-200/20 dark:primary-400/20`,"h-full":``,"w-full":``,"overflow-scroll":``,"rounded-xl":``,bg:`primary-50/50 dark:primary-950/70`,"backdrop-blur-md":``},Be={h:`<md:full`,flex:``,"gap-2":``};var Ve=g({__name:`InteractiveArea`,setup(i){let o=z(``),s=z(!1),l=z(!1),u=z(!1),d=Y(),{activeProvider:p,activeModel:m}=f(J()),{themeColorsHueDynamic:h}=f(W()),{askPermission:g}=G(),{enabled:_,selectedAudioInput:v}=f(G()),{send:y,onAfterMessageComposed:b,discoverToolsCompatibility:S}=q(),{messages:C}=f(q()),{audioContext:T}=c(),{t:D}=t(),{transcribe:O,terminate:j}=n(fe,{onComplete:async e=>{if(!e||!e.trim())return;let t=d.getProviderConfig(p.value);await y(e,{chatProvider:await d.getProviderInstance(p.value),model:m.value,providerConfig:t})}});async function M(){if(!(!o.value.trim()||u.value))try{let e=d.getProviderConfig(p.value);await y(o.value,{chatProvider:await d.getProviderInstance(p.value),model:m.value,providerConfig:e})}catch(e){C.value.pop(),C.value.push({role:`error`,content:e.message})}}let{destroy:N,start:P}=r(v,{onSpeechStart:()=>{s.value=!0},onVADMisfire:()=>{s.value=!1},onSpeechEnd:e=>{s.value=!1,F(e.buffer)},auto:!1});async function F(e){await T.resume();let t=await a(e,T.sampleRate);O({type:`generate`,data:{audio:t,language:`en`}})}return I(_,async e=>{e===!1&&(N(),j())}),I(l,async e=>{e&&await g()}),I([p,m],async()=>{p.value&&m.value&&await S(m.value,await d.getProviderInstance(p.value),[])}),k(()=>{P()}),b(async()=>{o.value=``}),(t,n)=>(A(),w(`div`,Le,[x(`div`,Re,[x(`div`,ze,[E(Ie,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`<md:[60%]`}),x(`div`,Be,[E(B(e),{modelValue:o.value,"onUpdate:modelValue":n[0]||=e=>o.value=e,placeholder:B(D)(`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:`primary-200/20 dark:primary-400/20`,"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:V({"transition-colors-none placeholder:transition-colors-none":B(h)}),onSubmit:M,onCompositionstart:n[1]||=e=>u.value=!0,onCompositionend:n[2]||=e=>u.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])])]))}}),He=Ve;const Ue=[`src`],We=[`src`];var Ge=g({__name:`MobileHeaderLink`,setup(e){let t=p();return(e,n)=>(A(),S(B(d),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:L(()=>[B(t)?(A(),w(`img`,{key:0,src:B(Q),"h-8":``,"w-8":``,class:`theme-colored`},null,8,Ue)):(A(),w(`img`,{key:1,src:B(Z),"h-8":``,"w-8":``,class:`theme-colored`},null,8,We))]),_:1}))}}),Ke=s(Ge,[[`__scopeId`,`data-v-9c3d67a4`]]);const qe={"mb-1":``,"w-full":``,"gap-2":``},Je={"w-full":``,flex:``,"justify-center":``};var Ye=g({__name:`MobileHeader`,setup(e){return(e,t)=>(A(),w(`header`,qe,[x(`div`,Je,[E(Ke)])]))}}),Xe=Ye;const Ze={flex:`~ col`,rounded:`lg`,"overflow-hidden":``},Qe={key:0,flex:``,mr:`12`},$e={flex:`~ col`,shadow:`md violet-200/20 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset <sm:fit`,bg:`violet-100 dark:violet-800`,"backdrop-blur-sm":``},et={flex:`~ row`,"items-center":``,"justify-between":``,"gap-2":``},tt={"text-xs":``,text:`violet-400/90 dark:violet-600/90`,"font-normal":``},nt=[`innerHTML`],rt={key:1,"i-eos-icons:three-dots-loading":``},it={key:1,flex:``,mr:`12`},at={flex:`~ col`,shadow:`md primary-200/20 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset <sm:fit`,bg:`primary-50 dark:primary-800`,"backdrop-blur-md":``},ot={text:`primary-400/90 dark:primary-600/90`,"text-xs":``,"font-normal":``,class:`inline <sm:hidden`},st=[`innerHTML`],ct={key:1,"i-eos-icons:three-dots-loading":``},lt={key:2,flex:`~`},ut={flex:`~ col`,shadow:`md cyan-200/20 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":``},dt={"text-xs":``,text:`cyan-400/90 dark:cyan-600/90`,"font-normal":``,class:`inline <sm:hidden`},ft=[`innerHTML`],pt={key:1};var mt=g({__name:`MobileChatHistory`,setup(e){let n=z(),{t:r}=t(),{messages:a}=f(q()),{process:o}=i(),{onBeforeMessageComposed:s,onTokenLiteral:c}=q();return s(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),c(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),(e,t)=>{let i=N(`auto-animate`);return A(),w(`div`,Ze,[R((A(),w(`div`,{ref_key:`chatHistoryRef`,ref:n,"max-h":`35dvh`,"z-5":``,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,class:`chat-history`},[(A(!0),w(v,null,j(B(a),(e,n)=>(A(),w(`div`,{key:n,"mb-2":``},[e.role===`error`?(A(),w(`div`,Qe,[x(`div`,$e,[x(`div`,et,[x(`div`,null,[x(`span`,tt,H(B(r)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=x(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(A(),w(`div`,{key:0,class:`markdown-content break-words`,text:`base <sm:xs`,innerHTML:B(o)(e.content)},null,8,nt)):(A(),w(`div`,rt))])])):C(``,!0),e.role===`assistant`?(A(),w(`div`,it,[x(`div`,at,[x(`div`,null,[x(`span`,ot,H(B(r)(`stage.chat.message.character-name.airi`)),1)]),e.content?(A(),w(`div`,{key:0,class:`markdown-content break-words`,text:`base <sm:xs`,innerHTML:B(o)(e.content)},null,8,st)):(A(),w(`div`,ct))])])):e.role===`user`?(A(),w(`div`,lt,[x(`div`,ut,[x(`div`,null,[x(`span`,dt,H(B(r)(`stage.chat.message.character-name.you`)),1)]),e.content?(A(),w(`div`,{key:0,class:`markdown-content break-words`,text:`base <sm:xs`,innerHTML:B(o)(e.content)},null,8,ft)):(A(),w(`div`,pt))])])):C(``,!0)]))),128))])),[[i]])])}}}),ht=s(mt,[[`__scopeId`,`data-v-07f4ba53`]]),gt=class extends Date{constructor(){super(),this.setTime(arguments.length===0?Date.now():arguments.length===1?typeof arguments[0]==`string`?+new Date(arguments[0]):arguments[0]:Date.UTC(...arguments))}getTimezoneOffset(){return 0}};const _t=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(_t.test(e)){let t=Date.prototype[e.replace(_t,`$1UTC`)];t&&(gt.prototype[e]=t)}});var vt=class extends gt{toString(){let e=this.toDateString(),t=this.toTimeString();return`${e} ${t}`}toDateString(){let e=yt.format(this),t=bt.format(this),n=this.getFullYear();return`${e} ${t} ${n}`}toTimeString(){let e=xt.format(this);return`${e} GMT+0000 (Coordinated Universal Time)`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{timeZone:`UTC`,...t})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{timeZone:`UTC`,...t})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{timeZone:`UTC`,...t})}},yt=new Intl.DateTimeFormat(`en-US`,{weekday:`short`,timeZone:`UTC`}),bt=new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,timeZone:`UTC`}),xt=new Intl.DateTimeFormat(`en-GB`,{hour12:!1,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZone:`UTC`});const St=`93d5f5adf0`,Ct=`main`,wt=`Tue Aug 12 00:06:46 2025 +0800`,Tt={"max-w":`calc[100%-2rem]`,"mx-auto":``,"h-full":``,flex:``,"flex-col":``,"pt-14":``},Et={"flex-1":``},Dt={grid:`~ cols-[70px_1fr]`,"mt-4":``,"gap-2":``,"text-sm":``},Ot={"font-mono":``},kt={"font-mono":``},At={"font-mono":``};var jt=g({__name:`About`,setup(e){let t=z(!1),n=re(new vt(wt));return(e,r)=>(A(),w(v,null,[x(`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:r[0]||=e=>t.value=!t.value},r[2]||=[x(`div`,{"i-solar:info-circle-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),E(B(l),{modelValue:t.value,"onUpdate:modelValue":r[1]||=e=>t.value=e},{default:L(()=>[x(`div`,Tt,[r[7]||=x(`div`,{"mb-14":``,"text-center":``,"text-5xl":``,"font-sans-rounded":``},[x(`span`,{text:`neutral-400 dark:neutral-100/65`},`Project`),T(),x(`span`,{text:`pink-400 dark:pink-300/90`},`AIRI`),x(`div`,{"mt-2":``,"text-base":``},` Web ver. `)],-1),x(`div`,Et,[r[6]||=x(`div`,{text:`neutral-500 dark:neutral-400`},` Application build information `,-1),x(`div`,Dt,[r[3]||=x(`div`,{text:`neutral-500 dark:neutral-400`},` Branch `,-1),x(`div`,Ot,H(B(Ct)),1),r[4]||=x(`div`,{text:`neutral-500 dark:neutral-400`},` Commit `,-1),x(`div`,kt,H(B(St).substring(0,7)),1),r[5]||=x(`div`,{text:`neutral-500 dark:neutral-400`},` Built on `,-1),x(`div`,At,H(B(n)),1)])]),r[8]||=x(`div`,{"my-10":``},[x(`div`,{text:`neutral-500 dark:neutral-400`},` About `),x(`div`,{"mt-4":``,flex:``,"flex-col":``,"gap-2":``},[x(`a`,{class:V([`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`},[x(`div`,{"i-solar:home-smile-outline":``}),x(`div`,null,`Home`)]),x(`a`,{href:`https://airi.moeru.ai/docs/en/docs/overview/`,class:V([`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`},[x(`div`,{"i-solar:document-add-outline":``}),x(`div`,null,`Documentations`)]),x(`a`,{href:`https://github.com/moeru-ai/airi`,class:V([`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`},[x(`div`,{"i-simple-icons:github":``}),x(`div`,null,`GitHub`)])])],-1)])]),_:1},8,[`modelValue`])],64))}}),Mt=jt;const Nt={"w-full":``,flex:``,"flex-1":``,"items-center":``,"self-end":``,"justify-end":``,"gap-2":``},Pt={key:0,"w-full":``,flex:``,"justify-between":``,"gap-2":``},Ft={key:0,"i-solar:tuning-outline":``,"size-5":``},It={key:1,"i-solar:alt-arrow-right-outline":``,"size-5":``};var Lt=g({__name:`ViewControls`,props:{modelValue:{required:!0},modelModifiers:{}},emits:D([`reset`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,{stageView:r,stageViewControlsEnabled:i}=f(W()),a=P(e,`modelValue`);function o(e){if(a.value===e){n(`reset`);return}a.value=e}return(e,t)=>(A(),w(`div`,Nt,[E(_,{name:`fade`},{default:L(()=>[B(i)?(A(),w(`div`,Pt,[E(B(u),{variant:`secondary-muted`,toggled:a.value===`x`,"w-full":``,onClick:t[0]||=e=>o(`x`)},{default:L(()=>t[5]||=[T(` X `,-1)]),_:1,__:[5]},8,[`toggled`]),E(B(u),{variant:`secondary-muted`,toggled:a.value===`y`,"w-full":``,onClick:t[1]||=e=>o(`y`)},{default:L(()=>t[6]||=[T(` Y `,-1)]),_:1,__:[6]},8,[`toggled`]),B(r)===`3d`?(A(),S(B(u),{key:0,variant:`secondary-muted`,toggled:a.value===`z`,"w-full":``,onClick:t[2]||=e=>o(`z`)},{default:L(()=>t[7]||=[T(` Z `,-1)]),_:1,__:[7]},8,[`toggled`])):C(``,!0),E(B(u),{variant:`secondary-muted`,toggled:a.value===`scale`,"w-full":``,onClick:t[3]||=e=>o(`scale`)},{default:L(()=>t[8]||=[T(` Scale `,-1)]),_:1,__:[8]},8,[`toggled`])])):C(``,!0)]),_:1}),x(`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=>i.value=!B(i)},[E(_,{name:`fade`,mode:`out-in`},{default:L(()=>[B(i)?(A(),w(`div`,It)):(A(),w(`div`,Ft))]),_:1})])]))}}),Rt=s(Lt,[[`__scopeId`,`data-v-35df7db7`]]);const zt={key:0},Bt={key:0,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Vt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Ht={key:1,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Ut={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Wt={key:2,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Gt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Kt={key:3,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},qt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`};var Jt=g({__name:`Inputs`,props:{mode:{}},setup(e,{expose:t}){let n=e,{stageView:r,stageViewControlsEnabled:i}=f(W()),{scale:a,modelOffset:s,modelSize:c}=f(U()),{scale:l,position:u}=f(K()),d=b({get:()=>{switch(r.value){case`2d`:return u.value.x;case`3d`:return s.value.x;default:return 0}},set:e=>{switch(r.value){case`2d`:u.value.x=e;break;case`3d`:s.value.x=e;break;default:break}}}),p=b(()=>r.value===`2d`?-500:-c.value.x-10),m=b(()=>r.value===`2d`?500:c.value.x+10),h=b({get:()=>{switch(r.value){case`2d`:return u.value.y;case`3d`:return s.value.y;default:return 0}},set:e=>{switch(r.value){case`2d`:u.value.y=e;break;case`3d`:s.value.y=e;break;default:break}}}),g=b(()=>r.value===`2d`?-500:-c.value.y-10),v=b(()=>r.value===`2d`?500:c.value.y+10),y=b({get:()=>{switch(r.value){case`2d`:return 0;case`3d`:return s.value.z;default:return 0}},set:e=>{switch(r.value){case`2d`:break;case`3d`:s.value.z=e;break;default:break}}}),T=b(()=>r.value===`2d`?-500:-c.value.z-10),D=b(()=>r.value===`2d`?500:c.value.z+10),O=b({get:()=>r.value===`2d`?l.value:a.value,set:e=>{r.value===`2d`?l.value=e:a.value=e}});function k(){switch(n.mode){case`x`:d.value=0;break;case`y`:h.value=0;break;case`z`:y.value=0;break;case`scale`:O.value=1;break}}return t({resetOnMode:k}),(e,t)=>(A(),S(_,{name:`fade-side-pops-in`},{default:L(()=>[B(i)?(A(),w(`div`,zt,[E(_,{name:`fade-side-pops-in`,mode:`out-in`},{default:L(()=>[n.mode===`x`?(A(),w(`div`,Bt,[E(B(o),{modelValue:d.value,"onUpdate:modelValue":t[0]||=e=>d.value=e,min:p.value,max:m.value,step:.01,"data-direction":`vertical`,h:`50%`,"write-vertical-left":``},null,8,[`modelValue`,`min`,`max`]),x(`div`,Vt,H(d.value.toFixed(2)),1)])):n.mode===`y`?(A(),w(`div`,Ht,[E(B(o),{modelValue:h.value,"onUpdate:modelValue":t[1]||=e=>h.value=e,min:g.value,max:v.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),x(`div`,Ut,H(h.value.toFixed(2)),1)])):B(r)===`3d`&&n.mode===`z`?(A(),w(`div`,Wt,[E(B(o),{modelValue:y.value,"onUpdate:modelValue":t[2]||=e=>y.value=e,min:T.value,max:D.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),x(`div`,Gt,H(y.value.toFixed(2)),1)])):n.mode===`scale`?(A(),w(`div`,Kt,[E(B(o),{modelValue:O.value,"onUpdate:modelValue":t[3]||=e=>O.value=e,min:0,max:3,step:1e-4,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`]),x(`div`,qt,H(O.value.toFixed(2)),1)])):C(``,!0)]),_:1})])):C(``,!0)]),_:1}))}}),Yt=s(Jt,[[`__scopeId`,`data-v-225b2747`]]);const Xt={fixed:``,"bottom-0":``,"w-full":``,flex:``,"flex-col":``},Zt={relative:``,"w-full":``,"self-end":``},Qt={top:`50%`,"translate-y":`[-50%]`,fixed:``,"z-15":``,"px-3":``},$t={"translate-y":`[-100%]`,absolute:``,"right-0":``,"w-full":``,"px-3":``,"pb-3":``,"font-sans":``},en={flex:`~ col`,"w-full":``,"gap-1":``},tn={key:0,"i-solar:moon-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},nn={key:1,"i-solar:sun-2-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},rn={key:0,"size-5":``,text:`neutral-500 dark:neutral-400`,"inline-flex":``,"items-center":``,"justify-center":``},an={key:1,"size-5":``,text:`neutral-500 dark:neutral-400`,"inline-flex":``,"items-center":``,"justify-center":``};var on=g({__name:`MobileInteractiveArea`,setup(n){let i=p({disableTransition:!1}),a=z(`scale`),o=F(`viewControlsInputs`),s=z(``),c=z(!1),l=z(!1),u=h(),g=Y(),{activeProvider:v,activeModel:b}=f(J());m(document.documentElement,()=>u.update());let{themeColorsHueDynamic:T,stageView:D,stageViewControlsEnabled:O}=f(W()),{enabled:j,selectedAudioInput:M}=f(G()),{send:N,onAfterMessageComposed:P,discoverToolsCompatibility:R}=q(),{messages:H}=f(q()),{t:U}=t();async function K(){if(!(!s.value.trim()||l.value))try{let e=g.getProviderConfig(v.value);await N(s.value,{chatProvider:await g.getProviderInstance(v.value),model:b.value,providerConfig:e})}catch(e){H.value.pop(),H.value.push({role:`error`,content:e.message})}}let{destroy:X,start:Z}=r(M,{onSpeechStart:()=>{c.value=!0},onVADMisfire:()=>{c.value=!1},onSpeechEnd:e=>{c.value=!1,Q(e)},auto:!1});function Q(e){alert(`Transcription is not implemented yet`)}return I(j,async e=>{e===!1&&X()}),P(async()=>{s.value=``}),I([v,b],async()=>{v.value&&b.value&&await R(b.value,await g.getProviderInstance(v.value),[])}),k(()=>{Z(),u.update()}),(t,n)=>(A(),w(`div`,Xt,[(A(),S(y,null,[E(_,{name:`fade`},{default:L(()=>[B(O)?C(``,!0):(A(),S(ht,{key:0,"max-w":`[calc(100%-3.5rem)]`,"w-full":``,"self-start":``,"pl-3":``}))]),_:1})],1024)),x(`div`,Zt,[x(`div`,Qt,[E(Yt,{ref:`viewControlsInputs`,mode:a.value},null,8,[`mode`])]),x(`div`,$t,[x(`div`,en,[E(Mt),x(`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:n[0]||=e=>i.value=!B(i)},[E(_,{name:`fade`,mode:`out-in`},{default:L(()=>[B(i)?(A(),w(`div`,tn)):(A(),w(`div`,nn))]),_:1})]),E(B(d),{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:L(()=>n[7]||=[x(`div`,{"i-solar:settings-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),_:1,__:[7]}),x(`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:`Stage View`,onClick:n[1]||=e=>D.value=B(D)===`2d`?`3d`:`2d`},[B(D)===`2d`?(A(),w(`div`,rn,n[8]||=[x(`span`,null,`2D`,-1)])):C(``,!0),B(D)===`3d`?(A(),w(`div`,an,n[9]||=[x(`span`,null,`3D`,-1)])):C(``,!0)]),E(Rt,{modelValue:a.value,"onUpdate:modelValue":n[2]||=e=>a.value=e,onReset:n[3]||=()=>o.value?.resetOnMode()},null,8,[`modelValue`])])]),x(`div`,{bg:`white dark:neutral-800`,"max-h-100dvh":``,"max-w-100dvw":``,"w-full":``,flex:``,"gap-1":``,"overflow-auto":``,"px-3":``,"pt-2":``,style:ee({paddingBottom:`${Math.max(Number.parseFloat(B(u).bottom.value.replace(`px`,``)),12)}px`})},[E(B(e),{modelValue:s.value,"onUpdate:modelValue":n[4]||=e=>s.value=e,placeholder:B(U)(`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:V([B(T)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:()=>{},onCompositionstart:n[5]||=e=>l.value=!0,onCompositionend:n[6]||=e=>l.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),s.value.trim()||l.value?(A(),w(`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:K},n[10]||=[x(`div`,{"i-solar:arrow-up-outline":``},null,-1)])):C(``,!0)],4)])]))}}),sn=on;const cn={class:`relative`},ln={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var un=g({__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=z(t.height),r=z(t.amplitude),i=z(t.waveLength),a=z(t.fillColor),o=z(t.direction),s=z(t.movementDirection);function c(e,t,n,r,i){let a=[],o=Math.ceil(e/r),s=o*r,c=1,l=i===`up`?n:t-n;a.push(`M 0 ${l}`);let u=Math.PI*2/r;for(let e=0;e<=s;e+=c){let t=n*Math.sin(u*e),r=i===`up`?l-t:l+t;a.push(`L ${e} ${r}`)}let d=i===`up`?t:0;return a.push(`L ${s} ${d}`),a.push(`L 0 ${d} Z`),a.join(` `)}let l=b(()=>n.value+r.value*2),u=b(()=>{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 I(()=>[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}),(e,t)=>(A(),
|
|
|
1 |
+
import{b as e}from"./Basic-i6dKFYXW.js";import{B as t,bU as n,c7 as r,c8 as i,cM as a,cR as o,ca as s,cd as c,cf as l,ck as u,d7 as d,dc as f,dg as p,do as m,dp as h,e$ as g,eQ as _,eW as v,eX as y,eZ as b,e_ as x,f0 as S,f1 as C,f2 as w,f3 as T,f4 as E,f7 as D,f9 as O,fa as k,fc as A,fe as j,ff as M,fh as N,fi as P,fj as F,fk as I,fm as L,fn as R,fp as z,ft as B,fu as V,fw as ee,fx as H,n as U,p as W,q as G,r as K,t as q,y as J,z as Y}from"./index-_PXww5qh.js";import{b as X,c as Z,d as Q}from"./HeaderLink-lBHYTbjo.js";import{d as $,e as te,f as ne}from"./Scenes-NPrm1JTa.js";function re(e,t){let n=ne(e,t?.in);if(!te(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),r=$(n.getFullYear(),4);a=`${r}${o}${t}${o}${e}`}if(i!==`date`){let e=$(n.getHours(),2),t=$(n.getMinutes(),2),r=$(n.getSeconds(),2),i=a===``?``:` `;a=`${a}${i}${e}${s}${t}${s}${r}`}return a}const ie={},ae={class:`cross-background-container`};function oe(e,t){return A(),C(`div`,ae,[M(e.$slots,`default`,{},void 0,!0)])}var se=o(ie,[[`render`,oe],[`__scopeId`,`data-v-455eb62c`]]);const ce={"mb-1":``,"w-full":``,"gap-2":``},le={"w-full":``};var ue=E({__name:`Header`,setup(e){return(e,t)=>(A(),C(`header`,ce,[x(`div`,le,[T(X)]),T(B(d),{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:L(()=>t[0]||=[x(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),de=ue,fe=`/assets/worker-_4r9VDQB.js`;const pe={relative:``,px:`<sm:2`,py:`<sm:2`,flex:`~ col`,rounded:`lg`,"overflow-hidden":``},me={key:0,flex:``,mr:`12`},he={flex:`~ col`,border:`2 solid violet-200/50 dark:violet-500/50`,shadow:`md violet-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,bg:`<md:violet-500/25`},ge={flex:`~ row`,"gap-2":``},_e={"flex-1":``},ve={"text-xs":``,text:`violet-400/90 dark:violet-600/90`,"font-normal":``,class:`inline <sm:hidden`},ye={key:0,"i-eos-icons:three-dots-loading":``},be=[`innerHTML`],xe={key:1,flex:``,mr:`12`},Se={flex:`~ col`,border:`2 solid primary-200/50 dark:primary-500/50`,shadow:`md primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,h:`unset <sm:fit`,bg:`<md:primary-500/25`},Ce={"text-xs":``,text:`primary-400/90 dark:primary-600/90`,"font-normal":``,class:`inline <sm:hidden`},we={key:0,class:`markdown-content break-words`,text:`xs primary-400`},Te={key:0},Ee={p:`1`,border:`1 solid primary-200`,"rounded-lg":``,m:`y-1`,bg:`primary-100`},De={key:1},Oe=[`innerHTML`],ke={key:1,"i-eos-icons:three-dots-loading":``},Ae={key:2,flex:`~ row-reverse`,ml:`12`},je={flex:`~ col`,border:`2 solid cyan-200/50 dark:cyan-500/50`,shadow:`md cyan-200/50 dark:none`,px:`2`,h:`unset <sm:fit`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,bg:`<md:cyan-500/25`},Me={"text-xs":``,text:`cyan-400/90 dark:cyan-600/90`,"font-normal":``,class:`inline <sm:hidden`},Ne=[`innerHTML`],Pe={key:1};var Fe=E({__name:`ChatHistory`,setup(e){let n=z(),{t:r}=t(),{messages:a,sending:o}=f(q()),{process:s}=i(),{onBeforeMessageComposed:c,onTokenLiteral:l}=q();return c(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),l(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),(e,t)=>{let i=N(`auto-animate`);return A(),C(`div`,pe,[t[3]||=x(`div`,{"flex-1":``},null,-1),R((A(),C(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[t[2]||=x(`div`,{"flex-1":``},null,-1),(A(!0),C(v,null,j(B(a),(e,n)=>(A(),C(`div`,{key:n,"mb-2":``},[e.role===`error`?(A(),C(`div`,me,[x(`div`,he,[x(`div`,ge,[x(`div`,_e,[x(`span`,ve,H(B(r)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=x(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),B(o)&&n===B(a).length-1?(A(),C(`div`,ye)):(A(),C(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base <sm:xs`,innerHTML:B(s)(e.content)},null,8,be))])])):S(``,!0),e.role===`assistant`?(A(),C(`div`,xe,[x(`div`,Se,[x(`div`,null,[x(`span`,Ce,H(B(r)(`stage.chat.message.character-name.airi`)),1)]),e.content?(A(),C(`div`,we,[(A(!0),C(v,null,j(e.slices,(e,n)=>(A(),C(`div`,{key:n},[e.type===`tool-call`?(A(),C(`div`,Te,[x(`div`,Ee,[t[1]||=w(` Called: `,-1),x(`code`,null,H(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(A(),C(`div`,De)):(A(),C(`div`,{key:2,innerHTML:B(s)(e.text)},null,8,Oe))]))),128))])):n===B(a).length-1&&!e.content?(A(),C(`div`,ke)):S(``,!0)])])):e.role===`user`?(A(),C(`div`,Ae,[x(`div`,je,[x(`div`,null,[x(`span`,Me,H(B(r)(`stage.chat.message.character-name.you`)),1)]),e.content?(A(),C(`div`,{key:0,class:`markdown-content break-words`,text:`base <sm:xs`,innerHTML:B(s)(e.content)},null,8,Ne)):(A(),C(`div`,Pe))])])):S(``,!0)]))),128))])),[[i]])])}}}),Ie=Fe;const Le={flex:`col`,"items-center":``,"pt-4":``},Re={"h-full":``,"max-h":`[85vh]`,"w-full":``,py:`4`},ze={flex:`~ col`,border:`solid 4 primary-200/20 dark:primary-400/20`,"h-full":``,"w-full":``,"overflow-scroll":``,"rounded-xl":``,bg:`primary-50/50 dark:primary-950/70`,"backdrop-blur-md":``},Be={h:`<md:full`,flex:``,"gap-2":``};var Ve=E({__name:`InteractiveArea`,setup(i){let a=z(``),o=z(!1),l=z(!1),u=z(!1),d=Y(),{activeProvider:p,activeModel:m}=f(J()),{themeColorsHueDynamic:h}=f(W()),{askPermission:g}=G(),{enabled:_,selectedAudioInput:v}=f(G()),{send:y,onAfterMessageComposed:b,discoverToolsCompatibility:S}=q(),{messages:w}=f(q()),{audioContext:E}=c(),{t:D}=t(),{transcribe:O,terminate:j}=n(fe,{onComplete:async e=>{if(!e||!e.trim())return;let t=d.getProviderConfig(p.value);await y(e,{chatProvider:await d.getProviderInstance(p.value),model:m.value,providerConfig:t})}});async function M(){if(!(!a.value.trim()||u.value))try{let e=d.getProviderConfig(p.value);await y(a.value,{chatProvider:await d.getProviderInstance(p.value),model:m.value,providerConfig:e})}catch(e){w.value.pop(),w.value.push({role:`error`,content:e.message})}}let{destroy:N,start:P}=r(v,{onSpeechStart:()=>{o.value=!0},onVADMisfire:()=>{o.value=!1},onSpeechEnd:e=>{o.value=!1,F(e.buffer)},auto:!1});async function F(e){await E.resume();let t=await s(e,E.sampleRate);O({type:`generate`,data:{audio:t,language:`en`}})}return I(_,async e=>{e===!1&&(N(),j())}),I(l,async e=>{e&&await g()}),I([p,m],async()=>{p.value&&m.value&&await S(m.value,await d.getProviderInstance(p.value),[])}),k(()=>{P()}),b(async()=>{a.value=``}),(t,n)=>(A(),C(`div`,Le,[x(`div`,Re,[x(`div`,ze,[T(Ie,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`<md:[60%]`}),x(`div`,Be,[T(B(e),{modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e,placeholder:B(D)(`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:`primary-200/20 dark:primary-400/20`,"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:V({"transition-colors-none placeholder:transition-colors-none":B(h)}),onSubmit:M,onCompositionstart:n[1]||=e=>u.value=!0,onCompositionend:n[2]||=e=>u.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])])]))}}),He=Ve;const Ue=[`src`],We=[`src`];var Ge=E({__name:`MobileHeaderLink`,setup(e){let t=p();return(e,n)=>(A(),g(B(d),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:L(()=>[B(t)?(A(),C(`img`,{key:0,src:B(Q),"h-8":``,"w-8":``,class:`theme-colored`},null,8,Ue)):(A(),C(`img`,{key:1,src:B(Z),"h-8":``,"w-8":``,class:`theme-colored`},null,8,We))]),_:1}))}}),Ke=o(Ge,[[`__scopeId`,`data-v-9c3d67a4`]]);const qe={"mb-1":``,"w-full":``,"gap-2":``},Je={"w-full":``,flex:``,"justify-center":``};var Ye=E({__name:`MobileHeader`,setup(e){return(e,t)=>(A(),C(`header`,qe,[x(`div`,Je,[T(Ke)])]))}}),Xe=Ye;const Ze={flex:`~ col`,rounded:`lg`,"overflow-hidden":``},Qe={key:0,flex:``,mr:`12`},$e={flex:`~ col`,shadow:`md violet-200/20 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset <sm:fit`,bg:`violet-100 dark:violet-800`,"backdrop-blur-sm":``},et={flex:`~ row`,"items-center":``,"justify-between":``,"gap-2":``},tt={"text-xs":``,text:`violet-400/90 dark:violet-600/90`,"font-normal":``},nt=[`innerHTML`],rt={key:1,"i-eos-icons:three-dots-loading":``},it={key:1,flex:``,mr:`12`},at={flex:`~ col`,shadow:`md primary-200/20 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset <sm:fit`,bg:`primary-50 dark:primary-800`,"backdrop-blur-md":``},ot={text:`primary-400/90 dark:primary-600/90`,"text-xs":``,"font-normal":``,class:`inline <sm:hidden`},st=[`innerHTML`],ct={key:1,"i-eos-icons:three-dots-loading":``},lt={key:2,flex:`~`},ut={flex:`~ col`,shadow:`md cyan-200/20 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":``},dt={"text-xs":``,text:`cyan-400/90 dark:cyan-600/90`,"font-normal":``,class:`inline <sm:hidden`},ft=[`innerHTML`],pt={key:1};var mt=E({__name:`MobileChatHistory`,setup(e){let n=z(),{t:r}=t(),{messages:a}=f(q()),{process:o}=i(),{onBeforeMessageComposed:s,onTokenLiteral:c}=q();return s(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),c(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),(e,t)=>{let i=N(`auto-animate`);return A(),C(`div`,Ze,[R((A(),C(`div`,{ref_key:`chatHistoryRef`,ref:n,"max-h":`35dvh`,"z-5":``,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,class:`chat-history`},[(A(!0),C(v,null,j(B(a),(e,n)=>(A(),C(`div`,{key:n,"mb-2":``},[e.role===`error`?(A(),C(`div`,Qe,[x(`div`,$e,[x(`div`,et,[x(`div`,null,[x(`span`,tt,H(B(r)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=x(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(A(),C(`div`,{key:0,class:`markdown-content break-words`,text:`base <sm:xs`,innerHTML:B(o)(e.content)},null,8,nt)):(A(),C(`div`,rt))])])):S(``,!0),e.role===`assistant`?(A(),C(`div`,it,[x(`div`,at,[x(`div`,null,[x(`span`,ot,H(B(r)(`stage.chat.message.character-name.airi`)),1)]),e.content?(A(),C(`div`,{key:0,class:`markdown-content break-words`,text:`base <sm:xs`,innerHTML:B(o)(e.content)},null,8,st)):(A(),C(`div`,ct))])])):e.role===`user`?(A(),C(`div`,lt,[x(`div`,ut,[x(`div`,null,[x(`span`,dt,H(B(r)(`stage.chat.message.character-name.you`)),1)]),e.content?(A(),C(`div`,{key:0,class:`markdown-content break-words`,text:`base <sm:xs`,innerHTML:B(o)(e.content)},null,8,ft)):(A(),C(`div`,pt))])])):S(``,!0)]))),128))])),[[i]])])}}}),ht=o(mt,[[`__scopeId`,`data-v-07f4ba53`]]),gt=class extends Date{constructor(){super(),this.setTime(arguments.length===0?Date.now():arguments.length===1?typeof arguments[0]==`string`?+new Date(arguments[0]):arguments[0]:Date.UTC(...arguments))}getTimezoneOffset(){return 0}};const _t=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(_t.test(e)){let t=Date.prototype[e.replace(_t,`$1UTC`)];t&&(gt.prototype[e]=t)}});var vt=class extends gt{toString(){let e=this.toDateString(),t=this.toTimeString();return`${e} ${t}`}toDateString(){let e=yt.format(this),t=bt.format(this),n=this.getFullYear();return`${e} ${t} ${n}`}toTimeString(){let e=xt.format(this);return`${e} GMT+0000 (Coordinated Universal Time)`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{timeZone:`UTC`,...t})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{timeZone:`UTC`,...t})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{timeZone:`UTC`,...t})}},yt=new Intl.DateTimeFormat(`en-US`,{weekday:`short`,timeZone:`UTC`}),bt=new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,timeZone:`UTC`}),xt=new Intl.DateTimeFormat(`en-GB`,{hour12:!1,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZone:`UTC`});const St=`4fb878e78a`,Ct=`main`,wt=`Sat Aug 16 22:24:37 2025 +0800`,Tt={"max-w":`calc[100%-2rem]`,"mx-auto":``,"h-full":``,flex:``,"flex-col":``,"pt-14":``},Et={"flex-1":``},Dt={grid:`~ cols-[70px_1fr]`,"mt-4":``,"gap-2":``,"text-sm":``},Ot={"font-mono":``},kt={"font-mono":``},At={"font-mono":``};var jt=E({__name:`About`,setup(e){let t=z(!1),n=re(new vt(wt));return(e,r)=>(A(),C(v,null,[x(`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:r[0]||=e=>t.value=!t.value},r[2]||=[x(`div`,{"i-solar:info-circle-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),T(B(l),{modelValue:t.value,"onUpdate:modelValue":r[1]||=e=>t.value=e},{default:L(()=>[x(`div`,Tt,[r[7]||=x(`div`,{"mb-14":``,"text-center":``,"text-5xl":``,"font-sans-rounded":``},[x(`span`,{text:`neutral-400 dark:neutral-100/65`},`Project`),w(),x(`span`,{text:`pink-400 dark:pink-300/90`},`AIRI`),x(`div`,{"mt-2":``,"text-base":``},` Web ver. `)],-1),x(`div`,Et,[r[6]||=x(`div`,{text:`neutral-500 dark:neutral-400`},` Application build information `,-1),x(`div`,Dt,[r[3]||=x(`div`,{text:`neutral-500 dark:neutral-400`},` Branch `,-1),x(`div`,Ot,H(B(Ct)),1),r[4]||=x(`div`,{text:`neutral-500 dark:neutral-400`},` Commit `,-1),x(`div`,kt,H(B(St).substring(0,7)),1),r[5]||=x(`div`,{text:`neutral-500 dark:neutral-400`},` Built on `,-1),x(`div`,At,H(B(n)),1)])]),r[8]||=x(`div`,{"my-10":``},[x(`div`,{text:`neutral-500 dark:neutral-400`},` About `),x(`div`,{"mt-4":``,flex:``,"flex-col":``,"gap-2":``},[x(`a`,{class:V([`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`},[x(`div`,{"i-solar:home-smile-outline":``}),x(`div`,null,`Home`)]),x(`a`,{href:`https://airi.moeru.ai/docs/en/docs/overview/`,class:V([`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`},[x(`div`,{"i-solar:document-add-outline":``}),x(`div`,null,`Documentations`)]),x(`a`,{href:`https://github.com/moeru-ai/airi`,class:V([`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`},[x(`div`,{"i-simple-icons:github":``}),x(`div`,null,`GitHub`)])])],-1)])]),_:1},8,[`modelValue`])],64))}}),Mt=jt;const Nt={"w-full":``,flex:``,"flex-1":``,"items-center":``,"self-end":``,"justify-end":``,"gap-2":``},Pt={key:0,"w-full":``,flex:``,"justify-between":``,"gap-2":``},Ft={key:0,"i-solar:tuning-outline":``,"size-5":``},It={key:1,"i-solar:alt-arrow-right-outline":``,"size-5":``};var Lt=E({__name:`ViewControls`,props:{modelValue:{required:!0},modelModifiers:{}},emits:D([`reset`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,{stageView:r,stageViewControlsEnabled:i}=f(W()),a=P(e,`modelValue`);function o(e){if(a.value===e){n(`reset`);return}a.value=e}return(e,t)=>(A(),C(`div`,Nt,[T(_,{name:`fade`},{default:L(()=>[B(i)?(A(),C(`div`,Pt,[T(B(u),{variant:`secondary-muted`,toggled:a.value===`x`,"w-full":``,onClick:t[0]||=e=>o(`x`)},{default:L(()=>t[5]||=[w(` X `,-1)]),_:1,__:[5]},8,[`toggled`]),T(B(u),{variant:`secondary-muted`,toggled:a.value===`y`,"w-full":``,onClick:t[1]||=e=>o(`y`)},{default:L(()=>t[6]||=[w(` Y `,-1)]),_:1,__:[6]},8,[`toggled`]),B(r)===`3d`?(A(),g(B(u),{key:0,variant:`secondary-muted`,toggled:a.value===`z`,"w-full":``,onClick:t[2]||=e=>o(`z`)},{default:L(()=>t[7]||=[w(` Z `,-1)]),_:1,__:[7]},8,[`toggled`])):S(``,!0),T(B(u),{variant:`secondary-muted`,toggled:a.value===`scale`,"w-full":``,onClick:t[3]||=e=>o(`scale`)},{default:L(()=>t[8]||=[w(` Scale `,-1)]),_:1,__:[8]},8,[`toggled`])])):S(``,!0)]),_:1}),x(`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=>i.value=!B(i)},[T(_,{name:`fade`,mode:`out-in`},{default:L(()=>[B(i)?(A(),C(`div`,It)):(A(),C(`div`,Ft))]),_:1})])]))}}),Rt=o(Lt,[[`__scopeId`,`data-v-35df7db7`]]);const zt={key:0},Bt={key:0,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Vt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Ht={key:1,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Ut={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Wt={key:2,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Gt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Kt={key:3,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},qt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`};var Jt=E({__name:`Inputs`,props:{mode:{}},setup(e,{expose:t}){let n=e,{stageView:r,stageViewControlsEnabled:i}=f(W()),{scale:o,modelOffset:s,modelSize:c}=f(U()),{scale:l,position:u}=f(K()),d=b({get:()=>{switch(r.value){case`2d`:return u.value.x;case`3d`:return s.value.x;default:return 0}},set:e=>{switch(r.value){case`2d`:u.value.x=e;break;case`3d`:s.value.x=e;break;default:break}}}),p=b(()=>r.value===`2d`?-500:-c.value.x-10),m=b(()=>r.value===`2d`?500:c.value.x+10),h=b({get:()=>{switch(r.value){case`2d`:return u.value.y;case`3d`:return s.value.y;default:return 0}},set:e=>{switch(r.value){case`2d`:u.value.y=e;break;case`3d`:s.value.y=e;break;default:break}}}),v=b(()=>r.value===`2d`?-500:-c.value.y-10),y=b(()=>r.value===`2d`?500:c.value.y+10),w=b({get:()=>{switch(r.value){case`2d`:return 0;case`3d`:return s.value.z;default:return 0}},set:e=>{switch(r.value){case`2d`:break;case`3d`:s.value.z=e;break;default:break}}}),E=b(()=>r.value===`2d`?-500:-c.value.z-10),D=b(()=>r.value===`2d`?500:c.value.z+10),O=b({get:()=>r.value===`2d`?l.value:o.value,set:e=>{r.value===`2d`?l.value=e:o.value=e}});function k(){switch(n.mode){case`x`:d.value=0;break;case`y`:h.value=0;break;case`z`:w.value=0;break;case`scale`:O.value=1;break}}return t({resetOnMode:k}),(e,t)=>(A(),g(_,{name:`fade-side-pops-in`},{default:L(()=>[B(i)?(A(),C(`div`,zt,[T(_,{name:`fade-side-pops-in`,mode:`out-in`},{default:L(()=>[n.mode===`x`?(A(),C(`div`,Bt,[T(B(a),{modelValue:d.value,"onUpdate:modelValue":t[0]||=e=>d.value=e,min:p.value,max:m.value,step:.01,"data-direction":`vertical`,h:`50%`,"write-vertical-left":``},null,8,[`modelValue`,`min`,`max`]),x(`div`,Vt,H(d.value.toFixed(2)),1)])):n.mode===`y`?(A(),C(`div`,Ht,[T(B(a),{modelValue:h.value,"onUpdate:modelValue":t[1]||=e=>h.value=e,min:v.value,max:y.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),x(`div`,Ut,H(h.value.toFixed(2)),1)])):B(r)===`3d`&&n.mode===`z`?(A(),C(`div`,Wt,[T(B(a),{modelValue:w.value,"onUpdate:modelValue":t[2]||=e=>w.value=e,min:E.value,max:D.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),x(`div`,Gt,H(w.value.toFixed(2)),1)])):n.mode===`scale`?(A(),C(`div`,Kt,[T(B(a),{modelValue:O.value,"onUpdate:modelValue":t[3]||=e=>O.value=e,min:0,max:3,step:1e-4,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`]),x(`div`,qt,H(O.value.toFixed(2)),1)])):S(``,!0)]),_:1})])):S(``,!0)]),_:1}))}}),Yt=o(Jt,[[`__scopeId`,`data-v-225b2747`]]);const Xt={fixed:``,"bottom-0":``,"w-full":``,flex:``,"flex-col":``},Zt={relative:``,"w-full":``,"self-end":``},Qt={top:`50%`,"translate-y":`[-50%]`,fixed:``,"z-15":``,"px-3":``},$t={"translate-y":`[-100%]`,absolute:``,"right-0":``,"w-full":``,"px-3":``,"pb-3":``,"font-sans":``},en={flex:`~ col`,"w-full":``,"gap-1":``},tn={key:0,"i-solar:moon-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},nn={key:1,"i-solar:sun-2-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},rn={key:0,"size-5":``,text:`neutral-500 dark:neutral-400`,"inline-flex":``,"items-center":``,"justify-center":``},an={key:1,"size-5":``,text:`neutral-500 dark:neutral-400`,"inline-flex":``,"items-center":``,"justify-center":``};var on=E({__name:`MobileInteractiveArea`,setup(n){let i=p({disableTransition:!1}),a=z(`scale`),o=F(`viewControlsInputs`),s=z(``),c=z(!1),l=z(!1),u=h(),v=Y(),{activeProvider:b,activeModel:w}=f(J());m(document.documentElement,()=>u.update());let{themeColorsHueDynamic:E,stageView:D,stageViewControlsEnabled:O}=f(W()),{enabled:j,selectedAudioInput:M}=f(G()),{send:N,onAfterMessageComposed:P,discoverToolsCompatibility:R}=q(),{messages:H}=f(q()),{t:U}=t();async function K(){if(!(!s.value.trim()||l.value))try{let e=v.getProviderConfig(b.value);await N(s.value,{chatProvider:await v.getProviderInstance(b.value),model:w.value,providerConfig:e})}catch(e){H.value.pop(),H.value.push({role:`error`,content:e.message})}}let{destroy:X,start:Z}=r(M,{onSpeechStart:()=>{c.value=!0},onVADMisfire:()=>{c.value=!1},onSpeechEnd:e=>{c.value=!1,Q(e)},auto:!1});function Q(e){alert(`Transcription is not implemented yet`)}return I(j,async e=>{e===!1&&X()}),P(async()=>{s.value=``}),I([b,w],async()=>{b.value&&w.value&&await R(w.value,await v.getProviderInstance(b.value),[])}),k(()=>{Z(),u.update()}),(t,n)=>(A(),C(`div`,Xt,[(A(),g(y,null,[T(_,{name:`fade`},{default:L(()=>[B(O)?S(``,!0):(A(),g(ht,{key:0,"max-w":`[calc(100%-3.5rem)]`,"w-full":``,"self-start":``,"pl-3":``}))]),_:1})],1024)),x(`div`,Zt,[x(`div`,Qt,[T(Yt,{ref:`viewControlsInputs`,mode:a.value},null,8,[`mode`])]),x(`div`,$t,[x(`div`,en,[T(Mt),x(`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:n[0]||=e=>i.value=!B(i)},[T(_,{name:`fade`,mode:`out-in`},{default:L(()=>[B(i)?(A(),C(`div`,tn)):(A(),C(`div`,nn))]),_:1})]),T(B(d),{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:L(()=>n[7]||=[x(`div`,{"i-solar:settings-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),_:1,__:[7]}),x(`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:`Stage View`,onClick:n[1]||=e=>D.value=B(D)===`2d`?`3d`:`2d`},[B(D)===`2d`?(A(),C(`div`,rn,n[8]||=[x(`span`,null,`2D`,-1)])):S(``,!0),B(D)===`3d`?(A(),C(`div`,an,n[9]||=[x(`span`,null,`3D`,-1)])):S(``,!0)]),T(Rt,{modelValue:a.value,"onUpdate:modelValue":n[2]||=e=>a.value=e,onReset:n[3]||=()=>o.value?.resetOnMode()},null,8,[`modelValue`])])]),x(`div`,{bg:`white dark:neutral-800`,"max-h-100dvh":``,"max-w-100dvw":``,"w-full":``,flex:``,"gap-1":``,"overflow-auto":``,"px-3":``,"pt-2":``,style:ee({paddingBottom:`${Math.max(Number.parseFloat(B(u).bottom.value.replace(`px`,``)),12)}px`})},[T(B(e),{modelValue:s.value,"onUpdate:modelValue":n[4]||=e=>s.value=e,placeholder:B(U)(`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:V([B(E)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:()=>{},onCompositionstart:n[5]||=e=>l.value=!0,onCompositionend:n[6]||=e=>l.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),s.value.trim()||l.value?(A(),C(`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:K},n[10]||=[x(`div`,{"i-solar:arrow-up-outline":``},null,-1)])):S(``,!0)],4)])]))}}),sn=on;const cn={class:`relative`},ln={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var un=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=z(t.height),r=z(t.amplitude),i=z(t.waveLength),a=z(t.fillColor),o=z(t.direction),s=z(t.movementDirection);function c(e,t,n,r,i){let a=[],o=Math.ceil(e/r),s=o*r,c=1,l=i===`up`?n:t-n;a.push(`M 0 ${l}`);let u=Math.PI*2/r;for(let e=0;e<=s;e+=c){let t=n*Math.sin(u*e),r=i===`up`?l-t:l+t;a.push(`L ${e} ${r}`)}let d=i===`up`?t:0;return a.push(`L ${s} ${d}`),a.push(`L 0 ${d} Z`),a.join(` `)}let l=b(()=>n.value+r.value*2),u=b(()=>{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 I(()=>[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}),(e,t)=>(A(),C(`div`,cn,[M(e.$slots,`default`,{},void 0,!0),x(`div`,ln,[x(`div`,{class:`colored-area wave`,style:ee({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)])]))}}),dn=o(un,[[`__scopeId`,`data-v-33a54ad1`]]);export{dn as b,sn as c,Xe as d,He as e,de as f,se as g};
|
assets/{Basic-DqZH4ccC.js → Basic-i6dKFYXW.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{eT as e,f1 as t,f4 as n,f7 as r,fc as i,fi as a,fk as o,fn as s,fp as c,fw as l}from"./index-_PXww5qh.js";var u=n({__name:`Basic`,props:r({defaultHeight:{}},{modelValue:{default:``},modelModifiers:{}}),emits:r([`submit`],[`update:modelValue`]),setup(n,{emit:r}){let u=n,d=r,f=a(n,`modelValue`),p=c(),m=c(`auto`);function h(e){e.code===`Enter`&&!e.shiftKey&&(e.preventDefault(),d(`submit`,f.value))}return o(f,()=>{m.value=`auto`,requestAnimationFrame(()=>{if(p.value){if(f.value===``){m.value=u.defaultHeight||`fit-content`;return}m.value=`${p.value.scrollHeight}px`}})},{immediate:!0}),(n,r)=>s((i(),t(`textarea`,{ref_key:`textareaRef`,ref:p,"onUpdate:modelValue":r[0]||=e=>f.value=e,style:l({height:m.value}),onKeydown:h},null,36)),[[e,f.value]])}}),d=u;export{d as b};
|
assets/{BasicInputFile-BpKQbl4s.js → BasicInputFile-CE2dQPco.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{dr as e,e_ as t,f1 as n,f4 as r,f7 as i,fc as a,ff as o,fi as s,fp as c,ft as l,fu as u}from"./index-_PXww5qh.js";const d=[`accept`,`multiple`];var f=r({__name:`BasicInputFile`,props:i({class:{},isDraggingClasses:{},isNotDraggingClasses:{},accept:{},multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(r){let i=r,f=s(r,`modelValue`),p=c(),m=c(!1),h=e(m,150);function g(e){let t=e.target;t.files&&t.files.length>0&&(p.value=t.files[0]),f.value=Array.from(t.files||[]),m.value=!1}return(e,r)=>(a(),n(`label`,{relative:``,"cursor-pointer":``,class:u([i.class,m.value?[...Array.isArray(e.isDraggingClasses)?e.isDraggingClasses:[e.isDraggingClasses]]:[...Array.isArray(e.isNotDraggingClasses)?e.isNotDraggingClasses:[e.isNotDraggingClasses]]]),onDragover:r[0]||=e=>m.value=!0,onDragleave:r[1]||=e=>m.value=!1},[t(`input`,{type:`file`,accept:e.accept,multiple:e.multiple,class:`absolute inset-0 cursor-pointer appearance-none opacity-0`,onChange:g},null,40,d),o(e.$slots,`default`,{isDragging:l(h),firstFile:p.value,files:f.value})],34))}}),p=f;export{p as b};
|
assets/CardCreate-0CgHn4pe.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{b as e}from"./CardCreate-BKWO-6Cc.js";export{e as default};
|
|
|
|
assets/{CardCreate-BKWO-6Cc.js → CardCreate-BHVHUBHO.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,e_ as t,f1 as n,f4 as r,fc as i,ft as a,fx as o}from"./index-_PXww5qh.js";const s={relative:``,class:`min-h-[120px] flex flex-col cursor-pointer items-center justify-center border-neutral-200 rounded-xl bg-white/60 p-6 dark:border-neutral-700 hover:border-primary-300 dark:bg-black/30 hover:bg-white/80 dark:hover:border-primary-700 dark:hover:bg-black/40`,border:`solid 2`,transition:`all duration-300`,"cursor-pointer":``,"opacity-95":``,hover:`scale-100 opacity-100 shadow-md dark:shadow-lg`},c={"font-medium":``,text:`neutral-600 dark:neutral-300`};var l=r({__name:`CardCreate`,setup(r){let{t:l}=e();return(e,r)=>(i(),n(`div`,s,[r[0]||=t(`div`,{"i-solar:add-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),t(`p`,c,o(a(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as b};
|
assets/CardCreate-C2hnBFDC.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{b as e}from"./CardCreate-BHVHUBHO.js";export{e as default};
|
assets/CardCreationDialog-CqLdYE1B.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{b as e}from"./CardCreationDialog-Cs6jehZt.js";export{e as default};
|
assets/{CardCreationDialog-CyMszlB6.js → CardCreationDialog-Cs6jehZt.js}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
import{
|
2 |
\r
|
3 |
-
\f\v \u2028\u2029 `,i=``;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a})),I=
|
|
|
1 |
+
import{B as e,c$ as t,cO as n,cR as r,cT as i,cX as a,cY as o,c_ as s,ck as c,d0 as l,e$ as ee,eW as u,eZ as d,e_ as f,f0 as p,f1 as m,f2 as h,f3 as g,f4 as _,f7 as v,fC as y,fc as b,fe as te,fi as ne,fm as x,fo as S,fp as C,fr as w,ft as T,fu as E,fx as D,fy as O,v as re}from"./index-_PXww5qh.js";var k=O(((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n})),A=O(((exports,t)=>{var n=k();t.exports=n})),j=O(((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n})),M=O(((exports,t)=>{var n=j();t.exports=n})),N=O(((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n})),P=O(((exports,t)=>{var n=String.prototype.trim;t.exports=n})),F=O(((exports,t)=>{var n=P(),r=`
|
2 |
\r
|
3 |
+
\f\v \u2028\u2029 `,i=``;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a})),I=O(((exports,t)=>{var n=M(),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})),L=O(((exports,t)=>{var n=P();function r(e){return n.call(e)}t.exports=r})),R=O(((exports,t)=>{var n=N(),r=F(),i=I(),a=L(),o;o=n&&r()?a:i,t.exports=o})),z=O(((exports,t)=>{var n=A(),r=M(),i=R(),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})),B=O(((exports,t)=>{var n=z();t.exports=n})),V=y(B());const H={class:`w-full flex flex-col gap-5`},U={class:`mt-4`},W={class:`border-b border-neutral-200 dark:border-neutral-700`},G={class:`flex justify-center -mb-px sm:justify-start space-x-1`},K=[`onClick`],ie={class:`flex items-center gap-1`},ae={key:0,class:`w-full rounded-xl bg-red900`},oe={class:`w-full p-4`},se={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`};var q=_({__name:`CardCreationDialog`,props:v({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:v([`update:modelValue`],[`update:modelValue`]),setup(r,{emit:_}){let v=_,y=ne(r,`modelValue`),{t:O}=e(),k=re(),A=C(``),j=[{id:`identity`,label:O(`settings.pages.card.creation.identity`),icon:`i-solar:emoji-funny-square-bold-duotone`},{id:`behavior`,label:O(`settings.pages.card.creation.behavior`),icon:`i-solar:chat-round-line-bold-duotone`},{id:`settings`,label:O(`settings.pages.card.creation.settings`),icon:`i-solar:settings-bold-duotone`}],M=d({get:()=>j.find(e=>e.id===A.value)?A.value:j[0]?.id||``,set:e=>{A.value=e}}),N=C(!1),P=C(``);function F(e){let t=w(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 N.value=!0,P.value=O(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.systemprompt`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.scenario`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.personality`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.description`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.version`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.name`),!1;return N.value=!1,k.addCard(t),y.value=!1,!0}let I=C({name:O(`settings.pages.card.creation.defaults.name`),nickname:void 0,version:`1.0`,description:``,notes:void 0,personality:O(`settings.pages.card.creation.defaults.personality`),scenario:O(`settings.pages.card.creation.defaults.scenario`),systemPrompt:O(`settings.pages.card.creation.defaults.systemprompt`),postHistoryInstructions:O(`settings.pages.card.creation.defaults.posthistoryinstructions`),greetings:[],messageExample:[]});function L(e,t){return d({get:()=>I.value[e]??``,set:n=>{let r=n.trim();I.value[e]=r.length>0?t?t(r):r:``}})}let R=L(`name`,e=>(0,V.default)(e)),z=L(`nickname`),B=L(`description`),q=L(`notes`),J=L(`personality`),Y=L(`scenario`),X=d({get:()=>I.value.greetings??[],set:e=>{I.value.greetings=e||[]}}),Z=L(`version`),Q=L(`systemPrompt`),$=L(`postHistoryInstructions`);return(e,r)=>(b(),ee(T(l),{open:y.value,"onUpdate:open":r[12]||=e=>v(`update:modelValue`,e)},{default:x(()=>[g(T(o),null,{default:x(()=>[g(T(s),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),g(T(t),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide 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 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:x(()=>[f(`div`,H,[g(T(a),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:x(()=>[h(D(T(O)(`settings.pages.card.create_card`)),1)]),_:1}),f(`div`,U,[f(`div`,W,[f(`div`,G,[(b(),m(u,null,te(j,e=>f(`button`,{key:e.id,class:E([`px-4 py-2 text-sm font-medium`,[M.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=>M.value=e.id},[f(`div`,ie,[f(`div`,{class:E(e.icon)},null,2),h(` `+D(e.label),1)])],10,K)),64))])])]),N.value?(b(),m(`div`,ae,[f(`p`,oe,D(P.value),1)])):p(``,!0),M.value===`identity`?(b(),m(`div`,se,[f(`p`,ce,D(T(O)(`settings.pages.card.creation.fields_info.subtitle`)),1),f(`div`,le,[g(T(i),{modelValue:T(R),"onUpdate:modelValue":r[0]||=e=>S(R)?R.value=e:null,label:T(O)(`settings.pages.card.creation.name`),description:T(O)(`settings.pages.card.creation.fields_info.name`),required:!0},null,8,[`modelValue`,`label`,`description`]),g(T(i),{modelValue:T(z),"onUpdate:modelValue":r[1]||=e=>S(z)?z.value=e:null,label:T(O)(`settings.pages.card.creation.nickname`),description:T(O)(`settings.pages.card.creation.fields_info.nickname`)},null,8,[`modelValue`,`label`,`description`]),g(T(i),{modelValue:T(B),"onUpdate:modelValue":r[2]||=e=>S(B)?B.value=e:null,label:T(O)(`settings.pages.card.creation.description`),"single-line":!1,required:!0,description:T(O)(`settings.pages.card.creation.fields_info.description`)},null,8,[`modelValue`,`label`,`description`]),g(T(i),{modelValue:T(q),"onUpdate:modelValue":r[3]||=e=>S(q)?q.value=e:null,label:T(O)(`settings.pages.card.creator_notes`),"single-line":!1,description:T(O)(`settings.pages.card.creation.fields_info.notes`)},null,8,[`modelValue`,`label`,`description`])])])):M.value===`behavior`?(b(),m(`div`,ue,[f(`div`,de,[g(T(i),{modelValue:T(J),"onUpdate:modelValue":r[4]||=e=>S(J)?J.value=e:null,label:T(O)(`settings.pages.card.personality`),"single-line":!1,required:!0,description:T(O)(`settings.pages.card.creation.fields_info.personality`)},null,8,[`modelValue`,`label`,`description`]),g(T(i),{modelValue:T(Y),"onUpdate:modelValue":r[5]||=e=>S(Y)?Y.value=e:null,label:T(O)(`settings.pages.card.scenario`),"single-line":!1,required:!0,description:T(O)(`settings.pages.card.creation.fields_info.scenario`)},null,8,[`modelValue`,`label`,`description`]),g(T(n),{modelValue:X.value,"onUpdate:modelValue":r[6]||=e=>X.value=e,label:T(O)(`settings.pages.card.creation.greetings`),description:T(O)(`settings.pages.card.creation.fields_info.greetings`)},null,8,[`modelValue`,`label`,`description`])])])):M.value===`settings`?(b(),m(`div`,fe,[f(`div`,pe,[g(T(i),{modelValue:T(Q),"onUpdate:modelValue":r[7]||=e=>S(Q)?Q.value=e:null,label:T(O)(`settings.pages.card.systemprompt`),"single-line":!1,required:!0,description:T(O)(`settings.pages.card.creation.fields_info.systemprompt`)},null,8,[`modelValue`,`label`,`description`]),g(T(i),{modelValue:T($),"onUpdate:modelValue":r[8]||=e=>S($)?$.value=e:null,label:T(O)(`settings.pages.card.posthistoryinstructions`),"single-line":!1,required:!0,description:T(O)(`settings.pages.card.creation.fields_info.posthistoryinstructions`)},null,8,[`modelValue`,`label`,`description`]),g(T(i),{modelValue:T(Z),"onUpdate:modelValue":r[9]||=e=>S(Z)?Z.value=e:null,label:T(O)(`settings.pages.card.creation.version`),required:!0,description:T(O)(`settings.pages.card.creation.fields_info.version`)},null,8,[`modelValue`,`label`,`description`])])])):p(``,!0),f(`div`,me,[g(T(c),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:T(O)(`settings.pages.card.cancel`),disabled:!1,onClick:r[10]||=e=>y.value=!1},null,8,[`label`]),g(T(c),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:T(O)(`settings.pages.card.creation.create`),disabled:!1,onClick:r[11]||=e=>F(I.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),J=r(q,[[`__scopeId`,`data-v-71e6e2f1`]]);export{J as b};
|
assets/CardCreationDialog-Ctd_P3OS.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{b as e}from"./CardCreationDialog-CyMszlB6.js";export{e as default};
|
|
|
|
assets/{CardDetailDialog-DJH5FQFU.js → CardDetailDialog-BFh-RIKw.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{b as e}from"./DeleteCardDialog-
|
|
|
1 |
+
import{b as e}from"./DeleteCardDialog-DK9pHTYG.js";import{B as t,c$ as ee,cX as te,cY as ne,c_ as re,ck as n,d0 as ie,dc as r,eW as i,eZ as a,e_ as o,f0 as s,f1 as c,f2 as l,f3 as u,f4 as d,fc as f,fe as p,fm as m,fp as h,ft as g,fu as _,fx as v,v as ae}from"./index-_PXww5qh.js";const oe={key:0,class:`w-full flex flex-col gap-5`},se={flex:`~ col`,"gap-3":``},ce={flex:`~ row`,"items-center":``,"justify-between":``},le={flex:`~ row`,"items-center":``,"gap-2":``},ue={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`},de={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},fe={"font-medium":``},pe={flex:`~ row`,"gap-2":``},me={class:`mt-4`},he={class:`border-b border-neutral-200 dark:border-neutral-700`},ge={class:`flex justify-center -mb-px sm:justify-start space-x-1`},y=[`onClick`],b={class:`flex items-center gap-1`},x={key:0},S=[`innerHTML`],C={key:1},w=[`innerHTML`],T={key:2},E={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},D={key:0,flex:`~ col`,"gap-2":``},O={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},k=[`innerHTML`],A={key:3},j={grid:`~ cols-1 sm:cols-3`,"gap-4":``},M={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`},N={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},P={truncate:``,"font-medium":``},F={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`},I={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},L={truncate:``,"font-medium":``},_e={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`},ve={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},ye={truncate:``,"font-medium":``},be={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`};var R=d({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:{}},emits:[`update:modelValue`],setup(d,{emit:R}){let z=d,B=R,{t:V}=t(),H=ae(),{removeCard:xe}=H,{activeCardId:U}=r(H),W=a(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=a(()=>{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=a(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=a(()=>z.cardId===U.value),J=h(!1);function Se(){J.value=!0,setTimeout(()=>{U.value=z.cardId,J.value=!1},300)}function Y(e){return e?.replace(/\{\{(.*?)\}\}/g,`<span class="bg-primary-500/20 inline-block">{{ $1 }}</span>`).trim()}let X=h(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=h(``),Q=a(()=>{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}),$=a({get:()=>Q.value.find(e=>e.id===Z.value)?Z.value:Q.value[0]?.id||``,set:e=>{Z.value=e}});return(t,r)=>(f(),c(i,null,[u(g(ie),{open:t.modelValue,"onUpdate:open":r[0]||=e=>B(`update:modelValue`,e)},{default:m(()=>[u(g(ne),null,{default:m(()=>[u(g(re),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),u(g(ee),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide 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 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:m(()=>[W.value?(f(),c(`div`,oe,[o(`div`,se,[o(`div`,ce,[o(`div`,null,[o(`div`,le,[u(g(te),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:m(()=>[l(v(W.value.name),1)]),_:1}),q.value?(f(),c(`div`,ue,[r[3]||=o(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),l(` `+v(g(V)(`settings.pages.card.active_badge`)),1)])):s(``,!0)]),o(`div`,de,[l(` v`+v(W.value.version)+` `,1),W.value.creator?(f(),c(i,{key:0},[l(` · `+v(g(V)(`settings.pages.card.created_by`))+` `,1),o(`span`,fe,v(W.value.creator),1)],64)):s(``,!0)])]),o(`div`,pe,[u(g(n),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?g(V)(`settings.pages.card.active`):g(V)(`settings.pages.card.activate`),disabled:q.value,class:_({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),o(`div`,me,[o(`div`,he,[o(`div`,ge,[(f(!0),c(i,null,p(Q.value,e=>(f(),c(`button`,{key:e.id,class:_([`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},[o(`div`,b,[o(`div`,{class:_(e.icon)},null,2),l(` `+v(e.label),1)])],10,y))),128))])])]),$.value===`notes`&&W.value.notes?(f(),c(`div`,x,[o(`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,S)])):s(``,!0),$.value===`description`&&W.value.description?(f(),c(`div`,C,[o(`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,w)])):s(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(f(),c(`div`,T,[o(`div`,E,[(f(!0),c(i,null,p(K.value,(e,t)=>(f(),c(i,{key:t},[e?(f(),c(`div`,D,[o(`h2`,O,v(g(V)(`settings.pages.card.${t.toLowerCase()}`)),1),o(`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,k)])):s(``,!0)],64))),128))])])):s(``,!0),$.value===`modules`?(f(),c(`div`,A,[o(`div`,j,[o(`div`,M,[o(`span`,N,[r[4]||=o(`div`,{"i-lucide:ghost":``},null,-1),l(` `+v(g(V)(`settings.pages.card.consciousness.model`)),1)]),o(`div`,P,v(G.value.consciousness??`default`),1)]),o(`div`,F,[o(`span`,I,[r[5]||=o(`div`,{"i-lucide:mic":``},null,-1),l(` `+v(g(V)(`settings.pages.card.speech.model`)),1)]),o(`div`,L,v(G.value.speech??`default`),1)]),o(`div`,_e,[o(`span`,ve,[r[6]||=o(`div`,{"i-lucide:music":``},null,-1),l(` `+v(g(V)(`settings.pages.card.speech.voice`)),1)]),o(`div`,ye,v(G.value.voice??`default`),1)])])])):s(``,!0)])])):(f(),c(`div`,be,[r[7]||=o(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),l(` `+v(g(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),u(e,{modelValue:X.value,"onUpdate:modelValue":r[1]||=e=>X.value=e,"card-name":W.value?.name,onConfirm:Ce,onCancel:r[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64))}}),z=R;export{z as b};
|
assets/CardDetailDialog-BH9jXwx0.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import"./DeleteCardDialog-DK9pHTYG.js";import{b as e}from"./CardDetailDialog-BFh-RIKw.js";export{e as default};
|
assets/CardDetailDialog-CoOsVBZq.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import"./DeleteCardDialog-OlwxkCQV.js";import{b as e}from"./CardDetailDialog-DJH5FQFU.js";export{e as default};
|
|
|
|
assets/CardListItem-CmjDq6oT.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{b as e}from"./CardListItem-DUrsLYpl.js";export{e as default};
|
assets/{CardListItem-Bf_aIu-g.js → CardListItem-DUrsLYpl.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{cg as e,e$ as t,eV as n,e_ as r,f0 as i,f1 as a,f4 as o,fc as s,fm as c,ft as l,fu as u,fx as d}from"./index-_PXww5qh.js";const 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`];var C=o({__name:`CardListItem`,props:{id:{},name:{},description:{},isActive:{type:Boolean},isSelected:{type:Boolean},version:{},consciousnessModel:{},voiceModel:{}},emits:[`select`,`activate`,`delete`],setup(o,{emit:C}){let w=C;return(o,C)=>(s(),t(l(e),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:u([o.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:C[2]||=e=>w(`select`)},{default:c(()=>[r(`div`,f,[r(`div`,p,[r(`h3`,m,d(o.name),1),o.isActive?(s(),a(`div`,h,C[3]||=[r(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):i(``,!0)]),o.description?(s(),a(`p`,g,d(o.description),1)):i(``,!0),r(`div`,_,[r(`div`,null,`v`+d(o.version),1),r(`div`,v,[r(`div`,y,[C[4]||=r(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),r(`span`,null,d(o.consciousnessModel),1)]),r(`div`,b,[C[5]||=r(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),r(`span`,null,d(o.voiceModel),1)])])])]),r(`div`,x,[r(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:o.isActive,onClick:C[0]||=n(e=>w(`activate`),[`stop`])},[r(`div`,{class:u([o.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),o.id===`default`?i(``,!0):(s(),a(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:C[1]||=n(e=>w(`delete`),[`stop`])},C[6]||=[r(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]))])]),_:1},8,[`class`]))}}),w=C;export{w as b};
|
assets/CardListItem-juaBI4OZ.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{b as e}from"./CardListItem-Bf_aIu-g.js";export{e as default};
|
|
|
|
assets/DeleteCardDialog-BXra5W4m.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{b as e}from"./DeleteCardDialog-DK9pHTYG.js";export{e as default};
|
assets/{DeleteCardDialog-OlwxkCQV.js → DeleteCardDialog-DK9pHTYG.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,c$ as t,cX as n,cZ as r,c_ as i,ck as a,d0 as o,d1 as s,d2 as c,d3 as l,d4 as u,d5 as d,d6 as f,e$ as p,eV as m,e_ as h,f2 as g,f3 as _,f4 as v,f5 as y,f8 as b,f9 as x,fa as S,fc as C,ff as w,fm as T,fp as E,ft as D,fv as O,fx as k}from"./index-_PXww5qh.js";var A=v({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;u();let n=s();return(e,r)=>(C(),p(D(c),b(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>D(n).onOpenChange(!1)}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16,[`type`]))}}),j=A,M=v({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;u();let n=s();return(e,r)=>(C(),p(D(c),b(t,{id:D(n).descriptionId}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16,[`id`]))}}),N=M,P=v({__name:`AlertDialogAction`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;return u(),(e,n)=>(C(),p(D(j),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),F=P;const[I,L]=f(`AlertDialogContent`);var R=v({__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:n}){let r=e,i=n,a=d(i);u();let o=E();return L({onCancelElementChange:e=>{o.value=e}}),(e,n)=>(C(),p(D(t),b({...r,...D(a)},{role:`alertdialog`,onPointerDownOutside:n[0]||=m(()=>{},[`prevent`]),onInteractOutside:n[1]||=m(()=>{},[`prevent`]),onOpenAutoFocus:n[2]||=()=>{x(()=>{o.value?.focus({preventScroll:!0})})}}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),z=R,B=v({__name:`AlertDialogCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=I(),{forwardRef:r,currentElement:i}=u();return S(()=>{n.onCancelElementChange(i.value)}),(e,n)=>(C(),p(D(j),b(t,{ref:D(r)}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),V=B,H=v({__name:`AlertDialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;return u(),(e,n)=>(C(),p(D(N),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),U=H,W=v({__name:`AlertDialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return u(),(e,n)=>(C(),p(D(i),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),G=W,K=v({__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 t=e;return(e,n)=>(C(),p(D(r),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),q=K,J=v({__name:`AlertDialogRoot`,props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,i=l(n,r);return u(),(e,t)=>(C(),p(D(o),b(D(i),{modal:!0}),{default:T(t=>[w(e.$slots,`default`,O(y(t)))]),_:3},16))}}),Y=J,X=v({__name:`AlertDialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e;return u(),(e,r)=>(C(),p(D(n),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),Z=X;const Q={class:`flex flex-row justify-end gap-3`};var $=v({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:{}},emits:[`update:modelValue`,`confirm`,`cancel`],setup(t,{emit:n}){let r=n,{t:i}=e();function o(){r(`update:modelValue`,!1),r(`cancel`)}function s(){r(`update:modelValue`,!1),r(`confirm`)}return(e,t)=>(C(),p(D(Y),{open:e.modelValue,"onUpdate:open":t[0]||=e=>r(`update:modelValue`,e)},{default:T(()=>[_(D(q),null,{default:T(()=>[_(D(G),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),_(D(z),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide 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 dark:border-neutral-700 dark:bg-neutral-800`},{default:T(()=>[_(D(Z),{class:`mb-4 text-xl font-normal`},{default:T(()=>[g(k(D(i)(`settings.pages.card.delete_card`)),1)]),_:1}),_(D(U),{class:`mb-6`},{default:T(()=>[g(k(D(i)(`settings.pages.card.delete_confirmation`))+` `,1),h(`b`,null,`"`+k(e.cardName||``)+`"`,1)]),_:1}),h(`div`,Q,[_(D(V),{"as-child":``},{default:T(()=>[_(D(a),{variant:`secondary`,label:D(i)(`settings.pages.card.cancel`),onClick:o},null,8,[`label`])]),_:1}),_(D(F),{"as-child":``},{default:T(()=>[_(D(a),{variant:`danger`,label:D(i)(`settings.pages.card.delete`),onClick:s},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),ee=$;export{ee as b};
|
assets/DeleteCardDialog-FoFFubkY.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{b as e}from"./DeleteCardDialog-OlwxkCQV.js";export{e as default};
|
|
|
|
assets/{HeaderLink-DYjzqPXM.js → HeaderLink-lBHYTbjo.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{cR as e,d7 as t,dg as n,e$ as r,e_ as i,f1 as a,f4 as o,fc as s,fm as c,ft as l}from"./index-_PXww5qh.js";var u=`/assets/logo-dark-B0bvNYTh.svg`,d=`/assets/logo-B2aCU-bH.svg`;const f=[`src`],p=[`src`];var m=o({__name:`HeaderLink`,setup(e){let o=n();return(e,n)=>(s(),r(l(t),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:c(()=>[l(o)?(s(),a(`img`,{key:0,src:l(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(s(),a(`img`,{key:1,src:l(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),n[0]||=i(`div`,{"translate-y":`[2px]`,"font-quicksand":``,"font-semibold":``},[i(`span`,null,`AIRI`)],-1)]),_:1,__:[0]}))}}),h=e(m,[[`__scopeId`,`data-v-242dcb19`]]);export{h as b,d as c,u as d};
|
assets/{IconAnimation-Dh5WqWOg.js → IconAnimation-CbzgKu4z.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{eZ as e,e_ as t,f1 as n,f4 as r,fc as i,fk as a,fp as o,fu as s,fw as c}from"./index-_PXww5qh.js";var l=r({__name:`IconAnimation`,props:{icon:{},iconSize:{},position:{},duration:{},started:{type:Boolean},textColor:{},isReverse:{type:Boolean},zIndex:{}},emits:[`animationEnded`],setup(r,{emit:l}){let u=r,d=l,f=o(!1);a(()=>u.started,e=>{e&&requestAnimationFrame(()=>{f.value=!0})});let p=e(()=>({opacity:f.value===u.isReverse?0:1,size:f.value===u.isReverse?u.iconSize:25,position:f.value===u.isReverse?u.position:`calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)`,textColor:f.value===u.isReverse?u.textColor:`text-white`})),m=o([]),h=o(!1);function g(e){m.value.push(e.propertyName),m.value.includes(`color`)&&m.value.includes(`width`)&&m.value.includes(`height`)&&m.value.includes(`transform`)&&(h.value=!0,d(`animationEnded`))}return(e,r)=>(i(),n(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:c({zIndex:h.value?e.zIndex:void 0})},[t(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:c({opacity:p.value.opacity,transitionDuration:`${e.duration}ms`})},null,4),t(`div`,{fixed:``,"inset-0":``,"ease-in-out":``,style:c({width:`${p.value.size}rem`,height:`${p.value.size}rem`,transform:`translate(${p.value.position})`,transitionDuration:`${e.duration}ms`}),class:s([p.value.textColor,u.icon,{"transition-all":f.value}]),onTransitionend:g},null,38)],4))}}),u=l;export{u as b};
|
assets/{InputFile-BCVv6DXo.js → InputFile-1iWiDDXD.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{b as e}from"./BasicInputFile-
|
|
|
1 |
+
import{b as e}from"./BasicInputFile-CE2dQPco.js";import{e$ as t,e_ as n,f1 as r,f4 as i,fc as a,fm as o,fu as s}from"./index-_PXww5qh.js";const c={key:0,text:`center`,"text-sm":``},l={key:1,text:`center`,"text-sm":``};var u=i({__name:`InputFile`,props:{accept:{},multiple:{type:Boolean}},setup(i){return(i,u)=>(a(),t(e,{class:`min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6`,"is-not-dragging-classes":[`border-neutral-200 dark:border-neutral-700 hover:border-primary-300 dark:hover:border-primary-700`,`bg-white/60 dark:bg-black/30 hover:bg-white/80 dark:hover:bg-black/40`],"is-dragging-classes":[`border-primary-400 dark:border-primary-600 hover:border-primary-300 dark:hover:border-primary-700`,`bg-primary-50/5 dark:bg-primary-900/5`],border:`dashed 2`,transition:`all duration-300`,"opacity-95":``,hover:`scale-100 opacity-100 shadow-md dark:shadow-lg`,accept:i.accept,multiple:i.multiple},{default:o(({isDragging:e})=>[n(`div`,{class:s([`flex flex-col items-center`,[e?`text-primary-500 dark:text-primary-400`:`text-neutral-400 dark:text-neutral-500`]])},[u[0]||=n(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),u[1]||=n(`p`,{"font-medium":``,text:`center lg`},` Upload `,-1),e?(a(),r(`p`,c,` Release to upload `)):(a(),r(`p`,l,` Click or drag and drop a file here `))],2)]),_:1},8,[`accept`,`multiple`]))}}),d=u;export{d as b};
|
assets/{Scenes-UHLwN41j.js → Scenes-NPrm1JTa.js}
RENAMED
The diff for this file is too large to render.
See raw diff
|
|
assets/{Textarea-996FU_k1.js → Textarea-Bs3dDFBW.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{b as e}from"./Basic-
|
|
|
1 |
+
import{b as e}from"./Basic-i6dKFYXW.js";import{e$ as t,f4 as n,fc as r,fi as i}from"./index-_PXww5qh.js";var a=n({__name:`Textarea`,props:{modelValue:{default:``},modelModifiers:{}},emits:[`update:modelValue`],setup(n){let a=i(n,`modelValue`);return(n,i)=>(r(),t(e,{modelValue:a.value,"onUpdate:modelValue":i[0]||=e=>a.value=e,border:`focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900`},null,8,[`modelValue`]))}}),o=a;export{o as b};
|
assets/_...all_-CK6MkbIo.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{cj as e,d8 as t,e$ as n,eV as r,eY as i,eZ as a,e_ as o,f7 as s,fh as c,fo as l}from"./index-xk_G3uGf.js";const u={"h-full":``,"w-full":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``,"gap-4":``};var d=n({__name:`[...all]`,setup(n){let d=t();return(t,n)=>(s(),i(`div`,u,[n[2]||=r(`div`,{"text-3xl":``},` Where are we? `,-1),r(`div`,null,[o(l(e),{onClick:n[0]||=e=>l(d).go(-1)},{default:c(()=>n[1]||=[a(` Go Back `,-1)]),_:1,__:[1]})])]))}}),f=d;export{f as default};
|
|
|
|
assets/_...all_-CKwVDcbd.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{ck as e,da as t,e_ as n,f1 as r,f2 as i,f3 as a,f4 as o,fc as s,fm as c,ft as l}from"./index-_PXww5qh.js";const u={"h-full":``,"w-full":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``,"gap-4":``};var d=o({__name:`[...all]`,setup(o){let d=t();return(t,o)=>(s(),r(`div`,u,[o[2]||=n(`div`,{"text-3xl":``},` Where are we? `,-1),n(`div`,null,[a(l(e),{onClick:o[0]||=e=>l(d).go(-1)},{default:c(()=>o[1]||=[i(` Go Back `,-1)]),_:1,__:[1]})])]))}}),f=d;export{f as default};
|
assets/{__vite-browser-external-Dr3SJRIM.js → __vite-browser-external-vNgQ4ZKm.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{fy as e}from"./index-_PXww5qh.js";var t=e(((exports,t)=>{t.exports={}}));export default t();
|
assets/{airi-card-CooYORDj.js → airi-card-CGFJp01Q.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{b as e}from"./DeleteCardDialog-
|
|
|
1 |
+
import{b as e}from"./DeleteCardDialog-DK9pHTYG.js";import"./BasicInputFile-CE2dQPco.js";import{b as t}from"./InputFile-1iWiDDXD.js";import{B as n,cL as r,co as i,dc as a,e$ as o,eT as s,eW as c,eZ as l,e_ as u,f0 as d,f1 as f,f2 as p,f3 as m,f4 as h,fc as g,fe as _,fh as v,fk as y,fm as b,fn as x,fp as S,ft as C,fu as w,fx as T,v as E}from"./index-_PXww5qh.js";import{b as D}from"./route-block-gWR0cCIm.js";import{b as O}from"./CardCreate-BHVHUBHO.js";import{b as ee}from"./CardCreationDialog-Cs6jehZt.js";import{b as te}from"./CardDetailDialog-BFh-RIKw.js";import{b as ne}from"./CardListItem-DUrsLYpl.js";const re={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ie={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},ae={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},oe=[`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":``};var R=h({__name:`index`,setup(h){let{t:D}=n(),R=E(),{addCard:z,removeCard:B}=R,{cards:V,activeCardId:H}=a(R),U=S(``),W=S(!1),G=S(!1),K=S(``),q=S(`nameAsc`),J=S([]);y(J,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);U.value=z(n),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=S(!1),Q=S(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){let t=V.value.get(e);return t?.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(n,a)=>{let l=v(`motion`);return g(),f(c,null,[u(`div`,re,[u(`div`,ie,[u(`div`,ae,[a[7]||=u(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[u(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),x(u(`input`,{"onUpdate:modelValue":a[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:C(D)(`settings.pages.card.search`)},null,8,oe),[[s,K.value]])]),u(`div`,k,[u(`div`,A,T(C(D)(`settings.pages.card.sort_by`))+`: `,1),m(C(r),{modelValue:q.value,"onUpdate:modelValue":a[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:C(D)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:C(D)(`settings.pages.card.name_desc`)},{value:`recent`,label:C(D)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),u(`div`,{class:w([`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))]":C(V).size>0}])},[m(C(t),{modelValue:J.value,"onUpdate:modelValue":a[2]||=e=>J.value=e,accept:`*.json`},{default:b(({isDragging:e})=>[e?(g(),f(`div`,P,[a[9]||=u(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),u(`p`,F,T(C(D)(`settings.pages.card.drop_here`)),1)])):(g(),f(`div`,j,[a[8]||=u(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),u(`p`,M,T(C(D)(`settings.pages.card.upload`)),1),u(`p`,N,T(C(D)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),m(O,{onClick:de}),C(V).size>0?(g(!0),f(c,{key:0},_(X.value,e=>(g(),o(ne,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===C(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)):d(``,!0),C(V).size===0?(g(),f(`div`,I,[a[10]||=u(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),u(`p`,null,T(C(D)(`settings.pages.card.no_cards`)),1)])):d(``,!0),K.value&&X.value.length===0?(g(),o(C(i),{key:2,type:`warning`},{title:b(()=>[p(T(C(D)(`settings.pages.card.no_results`)),1)]),content:b(()=>[p(T(C(D)(`settings.pages.card.try_different_search`)),1)]),_:1})):d(``,!0)],2)]),m(e,{modelValue:Z.value,"onUpdate:modelValue":a[3]||=e=>Z.value=e,"card-name":Q.value?C(R).getCard(Q.value)?.name:``,onConfirm:ce,onCancel:a[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),m(te,{modelValue:W.value,"onUpdate:modelValue":a[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),m(ee,{modelValue:G.value,"onUpdate:modelValue":a[6]||=e=>G.value=e},null,8,[`modelValue`]),x((g(),f(`div`,L,a[11]||=[u(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[l]])],64)}}});typeof D==`function`&&D(R);var z=R;export{z as default};
|
assets/{alibaba-cloud-model-studio-DnJc58m-.js → alibaba-cloud-model-studio-DEeGe0YV.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,cQ as t,dc as n,e as r,e$ as i,eZ as a,e_ as o,f as s,f3 as c,f4 as l,fa as u,fc as d,fk as f,fm as p,fp as m,ft as h,w as g,z as _}from"./index-_PXww5qh.js";import{b as v}from"./route-block-gWR0cCIm.js";const y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`;var S=l({__name:`alibaba-cloud-model-studio`,setup(l){let v={speed:1},S=m(0),C=m(1),w=m(0),T=g(),E=_(),{providers:D}=n(E),{t:O}=e(),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 u(async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)}),f(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),f(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),f(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),f(D,async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,n)=>(d(),i(h(r),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":p(()=>[o(`div`,y,[c(h(t),{modelValue:S.value,"onUpdate:modelValue":n[0]||=e=>S.value=e,label:h(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:h(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`]),c(h(t),{modelValue:C.value,"onUpdate:modelValue":n[1]||=e=>C.value=e,label:h(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),c(h(t),{modelValue:w.value,"onUpdate:modelValue":n[2]||=e=>w.value=e,label:h(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:h(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:p(()=>[c(h(s),{"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/{anthropic-XeWZREjS.js → anthropic-BrpI8Zfd.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,da as t,dc as n,e$ as r,eZ as i,e_ as a,f2 as o,f3 as s,f4 as c,fa as l,fc as u,fk as d,fm as f,ft as p,fx as m,g as h,h as g,i as _,j as v,k as y,l as b,z as x}from"./index-_PXww5qh.js";import{b as S}from"./route-block-gWR0cCIm.js";const C={bg:`orange-50 dark:orange-900/20`,"rounded-xl":``,"p-4":``,flex:`~ col gap-3`},w={"text-xl":``,"font-semibold":``,text:`orange-700 dark:orange-500`},T={underline:``,href:`https://docs.anthropic.com/en/api/openai-sdk`},E=`anthropic`;var D=c({__name:`anthropic`,setup(c){let{t:S}=e(),D=t(),O=x(),{providers:k}=n(O),A=i(()=>O.getProviderMetadata(E)),j=i({get:()=>k.value[E]?.apiKey||``,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=i({get:()=>k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});l(()=>{k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=k.value[E]?.apiKey||``,M.value=k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`}),d([j,M],()=>{k.value[E]={...k.value[E],apiKey:j.value,baseUrl:M.value||`https://api.anthropic.com/v1/`}});function N(){k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}}return(e,t)=>(u(),r(p(h),{"provider-name":A.value?.localizedName||`Anthropic | Claude`,"provider-icon":A.value?.icon,"on-back":()=>p(D).back()},{default:f(()=>[a(`div`,C,[a(`h2`,w,m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),a(`p`,null,[o(m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),a(`a`,T,m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),o(`, `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),t[2]||=a(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),o(` `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),a(`p`,null,[o(m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),t[3]||=a(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),o(` `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),s(p(g),null,{default:f(()=>[s(p(_),{title:p(S)(`settings.pages.providers.common.section.basic.title`),description:p(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:f(()=>[s(p(y),{modelValue:j.value,"onUpdate:modelValue":t[0]||=e=>j.value=e,"provider-name":A.value?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),s(p(b),{title:p(S)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[s(p(v),{modelValue:M.value,"onUpdate:modelValue":t[1]||=e=>M.value=e,placeholder:`https://api.anthropic.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`]))}});typeof S==`function`&&S(D);var O=D;export{O as default};
|
assets/{appearance-BWcJggRu.js → appearance-Cws_Hm5P.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,cq as t,e$ as n,eW as r,eZ as i,e_ as a,f1 as o,f4 as s,fc as c,fe as l,fh as u,fn as d,ft as f,fw as p}from"./index-_PXww5qh.js";import{b as m}from"./route-block-gWR0cCIm.js";const h={flex:`~ col gap-4`,"font-normal":``},g={flex:`~ col gap-4`},_={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-12rem)]`,"bottom-0":``,"right--10":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},v={text:`60`,"i-solar:settings-bold-duotone":``};var y=s({__name:`index`,setup(s){let{t:m}=e(),y=i(()=>[{title:m(`settings.pages.themes.general.title`),description:m(`settings.pages.themes.general.description`),icon:`i-solar:emoji-funny-square-bold-duotone`,to:`/settings/appearance/general`},{title:m(`settings.pages.themes.color-scheme.title`),description:m(`settings.pages.themes.color-scheme.description`),icon:`i-solar:pallete-2-bold-duotone`,to:`/settings/appearance/color-scheme`},{title:m(`settings.pages.themes.developer.title`),description:m(`settings.pages.themes.developer.description`),icon:`i-solar:code-bold-duotone`,to:`/settings/appearance/developer`}]);return(e,i)=>{let s=u(`motion`);return c(),o(`div`,h,[i[0]||=a(`div`,null,null,-1),a(`div`,g,[(c(!0),o(r,null,l(y.value,(e,r)=>d((c(),n(f(t),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:p({transitionDelay:`${r*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[s]])),128))]),d((c(),o(`div`,_,[d(a(`div`,v,null,512),[[s]])])),[[s]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default};
|
assets/{audio-BO3k15P2.js → audio-BW8HaNY6.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{e_ as e,f1 as t,f4 as n,fc as r,fp as i}from"./index-_PXww5qh.js";var a=n({__name:`audio`,setup(n){let a=i(),o=i();function s(e){if(!e)return;let t=o.value?.files?.[0];if(!t)return;let n=document.createElement(`audio`);a.value?.appendChild(n),n.src=URL.createObjectURL(t),n.controls=!0,n.load(),n.play()}return(n,i)=>(r(),t(`div`,null,[e(`div`,null,[e(`div`,{ref_key:`containerRef`,ref:a},null,512),e(`input`,{ref_key:`fileInputRef`,ref:o,type:`file`,onChange:s},null,544)])]))}}),o=a;export{o as default};
|
assets/{audio-record-QnosxCYD.js → audio-record-CLGIYkKz.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{cL as e,ck as t,dh as n,dq as r,dt as i,e$ as a,eW as o,eZ as s,e_ as c,f1 as l,f2 as u,f3 as d,f4 as f,f6 as p,f8 as m,fa as h,fb as g,fc as _,fe as v,ff as y,fk as b,fm as x,fo as S,fp as C,fs as w,ft as T,fx as E}from"./index-_PXww5qh.js";var D=f({__name:`Option`,props:{value:{},label:{},active:{type:Boolean}},setup(e){let t=e,n=p(`selectOption`),r=p(`hide`);return(e,i)=>(_(),l(`div`,m({...e.$attrs,class:null,style:null},{class:[`cursor-pointer rounded px-2 py-1 text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800`,{"bg-neutral-100 dark:bg-neutral-800":t.active}],"line-clamp-1":``,"overflow-hidden":``,"text-ellipsis":``,"whitespace-pre-wrap":``,text:`xs sm:sm`,"transition-colors":``,"duration-150":``,"ease-in-out":``,"will-change-background-color":``,"will-change-color":``,onClick:i[0]||=()=>{T(n)(t.value),T(r)()}}),[y(e.$slots,`default`,{},()=>[u(E(t.label),1)])],16))}}),O=D;function k(){let e=n({constraints:{audio:!0},requestPermissions:!1}),t=C(e.audioInputs.value[0]?.deviceId||``),i=C(),a=s(()=>e.audioInputs.value),o=C({audio:!0}),c=r({constraints:o,autoSwitch:!0,enabled:!1});async function l(){e.permissionGranted.value||e.isSupported.value&&await e.ensurePermissions()}b(t,()=>{t.value&&(o.value={audio:{deviceId:{exact:t.value}}})},{immediate:!0}),b(e.audioInputs,()=>{i.value=a.value.find(e=>e.deviceId===t.value)},{immediate:!0}),b([e.permissionGranted,a,t],async()=>{await l(),e.permissionGranted.value&&a.value.length!==0&&(i.value||=a.value[0])},{immediate:!0});async function u(){await l(),e.permissionGranted.value&&i.value&&(c.enabled.value&&c.restart(),c.start())}function d(){c.stop()}return{selectedAudioInputId:t,selectedAudioInput:i,audioInputs:a,start:u,stop:d,request:l,media:c}}function A(e,t=()=>Promise.resolve()){let n=C(),r=w(e);async function a(){if(await t(),await i(r).toBeTruthy(),!r.value){console.error(`No media media available`);return}n.value=new MediaRecorder(r.value),n.value.start()}function o(){n.value&&(n.value.stop(),n.value.ondataavailable=e=>{let t=e.data,n=URL.createObjectURL(t),r=new Audio(n);r.play()})}return{startRecord:a,stopRecord:o}}const j={class:`mt-4 w-full flex justify-center gap-2`};var M=f({__name:`audio-record`,setup(n){let{audioInputs:r,selectedAudioInputId:i,start:s,stop:f,media:p,request:m}=k(),{startRecord:y,stopRecord:b}=A(p.stream,s);return h(()=>m()),g(()=>f()),(n,f)=>(_(),l(`div`,null,[d(T(e),{modelValue:T(i),"onUpdate:modelValue":f[0]||=e=>S(i)?i.value=e:null,onChange:f[1]||=()=>T(s)()},{default:x(({value:e})=>[c(`div`,null,E(e?T(r).find(t=>t.deviceId===e)?.label:`Select Audio Input`),1)]),options:x(({hide:e})=>[(_(!0),l(o,null,v(T(r),t=>(_(),a(T(O),{key:t.deviceId,value:t.deviceId,active:t.deviceId===T(i),onClick:t=>e()},{default:x(()=>[u(E(t.label),1)]),_:2},1032,[`value`,`active`,`onClick`]))),128))]),_:1},8,[`modelValue`]),c(`div`,j,[d(T(t),{onClick:T(y)},{default:x(()=>f[2]||=[u(` Start Recording `,-1)]),_:1,__:[2]},8,[`onClick`]),d(T(t),{onClick:T(b)},{default:x(()=>f[3]||=[u(` Stop Recording `,-1)]),_:1,__:[3]},8,[`onClick`])])]))}}),N=M;export{N as default};
|
assets/{azure-ai-foundry-B6NkPA82.js → azure-ai-foundry-v6AJ70ME.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,da as t,dc as n,e$ as r,eZ as i,f3 as a,f4 as o,fa as s,fc as c,fk as l,fm as u,ft as d,g as f,h as p,i as m,k as h,l as g,m as _,z as v}from"./index-_PXww5qh.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`azure-ai-foundry`;var x=o({__name:`azure-ai-foundry`,setup(o){let{t:y}=e(),x=t(),S=v(),{providers:C}=n(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.resourceName||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].resourceName=e}}),D=i({get:()=>C.value[b]?.apiVersion||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiVersion=e}}),O=i({get:()=>C.value[b]?.modelId||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].modelId=e}});s(()=>{C.value[b]||(C.value[b]={}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.resourceName||``,D.value=C.value[b]?.apiVersion||``,O.value=C.value[b]?.modelId||``}),l([T,E,D,O],()=>{C.value[b]={...C.value[b],apiKey:T.value,resourceName:E.value,apiVersion:D.value,modelId:O.value}});function k(){C.value[b]={}}return(e,t)=>(c(),r(d(f),{"provider-name":w.value?.localizedName||`Azure OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[a(d(p),null,{default:u(()=>[a(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":k},{default:u(()=>[a(d(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`Azure OpenAI`,placeholder:`...`,required:``},null,8,[`modelValue`,`provider-name`]),a(d(_),{modelValue:E.value,"onUpdate:modelValue":t[1]||=e=>E.value=e,label:`Resouce name`,placeholder:`...`,description:`Prefix used in https://<prefix>.services.ai.azure.com`,required:``},null,8,[`modelValue`]),a(d(_),{modelValue:O.value,"onUpdate:modelValue":t[2]||=e=>O.value=e,label:`Model id`,placeholder:`...`,description:`Model ID on Azure AI Foundry`,required:``},null,8,[`modelValue`])]),_:1},8,[`title`,`description`]),a(d(g),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[a(d(_),{modelValue:D.value,"onUpdate:modelValue":t[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`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`]))}});typeof y==`function`&&y(x);var S=x;export{S as default};
|
assets/{background-gradient-blending-lo2DKvjb.js → background-gradient-blending-CKRNnZ8N.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
import{b as e}from"./BasicInputFile-
|
2 |
/*!
|
3 |
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
4 |
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
@@ -35,4 +35,4 @@ var T=function(e,t){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
35 |
content: "" !important;
|
36 |
display: none !important;
|
37 |
}`,sl=function(e){cl(e,`.`+il+nl+ol+`
|
38 |
-
.`+al+rl+ol)},cl=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement(`style`);r.textContent=t,e.appendChild(r)}},ll=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):`about:blank`},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement(`a`),e._origin=e.getOrigin(t.location.href)},e._origin=`about:blank`,e}(),ul=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(_l(e)||ml(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return O(this,void 0,void 0,function(){var t,n,r,i,a=this;return k(this,function(o){switch(o.label){case 0:return t=ll.isSameOrigin(e),n=!hl(e)&&this._options.useCORS===!0&&q.SUPPORT_CORS_IMAGES&&!t,r=!hl(e)&&!t&&!_l(e)&&typeof this._options.proxy==`string`&&q.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!hl(e)&&!_l(e)&&!r&&!n?[2]:(i=e,r?[4,this.proxy(i)]:[3,2]);case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug(`Added image `+e.substring(0,256)),[4,new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(gl(i)||n)&&(r.crossOrigin=`anonymous`),r.src=i,r.complete===!0&&setTimeout(function(){return e(r)},500),a._options.imageTimeout>0&&setTimeout(function(){return t(`Timed out (`+a._options.imageTimeout+`ms) loading image`)},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(e){return this._cache[e]!==void 0},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw Error(`No proxy defined`);var r=e.substring(0,256);return new Promise(function(i,a){var o=q.SUPPORT_RESPONSE_TYPE?`blob`:`text`,s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o===`text`)i(s.response);else{var e=new FileReader;e.addEventListener(`load`,function(){return i(e.result)},!1),e.addEventListener(`error`,function(e){return a(e)},!1),e.readAsDataURL(s.response)}else a(`Failed to proxy resource `+r+` with status code `+s.status)},s.onerror=a;var c=n.indexOf(`?`)>-1?`&`:`?`;if(s.open(`GET`,``+n+c+`url=`+encodeURIComponent(e)+`&responseType=`+o),o!==`text`&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a(`Timed out (`+l+`ms) proxying `+r)}}s.send()})},e}(),dl=/^data:image\/svg\+xml/i,fl=/^data:image\/.*;base64,/i,pl=/^data:image\/.*/i,ml=function(e){return q.SUPPORT_SVG_DRAWING||!vl(e)},hl=function(e){return pl.test(e)},gl=function(e){return fl.test(e)},_l=function(e){return e.substr(0,4)===`blob`},vl=function(e){return e.substr(-3).toLowerCase()===`svg`||dl.test(e)},Y=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),yl=function(e,t,n){return new Y(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},bl=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=yl(this.start,this.startControl,t),i=yl(this.startControl,this.endControl,t),a=yl(this.endControl,this.end,t),o=yl(r,i,t),s=yl(i,a,t),c=yl(o,s,t);return n?new e(this.start,r,o,c):new e(c,s,a,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),X=function(e){return e.type===1},xl=function(){function e(e){var t=e.styles,n=e.bounds,r=Rr(t.borderTopLeftRadius,n.width,n.height),i=r[0],a=r[1],o=Rr(t.borderTopRightRadius,n.width,n.height),s=o[0],c=o[1],l=Rr(t.borderBottomRightRadius,n.width,n.height),u=l[0],d=l[1],f=Rr(t.borderBottomLeftRadius,n.width,n.height),p=f[0],m=f[1],h=[];h.push((i+s)/n.width),h.push((p+u)/n.width),h.push((a+m)/n.height),h.push((c+d)/n.height);var g=Math.max.apply(Math,h);g>1&&(i/=g,a/=g,s/=g,c/=g,u/=g,d/=g,p/=g,m/=g);var _=n.width-s,v=n.height-d,y=n.width-u,b=n.height-m,x=t.borderTopWidth,S=t.borderRightWidth,C=t.borderBottomWidth,w=t.borderLeftWidth,T=V(t.paddingTop,e.bounds.width),E=V(t.paddingRight,e.bounds.width),D=V(t.paddingBottom,e.bounds.width),O=V(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?Q(n.left+w/3,n.top+x/3,i-w/3,a-x/3,Z.TOP_LEFT):new Y(n.left+w/3,n.top+x/3),this.topRightBorderDoubleOuterBox=i>0||a>0?Q(n.left+_,n.top+x/3,s-S/3,c-x/3,Z.TOP_RIGHT):new Y(n.left+n.width-S/3,n.top+x/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?Q(n.left+y,n.top+v,u-S/3,d-C/3,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S/3,n.top+n.height-C/3),this.bottomLeftBorderDoubleOuterBox=p>0||m>0?Q(n.left+w/3,n.top+b,p-w/3,m-C/3,Z.BOTTOM_LEFT):new Y(n.left+w/3,n.top+n.height-C/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?Q(n.left+w*2/3,n.top+x*2/3,i-w*2/3,a-x*2/3,Z.TOP_LEFT):new Y(n.left+w*2/3,n.top+x*2/3),this.topRightBorderDoubleInnerBox=i>0||a>0?Q(n.left+_,n.top+x*2/3,s-S*2/3,c-x*2/3,Z.TOP_RIGHT):new Y(n.left+n.width-S*2/3,n.top+x*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?Q(n.left+y,n.top+v,u-S*2/3,d-C*2/3,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S*2/3,n.top+n.height-C*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||m>0?Q(n.left+w*2/3,n.top+b,p-w*2/3,m-C*2/3,Z.BOTTOM_LEFT):new Y(n.left+w*2/3,n.top+n.height-C*2/3),this.topLeftBorderStroke=i>0||a>0?Q(n.left+w/2,n.top+x/2,i-w/2,a-x/2,Z.TOP_LEFT):new Y(n.left+w/2,n.top+x/2),this.topRightBorderStroke=i>0||a>0?Q(n.left+_,n.top+x/2,s-S/2,c-x/2,Z.TOP_RIGHT):new Y(n.left+n.width-S/2,n.top+x/2),this.bottomRightBorderStroke=u>0||d>0?Q(n.left+y,n.top+v,u-S/2,d-C/2,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S/2,n.top+n.height-C/2),this.bottomLeftBorderStroke=p>0||m>0?Q(n.left+w/2,n.top+b,p-w/2,m-C/2,Z.BOTTOM_LEFT):new Y(n.left+w/2,n.top+n.height-C/2),this.topLeftBorderBox=i>0||a>0?Q(n.left,n.top,i,a,Z.TOP_LEFT):new Y(n.left,n.top),this.topRightBorderBox=s>0||c>0?Q(n.left+_,n.top,s,c,Z.TOP_RIGHT):new Y(n.left+n.width,n.top),this.bottomRightBorderBox=u>0||d>0?Q(n.left+y,n.top+v,u,d,Z.BOTTOM_RIGHT):new Y(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=p>0||m>0?Q(n.left,n.top+b,p,m,Z.BOTTOM_LEFT):new Y(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||a>0?Q(n.left+w,n.top+x,Math.max(0,i-w),Math.max(0,a-x),Z.TOP_LEFT):new Y(n.left+w,n.top+x),this.topRightPaddingBox=s>0||c>0?Q(n.left+Math.min(_,n.width-S),n.top+x,_>n.width+S?0:Math.max(0,s-S),Math.max(0,c-x),Z.TOP_RIGHT):new Y(n.left+n.width-S,n.top+x),this.bottomRightPaddingBox=u>0||d>0?Q(n.left+Math.min(y,n.width-w),n.top+Math.min(v,n.height-C),Math.max(0,u-S),Math.max(0,d-C),Z.BOTTOM_RIGHT):new Y(n.left+n.width-S,n.top+n.height-C),this.bottomLeftPaddingBox=p>0||m>0?Q(n.left+w,n.top+Math.min(b,n.height-C),Math.max(0,p-w),Math.max(0,m-C),Z.BOTTOM_LEFT):new Y(n.left+w,n.top+n.height-C),this.topLeftContentBox=i>0||a>0?Q(n.left+w+O,n.top+x+T,Math.max(0,i-(w+O)),Math.max(0,a-(x+T)),Z.TOP_LEFT):new Y(n.left+w+O,n.top+x+T),this.topRightContentBox=s>0||c>0?Q(n.left+Math.min(_,n.width+w+O),n.top+x+T,_>n.width+w+O?0:s-w+O,c-(x+T),Z.TOP_RIGHT):new Y(n.left+n.width-(S+E),n.top+x+T),this.bottomRightContentBox=u>0||d>0?Q(n.left+Math.min(y,n.width-(w+O)),n.top+Math.min(v,n.height+x+T),Math.max(0,u-(S+E)),d-(C+D),Z.BOTTOM_RIGHT):new Y(n.left+n.width-(S+E),n.top+n.height-(C+D)),this.bottomLeftContentBox=p>0||m>0?Q(n.left+w+O,n.top+b,Math.max(0,p-(w+O)),m-(C+D),Z.BOTTOM_LEFT):new Y(n.left+w+O,n.top+n.height-(C+D))}return e}(),Z;(function(e){e[e.TOP_LEFT=0]=`TOP_LEFT`,e[e.TOP_RIGHT=1]=`TOP_RIGHT`,e[e.BOTTOM_RIGHT=2]=`BOTTOM_RIGHT`,e[e.BOTTOM_LEFT=3]=`BOTTOM_LEFT`})(Z||={});var Q=function(e,t,n,r,i){var a=4*((Math.sqrt(2)-1)/3),o=n*a,s=r*a,c=e+n,l=t+r;switch(i){case Z.TOP_LEFT:return new bl(new Y(e,l),new Y(e,l-s),new Y(c-o,t),new Y(c,t));case Z.TOP_RIGHT:return new bl(new Y(e,t),new Y(e+o,t),new Y(c,l-s),new Y(c,l));case Z.BOTTOM_RIGHT:return new bl(new Y(c,t),new Y(c,t+s),new Y(e+o,l),new Y(e,l));case Z.BOTTOM_LEFT:default:return new bl(new Y(c,l),new Y(c-o,l),new Y(e,t+s),new Y(e,t))}},Sl=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Cl=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},wl=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Tl=function(){function e(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return e}(),El=function(){function e(e,t){this.path=e,this.target=t,this.type=1}return e}(),Dl=function(){function e(e){this.opacity=e,this.type=2,this.target=6}return e}(),Ol=function(e){return e.type===0},kl=function(e){return e.type===1},Al=function(e){return e.type===2},jl=function(e,t){return e.length===t.length?e.some(function(e,n){return e===t[n]}):!1},Ml=function(e,t,n,r,i){return e.map(function(e,a){switch(a){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e})},Nl=function(){function e(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Pl=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new xl(this.container),this.container.styles.opacity<1&&this.effects.push(new Dl(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Tl(n,r,i))}if(this.container.styles.overflowX!==0){var a=Sl(this.curves),o=wl(this.curves);jl(a,o)?this.effects.push(new El(a,6)):(this.effects.push(new El(a,2)),this.effects.push(new El(o,4)))}}return e.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(e){return!kl(e)});if(t||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,i),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var a=Sl(n.curves),o=wl(n.curves);jl(a,o)||r.unshift(new El(o,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(t){return G(t.target,e)})},e}(),Fl=function(e,t,n,r){e.container.elements.forEach(function(i){var a=G(i.flags,4),o=G(i.flags,2),s=new Pl(i,e);G(i.styles.display,2048)&&r.push(s);var c=G(i.flags,8)?[]:r;if(a||o){var l=a||i.styles.isPositioned()?n:t,u=new Nl(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var d=i.styles.zIndex.order;if(d<0){var f=0;l.negativeZIndex.some(function(e,t){return d>e.element.container.styles.zIndex.order?(f=t,!1):f>0}),l.negativeZIndex.splice(f,0,u)}else if(d>0){var p=0;l.positiveZIndex.some(function(e,t){return d>=e.element.container.styles.zIndex.order?(p=t+1,!1):p>0}),l.positiveZIndex.splice(p,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Fl(s,u,a?u:n,c)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),Fl(s,t,n,c);G(i.flags,8)&&Il(i,c)})},Il=function(e,t){for(var n=e instanceof Vs?e.start:1,r=e instanceof Vs?e.reversed:!1,i=0;i<t.length;i++){var a=t[i];a.container instanceof Bs&&typeof a.container.value==`number`&&a.container.value!==0&&(n=a.container.value),a.listValue=Uc(n,a.container.styles.listStyleType,!0),n+=r?-1:1}},Ll=function(e){var t=new Pl(e,null),n=new Nl(t),r=[];return Fl(t,n,n,r),Il(t.container,r),n},Rl=function(e,t){switch(t){case 0:return $(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return $(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return $(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return $(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},zl=function(e,t){switch(t){case 0:return $(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return $(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return $(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return $(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},Bl=function(e,t){switch(t){case 0:return $(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return $(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return $(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return $(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},Vl=function(e,t){switch(t){case 0:return Hl(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Hl(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Hl(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return Hl(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Hl=function(e,t){var n=[];return X(e)?n.push(e.subdivide(.5,!1)):n.push(e),X(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},$=function(e,t,n,r){var i=[];return X(e)?i.push(e.subdivide(.5,!1)):i.push(e),X(n)?i.push(n.subdivide(.5,!0)):i.push(n),X(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),X(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},Ul=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},Wl=function(e){var t=e.styles,n=e.bounds,r=V(t.paddingLeft,n.width),i=V(t.paddingRight,n.width),a=V(t.paddingTop,n.width),o=V(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+a+o))},Gl=function(e,t){return e===0?t.bounds:e===2?Wl(t):Ul(t)},Kl=function(e,t){return e===0?t.bounds:e===2?Wl(t):Ul(t)},ql=function(e,t,n){var r=Gl(Zl(e.styles.backgroundOrigin,t),e),i=Kl(Zl(e.styles.backgroundClip,t),e),a=Xl(Zl(e.styles.backgroundSize,t),n,r),o=a[0],s=a[1],c=Rr(Zl(e.styles.backgroundPosition,t),r.width-o,r.height-s),l=Ql(Zl(e.styles.backgroundRepeat,t),c,a,r,i),u=Math.round(r.left+c[0]),d=Math.round(r.top+c[1]);return[l,u,d,o,s]},Jl=function(e){return R(e)&&e.value===Ni.AUTO},Yl=function(e){return typeof e==`number`},Xl=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1];if(!o)return[0,0];if(z(o)&&s&&z(s))return[V(o,n.width),V(s,n.height)];var c=Yl(a);if(R(o)&&(o.value===Ni.CONTAIN||o.value===Ni.COVER)){if(Yl(a)){var l=n.width/n.height;return l<a==(o.value===Ni.COVER)?[n.height*a,n.height]:[n.width,n.width/a]}return[n.width,n.height]}var u=Yl(r),d=Yl(i),f=u||d;if(Jl(o)&&(!s||Jl(s))){if(u&&d)return[r,i];if(!c&&!f)return[n.width,n.height];if(f&&c){var p=u?r:i*a,m=d?i:r/a;return[p,m]}var h=u?r:n.width,g=d?i:n.height;return[h,g]}if(c){var _=0,v=0;return z(o)?_=V(o,n.width):z(s)&&(v=V(s,n.height)),Jl(o)?_=v*a:(!s||Jl(s))&&(v=_/a),[_,v]}var y=null,b=null;if(z(o)?y=V(o,n.width):s&&z(s)&&(b=V(s,n.height)),y!==null&&(!s||Jl(s))&&(b=u&&d?y/r*i:n.height),b!==null&&Jl(o)&&(y=u&&d?b/i*r:n.width),y!==null&&b!==null)return[y,b];throw Error(`Unable to calculate background-size for element`)},Zl=function(e,t){var n=e[t];return n===void 0?e[0]:n},Ql=function(e,t,n,r,i){var a=t[0],o=t[1],s=n[0],c=n[1];switch(e){case 2:return[new Y(Math.round(r.left),Math.round(r.top+o)),new Y(Math.round(r.left+r.width),Math.round(r.top+o)),new Y(Math.round(r.left+r.width),Math.round(c+r.top+o)),new Y(Math.round(r.left),Math.round(c+r.top+o))];case 3:return[new Y(Math.round(r.left+a),Math.round(r.top)),new Y(Math.round(r.left+a+s),Math.round(r.top)),new Y(Math.round(r.left+a+s),Math.round(r.height+r.top)),new Y(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new Y(Math.round(r.left+a),Math.round(r.top+o)),new Y(Math.round(r.left+a+s),Math.round(r.top+o)),new Y(Math.round(r.left+a+s),Math.round(r.top+o+c)),new Y(Math.round(r.left+a),Math.round(r.top+o+c))];default:return[new Y(Math.round(i.left),Math.round(i.top)),new Y(Math.round(i.left+i.width),Math.round(i.top)),new Y(Math.round(i.left+i.width),Math.round(i.height+i.top)),new Y(Math.round(i.left),Math.round(i.height+i.top))]}},$l=`data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`,eu=`Hidden Text`,tu=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement(`div`),r=this._document.createElement(`img`),i=this._document.createElement(`span`),a=this._document.body;n.style.visibility=`hidden`,n.style.fontFamily=e,n.style.fontSize=t,n.style.margin=`0`,n.style.padding=`0`,n.style.whiteSpace=`nowrap`,a.appendChild(n),r.src=$l,r.width=1,r.height=1,r.style.margin=`0`,r.style.padding=`0`,r.style.verticalAlign=`baseline`,i.style.fontFamily=e,i.style.fontSize=t,i.style.margin=`0`,i.style.padding=`0`,i.appendChild(this._document.createTextNode(eu)),n.appendChild(i),n.appendChild(r);var o=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(eu)),n.style.lineHeight=`normal`,r.style.verticalAlign=`super`;var s=r.offsetTop-n.offsetTop+2;return a.removeChild(n),{baseline:o,middle:s}},e.prototype.getMetrics=function(e,t){var n=e+` `+t;return this._data[n]===void 0&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),nu=function(){function e(e,t){this.context=e,this.options=t}return e}(),ru=1e4,iu=function(e){E(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement(`canvas`),r.ctx=r.canvas.getContext(`2d`),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+`px`,r.canvas.style.height=n.height+`px`),r.fontMetrics=new tu(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline=`bottom`,r._activeEffects=[],r.context.logger.debug(`Canvas renderer initialized (`+n.width+`x`+n.height+`) with scale `+n.scale),r}return t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(e){return t.applyEffect(e)})},t.prototype.applyEffect=function(e){this.ctx.save(),Al(e)&&(this.ctx.globalAlpha=e.opacity),Ol(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),kl(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return O(this,void 0,void 0,function(){var t;return k(this,function(n){switch(n.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return O(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:if(G(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,t,n){var r=this;if(t===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n);else{var i=Os(e.text);i.reduce(function(t,i){return r.ctx.fillText(i,t,e.bounds.top+n),t+r.ctx.measureText(i).width},e.bounds.left)}},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(e){return e===`normal`||e===`small-caps`}).join(``),n=lu(e.fontFamily).join(`, `),r=Er(e.fontSize)?``+e.fontSize.number+e.fontSize.unit:e.fontSize.number+`px`;return[[e.fontStyle,t,e.fontWeight,r,n].join(` `),n,r]},t.prototype.renderTextNode=function(e,t){return O(this,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u=this;return k(this,function(d){return n=this.createFontStyle(t),r=n[0],i=n[1],a=n[2],this.ctx.font=r,this.ctx.direction=t.direction===1?`rtl`:`ltr`,this.ctx.textAlign=`left`,this.ctx.textBaseline=`alphabetic`,o=this.fontMetrics.getMetrics(i,a),s=o.baseline,c=o.middle,l=t.paintOrder,e.textBounds.forEach(function(e){l.forEach(function(n){switch(n){case 0:u.ctx.fillStyle=U(t.color),u.renderTextWithLetterSpacing(e,t.letterSpacing,s);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(function(n){u.ctx.shadowColor=U(n.color),u.ctx.shadowOffsetX=n.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=n.offsetY.number*u.options.scale,u.ctx.shadowBlur=n.blur.number,u.renderTextWithLetterSpacing(e,t.letterSpacing,s)}),u.ctx.shadowColor=``,u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=U(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){switch(t){case 1:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+s),e.bounds.width,1);break;case 2:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:u.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+c),e.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(u.ctx.strokeStyle=U(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?`miter`:`round`,u.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+s)),u.ctx.strokeStyle=``,u.ctx.lineWidth=0,u.ctx.lineJoin=`miter`;break}})}),[2]})})},t.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=Wl(e),i=wl(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return O(this,void 0,void 0,function(){var n,r,i,a,o,s,c,c,l,u,d,f,p,m,h,g,_,v,y,c,b,p,g;return k(this,function(x){switch(x.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,a=0,o=n.textNodes,x.label=1;case 1:return a<o.length?(s=o[a],[4,this.renderTextNode(s,i)]):[3,4];case 2:x.sent(),x.label=3;case 3:return a++,[3,1];case 4:if(!(n instanceof Ls))return[3,8];x.label=5;case 5:return x.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return c=x.sent(),this.renderReplacedElement(n,r,c),[3,8];case 7:return x.sent(),this.context.logger.error(`Error loading image `+n.src),[3,8];case 8:if(n instanceof Rs&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof zs))return[3,12];x.label=9;case 9:return x.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return c=x.sent(),this.renderReplacedElement(n,r,c),[3,12];case 11:return x.sent(),this.context.logger.error(`Error loading svg `+n.svg.substring(0,255)),[3,12];case 12:return n instanceof $s&&n.tree?(l=new t(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,l.render(n.tree)]):[3,14];case 13:u=x.sent(),n.width&&n.height&&this.ctx.drawImage(u,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),x.label=14;case 14:if(n instanceof Xs&&(d=Math.min(n.bounds.width,n.bounds.height),n.type===Ks?n.checked&&(this.ctx.save(),this.path([new Y(n.bounds.left+d*.39363,n.bounds.top+d*.79),new Y(n.bounds.left+d*.16,n.bounds.top+d*.5549),new Y(n.bounds.left+d*.27347,n.bounds.top+d*.44071),new Y(n.bounds.left+d*.39694,n.bounds.top+d*.5649),new Y(n.bounds.left+d*.72983,n.bounds.top+d*.23),new Y(n.bounds.left+d*.84,n.bounds.top+d*.34085),new Y(n.bounds.left+d*.39363,n.bounds.top+d*.79)]),this.ctx.fillStyle=U(Ys),this.ctx.fill(),this.ctx.restore()):n.type===qs&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+d/2,n.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=U(Ys),this.ctx.fill(),this.ctx.restore())),au(n)&&n.value.length){switch(f=this.createFontStyle(i),p=f[0],m=f[1],h=this.fontMetrics.getMetrics(p,m).baseline,this.ctx.font=p,this.ctx.fillStyle=U(i.color),this.ctx.textBaseline=`alphabetic`,this.ctx.textAlign=su(n.styles.textAlign),g=Wl(n),_=0,n.styles.textAlign){case 1:_+=g.width/2;break;case 2:_+=g.width;break}v=g.add(_,0,0,-g.height/2+1),this.ctx.save(),this.path([new Y(g.left,g.top),new Y(g.left+g.width,g.top),new Y(g.left+g.width,g.top+g.height),new Y(g.left,g.top+g.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new ws(n.value,v),i.letterSpacing,h),this.ctx.restore(),this.ctx.textBaseline=`alphabetic`,this.ctx.textAlign=`left`}if(!G(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(y=n.styles.listStyleImage,y.type!==0)return[3,18];c=void 0,b=y.url,x.label=15;case 15:return x.trys.push([15,17,,18]),[4,this.context.cache.match(b)];case 16:return c=x.sent(),this.ctx.drawImage(c,n.bounds.left-(c.width+10),n.bounds.top),[3,18];case 17:return x.sent(),this.context.logger.error(`Error loading list-style-image `+b),[3,18];case 18:return[3,20];case 19:e.listValue&&n.styles.listStyleType!==-1&&(p=this.createFontStyle(i)[0],this.ctx.font=p,this.ctx.fillStyle=U(i.color),this.ctx.textBaseline=`middle`,this.ctx.textAlign=`right`,g=new j(n.bounds.left,n.bounds.top+V(n.styles.paddingTop,n.bounds.width),n.bounds.width,da(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new ws(e.listValue,g),i.letterSpacing,da(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline=`bottom`,this.ctx.textAlign=`left`),x.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return O(this,void 0,void 0,function(){var t,n,r,i,a,r,o,s,r,c,l,r,u,d,r,f,p,r,m,h,r;return k(this,function(g){switch(g.label){case 0:if(G(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:g.sent(),t=0,n=e.negativeZIndex,g.label=2;case 2:return t<n.length?(r=n[t],[4,this.renderStack(r)]):[3,5];case 3:g.sent(),g.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:g.sent(),i=0,a=e.nonInlineLevel,g.label=7;case 7:return i<a.length?(r=a[i],[4,this.renderNode(r)]):[3,10];case 8:g.sent(),g.label=9;case 9:return i++,[3,7];case 10:o=0,s=e.nonPositionedFloats,g.label=11;case 11:return o<s.length?(r=s[o],[4,this.renderStack(r)]):[3,14];case 12:g.sent(),g.label=13;case 13:return o++,[3,11];case 14:c=0,l=e.nonPositionedInlineLevel,g.label=15;case 15:return c<l.length?(r=l[c],[4,this.renderStack(r)]):[3,18];case 16:g.sent(),g.label=17;case 17:return c++,[3,15];case 18:u=0,d=e.inlineLevel,g.label=19;case 19:return u<d.length?(r=d[u],[4,this.renderNode(r)]):[3,22];case 20:g.sent(),g.label=21;case 21:return u++,[3,19];case 22:f=0,p=e.zeroOrAutoZIndexOrTransformedOrOpacity,g.label=23;case 23:return f<p.length?(r=p[f],[4,this.renderStack(r)]):[3,26];case 24:g.sent(),g.label=25;case 25:return f++,[3,23];case 26:m=0,h=e.positiveZIndex,g.label=27;case 27:return m<h.length?(r=h[m],[4,this.renderStack(r)]):[3,30];case 28:g.sent(),g.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach(function(e,n){var r=X(e)?e.start:e;n===0?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),X(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)})},t.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},t.prototype.resizeImage=function(e,t,n){var r;if(e.width===t&&e.height===n)return e;var i=(r=this.canvas.ownerDocument)??document,a=i.createElement(`canvas`);a.width=Math.max(1,t),a.height=Math.max(1,n);var o=a.getContext(`2d`);return o.drawImage(e,0,0,e.width,e.height,0,0,t,n),a},t.prototype.renderBackgroundImage=function(e){return O(this,void 0,void 0,function(){var t,n,r,i,a,o;return k(this,function(s){switch(s.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var i,a,o,s,c,l,u,d,f,p,s,c,l,u,d,m,h,g,_,v,y,b,x,S,f,C,s,w,T,u,d,E,c,l,D,O,A,j,M,ee,te,N;return k(this,function(k){switch(k.label){case 0:if(n.type!==0)return[3,5];i=void 0,a=n.url,k.label=1;case 1:return k.trys.push([1,3,,4]),[4,r.context.cache.match(a)];case 2:return i=k.sent(),[3,4];case 3:return k.sent(),r.context.logger.error(`Error loading background-image `+a),[3,4];case 4:return i&&(o=ql(e,t,[i.width,i.height,i.width/i.height]),s=o[0],c=o[1],l=o[2],u=o[3],d=o[4],f=r.ctx.createPattern(r.resizeImage(i,u,d),`repeat`),r.renderRepeat(s,f,c,l)),[3,6];case 5:Ci(n)?(p=ql(e,t,[null,null,null]),s=p[0],c=p[1],l=p[2],u=p[3],d=p[4],m=si(n.angle,u,d),h=m[0],g=m[1],_=m[2],v=m[3],y=m[4],b=document.createElement(`canvas`),b.width=u,b.height=d,x=b.getContext(`2d`),S=x.createLinearGradient(g,v,_,y),ai(n.stops,h).forEach(function(e){return S.addColorStop(e.stop,U(e.color))}),x.fillStyle=S,x.fillRect(0,0,u,d),u>0&&d>0&&(f=r.ctx.createPattern(b,`repeat`),r.renderRepeat(s,f,c,l))):wi(n)&&(C=ql(e,t,[null,null,null]),s=C[0],w=C[1],T=C[2],u=C[3],d=C[4],E=n.position.length===0?[Ir]:n.position,c=V(E[0],u),l=V(E[E.length-1],d),D=li(n,c,l,u,d),O=D[0],A=D[1],O>0&&A>0&&(j=r.ctx.createRadialGradient(w+c,T+l,0,w+c,T+l,O),ai(n.stops,O*2).forEach(function(e){return j.addColorStop(e.stop,U(e.color))}),r.path(s),r.ctx.fillStyle=j,O===A?r.ctx.fill():(M=e.bounds.left+.5*e.bounds.width,ee=e.bounds.top+.5*e.bounds.height,te=A/O,N=1/te,r.ctx.save(),r.ctx.translate(M,ee),r.ctx.transform(1,0,0,te,0,0),r.ctx.translate(-M,-ee),r.ctx.fillRect(w,N*(T-ee)+ee,u,d*N),r.ctx.restore()))),k.label=6;case 6:return t--,[2]}})},r=this,i=0,a=e.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return i<a.length?(o=a[i],[5,n(o)]):[3,4];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,t,n){return O(this,void 0,void 0,function(){return k(this,function(r){return this.path(Rl(n,t)),this.ctx.fillStyle=U(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,t,n,r){return O(this,void 0,void 0,function(){var i,a;return k(this,function(o){switch(o.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,r)]:[3,2];case 1:return o.sent(),[2];case 2:return i=zl(r,n),this.path(i),this.ctx.fillStyle=U(e),this.ctx.fill(),a=Bl(r,n),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return O(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c,l=this;return k(this,function(u){switch(u.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!qr(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],i=ou(Zl(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),qr(t.backgroundColor)||(this.ctx.fillStyle=U(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(t){l.ctx.save();var n=Sl(e.curves),r=t.inset?0:ru,i=Ml(n,-r+(t.inset?1:-1)*t.spread.number,(t.inset?1:-1)*t.spread.number,t.spread.number*(t.inset?-2:2),t.spread.number*(t.inset?-2:2));t.inset?(l.path(n),l.ctx.clip(),l.mask(i)):(l.mask(n),l.ctx.clip(),l.path(i)),l.ctx.shadowOffsetX=t.offsetX.number+r,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=U(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?U(t.color):`rgba(0,0,0,1)`,l.ctx.fill(),l.ctx.restore()}),u.label=2;case 2:a=0,o=0,s=r,u.label=3;case 3:return o<s.length?(c=s[o],c.style!==0&&!qr(c.color)&&c.width>0?c.style===2?[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return c.style===3?[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,3)]:[3,7];case 6:return u.sent(),[3,11];case 7:return c.style===4?[4,this.renderDoubleBorder(c.color,c.width,a,e.curves)]:[3,9];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,e.curves)];case 10:u.sent(),u.label=11;case 11:a++,u.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,t,n,r,i){return O(this,void 0,void 0,function(){var a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,y,b;return k(this,function(x){return this.ctx.save(),a=Vl(r,n),o=Rl(r,n),i===2&&(this.path(o),this.ctx.clip()),X(o[0])?(s=o[0].start.x,c=o[0].start.y):(s=o[0].x,c=o[0].y),X(o[1])?(l=o[1].end.x,u=o[1].end.y):(l=o[1].x,u=o[1].y),d=n===0||n===2?Math.abs(s-l):Math.abs(c-u),this.ctx.beginPath(),i===3?this.formatPath(a):this.formatPath(o.slice(0,2)),f=t<3?t*3:t*2,p=t<3?t*2:t,i===3&&(f=t,p=t),m=!0,d<=f*2?m=!1:d<=f*2+p?(h=d/(2*f+p),f*=h,p*=h):(g=Math.floor((d+p)/(f+p)),_=(d-g*f)/(g-1),v=(d-(g+1)*f)/g,p=v<=0||Math.abs(p-_)<Math.abs(p-v)?_:v),m&&(i===3?this.ctx.setLineDash([0,f+p]):this.ctx.setLineDash([f,p])),i===3?(this.ctx.lineCap=`round`,this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=U(e),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(X(o[0])&&(y=o[3],b=o[0],this.ctx.beginPath(),this.formatPath([new Y(y.end.x,y.end.y),new Y(b.start.x,b.start.y)]),this.ctx.stroke()),X(o[1])&&(y=o[1],b=o[2],this.ctx.beginPath(),this.formatPath([new Y(y.end.x,y.end.y),new Y(b.start.x,b.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return O(this,void 0,void 0,function(){var t;return k(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=U(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=Ll(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},t}(nu),au=function(e){return e instanceof Qs||e instanceof Zs?!0:e instanceof Xs&&e.type!==qs&&e.type!==Ks},ou=function(e,t){switch(e){case 0:return Sl(t);case 2:return Cl(t);case 1:default:return wl(t)}},su=function(e){switch(e){case 1:return`center`;case 2:return`right`;case 0:default:return`left`}},cu=[`-apple-system`,`system-ui`],lu=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(e){return cu.indexOf(e)===-1}):e},uu=function(e){E(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement(`canvas`),r.ctx=r.canvas.getContext(`2d`),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+`px`,r.canvas.style.height=n.height+`px`,r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug(`EXPERIMENTAL ForeignObject renderer initialized (`+n.width+`x`+n.height+` at `+n.x+`,`+n.y+`) with scale `+n.scale),r}return t.prototype.render=function(e){return O(this,void 0,void 0,function(){var t,n;return k(this,function(r){switch(r.label){case 0:return t=Ss(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,du(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=U(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(nu),du=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src=`data:image/svg+xml;charset=utf-8,`+encodeURIComponent(new XMLSerializer().serializeToString(e))})},fu=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<`u`&&window.console&&typeof console.debug==`function`?console.debug.apply(console,A([this.id,this.getTime()+`ms`],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<`u`&&window.console&&typeof console.info==`function`&&console.info.apply(console,A([this.id,this.getTime()+`ms`],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<`u`&&window.console&&typeof console.warn==`function`?console.warn.apply(console,A([this.id,this.getTime()+`ms`],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<`u`&&window.console&&typeof console.error==`function`?console.error.apply(console,A([this.id,this.getTime()+`ms`],e)):this.info.apply(this,e))},e.instances={},e}(),pu=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName=`#`+ e.instanceCount++,this.logger=new fu({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)??new ul(this,t)}return e.instanceCount=1,e}(),mu=function(e,t){return t===void 0&&(t={}),hu(e,t)};typeof window<`u`&&ll.setContext(window);var hu=function(e,t){return O(void 0,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,S,w,T,E,O,A,te,N,ne,re,ie,ae,oe,se,ce,le,ue,de;return k(this,function(k){switch(k.label){case 0:if(!e||typeof e!=`object`)return[2,Promise.reject(`Invalid element provided as first argument`)];if(n=e.ownerDocument,!n)throw Error(`Element is not attached to a Document`);if(r=n.defaultView,!r)throw Error(`Document is not attached to a Window`);return i={allowTaint:(w=t.allowTaint)??!1,imageTimeout:(T=t.imageTimeout)??15e3,proxy:t.proxy,useCORS:(E=t.useCORS)??!1},a=D({logging:(O=t.logging)??!0,cache:t.cache},i),o={windowWidth:(A=t.windowWidth)??r.innerWidth,windowHeight:(te=t.windowHeight)??r.innerHeight,scrollX:(N=t.scrollX)??r.pageXOffset,scrollY:(ne=t.scrollY)??r.pageYOffset},s=new j(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),c=new pu(a,s),l=(re=t.foreignObjectRendering)??!1,u={allowTaint:(ie=t.allowTaint)??!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},c.logger.debug(`Starting document clone with size `+s.width+`x`+s.height+` scrolled to `+-s.left+`,`+-s.top),d=new Gc(c,e,u),f=d.clonedReferenceElement,f?[4,d.toIFrame(n,s)]:[2,Promise.reject(`Unable to find element in cloned iframe`)];case 1:return p=k.sent(),m=hc(f)||pc(f)?ee(f.ownerDocument):M(c,f),h=m.width,g=m.height,_=m.left,v=m.top,y=gu(c,f,t.backgroundColor),b={canvas:t.canvas,backgroundColor:y,scale:(oe=(ae=t.scale)??r.devicePixelRatio)??1,x:((se=t.x)??0)+_,y:((ce=t.y)??0)+v,width:(le=t.width)??Math.ceil(h),height:(ue=t.height)??Math.ceil(g)},l?(c.logger.debug(`Document cloned, using foreign object rendering`),S=new uu(c,b),[4,S.render(f)]):[3,3];case 2:return x=k.sent(),[3,5];case 3:return c.logger.debug(`Document cloned, element located at `+_+`,`+v+` with size `+h+`x`+g+` using computed rendering`),c.logger.debug(`Starting DOM parsing`),C=rc(c,f),y===C.styles.backgroundColor&&(C.styles.backgroundColor=ti.TRANSPARENT),c.logger.debug(`Starting renderer for element at `+b.x+`,`+b.y+` with size `+b.width+`x`+b.height),S=new iu(c,b),[4,S.render(C)];case 4:x=k.sent(),k.label=5;case 5:return((de=t.removeContainer)??!0)&&(Gc.destroy(p)||c.logger.error(`Cannot detach cloned iframe as it is not in the DOM anymore`)),c.logger.debug(`Finished rendering`),[2,x]}})})},gu=function(e,t,n){var r=t.ownerDocument,i=r.documentElement?ei(e,getComputedStyle(r.documentElement).backgroundColor):ti.TRANSPARENT,a=r.body?ei(e,getComputedStyle(r.body).backgroundColor):ti.TRANSPARENT,o=typeof n==`string`?ei(e,n):n===null?ti.TRANSPARENT:4294967295;return t===r.documentElement?qr(i)?qr(a)?o:a:i:o},_u=mu,vu=`/assets/fairy-forest.e17cbc2774.ko-fi.com-Ddz1VMpz.png`;const yu={class:`h-full w-full flex flex-col gap-4`},bu={class:`relative w-full overflow-hidden rounded-xl`},xu=[`src`],Su={class:`absolute inset-0 flex items-center justify-center`},Cu={class:`debug-info flex flex-col`,bg:`neutral-100 dark:neutral-900`,"rounded-xl":``},wu={flex:``},Tu={class:`rounded-lg p-4`,"flex-1":``},Eu={class:`mb-1 text-lg`,flex:``,"items-center":``,"gap-2":``},Du={class:`color-palette flex flex-wrap gap-2`},Ou=[`title`],ku={class:`mt-2 text-sm`},Au={class:`rounded-lg p-4`,"flex-1":``},ju={class:`mb-1 text-lg`,flex:``,"items-center":``,"gap-2":``},Mu={class:`color-palette flex flex-wrap gap-2`},Nu=[`title`],Pu={class:`mt-2 text-sm`},Fu={class:`rounded-lg p-4`,"w-full":``},Iu={ref:`canvas`,class:`max-w-full`,style:{"max-height":`100px`}};var Lu=i({__name:`background-gradient-blending`,setup(r){let i=y(!1),T=y([]),E=y(``),D=y(``),O=y([]),k=y([]),A=o(()=>k.value.length===0?[vu]:k.value.map(e=>{let t=URL.createObjectURL(e);return O.value.push(()=>URL.revokeObjectURL(t)),t})),j=y(`vibrant`),M=g(`imageRef`),ee=g(`canvas`),{updateThemeColor:te}=t(()=>E.value),N=o(()=>j.value===`vibrant`?E.value:j.value===`html2canvas`?D.value:``);async function ne(){if(A.value.length!==0)try{i.value=!0;let e=new w(A.value[0]),t=await e.getPalette(),n=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`);T.value=n,E.value=t.Vibrant?.hex||t.DarkVibrant?.hex||n[0],await te()}catch(e){console.error(`Color extraction failed:`,e)}finally{i.value=!1}}async function re(){if(M.value)try{i.value=!0;let e=await _u(M.value,{allowTaint:!0,useCORS:!0,backgroundColor:null,scale:.5,height:100,width:M.value.offsetWidth,logging:!1});if(ee.value){let t=ee.value.getContext(`2d`);t&&(ee.value.width=e.width,ee.value.height=e.height,t.drawImage(e,0,0))}let t=e.getContext(`2d`);if(t){let r=t.getImageData(0,0,e.width,20),i=[];for(let e=0;e<r.data.length;e+=40){let t=r.data[e],n=r.data[e+1],a=r.data[e+2],o=r.data[e+3];o>0&&i.push({mode:`rgb`,r:t,g:n,b:a})}if(i.length>0){let e=n(i);D.value=`rgb(${e.r}, ${e.g}, ${e.b})`}}}catch(e){console.error(`Canvas capture failed:`,e)}finally{i.value=!1}}return f(async()=>{await d(),await ne(),await re()}),_(A,async()=>{await d(),await ne(),await re()}),p(()=>{O.value.forEach(e=>e())}),(t,n)=>(m(),c(`div`,yu,[s(`div`,bu,[s(`div`,{class:`pointer-events-none left-0 right-0 top-0 z-10 flex items-center justify-center backdrop-blur-md`,style:S({background:N.value})},n[3]||=[s(`div`,{class:`py-4 text-center text-sm text-white font-medium`},` Top Area `,-1)],4),s(`div`,{class:`transparent-gradient-overlay absolute inset-0 h-[calc((1lh+1rem+1rem)*2)] w-full`,style:S({background:N.value})},null,4),s(`img`,{ref_key:`imageRef`,ref:M,src:A.value[0],class:`h-full max-h-[calc(100dvh-28rem)] w-full object-cover`},null,8,xu),s(`div`,Su,[u(b(e),{modelValue:k.value,"onUpdate:modelValue":n[0]||=e=>k.value=e},{default:v(()=>n[4]||=[s(`div`,{class:`rounded-xl bg-black bg-opacity-30 px-5 py-4 text-white backdrop-blur-sm`},` Replace Image `,-1)]),_:1,__:[4]},8,[`modelValue`])])]),s(`div`,Cu,[s(`div`,wu,[s(`div`,Tu,[s(`h3`,Eu,[n[5]||=s(`span`,null,`Node Vibrant`,-1),s(`button`,{"border-2":``,"border-neutral-300":``,"rounded-xl":``,"border-solid":``,"px-3":``,"py-1":``,"text-sm":``,"font-normal":``,"dark:border-neutral-700":``,class:x([j.value===`vibrant`?`bg-neutral-100 dark:bg-neutral-700`:``]),onClick:n[1]||=e=>j.value=`vibrant`},C(j.value===`vibrant`?`Activated`:`Active`),3)]),s(`div`,Du,[(m(!0),c(a,null,h(T.value,e=>(m(),c(`div`,{key:e,class:`h-12 w-12 cursor-pointer border-2 border-gray-300 rounded rounded-xl transition-transform duration-200 ease-in-out hover:scale-110 dark:border-gray-900`,style:S({backgroundColor:e}),title:e},null,12,Ou))),128))]),s(`p`,ku,[n[6]||=l(` Color: `,-1),s(`span`,{style:S({color:E.value})},C(E.value),5)])]),s(`div`,Au,[s(`h3`,ju,[n[7]||=s(`span`,null,`html2canvas Top sampling`,-1),s(`button`,{"border-2":``,"border-neutral-300":``,"rounded-xl":``,"border-solid":``,"px-3":``,"py-1":``,"text-sm":``,"font-normal":``,"dark:border-neutral-700":``,class:x([j.value===`html2canvas`?`bg-neutral-100 dark:bg-neutral-700`:``]),onClick:n[2]||=e=>j.value=`html2canvas`},C(j.value===`html2canvas`?`Activated`:`Active`),3)]),s(`div`,Mu,[s(`div`,{class:`color-swatch h-12 w-12 border-2 border-gray-300 rounded rounded-xl dark:border-gray-900`,style:S({backgroundColor:D.value}),title:D.value},null,12,Nu)]),s(`p`,Pu,[n[8]||=l(` Color: `,-1),s(`span`,{style:S({color:D.value})},C(D.value),5)])])]),s(`div`,Fu,[n[9]||=s(`h3`,{class:`mb-1 text-lg`},` Captured Canvas (Debug) `,-1),s(`canvas`,Iu,null,512)])])]))}}),Ru=r(Lu,[[`__scopeId`,`data-v-e6e8453f`]]);export{Ru as default};
|
|
|
1 |
+
import{b as e}from"./BasicInputFile-CE2dQPco.js";import{d as t}from"./theme-color-BlBL85DX.js";import{cJ as n,cR as r,eW as i,eZ as a,e_ as o,f1 as s,f2 as c,f3 as l,f4 as u,f9 as d,fa as f,fb as p,fc as m,fe as h,fj as g,fk as _,fm as v,fp as y,ft as b,fu as x,fw as S,fx as C}from"./index-_PXww5qh.js";import{b as w}from"./browser-bFm1l1qg.js";
|
2 |
/*!
|
3 |
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
4 |
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
|
35 |
content: "" !important;
|
36 |
display: none !important;
|
37 |
}`,sl=function(e){cl(e,`.`+il+nl+ol+`
|
38 |
+
.`+al+rl+ol)},cl=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement(`style`);r.textContent=t,e.appendChild(r)}},ll=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):`about:blank`},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement(`a`),e._origin=e.getOrigin(t.location.href)},e._origin=`about:blank`,e}(),ul=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(_l(e)||ml(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return O(this,void 0,void 0,function(){var t,n,r,i,a=this;return k(this,function(o){switch(o.label){case 0:return t=ll.isSameOrigin(e),n=!hl(e)&&this._options.useCORS===!0&&q.SUPPORT_CORS_IMAGES&&!t,r=!hl(e)&&!t&&!_l(e)&&typeof this._options.proxy==`string`&&q.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!hl(e)&&!_l(e)&&!r&&!n?[2]:(i=e,r?[4,this.proxy(i)]:[3,2]);case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug(`Added image `+e.substring(0,256)),[4,new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(gl(i)||n)&&(r.crossOrigin=`anonymous`),r.src=i,r.complete===!0&&setTimeout(function(){return e(r)},500),a._options.imageTimeout>0&&setTimeout(function(){return t(`Timed out (`+a._options.imageTimeout+`ms) loading image`)},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(e){return this._cache[e]!==void 0},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw Error(`No proxy defined`);var r=e.substring(0,256);return new Promise(function(i,a){var o=q.SUPPORT_RESPONSE_TYPE?`blob`:`text`,s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o===`text`)i(s.response);else{var e=new FileReader;e.addEventListener(`load`,function(){return i(e.result)},!1),e.addEventListener(`error`,function(e){return a(e)},!1),e.readAsDataURL(s.response)}else a(`Failed to proxy resource `+r+` with status code `+s.status)},s.onerror=a;var c=n.indexOf(`?`)>-1?`&`:`?`;if(s.open(`GET`,``+n+c+`url=`+encodeURIComponent(e)+`&responseType=`+o),o!==`text`&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a(`Timed out (`+l+`ms) proxying `+r)}}s.send()})},e}(),dl=/^data:image\/svg\+xml/i,fl=/^data:image\/.*;base64,/i,pl=/^data:image\/.*/i,ml=function(e){return q.SUPPORT_SVG_DRAWING||!vl(e)},hl=function(e){return pl.test(e)},gl=function(e){return fl.test(e)},_l=function(e){return e.substr(0,4)===`blob`},vl=function(e){return e.substr(-3).toLowerCase()===`svg`||dl.test(e)},Y=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),yl=function(e,t,n){return new Y(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},bl=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=yl(this.start,this.startControl,t),i=yl(this.startControl,this.endControl,t),a=yl(this.endControl,this.end,t),o=yl(r,i,t),s=yl(i,a,t),c=yl(o,s,t);return n?new e(this.start,r,o,c):new e(c,s,a,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),X=function(e){return e.type===1},xl=function(){function e(e){var t=e.styles,n=e.bounds,r=Rr(t.borderTopLeftRadius,n.width,n.height),i=r[0],a=r[1],o=Rr(t.borderTopRightRadius,n.width,n.height),s=o[0],c=o[1],l=Rr(t.borderBottomRightRadius,n.width,n.height),u=l[0],d=l[1],f=Rr(t.borderBottomLeftRadius,n.width,n.height),p=f[0],m=f[1],h=[];h.push((i+s)/n.width),h.push((p+u)/n.width),h.push((a+m)/n.height),h.push((c+d)/n.height);var g=Math.max.apply(Math,h);g>1&&(i/=g,a/=g,s/=g,c/=g,u/=g,d/=g,p/=g,m/=g);var _=n.width-s,v=n.height-d,y=n.width-u,b=n.height-m,x=t.borderTopWidth,S=t.borderRightWidth,C=t.borderBottomWidth,w=t.borderLeftWidth,T=V(t.paddingTop,e.bounds.width),E=V(t.paddingRight,e.bounds.width),D=V(t.paddingBottom,e.bounds.width),O=V(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?Q(n.left+w/3,n.top+x/3,i-w/3,a-x/3,Z.TOP_LEFT):new Y(n.left+w/3,n.top+x/3),this.topRightBorderDoubleOuterBox=i>0||a>0?Q(n.left+_,n.top+x/3,s-S/3,c-x/3,Z.TOP_RIGHT):new Y(n.left+n.width-S/3,n.top+x/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?Q(n.left+y,n.top+v,u-S/3,d-C/3,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S/3,n.top+n.height-C/3),this.bottomLeftBorderDoubleOuterBox=p>0||m>0?Q(n.left+w/3,n.top+b,p-w/3,m-C/3,Z.BOTTOM_LEFT):new Y(n.left+w/3,n.top+n.height-C/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?Q(n.left+w*2/3,n.top+x*2/3,i-w*2/3,a-x*2/3,Z.TOP_LEFT):new Y(n.left+w*2/3,n.top+x*2/3),this.topRightBorderDoubleInnerBox=i>0||a>0?Q(n.left+_,n.top+x*2/3,s-S*2/3,c-x*2/3,Z.TOP_RIGHT):new Y(n.left+n.width-S*2/3,n.top+x*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?Q(n.left+y,n.top+v,u-S*2/3,d-C*2/3,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S*2/3,n.top+n.height-C*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||m>0?Q(n.left+w*2/3,n.top+b,p-w*2/3,m-C*2/3,Z.BOTTOM_LEFT):new Y(n.left+w*2/3,n.top+n.height-C*2/3),this.topLeftBorderStroke=i>0||a>0?Q(n.left+w/2,n.top+x/2,i-w/2,a-x/2,Z.TOP_LEFT):new Y(n.left+w/2,n.top+x/2),this.topRightBorderStroke=i>0||a>0?Q(n.left+_,n.top+x/2,s-S/2,c-x/2,Z.TOP_RIGHT):new Y(n.left+n.width-S/2,n.top+x/2),this.bottomRightBorderStroke=u>0||d>0?Q(n.left+y,n.top+v,u-S/2,d-C/2,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S/2,n.top+n.height-C/2),this.bottomLeftBorderStroke=p>0||m>0?Q(n.left+w/2,n.top+b,p-w/2,m-C/2,Z.BOTTOM_LEFT):new Y(n.left+w/2,n.top+n.height-C/2),this.topLeftBorderBox=i>0||a>0?Q(n.left,n.top,i,a,Z.TOP_LEFT):new Y(n.left,n.top),this.topRightBorderBox=s>0||c>0?Q(n.left+_,n.top,s,c,Z.TOP_RIGHT):new Y(n.left+n.width,n.top),this.bottomRightBorderBox=u>0||d>0?Q(n.left+y,n.top+v,u,d,Z.BOTTOM_RIGHT):new Y(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=p>0||m>0?Q(n.left,n.top+b,p,m,Z.BOTTOM_LEFT):new Y(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||a>0?Q(n.left+w,n.top+x,Math.max(0,i-w),Math.max(0,a-x),Z.TOP_LEFT):new Y(n.left+w,n.top+x),this.topRightPaddingBox=s>0||c>0?Q(n.left+Math.min(_,n.width-S),n.top+x,_>n.width+S?0:Math.max(0,s-S),Math.max(0,c-x),Z.TOP_RIGHT):new Y(n.left+n.width-S,n.top+x),this.bottomRightPaddingBox=u>0||d>0?Q(n.left+Math.min(y,n.width-w),n.top+Math.min(v,n.height-C),Math.max(0,u-S),Math.max(0,d-C),Z.BOTTOM_RIGHT):new Y(n.left+n.width-S,n.top+n.height-C),this.bottomLeftPaddingBox=p>0||m>0?Q(n.left+w,n.top+Math.min(b,n.height-C),Math.max(0,p-w),Math.max(0,m-C),Z.BOTTOM_LEFT):new Y(n.left+w,n.top+n.height-C),this.topLeftContentBox=i>0||a>0?Q(n.left+w+O,n.top+x+T,Math.max(0,i-(w+O)),Math.max(0,a-(x+T)),Z.TOP_LEFT):new Y(n.left+w+O,n.top+x+T),this.topRightContentBox=s>0||c>0?Q(n.left+Math.min(_,n.width+w+O),n.top+x+T,_>n.width+w+O?0:s-w+O,c-(x+T),Z.TOP_RIGHT):new Y(n.left+n.width-(S+E),n.top+x+T),this.bottomRightContentBox=u>0||d>0?Q(n.left+Math.min(y,n.width-(w+O)),n.top+Math.min(v,n.height+x+T),Math.max(0,u-(S+E)),d-(C+D),Z.BOTTOM_RIGHT):new Y(n.left+n.width-(S+E),n.top+n.height-(C+D)),this.bottomLeftContentBox=p>0||m>0?Q(n.left+w+O,n.top+b,Math.max(0,p-(w+O)),m-(C+D),Z.BOTTOM_LEFT):new Y(n.left+w+O,n.top+n.height-(C+D))}return e}(),Z;(function(e){e[e.TOP_LEFT=0]=`TOP_LEFT`,e[e.TOP_RIGHT=1]=`TOP_RIGHT`,e[e.BOTTOM_RIGHT=2]=`BOTTOM_RIGHT`,e[e.BOTTOM_LEFT=3]=`BOTTOM_LEFT`})(Z||={});var Q=function(e,t,n,r,i){var a=4*((Math.sqrt(2)-1)/3),o=n*a,s=r*a,c=e+n,l=t+r;switch(i){case Z.TOP_LEFT:return new bl(new Y(e,l),new Y(e,l-s),new Y(c-o,t),new Y(c,t));case Z.TOP_RIGHT:return new bl(new Y(e,t),new Y(e+o,t),new Y(c,l-s),new Y(c,l));case Z.BOTTOM_RIGHT:return new bl(new Y(c,t),new Y(c,t+s),new Y(e+o,l),new Y(e,l));case Z.BOTTOM_LEFT:default:return new bl(new Y(c,l),new Y(c-o,l),new Y(e,t+s),new Y(e,t))}},Sl=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Cl=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},wl=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Tl=function(){function e(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return e}(),El=function(){function e(e,t){this.path=e,this.target=t,this.type=1}return e}(),Dl=function(){function e(e){this.opacity=e,this.type=2,this.target=6}return e}(),Ol=function(e){return e.type===0},kl=function(e){return e.type===1},Al=function(e){return e.type===2},jl=function(e,t){return e.length===t.length?e.some(function(e,n){return e===t[n]}):!1},Ml=function(e,t,n,r,i){return e.map(function(e,a){switch(a){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e})},Nl=function(){function e(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Pl=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new xl(this.container),this.container.styles.opacity<1&&this.effects.push(new Dl(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Tl(n,r,i))}if(this.container.styles.overflowX!==0){var a=Sl(this.curves),o=wl(this.curves);jl(a,o)?this.effects.push(new El(a,6)):(this.effects.push(new El(a,2)),this.effects.push(new El(o,4)))}}return e.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(e){return!kl(e)});if(t||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,i),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var a=Sl(n.curves),o=wl(n.curves);jl(a,o)||r.unshift(new El(o,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(t){return G(t.target,e)})},e}(),Fl=function(e,t,n,r){e.container.elements.forEach(function(i){var a=G(i.flags,4),o=G(i.flags,2),s=new Pl(i,e);G(i.styles.display,2048)&&r.push(s);var c=G(i.flags,8)?[]:r;if(a||o){var l=a||i.styles.isPositioned()?n:t,u=new Nl(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var d=i.styles.zIndex.order;if(d<0){var f=0;l.negativeZIndex.some(function(e,t){return d>e.element.container.styles.zIndex.order?(f=t,!1):f>0}),l.negativeZIndex.splice(f,0,u)}else if(d>0){var p=0;l.positiveZIndex.some(function(e,t){return d>=e.element.container.styles.zIndex.order?(p=t+1,!1):p>0}),l.positiveZIndex.splice(p,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Fl(s,u,a?u:n,c)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),Fl(s,t,n,c);G(i.flags,8)&&Il(i,c)})},Il=function(e,t){for(var n=e instanceof Vs?e.start:1,r=e instanceof Vs?e.reversed:!1,i=0;i<t.length;i++){var a=t[i];a.container instanceof Bs&&typeof a.container.value==`number`&&a.container.value!==0&&(n=a.container.value),a.listValue=Uc(n,a.container.styles.listStyleType,!0),n+=r?-1:1}},Ll=function(e){var t=new Pl(e,null),n=new Nl(t),r=[];return Fl(t,n,n,r),Il(t.container,r),n},Rl=function(e,t){switch(t){case 0:return $(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return $(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return $(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return $(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},zl=function(e,t){switch(t){case 0:return $(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return $(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return $(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return $(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},Bl=function(e,t){switch(t){case 0:return $(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return $(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return $(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return $(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},Vl=function(e,t){switch(t){case 0:return Hl(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Hl(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Hl(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return Hl(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Hl=function(e,t){var n=[];return X(e)?n.push(e.subdivide(.5,!1)):n.push(e),X(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},$=function(e,t,n,r){var i=[];return X(e)?i.push(e.subdivide(.5,!1)):i.push(e),X(n)?i.push(n.subdivide(.5,!0)):i.push(n),X(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),X(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},Ul=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},Wl=function(e){var t=e.styles,n=e.bounds,r=V(t.paddingLeft,n.width),i=V(t.paddingRight,n.width),a=V(t.paddingTop,n.width),o=V(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+a+o))},Gl=function(e,t){return e===0?t.bounds:e===2?Wl(t):Ul(t)},Kl=function(e,t){return e===0?t.bounds:e===2?Wl(t):Ul(t)},ql=function(e,t,n){var r=Gl(Zl(e.styles.backgroundOrigin,t),e),i=Kl(Zl(e.styles.backgroundClip,t),e),a=Xl(Zl(e.styles.backgroundSize,t),n,r),o=a[0],s=a[1],c=Rr(Zl(e.styles.backgroundPosition,t),r.width-o,r.height-s),l=Ql(Zl(e.styles.backgroundRepeat,t),c,a,r,i),u=Math.round(r.left+c[0]),d=Math.round(r.top+c[1]);return[l,u,d,o,s]},Jl=function(e){return R(e)&&e.value===Ni.AUTO},Yl=function(e){return typeof e==`number`},Xl=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1];if(!o)return[0,0];if(z(o)&&s&&z(s))return[V(o,n.width),V(s,n.height)];var c=Yl(a);if(R(o)&&(o.value===Ni.CONTAIN||o.value===Ni.COVER)){if(Yl(a)){var l=n.width/n.height;return l<a==(o.value===Ni.COVER)?[n.height*a,n.height]:[n.width,n.width/a]}return[n.width,n.height]}var u=Yl(r),d=Yl(i),f=u||d;if(Jl(o)&&(!s||Jl(s))){if(u&&d)return[r,i];if(!c&&!f)return[n.width,n.height];if(f&&c){var p=u?r:i*a,m=d?i:r/a;return[p,m]}var h=u?r:n.width,g=d?i:n.height;return[h,g]}if(c){var _=0,v=0;return z(o)?_=V(o,n.width):z(s)&&(v=V(s,n.height)),Jl(o)?_=v*a:(!s||Jl(s))&&(v=_/a),[_,v]}var y=null,b=null;if(z(o)?y=V(o,n.width):s&&z(s)&&(b=V(s,n.height)),y!==null&&(!s||Jl(s))&&(b=u&&d?y/r*i:n.height),b!==null&&Jl(o)&&(y=u&&d?b/i*r:n.width),y!==null&&b!==null)return[y,b];throw Error(`Unable to calculate background-size for element`)},Zl=function(e,t){var n=e[t];return n===void 0?e[0]:n},Ql=function(e,t,n,r,i){var a=t[0],o=t[1],s=n[0],c=n[1];switch(e){case 2:return[new Y(Math.round(r.left),Math.round(r.top+o)),new Y(Math.round(r.left+r.width),Math.round(r.top+o)),new Y(Math.round(r.left+r.width),Math.round(c+r.top+o)),new Y(Math.round(r.left),Math.round(c+r.top+o))];case 3:return[new Y(Math.round(r.left+a),Math.round(r.top)),new Y(Math.round(r.left+a+s),Math.round(r.top)),new Y(Math.round(r.left+a+s),Math.round(r.height+r.top)),new Y(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new Y(Math.round(r.left+a),Math.round(r.top+o)),new Y(Math.round(r.left+a+s),Math.round(r.top+o)),new Y(Math.round(r.left+a+s),Math.round(r.top+o+c)),new Y(Math.round(r.left+a),Math.round(r.top+o+c))];default:return[new Y(Math.round(i.left),Math.round(i.top)),new Y(Math.round(i.left+i.width),Math.round(i.top)),new Y(Math.round(i.left+i.width),Math.round(i.height+i.top)),new Y(Math.round(i.left),Math.round(i.height+i.top))]}},$l=`data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`,eu=`Hidden Text`,tu=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement(`div`),r=this._document.createElement(`img`),i=this._document.createElement(`span`),a=this._document.body;n.style.visibility=`hidden`,n.style.fontFamily=e,n.style.fontSize=t,n.style.margin=`0`,n.style.padding=`0`,n.style.whiteSpace=`nowrap`,a.appendChild(n),r.src=$l,r.width=1,r.height=1,r.style.margin=`0`,r.style.padding=`0`,r.style.verticalAlign=`baseline`,i.style.fontFamily=e,i.style.fontSize=t,i.style.margin=`0`,i.style.padding=`0`,i.appendChild(this._document.createTextNode(eu)),n.appendChild(i),n.appendChild(r);var o=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(eu)),n.style.lineHeight=`normal`,r.style.verticalAlign=`super`;var s=r.offsetTop-n.offsetTop+2;return a.removeChild(n),{baseline:o,middle:s}},e.prototype.getMetrics=function(e,t){var n=e+` `+t;return this._data[n]===void 0&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),nu=function(){function e(e,t){this.context=e,this.options=t}return e}(),ru=1e4,iu=function(e){E(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement(`canvas`),r.ctx=r.canvas.getContext(`2d`),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+`px`,r.canvas.style.height=n.height+`px`),r.fontMetrics=new tu(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline=`bottom`,r._activeEffects=[],r.context.logger.debug(`Canvas renderer initialized (`+n.width+`x`+n.height+`) with scale `+n.scale),r}return t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(e){return t.applyEffect(e)})},t.prototype.applyEffect=function(e){this.ctx.save(),Al(e)&&(this.ctx.globalAlpha=e.opacity),Ol(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),kl(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return O(this,void 0,void 0,function(){var t;return k(this,function(n){switch(n.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return O(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:if(G(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,t,n){var r=this;if(t===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n);else{var i=Os(e.text);i.reduce(function(t,i){return r.ctx.fillText(i,t,e.bounds.top+n),t+r.ctx.measureText(i).width},e.bounds.left)}},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(e){return e===`normal`||e===`small-caps`}).join(``),n=lu(e.fontFamily).join(`, `),r=Er(e.fontSize)?``+e.fontSize.number+e.fontSize.unit:e.fontSize.number+`px`;return[[e.fontStyle,t,e.fontWeight,r,n].join(` `),n,r]},t.prototype.renderTextNode=function(e,t){return O(this,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u=this;return k(this,function(d){return n=this.createFontStyle(t),r=n[0],i=n[1],a=n[2],this.ctx.font=r,this.ctx.direction=t.direction===1?`rtl`:`ltr`,this.ctx.textAlign=`left`,this.ctx.textBaseline=`alphabetic`,o=this.fontMetrics.getMetrics(i,a),s=o.baseline,c=o.middle,l=t.paintOrder,e.textBounds.forEach(function(e){l.forEach(function(n){switch(n){case 0:u.ctx.fillStyle=U(t.color),u.renderTextWithLetterSpacing(e,t.letterSpacing,s);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(function(n){u.ctx.shadowColor=U(n.color),u.ctx.shadowOffsetX=n.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=n.offsetY.number*u.options.scale,u.ctx.shadowBlur=n.blur.number,u.renderTextWithLetterSpacing(e,t.letterSpacing,s)}),u.ctx.shadowColor=``,u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=U(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){switch(t){case 1:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+s),e.bounds.width,1);break;case 2:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:u.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+c),e.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(u.ctx.strokeStyle=U(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?`miter`:`round`,u.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+s)),u.ctx.strokeStyle=``,u.ctx.lineWidth=0,u.ctx.lineJoin=`miter`;break}})}),[2]})})},t.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=Wl(e),i=wl(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return O(this,void 0,void 0,function(){var n,r,i,a,o,s,c,c,l,u,d,f,p,m,h,g,_,v,y,c,b,p,g;return k(this,function(x){switch(x.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,a=0,o=n.textNodes,x.label=1;case 1:return a<o.length?(s=o[a],[4,this.renderTextNode(s,i)]):[3,4];case 2:x.sent(),x.label=3;case 3:return a++,[3,1];case 4:if(!(n instanceof Ls))return[3,8];x.label=5;case 5:return x.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return c=x.sent(),this.renderReplacedElement(n,r,c),[3,8];case 7:return x.sent(),this.context.logger.error(`Error loading image `+n.src),[3,8];case 8:if(n instanceof Rs&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof zs))return[3,12];x.label=9;case 9:return x.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return c=x.sent(),this.renderReplacedElement(n,r,c),[3,12];case 11:return x.sent(),this.context.logger.error(`Error loading svg `+n.svg.substring(0,255)),[3,12];case 12:return n instanceof $s&&n.tree?(l=new t(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,l.render(n.tree)]):[3,14];case 13:u=x.sent(),n.width&&n.height&&this.ctx.drawImage(u,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),x.label=14;case 14:if(n instanceof Xs&&(d=Math.min(n.bounds.width,n.bounds.height),n.type===Ks?n.checked&&(this.ctx.save(),this.path([new Y(n.bounds.left+d*.39363,n.bounds.top+d*.79),new Y(n.bounds.left+d*.16,n.bounds.top+d*.5549),new Y(n.bounds.left+d*.27347,n.bounds.top+d*.44071),new Y(n.bounds.left+d*.39694,n.bounds.top+d*.5649),new Y(n.bounds.left+d*.72983,n.bounds.top+d*.23),new Y(n.bounds.left+d*.84,n.bounds.top+d*.34085),new Y(n.bounds.left+d*.39363,n.bounds.top+d*.79)]),this.ctx.fillStyle=U(Ys),this.ctx.fill(),this.ctx.restore()):n.type===qs&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+d/2,n.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=U(Ys),this.ctx.fill(),this.ctx.restore())),au(n)&&n.value.length){switch(f=this.createFontStyle(i),p=f[0],m=f[1],h=this.fontMetrics.getMetrics(p,m).baseline,this.ctx.font=p,this.ctx.fillStyle=U(i.color),this.ctx.textBaseline=`alphabetic`,this.ctx.textAlign=su(n.styles.textAlign),g=Wl(n),_=0,n.styles.textAlign){case 1:_+=g.width/2;break;case 2:_+=g.width;break}v=g.add(_,0,0,-g.height/2+1),this.ctx.save(),this.path([new Y(g.left,g.top),new Y(g.left+g.width,g.top),new Y(g.left+g.width,g.top+g.height),new Y(g.left,g.top+g.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new ws(n.value,v),i.letterSpacing,h),this.ctx.restore(),this.ctx.textBaseline=`alphabetic`,this.ctx.textAlign=`left`}if(!G(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(y=n.styles.listStyleImage,y.type!==0)return[3,18];c=void 0,b=y.url,x.label=15;case 15:return x.trys.push([15,17,,18]),[4,this.context.cache.match(b)];case 16:return c=x.sent(),this.ctx.drawImage(c,n.bounds.left-(c.width+10),n.bounds.top),[3,18];case 17:return x.sent(),this.context.logger.error(`Error loading list-style-image `+b),[3,18];case 18:return[3,20];case 19:e.listValue&&n.styles.listStyleType!==-1&&(p=this.createFontStyle(i)[0],this.ctx.font=p,this.ctx.fillStyle=U(i.color),this.ctx.textBaseline=`middle`,this.ctx.textAlign=`right`,g=new j(n.bounds.left,n.bounds.top+V(n.styles.paddingTop,n.bounds.width),n.bounds.width,da(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new ws(e.listValue,g),i.letterSpacing,da(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline=`bottom`,this.ctx.textAlign=`left`),x.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return O(this,void 0,void 0,function(){var t,n,r,i,a,r,o,s,r,c,l,r,u,d,r,f,p,r,m,h,r;return k(this,function(g){switch(g.label){case 0:if(G(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:g.sent(),t=0,n=e.negativeZIndex,g.label=2;case 2:return t<n.length?(r=n[t],[4,this.renderStack(r)]):[3,5];case 3:g.sent(),g.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:g.sent(),i=0,a=e.nonInlineLevel,g.label=7;case 7:return i<a.length?(r=a[i],[4,this.renderNode(r)]):[3,10];case 8:g.sent(),g.label=9;case 9:return i++,[3,7];case 10:o=0,s=e.nonPositionedFloats,g.label=11;case 11:return o<s.length?(r=s[o],[4,this.renderStack(r)]):[3,14];case 12:g.sent(),g.label=13;case 13:return o++,[3,11];case 14:c=0,l=e.nonPositionedInlineLevel,g.label=15;case 15:return c<l.length?(r=l[c],[4,this.renderStack(r)]):[3,18];case 16:g.sent(),g.label=17;case 17:return c++,[3,15];case 18:u=0,d=e.inlineLevel,g.label=19;case 19:return u<d.length?(r=d[u],[4,this.renderNode(r)]):[3,22];case 20:g.sent(),g.label=21;case 21:return u++,[3,19];case 22:f=0,p=e.zeroOrAutoZIndexOrTransformedOrOpacity,g.label=23;case 23:return f<p.length?(r=p[f],[4,this.renderStack(r)]):[3,26];case 24:g.sent(),g.label=25;case 25:return f++,[3,23];case 26:m=0,h=e.positiveZIndex,g.label=27;case 27:return m<h.length?(r=h[m],[4,this.renderStack(r)]):[3,30];case 28:g.sent(),g.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach(function(e,n){var r=X(e)?e.start:e;n===0?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),X(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)})},t.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},t.prototype.resizeImage=function(e,t,n){var r;if(e.width===t&&e.height===n)return e;var i=(r=this.canvas.ownerDocument)??document,a=i.createElement(`canvas`);a.width=Math.max(1,t),a.height=Math.max(1,n);var o=a.getContext(`2d`);return o.drawImage(e,0,0,e.width,e.height,0,0,t,n),a},t.prototype.renderBackgroundImage=function(e){return O(this,void 0,void 0,function(){var t,n,r,i,a,o;return k(this,function(s){switch(s.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var i,a,o,s,c,l,u,d,f,p,s,c,l,u,d,m,h,g,_,v,y,b,x,S,f,C,s,w,T,u,d,E,c,l,D,O,A,j,M,ee,te,N;return k(this,function(k){switch(k.label){case 0:if(n.type!==0)return[3,5];i=void 0,a=n.url,k.label=1;case 1:return k.trys.push([1,3,,4]),[4,r.context.cache.match(a)];case 2:return i=k.sent(),[3,4];case 3:return k.sent(),r.context.logger.error(`Error loading background-image `+a),[3,4];case 4:return i&&(o=ql(e,t,[i.width,i.height,i.width/i.height]),s=o[0],c=o[1],l=o[2],u=o[3],d=o[4],f=r.ctx.createPattern(r.resizeImage(i,u,d),`repeat`),r.renderRepeat(s,f,c,l)),[3,6];case 5:Ci(n)?(p=ql(e,t,[null,null,null]),s=p[0],c=p[1],l=p[2],u=p[3],d=p[4],m=si(n.angle,u,d),h=m[0],g=m[1],_=m[2],v=m[3],y=m[4],b=document.createElement(`canvas`),b.width=u,b.height=d,x=b.getContext(`2d`),S=x.createLinearGradient(g,v,_,y),ai(n.stops,h).forEach(function(e){return S.addColorStop(e.stop,U(e.color))}),x.fillStyle=S,x.fillRect(0,0,u,d),u>0&&d>0&&(f=r.ctx.createPattern(b,`repeat`),r.renderRepeat(s,f,c,l))):wi(n)&&(C=ql(e,t,[null,null,null]),s=C[0],w=C[1],T=C[2],u=C[3],d=C[4],E=n.position.length===0?[Ir]:n.position,c=V(E[0],u),l=V(E[E.length-1],d),D=li(n,c,l,u,d),O=D[0],A=D[1],O>0&&A>0&&(j=r.ctx.createRadialGradient(w+c,T+l,0,w+c,T+l,O),ai(n.stops,O*2).forEach(function(e){return j.addColorStop(e.stop,U(e.color))}),r.path(s),r.ctx.fillStyle=j,O===A?r.ctx.fill():(M=e.bounds.left+.5*e.bounds.width,ee=e.bounds.top+.5*e.bounds.height,te=A/O,N=1/te,r.ctx.save(),r.ctx.translate(M,ee),r.ctx.transform(1,0,0,te,0,0),r.ctx.translate(-M,-ee),r.ctx.fillRect(w,N*(T-ee)+ee,u,d*N),r.ctx.restore()))),k.label=6;case 6:return t--,[2]}})},r=this,i=0,a=e.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return i<a.length?(o=a[i],[5,n(o)]):[3,4];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,t,n){return O(this,void 0,void 0,function(){return k(this,function(r){return this.path(Rl(n,t)),this.ctx.fillStyle=U(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,t,n,r){return O(this,void 0,void 0,function(){var i,a;return k(this,function(o){switch(o.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,r)]:[3,2];case 1:return o.sent(),[2];case 2:return i=zl(r,n),this.path(i),this.ctx.fillStyle=U(e),this.ctx.fill(),a=Bl(r,n),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return O(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c,l=this;return k(this,function(u){switch(u.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!qr(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],i=ou(Zl(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),qr(t.backgroundColor)||(this.ctx.fillStyle=U(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(t){l.ctx.save();var n=Sl(e.curves),r=t.inset?0:ru,i=Ml(n,-r+(t.inset?1:-1)*t.spread.number,(t.inset?1:-1)*t.spread.number,t.spread.number*(t.inset?-2:2),t.spread.number*(t.inset?-2:2));t.inset?(l.path(n),l.ctx.clip(),l.mask(i)):(l.mask(n),l.ctx.clip(),l.path(i)),l.ctx.shadowOffsetX=t.offsetX.number+r,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=U(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?U(t.color):`rgba(0,0,0,1)`,l.ctx.fill(),l.ctx.restore()}),u.label=2;case 2:a=0,o=0,s=r,u.label=3;case 3:return o<s.length?(c=s[o],c.style!==0&&!qr(c.color)&&c.width>0?c.style===2?[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return c.style===3?[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,3)]:[3,7];case 6:return u.sent(),[3,11];case 7:return c.style===4?[4,this.renderDoubleBorder(c.color,c.width,a,e.curves)]:[3,9];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,e.curves)];case 10:u.sent(),u.label=11;case 11:a++,u.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,t,n,r,i){return O(this,void 0,void 0,function(){var a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,y,b;return k(this,function(x){return this.ctx.save(),a=Vl(r,n),o=Rl(r,n),i===2&&(this.path(o),this.ctx.clip()),X(o[0])?(s=o[0].start.x,c=o[0].start.y):(s=o[0].x,c=o[0].y),X(o[1])?(l=o[1].end.x,u=o[1].end.y):(l=o[1].x,u=o[1].y),d=n===0||n===2?Math.abs(s-l):Math.abs(c-u),this.ctx.beginPath(),i===3?this.formatPath(a):this.formatPath(o.slice(0,2)),f=t<3?t*3:t*2,p=t<3?t*2:t,i===3&&(f=t,p=t),m=!0,d<=f*2?m=!1:d<=f*2+p?(h=d/(2*f+p),f*=h,p*=h):(g=Math.floor((d+p)/(f+p)),_=(d-g*f)/(g-1),v=(d-(g+1)*f)/g,p=v<=0||Math.abs(p-_)<Math.abs(p-v)?_:v),m&&(i===3?this.ctx.setLineDash([0,f+p]):this.ctx.setLineDash([f,p])),i===3?(this.ctx.lineCap=`round`,this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=U(e),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(X(o[0])&&(y=o[3],b=o[0],this.ctx.beginPath(),this.formatPath([new Y(y.end.x,y.end.y),new Y(b.start.x,b.start.y)]),this.ctx.stroke()),X(o[1])&&(y=o[1],b=o[2],this.ctx.beginPath(),this.formatPath([new Y(y.end.x,y.end.y),new Y(b.start.x,b.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return O(this,void 0,void 0,function(){var t;return k(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=U(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=Ll(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},t}(nu),au=function(e){return e instanceof Qs||e instanceof Zs?!0:e instanceof Xs&&e.type!==qs&&e.type!==Ks},ou=function(e,t){switch(e){case 0:return Sl(t);case 2:return Cl(t);case 1:default:return wl(t)}},su=function(e){switch(e){case 1:return`center`;case 2:return`right`;case 0:default:return`left`}},cu=[`-apple-system`,`system-ui`],lu=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(e){return cu.indexOf(e)===-1}):e},uu=function(e){E(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement(`canvas`),r.ctx=r.canvas.getContext(`2d`),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+`px`,r.canvas.style.height=n.height+`px`,r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug(`EXPERIMENTAL ForeignObject renderer initialized (`+n.width+`x`+n.height+` at `+n.x+`,`+n.y+`) with scale `+n.scale),r}return t.prototype.render=function(e){return O(this,void 0,void 0,function(){var t,n;return k(this,function(r){switch(r.label){case 0:return t=Ss(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,du(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=U(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(nu),du=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src=`data:image/svg+xml;charset=utf-8,`+encodeURIComponent(new XMLSerializer().serializeToString(e))})},fu=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<`u`&&window.console&&typeof console.debug==`function`?console.debug.apply(console,A([this.id,this.getTime()+`ms`],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<`u`&&window.console&&typeof console.info==`function`&&console.info.apply(console,A([this.id,this.getTime()+`ms`],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<`u`&&window.console&&typeof console.warn==`function`?console.warn.apply(console,A([this.id,this.getTime()+`ms`],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<`u`&&window.console&&typeof console.error==`function`?console.error.apply(console,A([this.id,this.getTime()+`ms`],e)):this.info.apply(this,e))},e.instances={},e}(),pu=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName=`#`+ e.instanceCount++,this.logger=new fu({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)??new ul(this,t)}return e.instanceCount=1,e}(),mu=function(e,t){return t===void 0&&(t={}),hu(e,t)};typeof window<`u`&&ll.setContext(window);var hu=function(e,t){return O(void 0,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,S,w,T,E,O,A,te,N,ne,re,ie,ae,oe,se,ce,le,ue,de;return k(this,function(k){switch(k.label){case 0:if(!e||typeof e!=`object`)return[2,Promise.reject(`Invalid element provided as first argument`)];if(n=e.ownerDocument,!n)throw Error(`Element is not attached to a Document`);if(r=n.defaultView,!r)throw Error(`Document is not attached to a Window`);return i={allowTaint:(w=t.allowTaint)??!1,imageTimeout:(T=t.imageTimeout)??15e3,proxy:t.proxy,useCORS:(E=t.useCORS)??!1},a=D({logging:(O=t.logging)??!0,cache:t.cache},i),o={windowWidth:(A=t.windowWidth)??r.innerWidth,windowHeight:(te=t.windowHeight)??r.innerHeight,scrollX:(N=t.scrollX)??r.pageXOffset,scrollY:(ne=t.scrollY)??r.pageYOffset},s=new j(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),c=new pu(a,s),l=(re=t.foreignObjectRendering)??!1,u={allowTaint:(ie=t.allowTaint)??!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},c.logger.debug(`Starting document clone with size `+s.width+`x`+s.height+` scrolled to `+-s.left+`,`+-s.top),d=new Gc(c,e,u),f=d.clonedReferenceElement,f?[4,d.toIFrame(n,s)]:[2,Promise.reject(`Unable to find element in cloned iframe`)];case 1:return p=k.sent(),m=hc(f)||pc(f)?ee(f.ownerDocument):M(c,f),h=m.width,g=m.height,_=m.left,v=m.top,y=gu(c,f,t.backgroundColor),b={canvas:t.canvas,backgroundColor:y,scale:(oe=(ae=t.scale)??r.devicePixelRatio)??1,x:((se=t.x)??0)+_,y:((ce=t.y)??0)+v,width:(le=t.width)??Math.ceil(h),height:(ue=t.height)??Math.ceil(g)},l?(c.logger.debug(`Document cloned, using foreign object rendering`),S=new uu(c,b),[4,S.render(f)]):[3,3];case 2:return x=k.sent(),[3,5];case 3:return c.logger.debug(`Document cloned, element located at `+_+`,`+v+` with size `+h+`x`+g+` using computed rendering`),c.logger.debug(`Starting DOM parsing`),C=rc(c,f),y===C.styles.backgroundColor&&(C.styles.backgroundColor=ti.TRANSPARENT),c.logger.debug(`Starting renderer for element at `+b.x+`,`+b.y+` with size `+b.width+`x`+b.height),S=new iu(c,b),[4,S.render(C)];case 4:x=k.sent(),k.label=5;case 5:return((de=t.removeContainer)??!0)&&(Gc.destroy(p)||c.logger.error(`Cannot detach cloned iframe as it is not in the DOM anymore`)),c.logger.debug(`Finished rendering`),[2,x]}})})},gu=function(e,t,n){var r=t.ownerDocument,i=r.documentElement?ei(e,getComputedStyle(r.documentElement).backgroundColor):ti.TRANSPARENT,a=r.body?ei(e,getComputedStyle(r.body).backgroundColor):ti.TRANSPARENT,o=typeof n==`string`?ei(e,n):n===null?ti.TRANSPARENT:4294967295;return t===r.documentElement?qr(i)?qr(a)?o:a:i:o},_u=mu,vu=`/assets/fairy-forest.e17cbc2774.ko-fi.com-Ddz1VMpz.png`;const yu={class:`h-full w-full flex flex-col gap-4`},bu={class:`relative w-full overflow-hidden rounded-xl`},xu=[`src`],Su={class:`absolute inset-0 flex items-center justify-center`},Cu={class:`debug-info flex flex-col`,bg:`neutral-100 dark:neutral-900`,"rounded-xl":``},wu={flex:``},Tu={class:`rounded-lg p-4`,"flex-1":``},Eu={class:`mb-1 text-lg`,flex:``,"items-center":``,"gap-2":``},Du={class:`color-palette flex flex-wrap gap-2`},Ou=[`title`],ku={class:`mt-2 text-sm`},Au={class:`rounded-lg p-4`,"flex-1":``},ju={class:`mb-1 text-lg`,flex:``,"items-center":``,"gap-2":``},Mu={class:`color-palette flex flex-wrap gap-2`},Nu=[`title`],Pu={class:`mt-2 text-sm`},Fu={class:`rounded-lg p-4`,"w-full":``},Iu={ref:`canvas`,class:`max-w-full`,style:{"max-height":`100px`}};var Lu=u({__name:`background-gradient-blending`,setup(r){let u=y(!1),T=y([]),E=y(``),D=y(``),O=y([]),k=y([]),A=a(()=>k.value.length===0?[vu]:k.value.map(e=>{let t=URL.createObjectURL(e);return O.value.push(()=>URL.revokeObjectURL(t)),t})),j=y(`vibrant`),M=g(`imageRef`),ee=g(`canvas`),{updateThemeColor:te}=t(()=>E.value),N=a(()=>j.value===`vibrant`?E.value:j.value===`html2canvas`?D.value:``);async function ne(){if(A.value.length!==0)try{u.value=!0;let e=new w(A.value[0]),t=await e.getPalette(),n=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`);T.value=n,E.value=t.Vibrant?.hex||t.DarkVibrant?.hex||n[0],await te()}catch(e){console.error(`Color extraction failed:`,e)}finally{u.value=!1}}async function re(){if(M.value)try{u.value=!0;let e=await _u(M.value,{allowTaint:!0,useCORS:!0,backgroundColor:null,scale:.5,height:100,width:M.value.offsetWidth,logging:!1});if(ee.value){let t=ee.value.getContext(`2d`);t&&(ee.value.width=e.width,ee.value.height=e.height,t.drawImage(e,0,0))}let t=e.getContext(`2d`);if(t){let r=t.getImageData(0,0,e.width,20),i=[];for(let e=0;e<r.data.length;e+=40){let t=r.data[e],n=r.data[e+1],a=r.data[e+2],o=r.data[e+3];o>0&&i.push({mode:`rgb`,r:t,g:n,b:a})}if(i.length>0){let e=n(i);D.value=`rgb(${e.r}, ${e.g}, ${e.b})`}}}catch(e){console.error(`Canvas capture failed:`,e)}finally{u.value=!1}}return f(async()=>{await d(),await ne(),await re()}),_(A,async()=>{await d(),await ne(),await re()}),p(()=>{O.value.forEach(e=>e())}),(t,n)=>(m(),s(`div`,yu,[o(`div`,bu,[o(`div`,{class:`pointer-events-none left-0 right-0 top-0 z-10 flex items-center justify-center backdrop-blur-md`,style:S({background:N.value})},n[3]||=[o(`div`,{class:`py-4 text-center text-sm text-white font-medium`},` Top Area `,-1)],4),o(`div`,{class:`transparent-gradient-overlay absolute inset-0 h-[calc((1lh+1rem+1rem)*2)] w-full`,style:S({background:N.value})},null,4),o(`img`,{ref_key:`imageRef`,ref:M,src:A.value[0],class:`h-full max-h-[calc(100dvh-28rem)] w-full object-cover`},null,8,xu),o(`div`,Su,[l(b(e),{modelValue:k.value,"onUpdate:modelValue":n[0]||=e=>k.value=e},{default:v(()=>n[4]||=[o(`div`,{class:`rounded-xl bg-black bg-opacity-30 px-5 py-4 text-white backdrop-blur-sm`},` Replace Image `,-1)]),_:1,__:[4]},8,[`modelValue`])])]),o(`div`,Cu,[o(`div`,wu,[o(`div`,Tu,[o(`h3`,Eu,[n[5]||=o(`span`,null,`Node Vibrant`,-1),o(`button`,{"border-2":``,"border-neutral-300":``,"rounded-xl":``,"border-solid":``,"px-3":``,"py-1":``,"text-sm":``,"font-normal":``,"dark:border-neutral-700":``,class:x([j.value===`vibrant`?`bg-neutral-100 dark:bg-neutral-700`:``]),onClick:n[1]||=e=>j.value=`vibrant`},C(j.value===`vibrant`?`Activated`:`Active`),3)]),o(`div`,Du,[(m(!0),s(i,null,h(T.value,e=>(m(),s(`div`,{key:e,class:`h-12 w-12 cursor-pointer border-2 border-gray-300 rounded rounded-xl transition-transform duration-200 ease-in-out hover:scale-110 dark:border-gray-900`,style:S({backgroundColor:e}),title:e},null,12,Ou))),128))]),o(`p`,ku,[n[6]||=c(` Color: `,-1),o(`span`,{style:S({color:E.value})},C(E.value),5)])]),o(`div`,Au,[o(`h3`,ju,[n[7]||=o(`span`,null,`html2canvas Top sampling`,-1),o(`button`,{"border-2":``,"border-neutral-300":``,"rounded-xl":``,"border-solid":``,"px-3":``,"py-1":``,"text-sm":``,"font-normal":``,"dark:border-neutral-700":``,class:x([j.value===`html2canvas`?`bg-neutral-100 dark:bg-neutral-700`:``]),onClick:n[2]||=e=>j.value=`html2canvas`},C(j.value===`html2canvas`?`Activated`:`Active`),3)]),o(`div`,Mu,[o(`div`,{class:`color-swatch h-12 w-12 border-2 border-gray-300 rounded rounded-xl dark:border-gray-900`,style:S({backgroundColor:D.value}),title:D.value},null,12,Nu)]),o(`p`,Pu,[n[8]||=c(` Color: `,-1),o(`span`,{style:S({color:D.value})},C(D.value),5)])])]),o(`div`,Fu,[n[9]||=o(`h3`,{class:`mb-1 text-lg`},` Captured Canvas (Debug) `,-1),o(`canvas`,Iu,null,512)])])]))}}),Ru=r(Lu,[[`__scopeId`,`data-v-e6e8453f`]]);export{Ru as default};
|
assets/{background-remove-XV3Q3VDI.js → background-remove-DJQTlQ2j.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./BasicInputFile-
|
|
|
1 |
+
import"./BasicInputFile-CE2dQPco.js";import{b as e}from"./InputFile-1iWiDDXD.js";import{A as t,eW as n,eZ as r,e_ as i,f0 as a,f1 as o,f3 as s,f4 as c,fa as l,fc as u,fe as d,fp as f,ft as p,fw as m,fx as h}from"./index-_PXww5qh.js";import{b as g,c as _,d as v,f as y}from"./transformers.web-DlQmBXVo.js";const b={flex:``,"flex-col":``,"items-center":``,"gap-4":``},x=[`disabled`],S={"h-full":``,"w-full":``,flex:``,"gap-2":``},C={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,"overflow-hidden":``,"rounded-lg":``},w=[`src`],T={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,relative:``,"overflow-hidden":``,"rounded-lg":``},E={key:0,bg:`black/50`,absolute:``,"inset-0":``,"z-10":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``},D={"mb-4":``,"text-white":``,"font-medium":``},O={bg:`gray-200/30`,w:`70%`,"h-2":``,"overflow-hidden":``,"rounded-full":``},k=[`src`],A={bg:`black/0 group-hover:black/20`,absolute:``,"inset-0":``,flex:``,"items-center":``,"justify-center":``,"transition-all":``,"duration-200":``},j=[`onClick`],M={key:1,absolute:``,"bottom-2":``,"right-2":``};var N=c({__name:`background-remove`,setup(c){let N=f(),P=f(),F=f(),I=f(),L=f(!1),R=f(0),z=f(),B=f(),V=f([]),H=r(()=>V.value.map(e=>URL.createObjectURL(e)));l(async()=>{try{if(!(await t()).supported)throw Error(`WebGPU is not supported in this browser.`);let e=`Xenova/modnet`;y.backends.onnx.wasm.proxy=!1,N.value??=await g.from_pretrained(e,{device:`webgpu`}),P.value??=await _.from_pretrained(e,{})}catch(e){F.value=e}I.value=!1});async function U(){if(!N.value||!P.value)return;L.value=!0,R.value=0,z.value=[];let e=H.value.length;for(let t=0;t<e;++t){let n=await v.fromURL(H.value[t]),{pixel_values:r}=await P.value(n),{output:i}=await N.value({input:r}),a=(await v.fromTensor(i[0].mul(255).to(`uint8`)).resize(n.width,n.height)).data,o=document.createElement(`canvas`);o.width=n.width,o.height=n.height;let s=o.getContext(`2d`);if(!s)return;s.drawImage(n.toCanvas(),0,0);let c=s.getImageData(0,0,n.width,n.height);for(let e=0;e<a.length;++e)c.data[4*e+3]=a[e];s.putImageData(c,0,0),z.value.push(o.toDataURL(`image/png`)),R.value=Math.round((t+1)/e*100)}L.value=!1,B.value=!0}function W(e){if(!z.value||e>=z.value.length||!V.value[e])return;let t=V.value[e].name,n=t.substring(0,t.lastIndexOf(`.`))||t,r=t.substring(t.lastIndexOf(`.`))||`.png`,i=`${n}-background-removed${r}`,a=document.createElement(`a`);a.href=z.value[e],a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}function G(){!z.value||z.value.length===0||z.value.forEach((e,t)=>{setTimeout(()=>W(t),t*100)})}return(t,r)=>(u(),o(`div`,b,[i(`button`,{bg:`neutral-100 dark:neutral-800`,"w-full":``,"cursor-pointer":``,"rounded-lg":``,"px-3":``,"py-2":``,disabled:L.value,onClick:U},h(L.value?`Processing...`:`Process`),9,x),i(`div`,S,[i(`div`,C,[(u(!0),o(n,null,d(H.value,(e,t)=>(u(),o(`img`,{key:t,src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,w))),128))]),i(`div`,T,[L.value?(u(),o(`div`,E,[i(`div`,D,h(R.value)+`% `,1),i(`div`,O,[i(`div`,{bg:`emerald-500`,"h-full":``,style:m({width:`${R.value}%`}),"transition-all":``,"duration-200":``},null,4)])])):a(``,!0),(u(!0),o(n,null,d(z.value,(e,t)=>(u(),o(`div`,{key:t,relative:``,class:`group`,"h-full":``,"w-full":``},[i(`img`,{src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,k),i(`div`,A,[i(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,"opacity-0":``,"transition-all":``,"duration-200":``,"group-hover:opacity-100":``,onClick:e=>W(t)},r[1]||=[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[i(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4`})],-1)],8,j)])]))),128)),z.value&&z.value.length>1?(u(),o(`div`,M,[i(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,onClick:G},r[2]||=[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[i(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12`})],-1)])])):a(``,!0)])]),s(p(e),{modelValue:V.value,"onUpdate:modelValue":r[0]||=e=>V.value=e,"w-full":``},null,8,[`modelValue`])]))}}),P=N;export{P as default};
|
assets/{chat-DVTmv4F-.js → chat-B8qU7lMa.js}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
import{
|
2 |
`)}})}},j=class extends TransformStream{#eventMap;constructor(e){super({transform:(e,t)=>{let n=e.split(`
|
3 |
-
`).map(e=>e.trim()).filter(e=>e.length>0);n.forEach(e=>{let n=JSON.parse(e),r=Object.values(this.#eventMap).find(e=>e.uniqueId===n.uniqueId);if(r){let e=r.with(n.data);t.enqueue(e)}else console.warn(`Unknown event: ${n.uniqueId}`)})}}),this.#eventMap=e}},M=class e extends ReadableStream{#stream;#subscribable;on(e,t){return this.#subscribable.subscribe(n=>{e.include(n)&&t(n)})}constructor(e,t){if(!e&&!t)throw TypeError(`Either subscribable or root stream must be provided`);if(super(),e){this.#subscribable=e;let n;this.#stream=t??new ReadableStream({start:t=>{n=e.subscribe(e=>{t.enqueue(e)})},cancel:()=>{n()}})}else{this.#subscribable=k(),this.#stream=t.pipeThrough(new TransformStream({transform:(e,t)=>{this.#subscribable.publish(e),t.enqueue(e)}}));return}}static fromReadableStream(t){return new e(null,t.pipeThrough(new TransformStream({transform:(e,t)=>{t.enqueue(e)}})))}static fromResponse(t,n){let r=t.body;if(!r)throw Error(`Response body is not readable`);return new e(null,r.pipeThrough(new TextDecoderStream).pipeThrough(new j(n)))}toResponse(e,t=new A){return new Response(this.#stream.pipeThrough(t).pipeThrough(new TextEncoderStream),e)}get locked(){return this.#stream.locked}[Symbol.asyncIterator](){return this.#stream[Symbol.asyncIterator]()}cancel(e){return this.#stream.cancel(e)}getReader(){return this.#stream.getReader()}pipeThrough(t,n){let r=this.#stream.pipeThrough(t,n);return new e(null,r)}pipeTo(e,t){return this.#stream.pipeTo(e,t)}tee(){let[t,n]=this.#stream.tee();return[new e(this.#subscribable,t),new e(this.#subscribable,n)]}forEach(e){return this.#stream.pipeTo(new WritableStream({write:t=>{e(t)}}))}map(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(e(t))}}))}values(e){return this.#stream.values(e)}take(e){let t=0;return this.pipeThrough(new TransformStream({transform:(n,r)=>{t<e&&(r.enqueue(n),t++),t>=e&&r.terminate()}}))}filter(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{(typeof e==`function`?e(t):S(e)?e.include(t):e===t)&&n.enqueue(t)}}))}until(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(t),(typeof e==`function`?e(t):S(e)?e.include(t):e===t)&&n.terminate()}}))}async toArray(){let e=[];return await this.pipeTo(new WritableStream({write:t=>{e.push(t)}})),e}};const N=g();function P(){let e=N.getStore();if(!e)throw Error(`No current context found`);return e}const F=g(),I=new WeakMap,L=({listeners:e})=>{let t=[],n=(e,t,n,r)=>{let c,l={get abortController(){return c||=new AbortController,c},async:`constructor`in e?e.constructor.name===`AsyncFunction`:!1,pending:null,handler:e,inputEvents:t,inputs:n,outputs:[],prev:r,next:new Set,get root(){return o}};l.prev.next.add(l);let u=i(l);F.run(l,()=>{let e=[...new Set([...O(s.__internal__call_context),...O(u.__internal__call_context)])];N.run(u,()=>{let t=0,n=r=>{if(t===e.length){let e;try{e=r.handler(...r.inputs)}catch(e){if(c??a)(c??a).abort(e);else throw console.error(`unhandled error in handler`,e),e}T(e)?(l.async=!0,l.pending=e.then(e=>(w(e)&&u.sendEvent(e),e))):w(e)&&u.sendEvent(e)}let i=e[t];i&&(t++,i(r,n))};n(l)})})},r=r=>{let i=[...t];[...e].filter(([e])=>{let t=E(e,i);return t.length===e.length}).map(([e,a])=>{let o=E(e,i);o.forEach(e=>{t.splice(t.indexOf(e),1)});for(let t of a)n(t,e,o,r)})},i=e=>{let n=null;return{get stream(){if(!n){let t=k();s.__internal__call_send_event.subscribe(n=>{let r=I.get(n);for(;r;){if(r===e){t.publish(n);break}r=r.prev}}),n=new M(t,null)}return n},get signal(){return e.abortController.signal},sendEvent:(...n)=>{n.forEach(n=>{I.set(n,e),e.outputs.push(n),t.push(n),s.__internal__call_send_event.publish(n,e),r(e)})},__internal__call_context:k(),__internal__call_send_event:k()}},a=new AbortController,o={get abortController(){return a||=new AbortController,a},async:!1,pending:null,inputEvents:[],inputs:[],outputs:[],handler:null,prev:null,next:new Set,get root(){return o}},s=i(o);return s},R=()=>{let e={steps:new Map};return{handle:(t,n)=>{if(e.steps.has(t)){let r=e.steps.get(t);r.add(n)}else{let r=new Set;r.add(n),e.steps.set(t,r)}},createContext(){return L({listeners:e.steps})}}};function z(e,t){let n=(...e)=>{let n=t.filter(([t])=>t.every((t,n)=>t.include(e[n]))).map(([e,t])=>t),r=P(),i=r.sendEvent;return(...e)=>{for(let t=0;t<n.length;t++){let r=n[t];if(r.length===e.length&&r.every((t,n)=>t.include(e[n])))return i(...e)}return console.warn(`Invalid input detected [%s]`,e.map(e=>e.data).join(`, `)),i(...e)}};return{...e,strictHandle:(t,n)=>{let r=(...e)=>{let t=P();return n(t.safeSendEvent,...e)};return e.handle(t,r)},createContext(){let t=e.createContext();return t.__internal__call_context.subscribe((e,t)=>{P().safeSendEvent=n(...e.inputs),t(e)}),t}}}async function B(e,t,n){let{stream:r,sendEvent:i}=e.createContext();i(t);let a=(await r.until(n).toArray()).at(-1);if(!a)throw Error(`No output event received`);return a}const V={flex:``,"flex-col":``,"gap-2":``},H={flex:`~ col`,"gap-2":``},U={flex:``,"flex-col":``,"gap-2":``},W={grid:``,"grid-cols-2":``,"gap-2":``},G={flex:``,"items-center":``,"gap-2":``},K={flex:``,"items-center":``,"gap-2":``},q={flex:``,"items-center":``,"gap-2":``},J={key:0},Y={key:1};var X=
|
|
|
1 |
+
import{bT as e,dk as t,eT as n,eW as r,e_ as i,f0 as a,f1 as o,f4 as s,fc as c,fe as l,fn as u,fo as d,fp as f,fr as p,ft as m,fx as h}from"./index-_PXww5qh.js";const g=()=>{let e=null;return{getStore:()=>(e===null&&console.warn("Woops! Looks like you are calling `getContext` after `await fn()`. Please move `getContext` to top level of handler."),e),run(t,n){e=t;try{return n()}finally{e=null}}}},_=new WeakMap,v=new WeakMap;let y=0,b=0;const x=e=>{let t=`${y++}`,n={debugLabel:e?.debugLabel??t,include:e=>r.has(e),with:i=>{let a=`${b++}`,o={[Symbol.toStringTag]:e?.debugLabel??`WorkflowEvent(${t}.${a})`,toString:()=>e?.debugLabel?e.debugLabel:`WorkflowEvent(${t}.${a})`,toJSON:()=>({type:e?.debugLabel?e.debugLabel:t,data:i}),get data(){return i}};return r.add(o),v.set(o,n),o}},r=new WeakSet;_.set(n,r),Object.defineProperty(n,Symbol.toStringTag,{get:()=>n?.debugLabel??`WorkflowEvent<${t}>`}),Object.defineProperty(n,`displayName`,{value:n?.debugLabel??`WorkflowEvent<${t}>`});let i=e?.uniqueId;return Object.defineProperty(n,`uniqueId`,{get:()=>(i||=t,i),set:()=>{throw Error(`uniqueId is readonly`)}}),n.toString=()=>e?.debugLabel??`WorkflowEvent<${t}>`,n},S=e=>typeof e==`object`&&e?_.has(e):!1,C=e=>typeof e==`object`&&e?v.get(e):void 0,w=e=>typeof e==`object`&&!!e&&`data`in e,T=e=>e!=null&&typeof e.then==`function`;function E(e,t){let n=Array(e.length);for(let r of t)for(let t=0;t<e.length;t++)if(!n[t]&&e[t].include(r)){n[t]=r;break}return n.filter(Boolean)}const D=new WeakMap;function O(e){return D.get(e)}function k(){let e=new Set,t={subscribe:t=>(e.add(t),()=>{e.delete(t)}),publish:(...t)=>{let n=[];for(let r of e)n.push(r(...t));return n}};return D.set(t,e),t}var A=class extends TransformStream{constructor(){super({transform:(e,t)=>{C(e)&&t.enqueue(JSON.stringify({data:e.data,uniqueId:C(e).uniqueId})+`
|
2 |
`)}})}},j=class extends TransformStream{#eventMap;constructor(e){super({transform:(e,t)=>{let n=e.split(`
|
3 |
+
`).map(e=>e.trim()).filter(e=>e.length>0);n.forEach(e=>{let n=JSON.parse(e),r=Object.values(this.#eventMap).find(e=>e.uniqueId===n.uniqueId);if(r){let e=r.with(n.data);t.enqueue(e)}else console.warn(`Unknown event: ${n.uniqueId}`)})}}),this.#eventMap=e}},M=class e extends ReadableStream{#stream;#subscribable;on(e,t){return this.#subscribable.subscribe(n=>{e.include(n)&&t(n)})}constructor(e,t){if(!e&&!t)throw TypeError(`Either subscribable or root stream must be provided`);if(super(),e){this.#subscribable=e;let n;this.#stream=t??new ReadableStream({start:t=>{n=e.subscribe(e=>{t.enqueue(e)})},cancel:()=>{n()}})}else{this.#subscribable=k(),this.#stream=t.pipeThrough(new TransformStream({transform:(e,t)=>{this.#subscribable.publish(e),t.enqueue(e)}}));return}}static fromReadableStream(t){return new e(null,t.pipeThrough(new TransformStream({transform:(e,t)=>{t.enqueue(e)}})))}static fromResponse(t,n){let r=t.body;if(!r)throw Error(`Response body is not readable`);return new e(null,r.pipeThrough(new TextDecoderStream).pipeThrough(new j(n)))}toResponse(e,t=new A){return new Response(this.#stream.pipeThrough(t).pipeThrough(new TextEncoderStream),e)}get locked(){return this.#stream.locked}[Symbol.asyncIterator](){return this.#stream[Symbol.asyncIterator]()}cancel(e){return this.#stream.cancel(e)}getReader(){return this.#stream.getReader()}pipeThrough(t,n){let r=this.#stream.pipeThrough(t,n);return new e(null,r)}pipeTo(e,t){return this.#stream.pipeTo(e,t)}tee(){let[t,n]=this.#stream.tee();return[new e(this.#subscribable,t),new e(this.#subscribable,n)]}forEach(e){return this.#stream.pipeTo(new WritableStream({write:t=>{e(t)}}))}map(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(e(t))}}))}values(e){return this.#stream.values(e)}take(e){let t=0;return this.pipeThrough(new TransformStream({transform:(n,r)=>{t<e&&(r.enqueue(n),t++),t>=e&&r.terminate()}}))}filter(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{(typeof e==`function`?e(t):S(e)?e.include(t):e===t)&&n.enqueue(t)}}))}until(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(t),(typeof e==`function`?e(t):S(e)?e.include(t):e===t)&&n.terminate()}}))}async toArray(){let e=[];return await this.pipeTo(new WritableStream({write:t=>{e.push(t)}})),e}};const N=g();function P(){let e=N.getStore();if(!e)throw Error(`No current context found`);return e}const F=g(),I=new WeakMap,L=({listeners:e})=>{let t=[],n=(e,t,n,r)=>{let c,l={get abortController(){return c||=new AbortController,c},async:`constructor`in e?e.constructor.name===`AsyncFunction`:!1,pending:null,handler:e,inputEvents:t,inputs:n,outputs:[],prev:r,next:new Set,get root(){return o}};l.prev.next.add(l);let u=i(l);F.run(l,()=>{let e=[...new Set([...O(s.__internal__call_context),...O(u.__internal__call_context)])];N.run(u,()=>{let t=0,n=r=>{if(t===e.length){let e;try{e=r.handler(...r.inputs)}catch(e){if(c??a)(c??a).abort(e);else throw console.error(`unhandled error in handler`,e),e}T(e)?(l.async=!0,l.pending=e.then(e=>(w(e)&&u.sendEvent(e),e))):w(e)&&u.sendEvent(e)}let i=e[t];i&&(t++,i(r,n))};n(l)})})},r=r=>{let i=[...t];[...e].filter(([e])=>{let t=E(e,i);return t.length===e.length}).map(([e,a])=>{let o=E(e,i);o.forEach(e=>{t.splice(t.indexOf(e),1)});for(let t of a)n(t,e,o,r)})},i=e=>{let n=null;return{get stream(){if(!n){let t=k();s.__internal__call_send_event.subscribe(n=>{let r=I.get(n);for(;r;){if(r===e){t.publish(n);break}r=r.prev}}),n=new M(t,null)}return n},get signal(){return e.abortController.signal},sendEvent:(...n)=>{n.forEach(n=>{I.set(n,e),e.outputs.push(n),t.push(n),s.__internal__call_send_event.publish(n,e),r(e)})},__internal__call_context:k(),__internal__call_send_event:k()}},a=new AbortController,o={get abortController(){return a||=new AbortController,a},async:!1,pending:null,inputEvents:[],inputs:[],outputs:[],handler:null,prev:null,next:new Set,get root(){return o}},s=i(o);return s},R=()=>{let e={steps:new Map};return{handle:(t,n)=>{if(e.steps.has(t)){let r=e.steps.get(t);r.add(n)}else{let r=new Set;r.add(n),e.steps.set(t,r)}},createContext(){return L({listeners:e.steps})}}};function z(e,t){let n=(...e)=>{let n=t.filter(([t])=>t.every((t,n)=>t.include(e[n]))).map(([e,t])=>t),r=P(),i=r.sendEvent;return(...e)=>{for(let t=0;t<n.length;t++){let r=n[t];if(r.length===e.length&&r.every((t,n)=>t.include(e[n])))return i(...e)}return console.warn(`Invalid input detected [%s]`,e.map(e=>e.data).join(`, `)),i(...e)}};return{...e,strictHandle:(t,n)=>{let r=(...e)=>{let t=P();return n(t.safeSendEvent,...e)};return e.handle(t,r)},createContext(){let t=e.createContext();return t.__internal__call_context.subscribe((e,t)=>{P().safeSendEvent=n(...e.inputs),t(e)}),t}}}async function B(e,t,n){let{stream:r,sendEvent:i}=e.createContext();i(t);let a=(await r.until(n).toArray()).at(-1);if(!a)throw Error(`No output event received`);return a}const V={flex:``,"flex-col":``,"gap-2":``},H={flex:`~ col`,"gap-2":``},U={flex:``,"flex-col":``,"gap-2":``},W={grid:``,"grid-cols-2":``,"gap-2":``},G={flex:``,"items-center":``,"gap-2":``},K={flex:``,"items-center":``,"gap-2":``},q={flex:``,"items-center":``,"gap-2":``},J={key:0},Y={key:1};var X=s({__name:`chat`,setup(s){let g=t(`settings/llm/baseUrl`,`https://openrouter.ai/api/v1/`),_=t(`settings/llm/apiKey`,``),v=t(`settings/llm/model`,`openai/gpt-4o-mini`),y=f(``),b=f([]),S=f({role:`assistant`,content:``}),C=f(!1),w=x(),T=x(),E=x(),D=x(),O=x();async function k(){C.value=!0;try{let t=z(R(),[[[w],[T,O]],[[T],[E]],[[E],[D]]]);t.handle([w],async()=>{let{sendEvent:n}=t.createContext();S.value={role:`assistant`,content:``},b.value.push({role:`user`,content:y.value}),b.value.push(S.value);let r=await e({baseURL:g.value,apiKey:_.value,model:v.value,messages:b.value.slice(0,b.value.length-1).map(e=>p(e))});for await(let e of r.fullStream)e.type===`text-delta`&&n(T.with(e.text||``));return O.with()}),t.handle([T],async e=>{S.value.content?S.value.content+=e.data:S.value.content=e.data}),await B(t,w.with(),O)}catch(e){console.error(e)}finally{C.value=!1}}return(e,t)=>(c(),o(`div`,V,[i(`div`,H,[i(`div`,U,[t[7]||=i(`div`,null,[i(`span`,{"text-neutral-500":``,"dark:text-neutral-400":``},`LLM`)],-1),i(`div`,W,[i(`label`,G,[t[4]||=i(`span`,{"text-nowrap":``},` Base URL `,-1),u(i(`input`,{"onUpdate:modelValue":t[0]||=e=>d(g)?g.value=e:null,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`},null,512),[[n,m(g)]])]),i(`label`,K,[t[5]||=i(`span`,{"text-nowrap":``},` API Key `,-1),u(i(`input`,{"onUpdate:modelValue":t[1]||=e=>d(_)?_.value=e:null,type:`password`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`},null,512),[[n,m(_)]])]),i(`label`,q,[t[6]||=i(`span`,{"text-nowrap":``},` Model `,-1),u(i(`input`,{"onUpdate:modelValue":t[2]||=e=>d(v)?v.value=e:null,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`},null,512),[[n,m(v)]])])])]),i(`div`,null,[u(i(`textarea`,{"onUpdate:modelValue":t[3]||=e=>y.value=e,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`},null,512),[[n,y.value]])]),i(`button`,{"rounded-lg":``,bg:`blue-100 dark:blue-900`,"px-4":``,"py-2":``,onClick:k},` Send `),i(`div`,null,[(c(!0),o(r,null,l(b.value,(e,t)=>(c(),o(`div`,{key:t},[e.role===`user`?(c(),o(`div`,J,[i(`span`,null,h(e.content),1)])):a(``,!0),e.role===`assistant`?(c(),o(`div`,Y,[i(`span`,null,h(e.content),1)])):a(``,!0)]))),128))])])]))}}),Z=X;export{Z as default};
|
assets/{cloudflare-workers-ai-DUaW50rh.js → cloudflare-workers-ai-BZyG5JaO.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,da as t,dc as n,e$ as r,eZ as i,f3 as a,f4 as o,fa as s,fc as c,fk as l,fm as u,ft as d,g as f,h as p,i as m,k as h,m as g,z as _}from"./index-_PXww5qh.js";import{b as v}from"./route-block-gWR0cCIm.js";const y=`cloudflare-workers-ai`;var b=o({__name:`cloudflare-workers-ai`,setup(o){let{t:v}=e(),b=t(),x=_(),{providers:S}=n(x),C=i(()=>x.getProviderMetadata(y)),w=i({get:()=>S.value[y]?.apiKey||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=i({get:()=>S.value[y]?.accountId||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});s(()=>{x.initializeProvider(y),w.value=S.value[y]?.apiKey||``,T.value=S.value[y]?.accountId||``}),l([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){S.value[y]={...C.value?.defaultOptions}}return(e,t)=>(c(),r(d(f),{"provider-name":C.value?.localizedName,"provider-icon-color":C.value?.iconColor,"on-back":()=>d(b).back()},{default:u(()=>[a(d(p),null,{default:u(()=>[a(d(m),{title:d(v)(`settings.pages.providers.common.section.basic.title`),description:d(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:u(()=>[a(d(h),{modelValue:w.value,"onUpdate:modelValue":t[0]||=e=>w.value=e,"provider-name":C.value?.localizedName,placeholder:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),a(d(g),{modelValue:T.value,"onUpdate:modelValue":t[1]||=e=>T.value=e,label:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder`)},null,8,[`modelValue`,`label`,`description`,`placeholder`])]),_:1},8,[`title`,`description`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof v==`function`&&v(b);var x=b;export{x as default};
|
assets/{color-scheme-B1nTqxNP.js → color-scheme-DIbhSfnd.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,b as t,cN as n,cR as r,cs as i,e$ as a,eR as o,eW as s,e_ as c,f1 as l,f2 as u,f3 as d,f4 as f,fc as p,fe as m,fh as h,fm as g,fn as _,ft as v,fx as y,p as b}from"./index-_PXww5qh.js";import{b as x}from"./route-block-gWR0cCIm.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`]];const 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":``};var N=f({__name:`color-scheme`,setup(r){let f=b(),{t:x}=e();return(e,r)=>{let b=h(`motion`);return p(),l(s,null,[_((p(),a(v(i),{"mb-2":``,title:v(x)(`settings.pages.themes.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:g(()=>[_((p(),l(`div`,C,[c(`span`,w,y(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),c(`label`,T,[_(c(`input`,{"onUpdate:modelValue":r[0]||=e=>v(f).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[o,v(f).themeColorsHueDynamic]]),r[2]||=c(`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),u(` `+y(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[b]]),_(d(v(n),{modelValue:v(f).themeColorsHue,"onUpdate:modelValue":r[1]||=e=>v(f).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:300,disabled:v(f).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[b]]),_((p(),l(`div`,E,[r[4]||=c(`span`,{"bg-primary-50":``},`50`,-1),r[5]||=c(`span`,{"bg-primary-100":``},`100`,-1),r[6]||=c(`span`,{"bg-primary-200":``},`200`,-1),r[7]||=c(`span`,{"bg-primary-300":``},`300`,-1),r[8]||=c(`span`,{"bg-primary-400":``},`400`,-1),r[9]||=c(`span`,{"bg-primary-500":``},`500`,-1),_((p(),l(`div`,D,r[3]||=[c(`span`,{"bg-primary-600":``},`600`,-1),c(`span`,{"bg-primary-700":``},`700`,-1),c(`span`,{"bg-primary-800":``},`800`,-1),c(`span`,{"bg-primary-900":``},`900`,-1),c(`span`,{"bg-primary-950":``},`950`,-1)])),[[b]])])),[[b]]),_((p(),l(`div`,O,r[10]||=[c(`span`,{bg:`primary-500/5`},`500/5`,-1),c(`span`,{bg:`primary-500/10`},`500/10`,-1),c(`span`,{bg:`primary-500/20`},`500/20`,-1),c(`span`,{bg:`primary-500/30`},`500/30`,-1),c(`span`,{bg:`primary-500/40`},`500/40`,-1),c(`span`,{bg:`primary-500/50`},`500/50`,-1),c(`span`,{bg:`primary-500/60`},`500/60`,-1),c(`span`,{bg:`primary-500/70`},`500/70`,-1),c(`span`,{bg:`primary-500/80`},`500/80`,-1),c(`span`,{bg:`primary-500/90`},`500/90`,-1),c(`span`,{bg:`primary-500`},`500`,-1)])),[[b]])]),_:1},8,[`title`])),[[b]]),_((p(),a(v(i),{"mb-2":``,title:v(x)(`settings.pages.themes.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:g(()=>[(p(!0),l(s,null,m(e.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:n,description:r,colors:i},a)=>_((p(),l(`div`,{key:a,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+a*10,delay:550+a*50,transition:`all ease-in-out duration-250`},[c(`div`,null,[c(`span`,A,y(e.$rt(n)),1),c(`div`,j,y(e.$rt(r)),1)]),d(v(t),{colors:i.map((t,n)=>({hex:v(S)[a][n],name:e.$rt(t)}))},null,8,[`colors`])],8,k)),[[b]])),128))]),_:1},8,[`title`])),[[b]]),_((p(),l(`div`,M,r[11]||=[c(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[b]])],64)}}});typeof x==`function`&&x(N);var P=r(N,[[`__scopeId`,`data-v-659ad349`]]);export{P as default};
|
assets/{consciousness-BRGy5-ue.js → consciousness-K169XQMI.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,cj as t,cm as ee,cn as te,co as ne,d7 as n,dc as r,e$ as i,eT as re,eW as a,e_ as o,f0 as s,f1 as c,f2 as l,f3 as ie,f4 as u,fa as ae,fc as d,fe as f,fh as p,fm as m,fn as h,fo as g,ft as _,fx as v,y as oe,z as se}from"./index-_PXww5qh.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={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`},ce={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`},I={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":``};var U=u({__name:`consciousness`,setup(u){let y=se(),U=oe(),{configuredChatProvidersMetadata:W}=r(y),{activeProvider:G,activeModel:K,customModelName:le,modelSearchQuery:q,supportsModelListing:J,providerModels:Y,isLoadingActiveProviderModels:X,activeProviderModelError:Z}=r(U),{t:Q}=e();ae(async()=>{await U.loadModelsForProvider(G.value)});function $(e){le.value=e}return(e,r)=>{let u=p(`motion`);return d(),c(a,null,[o(`div`,b,[o(`div`,null,[o(`div`,x,[o(`div`,null,[o(`h2`,S,v(_(Q)(`settings.pages.providers.title`)),1),o(`div`,C,[o(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),o(`div`,w,[_(W).length>0?(d(),c(`fieldset`,T,[(d(!0),c(a,null,f(_(W),e=>(d(),i(_(ee),{id:e.id,key:e.id,modelValue:_(G),"onUpdate:modelValue":r[0]||=e=>g(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))])):(d(),c(`div`,E,[ie(_(n),{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[4]||=[o(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),o(`div`,{class:`flex flex-col`},[o(`span`,{class:`font-medium`},`No Providers Configured`),o(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),o(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),_(G)&&_(J)?(d(),c(`div`,D,[o(`div`,O,[o(`div`,null,[o(`h2`,k,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),o(`div`,A,[o(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),_(X)?(d(),c(`div`,j,[r[5]||=o(`div`,{class:`mr-2 animate-spin`},[o(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),o(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):_(Z)?(d(),i(_(t),{key:1,title:_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:_(Z)},null,8,[`title`,`error`])):_(Y).length===0&&!_(X)?(d(),i(_(ne),{key:2,type:`warning`},{title:m(()=>[l(v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:m(()=>[l(v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):_(Y).length>0?(d(),i(_(te),{key:3,modelValue:_(K),"onUpdate:modelValue":r[1]||=e=>g(K)?K.value=e:null,"search-query":_(q),"onUpdate:searchQuery":r[2]||=e=>g(q)?q.value=e:null,items:_(Y).sort((e,t)=>e.id===_(K)?-1:t.id===_(K)?1:0),searchable:!0,"search-placeholder":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:_(q)}),"search-results-text":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":_(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`])):s(``,!0)])])):_(G)&&!_(J)?(d(),c(`div`,M,[o(`div`,N,[o(`div`,null,[o(`h2`,P,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),o(`div`,F,[o(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),o(`div`,ce,[r[6]||=o(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),o(`div`,I,[o(`span`,L,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),o(`span`,R,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),o(`div`,z,[o(`label`,B,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),h(o(`input`,{"onUpdate:modelValue":r[3]||=e=>g(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:_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,V),[[re,_(K)]])])])])):s(``,!0)]),h((d(),c(`div`,H,r[7]||=[o(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof y==`function`&&y(U);var W=U;export{W as default};
|
assets/core-DUQNFnRE.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{$ as ee,B as te,C as e,D as t,E as n,F as r,G as i,H as a,I as o,J as s,K as c,L as l,M as u,N as d,O as f,P as p,Q as m,R as h,S as g,T as _,U as v,V as y,W as b,X as x,Y as S,Z as C,_ as w,a$ as T,a1 as E,a2 as D,a3 as O,a4 as k,a5 as A,a6 as j,a7 as M,a8 as N,a9 as P,aA as F,aB as I,aC as L,aD as R,aE as z,aF as B,aG as V,aH as H,aI as U,aJ as W,aK as G,aL as K,aM as q,aN as J,aO as Y,aP as X,aQ as Z,aR as Q,aS as ne,aT as re,aU as ie,aV as ae,aW as oe,aX as se,aY as ce,aZ as le,a_ as ue,aa as de,ab as fe,ac as pe,ad as me,ae as he,af as ge,ag as _e,ah as ve,ai as ye,aj as be,ak as xe,al as Se,am as $,an as Ce,ao as we,ap as Te,aq as Ee,ar as De,as as Oe,at as ke,au as Ae,av as je,aw as Me,ax as Ne,ay as Pe,az as Fe,b0 as Ie,b1 as Le,b2 as Re,b3 as ze,b4 as Be,b5 as Ve,b6 as He,b7 as Ue,b8 as We,b9 as Ge,bA as Ke,bB as qe,bC as Je,bD as Ye,bE as Xe,bF as Ze,bG as Qe,bH as $e,bI as et,bJ as tt,bK as nt,bL as rt,bM as it,bN as at,bO as ot,bP as st,ba as ct,bb as lt,bc as ut,bd as dt,be as ft,bf as pt,bg as mt,bh as ht,bi as gt,bj as _t,bk as vt,bl as yt,bm as bt,bn as xt,bo as St,bp as Ct,bq as wt,br as Tt,bs as Et,bt as Dt,bu as Ot,bv as kt,bw as At,bx as jt,by as Mt,bz as Nt}from"./index-xk_G3uGf.js";export{Pe as $ZodArray,it as $ZodAsyncError,Fe as $ZodBase64,F as $ZodBase64URL,I as $ZodBoolean,L as $ZodCIDRv4,R as $ZodCIDRv6,z as $ZodCUID,B as $ZodCUID2,V as $ZodCatch,yt as $ZodCheck,bt as $ZodCheckEndsWith,xt as $ZodCheckGreaterThan,St as $ZodCheckIncludes,Ct as $ZodCheckLengthEquals,wt as $ZodCheckLessThan,Tt as $ZodCheckLowerCase,Et as $ZodCheckMaxLength,Dt as $ZodCheckMinLength,Ot as $ZodCheckMultipleOf,kt as $ZodCheckNumberFormat,At as $ZodCheckOverwrite,jt as $ZodCheckRegex,Mt as $ZodCheckStartsWith,Nt as $ZodCheckStringFormat,Ke as $ZodCheckUpperCase,H as $ZodCustom,U as $ZodDefault,W as $ZodE164,G as $ZodEmail,K as $ZodEmoji,q as $ZodEnum,$e as $ZodError,J as $ZodGUID,Y as $ZodIPv4,X as $ZodIPv6,Z as $ZodISODate,Q as $ZodISODateTime,ne as $ZodISODuration,re as $ZodISOTime,ie as $ZodIntersection,ae as $ZodJWT,oe as $ZodKSUID,se as $ZodNanoID,ce as $ZodNever,le as $ZodNonOptional,ue as $ZodNullable,T as $ZodNumber,Ie as $ZodNumberFormat,Le as $ZodObject,Re as $ZodOptional,ze as $ZodPipe,Be as $ZodPrefault,Ve as $ZodReadonly,et as $ZodRealError,je as $ZodRegistry,He as $ZodString,Ue as $ZodStringFormat,We as $ZodTransform,Ge as $ZodType,ct as $ZodULID,lt as $ZodURL,ut as $ZodUUID,dt as $ZodUnion,ft as $ZodUnknown,pt as $ZodXID,at as $constructor,vt as Doc,te as JSONSchemaGenerator,t as _array,n as _base64,r as _base64url,i as _boolean,a as _check,o as _cidrv4,s as _cidrv6,c as _cuid,l as _cuid2,u as _e164,d as _email,f as _emoji,p as _endsWith,m as _gt,h as _gte,h as _min,g as _guid,_ as _includes,v as _int,y as _ipv4,b as _ipv6,x as _isoDate,S as _isoDateTime,C as _isoDuration,w as _isoTime,ee as _jwt,E as _ksuid,D as _length,O as _lowercase,k as _lt,A as _lte,A as _max,j as _maxLength,M as _minLength,N as _multipleOf,P as _nanoid,de as _never,fe as _normalize,pe as _number,me as _overwrite,qe as _parse,Je as _parseAsync,he as _refine,ge as _regex,Ye as _safeParse,Xe as _safeParseAsync,_e as _startsWith,ve as _string,ye as _superRefine,be as _toLowerCase,xe as _toUpperCase,Se as _trim,$ as _ulid,Ce as _unknown,we as _uppercase,Te as _url,Ee as _uuid,De as _uuidv4,Oe as _uuidv6,ke as _uuidv7,Ae as _xid,rt as clone,ot as config,tt as flattenError,nt as formatError,st as globalConfig,Me as globalRegistry,mt as isValidBase64,ht as isValidBase64URL,gt as isValidJWT,Ne as registry,Ze as safeParse,Qe as safeParseAsync,e as toJSONSchema,_t as version};
|
|
|
|
assets/core-DwBaktBr.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{$ as ee,C as te,D as e,E as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,M as l,N as u,O as d,P as f,Q as p,R as m,S as h,T as g,U as _,V as v,W as y,X as b,Y as x,Z as S,_ as C,a$ as w,a1 as T,a2 as E,a3 as D,a4 as O,a5 as k,a6 as A,a7 as j,a8 as M,a9 as N,aA as P,aB as F,aC as I,aD as L,aE as R,aF as z,aG as B,aH as V,aI as H,aJ as U,aK as W,aL as G,aM as K,aN as q,aO as J,aP as Y,aQ as X,aR as Z,aS as Q,aT as ne,aU as re,aV as ie,aW as ae,aX as oe,aY as se,aZ as ce,a_ as le,aa as ue,ab as de,ac as fe,ad as pe,ae as me,af as he,ag as ge,ah as _e,ai as ve,aj as ye,ak as be,al as xe,am as Se,an as $,ao as Ce,ap as we,aq as Te,ar as Ee,as as De,at as Oe,au as ke,av as Ae,aw as je,ax as Me,ay as Ne,az as Pe,b0 as Fe,b1 as Ie,b2 as Le,b3 as Re,b4 as ze,b5 as Be,b6 as Ve,b7 as He,b8 as Ue,b9 as We,bA as Ge,bB as Ke,bC as qe,bD as Je,bE as Ye,bF as Xe,bG as Ze,bH as Qe,bI as $e,bJ as et,bK as tt,bL as nt,bM as rt,bN as it,bO as at,bP as ot,bQ as st,ba as ct,bb as lt,bc as ut,bd as dt,be as ft,bf as pt,bg as mt,bh as ht,bi as gt,bj as _t,bk as vt,bl as yt,bm as bt,bn as xt,bo as St,bp as Ct,bq as wt,br as Tt,bs as Et,bt as Dt,bu as Ot,bv as kt,bw as At,bx as jt,by as Mt,bz as Nt}from"./index-_PXww5qh.js";export{Pe as $ZodArray,it as $ZodAsyncError,P as $ZodBase64,F as $ZodBase64URL,I as $ZodBoolean,L as $ZodCIDRv4,R as $ZodCIDRv6,z as $ZodCUID,B as $ZodCUID2,V as $ZodCatch,bt as $ZodCheck,xt as $ZodCheckEndsWith,St as $ZodCheckGreaterThan,Ct as $ZodCheckIncludes,wt as $ZodCheckLengthEquals,Tt as $ZodCheckLessThan,Et as $ZodCheckLowerCase,Dt as $ZodCheckMaxLength,Ot as $ZodCheckMinLength,kt as $ZodCheckMultipleOf,At as $ZodCheckNumberFormat,jt as $ZodCheckOverwrite,Mt as $ZodCheckRegex,Nt as $ZodCheckStartsWith,Ge as $ZodCheckStringFormat,Ke as $ZodCheckUpperCase,H as $ZodCustom,U as $ZodDefault,W as $ZodE164,G as $ZodEmail,K as $ZodEmoji,q as $ZodEnum,$e as $ZodError,J as $ZodGUID,Y as $ZodIPv4,X as $ZodIPv6,Z as $ZodISODate,Q as $ZodISODateTime,ne as $ZodISODuration,re as $ZodISOTime,ie as $ZodIntersection,ae as $ZodJWT,oe as $ZodKSUID,se as $ZodNanoID,ce as $ZodNever,le as $ZodNonOptional,w as $ZodNullable,Fe as $ZodNumber,Ie as $ZodNumberFormat,Le as $ZodObject,Re as $ZodOptional,ze as $ZodPipe,Be as $ZodPrefault,Ve as $ZodReadonly,et as $ZodRealError,je as $ZodRegistry,He as $ZodString,Ue as $ZodStringFormat,We as $ZodTransform,ct as $ZodType,lt as $ZodULID,ut as $ZodURL,dt as $ZodUUID,ft as $ZodUnion,pt as $ZodUnknown,mt as $ZodXID,at as $constructor,yt as Doc,te as JSONSchemaGenerator,t as _array,n as _base64,r as _base64url,i as _boolean,a as _check,o as _cidrv4,s as _cidrv6,c as _cuid,l as _cuid2,u as _e164,d as _email,f as _emoji,p as _endsWith,m as _gt,h as _gte,h as _min,g as _guid,_ as _includes,v as _int,y as _ipv4,b as _ipv6,x as _isoDate,S as _isoDateTime,C as _isoDuration,ee as _isoTime,T as _jwt,E as _ksuid,D as _length,O as _lowercase,k as _lt,A as _lte,A as _max,j as _maxLength,M as _minLength,N as _multipleOf,ue as _nanoid,de as _never,fe as _normalize,pe as _number,me as _overwrite,qe as _parse,Je as _parseAsync,he as _refine,ge as _regex,Ye as _safeParse,Xe as _safeParseAsync,_e as _startsWith,ve as _string,ye as _superRefine,be as _toLowerCase,xe as _toUpperCase,Se as _trim,$ as _ulid,Ce as _unknown,we as _uppercase,Te as _url,Ee as _uuid,De as _uuidv4,Oe as _uuidv6,ke as _uuidv7,Ae as _xid,rt as clone,ot as config,tt as flattenError,nt as formatError,st as globalConfig,Me as globalRegistry,ht as isValidBase64,gt as isValidBase64URL,_t as isValidJWT,Ne as registry,Ze as safeParse,Qe as safeParseAsync,e as toJSONSchema,vt as version};
|
assets/{deepseek-CQlomwi-.js → deepseek-BhEIX9aM.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,da as t,dc as n,e$ as r,eZ as i,f3 as a,f4 as o,fa as s,fc as c,fk as l,fm as u,ft as d,g as f,h as p,i as m,j as h,k as g,l as _,z as v}from"./index-_PXww5qh.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`deepseek`;var x=o({__name:`deepseek`,setup(o){let{t:y}=e(),x=t(),S=v(),{providers:C}=n(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(c(),r(d(f),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>d(x).back()},{default:u(()=>[a(d(p),null,{default:u(()=>[a(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[a(d(g),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),a(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[a(d(h),{modelValue:E.value,"onUpdate:modelValue":t[1]||=e=>E.value=e,placeholder:`https://api.deepseek.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`]))}});typeof y==`function`&&y(x);var S=x;export{S as default};
|
assets/{default-B9w9uvy6.js → default-ZM1vW7ty.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{d8 as e,e_ as t,f1 as n,f3 as r,f4 as i,fc as a,ft as o}from"./index-_PXww5qh.js";import{b as s}from"./HeaderLink-lBHYTbjo.js";const c={style:{paddingBottom:`env(safe-area-inset-bottom, 0px)`,paddingTop:`env(safe-area-inset-top, 0px)`,paddingRight:`env(safe-area-inset-right, 0px)`,paddingLeft:`env(safe-area-inset-left, 0px)`},"h-full":``},l={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},u={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,h:`[calc(100%-56px)]`};var d=i({__name:`default`,setup(i){return(i,d)=>(a(),n(`div`,c,[t(`div`,l,[r(s)]),t(`div`,u,[r(o(e))])]))}}),f=d;export{f as default};
|
assets/{default-node-EfZTletR.js → default-node-CpWjZ3Ux.js}
RENAMED
@@ -1,2 +1,2 @@
|
|
1 |
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-
|
2 |
-
import{
|
|
|
1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-vNgQ4ZKm.js","assets/index-_PXww5qh.js","assets/index-D1MslTZP.css"])))=>i.map(i=>d[i]);
|
2 |
+
import{db as e,fB as t}from"./index-_PXww5qh.js";async function n(){let{createRequire:n}=await e(async()=>{let{createRequire:e}=await import(`./__vite-browser-external-vNgQ4ZKm.js`).then(t(1));return{createRequire:e}},__vite__mapDeps([0,1,2])),{dirname:r,resolve:i}=await e(async()=>{let{dirname:e,resolve:n}=await import(`./__vite-browser-external-vNgQ4ZKm.js`).then(t(1));return{dirname:e,resolve:n}},__vite__mapDeps([0,1,2])),a=n(import.meta.url),o=r(a.resolve(`@duckdb/duckdb-wasm`));return{mvp:{mainModule:i(o,`./duckdb-mvp.wasm`),mainWorker:i(o,`./duckdb-node-mvp.worker.cjs`)},eh:{mainModule:i(o,`./duckdb-eh.wasm`),mainWorker:i(o,`./duckdb-node-eh.worker.cjs`)}}}export{n as getBundles};
|
assets/{delays-BY5FPO4G.js → delays-UZUvEnrl.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Basic-
|
|
|
1 |
+
import"./Basic-i6dKFYXW.js";import{b as e}from"./Textarea-Bs3dDFBW.js";import{c3 as t,cw as n,eW as r,e_ as i,f1 as a,f3 as o,f4 as s,fc as c,fe as l,fp as u,ft as d,fx as f}from"./index-_PXww5qh.js";const p={flex:``,"flex-col":``,"gap-2":``,"p-2":``},m={flex:``,"flex-row":``,"gap-2":``},h={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},g={"w-full":``,flex:``,"flex-row":``,"gap-4":``},_={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=s({__name:`delays`,setup(s){let y=u(``),b=u([]),x=u([]),S=u(!1),C=t();C.onHandlerEvent(`delay`,e=>{x.value.push(e)});function w(){S.value=!0;let e=y.value.split(``);for(let t of e)C.add(t);C.add(n),y.value=``,S.value=!1}return(t,n)=>(c(),a(`div`,p,[i(`div`,m,[o(d(e),{modelValue:y.value,"onUpdate:modelValue":n[0]||=e=>y.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:w},null,8,[`modelValue`]),i(`button`,h,f(S.value?`Processing...`:`Send`),1)]),i(`div`,g,[i(`div`,_,[n[1]||=i(`h3`,{"font-normal":``},` Emotion Message `,-1),(c(!0),a(r,null,l(b.value,e=>(c(),a(`div`,{key:e},[i(`div`,null,f(e),1)]))),128))]),i(`div`,v,[n[2]||=i(`h3`,{"font-normal":``},` Delays `,-1),(c(!0),a(r,null,l(x.value,e=>(c(),a(`div`,{key:e},[i(`div`,null,f(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default};
|
assets/{developer-BWVOPWBi.js → developer-Dkf2yq78.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{eQ as e,eR as t,eW as n,e_ as r,f0 as i,f1 as a,f2 as o,f3 as s,f4 as c,f7 as l,fc as u,fh as d,fi as f,fm as p,fn as m,ft as h,fu as g,fx as _,p as v}from"./index-_PXww5qh.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={class:`w-full flex cursor-pointer items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out`,bg:`neutral-50 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`},x=[`aria-checked`],S={key:0,text:`sm neutral-500`};var C=c({__name:`CheckBar`,props:l({text:{},iconOn:{},iconOff:{},description:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let c=f(n,`modelValue`);return(n,l)=>(u(),a(`label`,b,[m(r(`input`,{"onUpdate:modelValue":l[0]||=e=>c.value=e,"aria-checked":c.value,type:`checkbox`,hidden:``},null,8,x),[[t,c.value]]),r(`div`,null,[o(_(n.$t(n.text))+` `,1),n.description?(u(),a(`div`,S,_(n.$t(n.description)),1)):i(``,!0)]),s(e,{name:`slide-away`,mode:`out-in`},{default:p(()=>[c.value?(u(),a(`div`,{key:0,class:g(n.iconOn),transition:`all ease-in-out duration-250`},null,2)):(u(),a(`div`,{key:1,class:g(n.iconOff),transition:`all ease-in-out duration-250`},null,2))]),_:1})]))}}),w=C;const T={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":``};var E=c({__name:`developer`,setup(e){let t=v();return(e,i)=>{let o=d(`motion`);return u(),a(n,null,[m(s(w,{modelValue:h(t).disableTransitions,"onUpdate:modelValue":i[0]||=e=>h(t).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:950,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[o]]),m(s(w,{modelValue:h(t).usePageSpecificTransitions,"onUpdate:modelValue":i[1]||=e=>h(t).usePageSpecificTransitions=e,disabled:h(t).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:1e3,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[o]]),m((u(),a(`div`,T,i[2]||=[r(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[o]])],64)}}});typeof y==`function`&&y(E);var D=E;export{D as default};
|
assets/{effect--zg3C1LQ-D9KtGoly.js → effect--zg3C1LQ-4lsxt-_9.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{bS as e,db as t}from"./index-_PXww5qh.js";const n=async()=>{let{JSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_effect_xsschema-snGRN6_r.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn};
|
assets/{elevenlabs-DjPDAPqc.js → elevenlabs-C-2yi9F8.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{
|
|
|
1 |
+
import{B as e,cQ as t,cV as n,dc as r,e as i,e$ as a,eZ as o,e_ as s,f as c,f3 as l,f4 as u,fa as d,fc as f,fk as p,fm as m,fp as h,ft as g,w as _,z as v}from"./index-_PXww5qh.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=u({__name:`elevenlabs`,setup(u){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=h(0),w=h(1),T=h(0),E=h(0),D=h(.5),O=h(.75),k=h(!1),A=_(),j=v(),{providers:M}=r(j),{t:N}=e(),P=o(()=>!!M.value[x]?.apiKey),F=o(()=>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 d(async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),p(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),p(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),p(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),p(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),p(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),p(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),p(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),p(M,async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,r)=>(f(),a(g(i),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":m(()=>[s(`div`,b,[l(g(t),{modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,label:g(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:g(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`]),l(g(t),{modelValue:w.value,"onUpdate:modelValue":r[1]||=e=>w.value=e,label:g(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:g(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),l(g(t),{modelValue:T.value,"onUpdate:modelValue":r[2]||=e=>T.value=e,label:g(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:g(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`]),l(g(t),{modelValue:E.value,"onUpdate:modelValue":r[3]||=e=>E.value=e,label:g(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:g(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),l(g(t),{modelValue:D.value,"onUpdate:modelValue":r[4]||=e=>D.value=e,label:g(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:g(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),l(g(t),{modelValue:O.value,"onUpdate:modelValue":r[5]||=e=>O.value=e,label:g(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:g(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),l(g(n),{modelValue:k.value,"onUpdate:modelValue":r[6]||=e=>k.value=e,label:g(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:g(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:m(()=>[l(g(c),{"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/{emotions-DgUrsGtC.js → emotions-DD0zbvQb.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./Basic-
|
|
|
1 |
+
import"./Basic-i6dKFYXW.js";import{b as e}from"./Textarea-Bs3dDFBW.js";import{c4 as t,c6 as n,cw as r,eW as i,e_ as a,f1 as o,f3 as s,f4 as c,fc as l,fe as u,fp as d,ft as f,fx as p}from"./index-_PXww5qh.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},y={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var b=c({__name:`emotions`,setup(c){let b=d(``),x=d([]),S=d([]),C=d(!1),w=n({handlers:[async e=>{S.value.push(e.data)}]}),T=t(w);function E(){C.value=!0;let e=b.value.split(``);for(let t of e)T.add(t);T.add(r),b.value=``,C.value=!1}return(t,n)=>(l(),o(`div`,m,[a(`div`,h,[s(f(e),{modelValue:b.value,"onUpdate:modelValue":n[0]||=e=>b.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:E},null,8,[`modelValue`]),a(`button`,g,p(C.value?`Processing...`:`Send`),1)]),a(`div`,_,[a(`div`,v,[n[1]||=a(`h3`,{"font-normal":``},` Messages `,-1),(l(!0),o(i,null,u(x.value,e=>(l(),o(`div`,{key:e},[a(`div`,null,p(e),1)]))),128))]),a(`div`,y,[n[2]||=a(`h3`,{"font-normal":``},` Emotions `,-1),(l(!0),o(i,null,u(S.value,e=>(l(),o(`div`,{key:e},[a(`div`,null,p(e),1)]))),128))])])]))}}),x=b;export{x as default};
|