diff --git "a/hfstudio/static/_app/immutable/nodes/2.DPbkTEMF.js" "b/hfstudio/static/_app/immutable/nodes/2.DPbkTEMF.js" new file mode 100644--- /dev/null +++ "b/hfstudio/static/_app/immutable/nodes/2.DPbkTEMF.js" @@ -0,0 +1,73 @@ +import{r as _t,p as C,o as F,S as He,i as Ue,s as Me,m as Ge,O as J,d as f,P as Gt,u as We,v as qe,w as Xe,Q as Wt,b as ce,c as o,R as Ln,f as v,E as mt,T as Mn,U as rn,V as _e,I as se,K as ae,L as oe,J as ie,q as u,D as nt,x as pe,e as h,g as ee,h as L,j as p,t as te,k as M,z as Hn,a as Le,A as Mt,C as lt,y as Ce,N as sn,W as an,M as Ut,n as Ft,X as Xt,Y as Yt,B as qt}from"../chunks/MT0Fezl8.js";import"../chunks/IHki7fMi.js";function pt(s){return(s==null?void 0:s.length)!==void 0?s:Array.from(s)}function Un(s,e){F(s,1,1,()=>{e.delete(s.key)})}function zn(s,e,n,t,r,l,a,i,_,T,S,E){let y=s.length,I=l.length,D=y;const N={};for(;D--;)N[s[D].key]=D;const w=[],A=new Map,c=new Map,d=[];for(D=I;D--;){const $=E(r,l,D),x=n($);let b=a.get(x);b?d.push(()=>b.p($,e)):(b=T(x,$),b.c()),A.set(x,w[D]=b),x in N&&c.set(x,Math.abs(D-N[x]))}const m=new Set,g=new Set;function k($){C($,1),$.m(i,S),a.set($.key,$),S=$.first,I--}for(;y&&I;){const $=w[I-1],x=s[y-1],b=$.key,P=x.key;$===x?(S=$.first,y--,I--):A.has(P)?!a.has(b)||m.has(b)?k($):g.has(P)?y--:c.get(b)>c.get(P)?(g.add(b),k($)):(m.add(P),y--):(_(x,a),y--)}for(;y--;){const $=s[y];A.has($.key)||_($,a)}for(;I;)k(w[I-1]);return _t(d),w}function ze(s,e){const n={},t={},r={$$scope:1};let l=s.length;for(;l--;){const a=s[l],i=e[l];if(i){for(const _ in a)_ in i||(t[_]=1);for(const _ in i)r[_]||(n[_]=i[_],r[_]=1);s[l]=i}else for(const _ in a)r[_]=1}for(const a in t)a in n||(n[a]=void 0);return n}function Ze(s){return typeof s=="object"&&s!==null?s:{}}/** + * @license lucide-svelte v0.303.0 - ISC + +This source code is licensed under the ISC license. +See the LICENSE file in the root directory of this source tree. + */const on={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function un(s,e,n){const t=s.slice();return t[10]=e[n][0],t[11]=e[n][1],t}function Zt(s){let e,n=[s[11]],t={};for(let r=0;r{n(7,e=J(J({},e),_e(I))),n(6,r=rn(e,t)),"name"in I&&n(0,i=I.name),"color"in I&&n(1,_=I.color),"size"in I&&n(2,T=I.size),"strokeWidth"in I&&n(3,S=I.strokeWidth),"absoluteStrokeWidth"in I&&n(4,E=I.absoluteStrokeWidth),"iconNode"in I&&n(5,y=I.iconNode),"$$scope"in I&&n(8,a=I.$$scope)},e=_e(e),[i,_,T,S,E,y,r,e,a,l]}class Je extends He{constructor(e){super(),Ue(this,e,jn,Bn,Me,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Gn(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Wn(s){let e,n;const t=[{name:"alert-circle"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Gn]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Xn extends He{constructor(e){super(),Ue(this,e,qn,Wn,Me,{})}}function Yn(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Kn(s){let e,n;const t=[{name:"chevron-down"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Yn]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Jn extends He{constructor(e){super(),Ue(this,e,Zn,Kn,Me,{})}}function Qn(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function el(s){let e,n;const t=[{name:"code"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Qn]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class nl extends He{constructor(e){super(),Ue(this,e,tl,el,Me,{})}}function ll(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function rl(s){let e,n;const t=[{name:"copy"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[ll]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class zt extends He{constructor(e){super(),Ue(this,e,sl,rl,Me,{})}}function al(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function ol(s){let e,n;const t=[{name:"download"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[al]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Jt extends He{constructor(e){super(),Ue(this,e,il,ol,Me,{})}}function ul(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function cl(s){let e,n;const t=[{name:"loader-2"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[ul]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class dl extends He{constructor(e){super(),Ue(this,e,fl,cl,Me,{})}}function gl(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function hl(s){let e,n;const t=[{name:"more-horizontal"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[gl]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class ml extends He{constructor(e){super(),Ue(this,e,pl,hl,Me,{})}}function _l(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function bl(s){let e,n;const t=[{name:"panels-top-left"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[_l]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class yl extends He{constructor(e){super(),Ue(this,e,vl,bl,Me,{})}}function wl(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function $l(s){let e,n;const t=[{name:"pause"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[wl]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Rn extends He{constructor(e){super(),Ue(this,e,kl,$l,Me,{})}}function El(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Sl(s){let e,n;const t=[{name:"play"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[El]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Bt extends He{constructor(e){super(),Ue(this,e,Al,Sl,Me,{})}}function Tl(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Il(s){let e,n;const t=[{name:"rotate-ccw"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Tl]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Dl extends He{constructor(e){super(),Ue(this,e,xl,Il,Me,{})}}function Nl(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Cl(s){let e,n;const t=[{name:"share"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Nl]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Qt extends He{constructor(e){super(),Ue(this,e,Fl,Cl,Me,{})}}function Pl(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Ol(s){let e,n;const t=[{name:"skip-back"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Pl]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Ml extends He{constructor(e){super(),Ue(this,e,Ll,Ol,Me,{})}}function Rl(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Vl(s){let e,n;const t=[{name:"skip-forward"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Rl]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Ul extends He{constructor(e){super(),Ue(this,e,Hl,Vl,Me,{})}}function zl(s){let e;const n=s[2].default,t=Ge(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&We(t,n,r,r[3],e?Xe(n,r[3],l,null):qe(r[3]),null)},i(r){e||(C(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Bl(s){let e,n;const t=[{name:"x"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[zl]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=J(J({},e),_e(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=_e(e),[l,e,t,r]}class Gl extends He{constructor(e){super(),Ue(this,e,jl,Bl,Me,{})}}var fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Vn={exports:{}};(function(s){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var n=function(t){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,a={},i={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function c(d){return d instanceof _?new _(d.type,c(d.content),d.alias):Array.isArray(d)?d.map(c):d.replace(/&/g,"&").replace(/"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(g){var c=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(g.stack)||[])[1];if(c){var d=document.getElementsByTagName("script");for(var m in d)if(d[m].src==c)return d[m]}return null}},isActive:function(c,d,m){for(var g="no-"+d;c;){var k=c.classList;if(k.contains(d))return!0;if(k.contains(g))return!1;c=c.parentElement}return!!m}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(c,d){var m=i.util.clone(i.languages[c]);for(var g in d)m[g]=d[g];return m},insertBefore:function(c,d,m,g){g=g||i.languages;var k=g[c],$={};for(var x in k)if(k.hasOwnProperty(x)){if(x==d)for(var b in m)m.hasOwnProperty(b)&&($[b]=m[b]);m.hasOwnProperty(x)||($[x]=k[x])}var P=g[c];return g[c]=$,i.languages.DFS(i.languages,function(H,G){G===P&&H!=c&&(this[H]=$)}),$},DFS:function c(d,m,g,k){k=k||{};var $=i.util.objId;for(var x in d)if(d.hasOwnProperty(x)){m.call(d,x,d[x],g||x);var b=d[x],P=i.util.type(b);P==="Object"&&!k[$(b)]?(k[$(b)]=!0,c(b,m,null,k)):P==="Array"&&!k[$(b)]&&(k[$(b)]=!0,c(b,m,x,k))}}},plugins:{},highlightAll:function(c,d){i.highlightAllUnder(document,c,d)},highlightAllUnder:function(c,d,m){var g={callback:m,container:c,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",g),g.elements=Array.prototype.slice.apply(g.container.querySelectorAll(g.selector)),i.hooks.run("before-all-elements-highlight",g);for(var k=0,$;$=g.elements[k++];)i.highlightElement($,d===!0,g.callback)},highlightElement:function(c,d,m){var g=i.util.getLanguage(c),k=i.languages[g];i.util.setLanguage(c,g);var $=c.parentElement;$&&$.nodeName.toLowerCase()==="pre"&&i.util.setLanguage($,g);var x=c.textContent,b={element:c,language:g,grammar:k,code:x};function P(G){b.highlightedCode=G,i.hooks.run("before-insert",b),b.element.innerHTML=b.highlightedCode,i.hooks.run("after-highlight",b),i.hooks.run("complete",b),m&&m.call(b.element)}if(i.hooks.run("before-sanity-check",b),$=b.element.parentElement,$&&$.nodeName.toLowerCase()==="pre"&&!$.hasAttribute("tabindex")&&$.setAttribute("tabindex","0"),!b.code){i.hooks.run("complete",b),m&&m.call(b.element);return}if(i.hooks.run("before-highlight",b),!b.grammar){P(i.util.encode(b.code));return}if(d&&t.Worker){var H=new Worker(i.filename);H.onmessage=function(G){P(G.data)},H.postMessage(JSON.stringify({language:b.language,code:b.code,immediateClose:!0}))}else P(i.highlight(b.code,b.grammar,b.language))},highlight:function(c,d,m){var g={code:c,grammar:d,language:m};if(i.hooks.run("before-tokenize",g),!g.grammar)throw new Error('The language "'+g.language+'" has no grammar.');return g.tokens=i.tokenize(g.code,g.grammar),i.hooks.run("after-tokenize",g),_.stringify(i.util.encode(g.tokens),g.language)},tokenize:function(c,d){var m=d.rest;if(m){for(var g in m)d[g]=m[g];delete d.rest}var k=new E;return y(k,k.head,c),S(c,k,d,k.head,0),D(k)},hooks:{all:{},add:function(c,d){var m=i.hooks.all;m[c]=m[c]||[],m[c].push(d)},run:function(c,d){var m=i.hooks.all[c];if(!(!m||!m.length))for(var g=0,k;k=m[g++];)k(d)}},Token:_};t.Prism=i;function _(c,d,m,g){this.type=c,this.content=d,this.alias=m,this.length=(g||"").length|0}_.stringify=function c(d,m){if(typeof d=="string")return d;if(Array.isArray(d)){var g="";return d.forEach(function(P){g+=c(P,m)}),g}var k={type:d.type,content:c(d.content,m),tag:"span",classes:["token",d.type],attributes:{},language:m},$=d.alias;$&&(Array.isArray($)?Array.prototype.push.apply(k.classes,$):k.classes.push($)),i.hooks.run("wrap",k);var x="";for(var b in k.attributes)x+=" "+b+'="'+(k.attributes[b]||"").replace(/"/g,""")+'"';return"<"+k.tag+' class="'+k.classes.join(" ")+'"'+x+">"+k.content+""};function T(c,d,m,g){c.lastIndex=d;var k=c.exec(m);if(k&&g&&k[1]){var $=k[1].length;k.index+=$,k[0]=k[0].slice($)}return k}function S(c,d,m,g,k,$){for(var x in m)if(!(!m.hasOwnProperty(x)||!m[x])){var b=m[x];b=Array.isArray(b)?b:[b];for(var P=0;P=$.reach);Y+=z.value.length,z=z.next){var Z=z.value;if(d.length>c.length)return;if(!(Z instanceof _)){var fe=1,be;if(R){if(be=T(q,Y,c,O),!be||be.index>=c.length)break;var de=be.index,j=be.index+be[0].length,X=Y;for(X+=z.value.length;de>=X;)z=z.next,X+=z.value.length;if(X-=z.value.length,Y=X,z.value instanceof _)continue;for(var K=z;K!==d.tail&&(X$.reach&&($.reach=Ie);var $e=z.prev;ve&&($e=y(d,$e,ve),Y+=ve.length),I(d,$e,fe);var ye=new _(x,G?i.tokenize(Q,G):Q,W,Q);if(z=y(d,$e,ye),ge&&y(d,z,ge),fe>1){var he={cause:x+","+P,reach:Ie};S(c,d,m,z.prev,Y,he),$&&he.reach>$.reach&&($.reach=he.reach)}}}}}}function E(){var c={value:null,prev:null,next:null},d={value:null,prev:c,next:null};c.next=d,this.head=c,this.tail=d,this.length=0}function y(c,d,m){var g=d.next,k={value:m,prev:d,next:g};return d.next=k,g.prev=k,c.length++,k}function I(c,d,m){for(var g=d.next,k=0;k/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,l){var a={};a["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[l]},a.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:a}};i["language-"+l]={pattern:/[\s\S]+/,inside:n.languages[l]};var _={};_[r]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore("markup","cdata",_)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(t,r){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:n.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(t){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var l=t.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var t="Loading…",r=function(N,w){return"✖ Error "+N+" while fetching file: "+w},l="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",_="loading",T="loaded",S="failed",E="pre[data-src]:not(["+i+'="'+T+'"]):not(['+i+'="'+_+'"])';function y(N,w,A){var c=new XMLHttpRequest;c.open("GET",N,!0),c.onreadystatechange=function(){c.readyState==4&&(c.status<400&&c.responseText?w(c.responseText):c.status>=400?A(r(c.status,c.statusText)):A(l))},c.send(null)}function I(N){var w=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(N||"");if(w){var A=Number(w[1]),c=w[2],d=w[3];return c?d?[A,Number(d)]:[A,void 0]:[A,A]}}n.hooks.add("before-highlightall",function(N){N.selector+=", "+E}),n.hooks.add("before-sanity-check",function(N){var w=N.element;if(w.matches(E)){N.code="",w.setAttribute(i,_);var A=w.appendChild(document.createElement("CODE"));A.textContent=t;var c=w.getAttribute("data-src"),d=N.language;if(d==="none"){var m=(/\.(\w+)$/.exec(c)||[,"none"])[1];d=a[m]||m}n.util.setLanguage(A,d),n.util.setLanguage(w,d);var g=n.plugins.autoloader;g&&g.loadLanguages(d),y(c,function(k){w.setAttribute(i,T);var $=I(w.getAttribute("data-range"));if($){var x=k.split(/\r\n?|\n/g),b=$[0],P=$[1]==null?x.length:$[1];b<0&&(b+=x.length),b=Math.max(0,Math.min(b-1,x.length)),P<0&&(P+=x.length),P=Math.max(0,Math.min(P,x.length)),k=x.slice(b,P).join(` +`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(b+1))}A.textContent=k,n.highlightElement(A)},function(k){w.setAttribute(i,S),A.textContent=k})}}),n.plugins.fileHighlight={highlight:function(w){for(var A=(w||document).querySelectorAll(E),c=0,d;d=A[c++];)n.highlightElement(d)}};var D=!1;n.fileHighlight=function(){D||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),D=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Vn);var ql=Vn.exports;const it=Wl(ql);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(s){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},t={bash:n,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};s.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:t.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:t.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=s.languages.bash;for(var r=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],l=t.variable[1].inside,a=0;a0||s[9]||s[1])&&_n(s),z=s[9]&&bn(s),Y=s[1]&&vn(s),Z=!s[1]&&s[8].length===0&&yn(s),fe=pt(s[8]);const be=j=>j[79].id;for(let j=0;j0||j[9]||j[1]?q?(q.p(j,X),X[0]&770&&C(q,1)):(q=_n(j),q.c(),C(q,1),q.m(S,null)):q&&(lt(),F(q,1,1,()=>{q=null}),nt()),j[9]?z?(z.p(j,X),X[0]&512&&C(z,1)):(z=bn(j),z.c(),C(z,1),z.m(g,k)):z&&(lt(),F(z,1,1,()=>{z=null}),nt()),j[1]?Y?(Y.p(j,X),X[0]&2&&C(Y,1)):(Y=vn(j),Y.c(),C(Y,1),Y.m(g,$)):Y&&(lt(),F(Y,1,1,()=>{Y=null}),nt()),!j[1]&&j[8].length===0?Z?Z.p(j,X):(Z=yn(j),Z.c(),Z.m(g,x)):Z&&(Z.d(1),Z=null),X[0]&256|X[1]&544&&(fe=pt(j[8]),lt(),b=zn(b,X,be,1,j,fe,P,g,Un,kn,null,dn),nt())},i(j){if(!H){C(q),C(z),C(Y);for(let X=0;XBilling ⤴',ne,q,z,Y='

Voice

',Z,fe,be,j,X='
+
Clone your voice
(coming soon)
',K,de,Q,ve,ge,Ie="Exaggeration",$e,ye,he=s[12].toFixed(2)+"",xe,Be,ke,bt,De,ut="None Exaggerated",ct,je,Qe,Re,ot="Stability",vt,Ye,rt=s[13].toFixed(2)+"",ft,yt,Ee,et,Ve,At="More stable More variable",V,le,we='',Te,Oe,tt;const Pt=[lr,nr],Ne=[];function Ot(B,U){return B[7]?0:1}D=Ot(s),N=Ne[D]=Pt[D](s);let Ae=s[10]&&En(s),wt=pt(s[24]),Se=[];for(let B=0;BF(me[B],1,1,()=>{me[B]=null});return{c(){e=p("div"),n=p("div"),t=p("div"),r=p("textarea"),l=M(),a=p("div"),i=p("div"),_=p("span"),S=te(T),E=te(" / 5,000 characters"),y=M(),I=p("button"),N.c(),A=M(),Ae&&Ae.c(),c=M(),d=p("div"),m=p("div"),g=p("h3"),g.textContent=k,$=M(),x=p("button"),b=p("span");for(let B=0;B{Ne[re]=null}),nt(),N=Ne[D],N||(N=Ne[D]=Pt[D](B),N.c()),C(N,1),N.m(I,null)),(!Te||U[0]&132&&w!==(w=B[7]||!B[2].trim()))&&(I.disabled=w),B[10]?Ae?(Ae.p(B,U),U[0]&1024&&C(Ae,1)):(Ae=En(B),Ae.c(),C(Ae,1),Ae.m(n,null)):Ae&&(lt(),F(Ae,1,1,()=>{Ae=null}),nt()),U[0]&16777232){wt=pt(B[24]);let ue;for(ue=0;ues[58](P,G,O),j=()=>s[58](null,G,O);function X(){return s[59](s[79],s[80],s[81])}return{c(){e=p("div"),n=p("div"),t=p("div"),r=p("div"),l=p("button"),i.c(),_=M(),T=p("div"),S=p("div"),y=te(E),I=M(),D=p("div"),N=te("Duration: "),A=te(w),c=M(),d=p("div"),m=p("button"),ie(g.$$.fragment),k=M(),$=p("button"),ie(x.$$.fragment),b=M(),P=p("audio"),this.h()},l(K){e=h(K,"DIV",{class:!0});var de=v(e);n=h(de,"DIV",{class:!0});var Q=v(n);t=h(Q,"DIV",{class:!0});var ve=v(t);r=h(ve,"DIV",{class:!0});var ge=v(r);l=h(ge,"BUTTON",{class:!0});var Ie=v(l);i.l(Ie),Ie.forEach(f),_=L(ge),T=h(ge,"DIV",{class:!0});var $e=v(T);S=h($e,"DIV",{class:!0});var ye=v(S);y=ee(ye,E),ye.forEach(f),I=L($e),D=h($e,"DIV",{class:!0});var he=v(D);N=ee(he,"Duration: "),A=ee(he,w),he.forEach(f),$e.forEach(f),ge.forEach(f),c=L(ve),d=h(ve,"DIV",{class:!0});var xe=v(d);m=h(xe,"BUTTON",{class:!0,title:!0});var Be=v(m);oe(g.$$.fragment,Be),Be.forEach(f),k=L(xe),$=h(xe,"BUTTON",{class:!0,title:!0});var ke=v($);oe(x.$$.fragment,ke),ke.forEach(f),xe.forEach(f),ve.forEach(f),b=L(Q),P=h(Q,"AUDIO",{src:!0,class:!0}),v(P).forEach(f),Q.forEach(f),de.forEach(f),this.h()},h(){u(l,"class","w-10 h-10 bg-gradient-to-r from-amber-500 to-orange-500 rounded-full flex items-center justify-center text-white hover:from-amber-600 hover:to-orange-600 transition-colors shadow-md"),u(S,"class","text-sm font-medium text-gray-900 truncate"),u(D,"class","text-xs text-gray-500"),u(T,"class","flex-1"),u(r,"class","flex items-center gap-3 flex-1"),u(m,"class","p-2 hover:bg-gray-100 rounded-lg transition-colors"),u(m,"title","Download"),u($,"class","p-2 hover:bg-gray-100 rounded-lg transition-colors"),u($,"title","Share"),u(d,"class","flex items-center gap-1"),u(t,"class","flex items-center justify-between"),qt(P.src,H=s[79].result.url)||u(P,"src",H),u(P,"class","hidden"),u(n,"class","bg-white rounded-lg border border-gray-200 p-4 shadow-sm"),u(e,"class","bg-gradient-to-b from-gray-50 to-white p-4")},m(K,de){ce(K,e,de),o(e,n),o(n,t),o(t,r),o(r,l),z[a].m(l,null),o(r,_),o(r,T),o(T,S),o(S,y),o(T,I),o(T,D),o(D,N),o(D,A),o(t,c),o(t,d),o(d,m),ae(g,m,null),o(d,k),o(d,$),ae(x,$,null),o(n,b),o(n,P),be(),R=!0,W||(ne=[pe(l,"click",Z),pe(m,"click",fe),pe(P,"ended",X)],W=!0)},p(K,de){s=K;let Q=a;a=Y(s),a!==Q&&(lt(),F(z[Q],1,1,()=>{z[Q]=null}),nt(),i=z[a],i||(i=z[a]=q[a](s),i.c()),C(i,1),i.m(l,null)),(!R||de[0]&256)&&E!==(E=(s[79].result.title||"Generated Audio")+"")&&Le(y,E),(!R||de[0]&256)&&w!==(w=On(s[79].result.duration||0)+"")&&Le(A,w),(!R||de[0]&256&&!qt(P.src,H=s[79].result.url))&&u(P,"src",H),(G!==s[80]||O!==s[81])&&(j(),G=s[80],O=s[81],be())},i(K){R||(C(i),C(g.$$.fragment,K),C(x.$$.fragment,K),R=!0)},o(K){F(i),F(g.$$.fragment,K),F(x.$$.fragment,K),R=!1},d(K){K&&f(e),z[a].d(),se(g),se(x),j(),W=!1,_t(ne)}}}function er(s){let e,n;return e=new Bt({props:{size:18,class:"ml-0.5"}}),{c(){ie(e.$$.fragment)},l(t){oe(e.$$.fragment,t)},m(t,r){ae(e,t,r),n=!0},i(t){n||(C(e.$$.fragment,t),n=!0)},o(t){F(e.$$.fragment,t),n=!1},d(t){se(e,t)}}}function tr(s){let e,n;return e=new Rn({props:{size:18}}),{c(){ie(e.$$.fragment)},l(t){oe(e.$$.fragment,t)},m(t,r){ae(e,t,r),n=!0},i(t){n||(C(e.$$.fragment,t),n=!0)},o(t){F(e.$$.fragment,t),n=!1},d(t){se(e,t)}}}function kn(s,e){let n,t,r,l,a,i=e[81]+1+"",_,T,S,E,y,I,D,N,w,A=it.highlight(e[79].code,it.languages.python,"python")+"",c,d,m,g,k;E=new zt({props:{size:14,class:"text-gray-600"}});function $(){return e[55](e[79])}let x=e[79].result&&e[79].result.type==="audio"&&$n(e);return{key:s,first:null,c(){n=p("div"),t=p("div"),r=p("div"),l=p("span"),a=te("Cell "),_=te(i),T=M(),S=p("button"),ie(E.$$.fragment),y=M(),I=p("div"),D=p("pre"),N=p("code"),w=new Yt(!1),c=M(),x&&x.c(),d=M(),this.h()},l(b){n=h(b,"DIV",{class:!0});var P=v(n);t=h(P,"DIV",{class:!0});var H=v(t);r=h(H,"DIV",{class:!0});var G=v(r);l=h(G,"SPAN",{class:!0});var O=v(l);a=ee(O,"Cell "),_=ee(O,i),O.forEach(f),T=L(G),S=h(G,"BUTTON",{class:!0,title:!0});var R=v(S);oe(E.$$.fragment,R),R.forEach(f),G.forEach(f),y=L(H),I=h(H,"DIV",{class:!0});var W=v(I);D=h(W,"PRE",{class:!0});var ne=v(D);N=h(ne,"CODE",{class:!0});var q=v(N);w=Xt(q,!1),q.forEach(f),ne.forEach(f),W.forEach(f),H.forEach(f),c=L(P),x&&x.l(P),d=L(P),P.forEach(f),this.h()},h(){u(l,"class","text-sm font-medium text-gray-700"),u(S,"class","p-1.5 hover:bg-gray-200 rounded transition-colors"),u(S,"title","Copy code"),u(r,"class","flex items-center justify-between px-4 py-2 bg-gray-50 border-b border-gray-100"),w.a=null,u(N,"class","language-python text-sm"),u(D,"class","p-4 overflow-x-auto bg-gray-50"),u(I,"class","relative"),u(t,"class","border-b border-gray-200"),u(n,"class","bg-white rounded-lg border border-gray-200 overflow-hidden shadow-sm"),this.first=n},m(b,P){ce(b,n,P),o(n,t),o(t,r),o(r,l),o(l,a),o(l,_),o(r,T),o(r,S),ae(E,S,null),o(t,y),o(t,I),o(I,D),o(D,N),w.m(A,N),o(n,c),x&&x.m(n,null),o(n,d),m=!0,g||(k=pe(S,"click",$),g=!0)},p(b,P){e=b,(!m||P[0]&256)&&i!==(i=e[81]+1+"")&&Le(_,i),(!m||P[0]&256)&&A!==(A=it.highlight(e[79].code,it.languages.python,"python")+"")&&w.p(A),e[79].result&&e[79].result.type==="audio"?x?(x.p(e,P),P[0]&256&&C(x,1)):(x=$n(e),x.c(),C(x,1),x.m(n,d)):x&&(lt(),F(x,1,1,()=>{x=null}),nt())},i(b){m||(C(E.$$.fragment,b),C(x),m=!0)},o(b){F(E.$$.fragment,b),F(x),m=!1},d(b){b&&f(n),se(E),x&&x.d(),g=!1,k()}}}function nr(s){let e,n,t;return e=new Bt({props:{size:20}}),{c(){ie(e.$$.fragment),n=te(` + Generate speech`)},l(r){oe(e.$$.fragment,r),n=ee(r,` + Generate speech`)},m(r,l){ae(e,r,l),ce(r,n,l),t=!0},i(r){t||(C(e.$$.fragment,r),t=!0)},o(r){F(e.$$.fragment,r),t=!1},d(r){r&&f(n),se(e,r)}}}function lr(s){let e,n,t;return e=new dl({props:{size:20,class:"animate-spin"}}),{c(){ie(e.$$.fragment),n=te(` + Generating...`)},l(r){oe(e.$$.fragment,r),n=ee(r,` + Generating...`)},m(r,l){ae(e,r,l),ce(r,n,l),t=!0},i(r){t||(C(e.$$.fragment,r),t=!0)},o(r){F(e.$$.fragment,r),t=!1},d(r){r&&f(n),se(e,r)}}}function En(s){let e,n,t,r,l,a,i,_,T,S,E,y,I,D,N,w,A,c="Share",d,m,g,k="Download",$,x,b,P,H,G,O,R,W,ne,q=Tt(s[15])+"",z,Y,Z,fe,be,j,X=Tt(s[16])+"",K,de,Q,ve,ge,Ie,$e,ye,he,xe,Be,ke,bt,De,ut,ct=Tt(s[15])+"",je,Qe,Re,ot,vt,Ye,rt=Tt(s[16])+"",ft,yt,Ee,et,Ve,At,V,le,we,Te,Oe,tt,Pt,Ne,Ot,Ae;N=new Qt({props:{size:14,class:"text-gray-600"}}),x=new Jt({props:{size:14,class:"text-gray-600"}});const wt=[sr,rr],Se=[];function Fe(U,re){return U[14]?0:1}G=Fe(s),O=Se[G]=wt[G](s),ge=new Ml({props:{size:20,class:"text-gray-600"}});const gt=[or,ar],me=[];function jt(U,re){return U[14]?0:1}ye=jt(s),he=me[ye]=gt[ye](s),ke=new Ul({props:{size:20,class:"text-gray-600"}}),Ve=new Qt({props:{size:14}}),we=new Jt({props:{size:16,class:"text-gray-600"}}),tt=new ml({props:{size:16,class:"text-gray-600"}});let B=s[10]&&Sn(s);return{c(){e=p("div"),n=p("div"),t=p("div"),r=M(),l=p("div"),a=p("h3"),i=te(s[17]),_=M(),T=p("p"),S=te(s[3]),E=te(" • Created 1 second ago"),y=M(),I=p("div"),D=p("button"),ie(N.$$.fragment),w=M(),A=p("span"),A.textContent=c,d=M(),m=p("button"),g=p("span"),g.textContent=k,$=M(),ie(x.$$.fragment),b=M(),P=p("div"),H=p("button"),O.c(),R=M(),W=p("div"),ne=p("span"),z=te(q),Y=M(),Z=p("div"),fe=p("div"),be=M(),j=p("span"),K=te(X),de=M(),Q=p("div"),ve=p("button"),ie(ge.$$.fragment),Ie=M(),$e=p("button"),he.c(),xe=M(),Be=p("button"),ie(ke.$$.fragment),bt=M(),De=p("div"),ut=p("span"),je=te(ct),Qe=M(),Re=p("div"),ot=p("div"),vt=M(),Ye=p("span"),ft=te(rt),yt=M(),Ee=p("div"),et=p("button"),ie(Ve.$$.fragment),At=te(` + Share`),V=M(),le=p("button"),ie(we.$$.fragment),Te=M(),Oe=p("button"),ie(tt.$$.fragment),Pt=M(),B&&B.c(),this.h()},l(U){e=h(U,"DIV",{class:!0});var re=v(e);n=h(re,"DIV",{class:!0});var ue=v(n);t=h(ue,"DIV",{class:!0}),v(t).forEach(f),r=L(ue),l=h(ue,"DIV",{class:!0});var Pe=v(l);a=h(Pe,"H3",{class:!0});var Rt=v(a);i=ee(Rt,s[17]),Rt.forEach(f),_=L(Pe),T=h(Pe,"P",{class:!0});var It=v(T);S=ee(It,s[3]),E=ee(It," • Created 1 second ago"),It.forEach(f),Pe.forEach(f),y=L(ue),I=h(ue,"DIV",{class:!0});var xt=v(I);D=h(xt,"BUTTON",{class:!0});var st=v(D);oe(N.$$.fragment,st),w=L(st),A=h(st,"SPAN",{class:!0,"data-svelte-h":!0}),Ce(A)!=="svelte-hbn8gl"&&(A.textContent=c),st.forEach(f),d=L(xt),m=h(xt,"BUTTON",{class:!0});var at=v(m);g=h(at,"SPAN",{class:!0,"data-svelte-h":!0}),Ce(g)!=="svelte-h01aeg"&&(g.textContent=k),$=L(at),oe(x.$$.fragment,at),at.forEach(f),xt.forEach(f),ue.forEach(f),b=L(re),P=h(re,"DIV",{class:!0});var $t=v(P);H=h($t,"BUTTON",{class:!0});var Vt=v(H);O.l(Vt),Vt.forEach(f),R=L($t),W=h($t,"DIV",{class:!0});var dt=v(W);ne=h(dt,"SPAN",{class:!0});var Dt=v(ne);z=ee(Dt,q),Dt.forEach(f),Y=L(dt),Z=h(dt,"DIV",{class:!0});var Nt=v(Z);fe=h(Nt,"DIV",{class:!0,style:!0}),v(fe).forEach(f),Nt.forEach(f),be=L(dt),j=h(dt,"SPAN",{class:!0});var kt=v(j);K=ee(kt,X),kt.forEach(f),dt.forEach(f),$t.forEach(f),de=L(re),Q=h(re,"DIV",{class:!0});var Ke=v(Q);ve=h(Ke,"BUTTON",{class:!0,title:!0});var Ht=v(ve);oe(ge.$$.fragment,Ht),Ht.forEach(f),Ie=L(Ke),$e=h(Ke,"BUTTON",{class:!0});var Et=v($e);he.l(Et),Et.forEach(f),xe=L(Ke),Be=h(Ke,"BUTTON",{class:!0,title:!0});var Ct=v(Be);oe(ke.$$.fragment,Ct),Ct.forEach(f),bt=L(Ke),De=h(Ke,"DIV",{class:!0});var St=v(De);ut=h(St,"SPAN",{class:!0});var ht=v(ut);je=ee(ht,ct),ht.forEach(f),Qe=L(St),Re=h(St,"DIV",{class:!0});var en=v(Re);ot=h(en,"DIV",{class:!0,style:!0}),v(ot).forEach(f),en.forEach(f),vt=L(St),Ye=h(St,"SPAN",{class:!0});var tn=v(Ye);ft=ee(tn,rt),tn.forEach(f),St.forEach(f),yt=L(Ke),Ee=h(Ke,"DIV",{class:!0});var Lt=v(Ee);et=h(Lt,"BUTTON",{class:!0});var Kt=v(et);oe(Ve.$$.fragment,Kt),At=ee(Kt,` + Share`),Kt.forEach(f),V=L(Lt),le=h(Lt,"BUTTON",{class:!0,title:!0});var nn=v(le);oe(we.$$.fragment,nn),nn.forEach(f),Te=L(Lt),Oe=h(Lt,"BUTTON",{class:!0,title:!0});var ln=v(Oe);oe(tt.$$.fragment,ln),ln.forEach(f),Lt.forEach(f),Ke.forEach(f),Pt=L(re),B&&B.l(re),re.forEach(f),this.h()},h(){u(t,"class","w-2 h-2 bg-green-500 rounded-full"),u(a,"class","font-medium text-gray-900 text-sm"),u(T,"class","text-xs text-gray-500"),u(l,"class","flex-1"),u(A,"class","text-gray-700"),u(D,"class","flex items-center gap-1.5 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50 transition-colors"),u(g,"class","text-gray-700"),u(m,"class","flex items-center gap-1.5 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50 transition-colors"),u(I,"class","flex items-center gap-2"),u(n,"class","flex items-center gap-3 mb-4"),u(H,"class","w-8 h-8 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),u(ne,"class","text-xs text-gray-500 font-mono"),u(fe,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Ut(fe,"width",s[15]/s[16]*100+"%"),u(Z,"class","flex-1 h-1 bg-gray-200 rounded-full cursor-pointer"),u(j,"class","text-xs text-gray-500 font-mono"),u(W,"class","flex-1 flex items-center gap-2"),u(P,"class","flex items-center gap-3 mb-4"),u(ve,"class","p-2 hover:bg-gray-100 rounded-full"),u(ve,"title","Skip back"),u($e,"class","w-12 h-12 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),u(Be,"class","p-2 hover:bg-gray-100 rounded-full"),u(Be,"title","Skip forward"),u(ut,"class","text-xs text-gray-500 font-mono"),u(ot,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Ut(ot,"width",s[15]/s[16]*100+"%"),u(Re,"class","flex-1 h-1 bg-gray-200 rounded-full"),u(Ye,"class","text-xs text-gray-500 font-mono"),u(De,"class","flex-1 flex items-center gap-3"),u(et,"class","flex items-center gap-2 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50"),u(le,"class","p-2 hover:bg-gray-100 rounded-md"),u(le,"title","Download"),u(Oe,"class","p-2 hover:bg-gray-100 rounded-md"),u(Oe,"title","More options"),u(Ee,"class","flex items-center gap-2"),u(Q,"class","flex items-center gap-4 mb-4"),u(e,"class","p-4 border border-gray-200 rounded-lg bg-white")},m(U,re){ce(U,e,re),o(e,n),o(n,t),o(n,r),o(n,l),o(l,a),o(a,i),o(l,_),o(l,T),o(T,S),o(T,E),o(n,y),o(n,I),o(I,D),ae(N,D,null),o(D,w),o(D,A),o(I,d),o(I,m),o(m,g),o(m,$),ae(x,m,null),o(e,b),o(e,P),o(P,H),Se[G].m(H,null),o(P,R),o(P,W),o(W,ne),o(ne,z),o(W,Y),o(W,Z),o(Z,fe),o(W,be),o(W,j),o(j,K),o(e,de),o(e,Q),o(Q,ve),ae(ge,ve,null),o(Q,Ie),o(Q,$e),me[ye].m($e,null),o(Q,xe),o(Q,Be),ae(ke,Be,null),o(Q,bt),o(Q,De),o(De,ut),o(ut,je),o(De,Qe),o(De,Re),o(Re,ot),o(De,vt),o(De,Ye),o(Ye,ft),o(Q,yt),o(Q,Ee),o(Ee,et),ae(Ve,et,null),o(et,At),o(Ee,V),o(Ee,le),ae(we,le,null),o(Ee,Te),o(Ee,Oe),ae(tt,Oe,null),o(e,Pt),B&&B.m(e,null),Ne=!0,Ot||(Ae=[pe(D,"click",Pn),pe(m,"click",s[32]),pe(H,"click",s[27]),pe($e,"click",s[27]),pe(et,"click",Pn),pe(le,"click",s[32])],Ot=!0)},p(U,re){(!Ne||re[0]&131072)&&Le(i,U[17]),(!Ne||re[0]&8)&&Le(S,U[3]);let ue=G;G=Fe(U),G!==ue&&(lt(),F(Se[ue],1,1,()=>{Se[ue]=null}),nt(),O=Se[G],O||(O=Se[G]=wt[G](U),O.c()),C(O,1),O.m(H,null)),(!Ne||re[0]&32768)&&q!==(q=Tt(U[15])+"")&&Le(z,q),(!Ne||re[0]&98304)&&Ut(fe,"width",U[15]/U[16]*100+"%"),(!Ne||re[0]&65536)&&X!==(X=Tt(U[16])+"")&&Le(K,X);let Pe=ye;ye=jt(U),ye!==Pe&&(lt(),F(me[Pe],1,1,()=>{me[Pe]=null}),nt(),he=me[ye],he||(he=me[ye]=gt[ye](U),he.c()),C(he,1),he.m($e,null)),(!Ne||re[0]&32768)&&ct!==(ct=Tt(U[15])+"")&&Le(je,ct),(!Ne||re[0]&98304)&&Ut(ot,"width",U[15]/U[16]*100+"%"),(!Ne||re[0]&65536)&&rt!==(rt=Tt(U[16])+"")&&Le(ft,rt),U[10]?B?B.p(U,re):(B=Sn(U),B.c(),B.m(e,null)):B&&(B.d(1),B=null)},i(U){Ne||(C(N.$$.fragment,U),C(x.$$.fragment,U),C(O),C(ge.$$.fragment,U),C(he),C(ke.$$.fragment,U),C(Ve.$$.fragment,U),C(we.$$.fragment,U),C(tt.$$.fragment,U),Ne=!0)},o(U){F(N.$$.fragment,U),F(x.$$.fragment,U),F(O),F(ge.$$.fragment,U),F(he),F(ke.$$.fragment,U),F(Ve.$$.fragment,U),F(we.$$.fragment,U),F(tt.$$.fragment,U),Ne=!1},d(U){U&&f(e),se(N),se(x),Se[G].d(),se(ge),me[ye].d(),se(ke),se(Ve),se(we),se(tt),B&&B.d(),Ot=!1,_t(Ae)}}}function rr(s){let e,n;return e=new Bt({props:{size:14,class:"text-white ml-0.5"}}),{c(){ie(e.$$.fragment)},l(t){oe(e.$$.fragment,t)},m(t,r){ae(e,t,r),n=!0},i(t){n||(C(e.$$.fragment,t),n=!0)},o(t){F(e.$$.fragment,t),n=!1},d(t){se(e,t)}}}function sr(s){let e;return{c(){e=p("div"),this.h()},l(n){e=h(n,"DIV",{class:!0}),v(e).forEach(f),this.h()},h(){u(e,"class","pause-filled text-white")},m(n,t){ce(n,e,t)},i:Ft,o:Ft,d(n){n&&f(e)}}}function ar(s){let e,n;return e=new Bt({props:{size:20,class:"text-white ml-0.5"}}),{c(){ie(e.$$.fragment)},l(t){oe(e.$$.fragment,t)},m(t,r){ae(e,t,r),n=!0},i(t){n||(C(e.$$.fragment,t),n=!0)},o(t){F(e.$$.fragment,t),n=!1},d(t){se(e,t)}}}function or(s){let e;return{c(){e=p("div"),this.h()},l(n){e=h(n,"DIV",{class:!0}),v(e).forEach(f),this.h()},h(){u(e,"class","pause-filled text-white scale-150")},m(n,t){ce(n,e,t)},i:Ft,o:Ft,d(n){n&&f(e)}}}function Sn(s){let e,n,t,r;return{c(){e=p("audio"),this.h()},l(l){e=h(l,"AUDIO",{src:!0,style:!0}),v(e).forEach(f),this.h()},h(){qt(e.src,n=s[10])||u(e,"src",n),Ut(e,"display","none")},m(l,a){ce(l,e,a),s[44](e),t||(r=[pe(e,"loadedmetadata",s[28]),pe(e,"timeupdate",s[29]),pe(e,"play",s[30]),pe(e,"pause",s[31])],t=!0)},p(l,a){a[0]&1024&&!qt(e.src,n=l[10])&&u(e,"src",n)},d(l){l&&f(e),s[44](null),t=!1,_t(r)}}}function An(s){let e=s[74].name+"",n,t,r=s[74].badge&&ir(s);return{c(){n=te(e),r&&r.c(),t=mt()},l(l){n=ee(l,e),r&&r.l(l),t=mt()},m(l,a){ce(l,n,a),r&&r.m(l,a),ce(l,t,a)},p(l,a){l[74].badge&&r.p(l,a)},d(l){l&&(f(n),f(t)),r&&r.d(l)}}}function ir(s){let e,n,t,r=s[74].badge+"",l,a;return{c(){e=te(" "),n=p("span"),t=te("("),l=te(r),a=te(")"),this.h()},l(i){e=ee(i," "),n=h(i,"SPAN",{class:!0});var _=v(n);t=ee(_,"("),l=ee(_,r),a=ee(_,")"),_.forEach(f),this.h()},h(){u(n,"class","text-xs text-gray-500")},m(i,_){ce(i,e,_),ce(i,n,_),o(n,t),o(n,l),o(n,a)},p:Ft,d(i){i&&(f(e),f(n))}}}function Tn(s){let e,n=s[74].name===s[4]&&An(s);return{c(){n&&n.c(),e=mt()},l(t){n&&n.l(t),e=mt()},m(t,r){n&&n.m(t,r),ce(t,e,r)},p(t,r){t[74].name===t[4]?n?n.p(t,r):(n=An(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){t&&f(e),n&&n.d(t)}}}function In(s){let e,n=pt(s[24]),t=[];for(let r=0;r{b[W]=null}),nt(),c=b[A],c||(c=b[A]=x[A](s),c.c()),C(c,1),c.m(w,null)),(!g||R[0]&8&&m!==(m="w-full flex items-center justify-between p-1.5 rounded-lg hover:bg-gray-50 transition-colors text-left group border border-transparent "+(s[71].name===s[3]?"bg-gray-100 border-gray-200":"")))&&u(e,"class",m)},i(O){g||(C(c),g=!0)},o(O){F(c),g=!1},d(O){O&&f(e),b[A].d(),k=!1,_t($)}}}function Nn(s){let e,n;return{c(){e=p("div"),n=te(s[11]),this.h()},l(t){e=h(t,"DIV",{class:!0});var r=v(e);n=ee(r,s[11]),r.forEach(f),this.h()},h(){u(e,"class","fixed bottom-4 right-4 px-4 py-2 bg-gray-900 text-white rounded-lg shadow-lg z-50 animate-fade-in svelte-u8edqi")},m(t,r){ce(t,e,r),o(e,n)},p(t,r){r[0]&2048&&Le(n,t[11])},d(t){t&&f(e)}}}function Cn(s){let e,n,t,r,l,a,i,_,T,S,E,y,I="An error occurred while processing your request",D,N,w,A,c,d,m,g,k,$,x,b,P="Close",H,G,O;a=new Xn({props:{size:20,class:"text-red-600"}}),w=new Gl({props:{size:20,class:"text-gray-500"}});let R=s[22]&&Fn(s);return k=new zt({props:{size:16}}),{c(){e=p("div"),n=p("div"),t=p("div"),r=p("div"),l=p("div"),ie(a.$$.fragment),i=M(),_=p("div"),T=p("h3"),S=te(s[21]),E=M(),y=p("p"),y.textContent=I,D=M(),N=p("button"),ie(w.$$.fragment),A=M(),c=p("div"),R&&R.c(),d=M(),m=p("div"),g=p("button"),ie(k.$$.fragment),$=te(` + Copy Error`),x=M(),b=p("button"),b.textContent=P,this.h()},l(W){e=h(W,"DIV",{class:!0});var ne=v(e);n=h(ne,"DIV",{class:!0});var q=v(n);t=h(q,"DIV",{class:!0});var z=v(t);r=h(z,"DIV",{class:!0});var Y=v(r);l=h(Y,"DIV",{class:!0});var Z=v(l);oe(a.$$.fragment,Z),Z.forEach(f),i=L(Y),_=h(Y,"DIV",{class:!0});var fe=v(_);T=h(fe,"H3",{class:!0});var be=v(T);S=ee(be,s[21]),be.forEach(f),E=L(fe),y=h(fe,"P",{class:!0,"data-svelte-h":!0}),Ce(y)!=="svelte-1l3zl3"&&(y.textContent=I),fe.forEach(f),Y.forEach(f),D=L(z),N=h(z,"BUTTON",{class:!0,title:!0});var j=v(N);oe(w.$$.fragment,j),j.forEach(f),z.forEach(f),A=L(q),c=h(q,"DIV",{class:!0});var X=v(c);R&&R.l(X),X.forEach(f),d=L(q),m=h(q,"DIV",{class:!0});var K=v(m);g=h(K,"BUTTON",{class:!0});var de=v(g);oe(k.$$.fragment,de),$=ee(de,` + Copy Error`),de.forEach(f),x=L(K),b=h(K,"BUTTON",{class:!0,"data-svelte-h":!0}),Ce(b)!=="svelte-1nyppew"&&(b.textContent=P),K.forEach(f),q.forEach(f),ne.forEach(f),this.h()},h(){u(l,"class","w-10 h-10 bg-red-100 rounded-full flex items-center justify-center flex-shrink-0"),u(T,"class","text-lg font-semibold text-gray-900 truncate"),u(y,"class","text-sm text-gray-600"),u(_,"class","min-w-0"),u(r,"class","flex items-center gap-3 min-w-0"),u(N,"class","p-2 hover:bg-red-100 rounded-full transition-colors flex-shrink-0"),u(N,"title","Close"),u(t,"class","flex items-center justify-between p-6 border-b border-gray-200 bg-red-50 flex-shrink-0"),u(c,"class","p-6 overflow-y-auto flex-1 min-h-0"),u(g,"class","flex items-center gap-2 px-4 py-2 text-gray-700 hover:bg-gray-200 rounded-lg transition-colors"),u(b,"class","px-6 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors"),u(m,"class","flex items-center justify-end gap-3 p-6 border-t border-gray-200 bg-gray-50 flex-shrink-0"),u(n,"class","bg-white rounded-xl shadow-2xl max-w-2xl w-full max-h-[80vh] flex flex-col"),u(e,"class","fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4")},m(W,ne){ce(W,e,ne),o(e,n),o(n,t),o(t,r),o(r,l),ae(a,l,null),o(r,i),o(r,_),o(_,T),o(T,S),o(_,E),o(_,y),o(t,D),o(t,N),ae(w,N,null),o(n,A),o(n,c),R&&R.m(c,null),o(n,d),o(n,m),o(m,g),ae(k,g,null),o(g,$),o(m,x),o(m,b),H=!0,G||(O=[pe(N,"click",s[37]),pe(g,"click",s[38]),pe(b,"click",s[37])],G=!0)},p(W,ne){(!H||ne[0]&2097152)&&Le(S,W[21]),W[22]?R?R.p(W,ne):(R=Fn(W),R.c(),R.m(c,null)):R&&(R.d(1),R=null)},i(W){H||(C(a.$$.fragment,W),C(w.$$.fragment,W),C(k.$$.fragment,W),H=!0)},o(W){F(a.$$.fragment,W),F(w.$$.fragment,W),F(k.$$.fragment,W),H=!1},d(W){W&&f(e),se(a),se(w),R&&R.d(),se(k),G=!1,_t(O)}}}function Fn(s){let e,n,t="Error Details:",r,l,a;function i(S,E){return E[0]&4194304&&(a=null),a==null&&(a=!!S[22].includes("exceeded your monthly included credits")),a?gr:dr}let _=i(s,[-1,-1,-1]),T=_(s);return{c(){e=p("div"),n=p("h4"),n.textContent=t,r=M(),l=p("pre"),T.c(),this.h()},l(S){e=h(S,"DIV",{class:!0});var E=v(e);n=h(E,"H4",{class:!0,"data-svelte-h":!0}),Ce(n)!=="svelte-3lmggt"&&(n.textContent=t),r=L(E),l=h(E,"PRE",{class:!0});var y=v(l);T.l(y),y.forEach(f),E.forEach(f),this.h()},h(){u(n,"class","text-sm font-medium text-gray-900 mb-2"),u(l,"class","text-xs text-gray-700 whitespace-pre-wrap font-mono leading-relaxed break-words"),u(e,"class","bg-gray-50 rounded-lg p-4 border")},m(S,E){ce(S,e,E),o(e,n),o(e,r),o(e,l),T.m(l,null)},p(S,E){_===(_=i(S,E))&&T?T.p(S,E):(T.d(1),T=_(S),T&&(T.c(),T.m(l,null)))},d(S){S&&f(e),T.d()}}}function dr(s){let e;return{c(){e=te(s[22])},l(n){e=ee(n,s[22])},m(n,t){ce(n,e,t)},p(n,t){t[0]&4194304&&Le(e,n[22])},d(n){n&&f(e)}}}function gr(s){let e,n=s[22].replace("Subscribe to PRO",'Subscribe to PRO')+"",t;return{c(){e=new Yt(!1),t=mt(),this.h()},l(r){e=Xt(r,!1),t=mt(),this.h()},h(){e.a=t},m(r,l){e.m(n,r,l),ce(r,t,l)},p(r,l){l[0]&4194304&&n!==(n=r[22].replace("Subscribe to PRO",'Subscribe to PRO')+"")&&e.p(n)},d(r){r&&(f(t),e.d())}}}function hr(s){let e,n,t,r,l,a,i,_,T,S,E,y,I,D,N,w,A,c,d,m,g,k;i=new yl({props:{size:14}}),y=new nl({props:{size:14}});let $=s[8].length>0&&mn(s);const x=[Yl,Xl],b=[];function P(O,R){return O[5]==="ui"?0:1}w=P(s),A=b[w]=x[w](s);let H=s[11]&&Nn(s),G=s[20]&&Cn(s);return{c(){e=p("div"),n=p("header"),t=p("div"),r=p("div"),l=p("div"),a=p("button"),ie(i.$$.fragment),_=te(` + UI`),S=M(),E=p("button"),ie(y.$$.fragment),I=te(` + Code Recorder + `),$&&$.c(),N=M(),A.c(),c=M(),H&&H.c(),d=M(),G&&G.c(),this.h()},l(O){e=h(O,"DIV",{class:!0});var R=v(e);n=h(R,"HEADER",{class:!0});var W=v(n);t=h(W,"DIV",{class:!0});var ne=v(t);r=h(ne,"DIV",{class:!0});var q=v(r);l=h(q,"DIV",{class:!0});var z=v(l);a=h(z,"BUTTON",{class:!0});var Y=v(a);oe(i.$$.fragment,Y),_=ee(Y,` + UI`),Y.forEach(f),S=L(z),E=h(z,"BUTTON",{class:!0});var Z=v(E);oe(y.$$.fragment,Z),I=ee(Z,` + Code Recorder + `),$&&$.l(Z),Z.forEach(f),z.forEach(f),q.forEach(f),ne.forEach(f),W.forEach(f),N=L(R),A.l(R),c=L(R),H&&H.l(R),d=L(R),G&&G.l(R),R.forEach(f),this.h()},h(){u(a,"class",T="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(s[5]==="ui"?"bg-white shadow-sm":"text-gray-600")),u(E,"class",D="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative "+(s[5]==="code"?"bg-white shadow-sm":"text-gray-600")),u(l,"class","flex items-center bg-gray-100 rounded-md p-0.5"),u(r,"class","flex items-center gap-2"),u(t,"class","flex items-center justify-end px-4 py-2"),u(n,"class","border-b border-gray-200 bg-white"),u(e,"class","flex flex-col h-full")},m(O,R){ce(O,e,R),o(e,n),o(n,t),o(t,r),o(r,l),o(l,a),ae(i,a,null),o(a,_),o(l,S),o(l,E),ae(y,E,null),o(E,I),$&&$.m(E,null),o(e,N),b[w].m(e,null),o(e,c),H&&H.m(e,null),o(e,d),G&&G.m(e,null),m=!0,g||(k=[pe(a,"click",s[41]),pe(E,"click",s[42]),pe(e,"click",s[34])],g=!0)},p(O,R){(!m||R[0]&32&&T!==(T="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(O[5]==="ui"?"bg-white shadow-sm":"text-gray-600")))&&u(a,"class",T),O[8].length>0?$?$.p(O,R):($=mn(O),$.c(),$.m(E,null)):$&&($.d(1),$=null),(!m||R[0]&32&&D!==(D="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative "+(O[5]==="code"?"bg-white shadow-sm":"text-gray-600")))&&u(E,"class",D);let W=w;w=P(O),w===W?b[w].p(O,R):(lt(),F(b[W],1,1,()=>{b[W]=null}),nt(),A=b[w],A?A.p(O,R):(A=b[w]=x[w](O),A.c()),C(A,1),A.m(e,c)),O[11]?H?H.p(O,R):(H=Nn(O),H.c(),H.m(e,d)):H&&(H.d(1),H=null),O[20]?G?(G.p(O,R),R[0]&1048576&&C(G,1)):(G=Cn(O),G.c(),C(G,1),G.m(e,null)):G&&(lt(),F(G,1,1,()=>{G=null}),nt())},i(O){m||(C(i.$$.fragment,O),C(y.$$.fragment,O),C(A),C(G),m=!0)},o(O){F(i.$$.fragment,O),F(y.$$.fragment,O),F(A),F(G),m=!1},d(O){O&&f(e),se(i),se(y),$&&$.d(),b[w].d(),H&&H.d(),G&&G.d(),g=!1,_t(k)}}}function Tt(s){const e=Math.floor(s/60),n=Math.floor(s%60);return`${e}:${n.toString().padStart(2,"0")}`}function Pn(){}function pr(s,e){const n=document.createElement("a");n.href=s,n.download=`${e||"audio"}.wav`,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function On(s){if(!s)return"0:00";const e=Math.floor(s/60),n=Math.floor(s%60);return`${e}:${n.toString().padStart(2,"0")}`}function mr(s,e,n){let t="In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.",r="Lily",l="Chatterbox",a="api",i="ui",_=!1,T=!1,S=[],E=K(),y=null,I=null,D=null,N=.25,w=.7,A=!1,c=0,d=0,m="",g=null,k=null,$=null,x=!1,b="",P="",H=null;const G=[{id:"chatterbox",name:"Chatterbox",badge:"recommended"},{id:"kokoro",name:"Kokoro",badge:"coming soon",disabled:!0}],O=[{id:"lily",name:"Lily",description:"Warm, conversational tone of a woman in her 30s",sample:"/voices/lily.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/lily.mp3"},{id:"andrew",name:"Andrew",description:"Older British man who speaks clearly and kindly",sample:"/voices/andrew.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/andrew.mp3"},{id:"fairy",name:"Fairy",description:"High and airy female voice that bursts with excitement",sample:"/voices/fairy.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/fairy.mp3"},{id:"pirate",name:"Pirate",description:"Young pirate that speaks gruffly and with excitement",sample:"/voices/pirate.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/pirate.mp3"}];async function R(){if(!t.trim())return;if(!(await fetch("/api/auth/user",{credentials:"include"})).ok){window.dispatchEvent(new CustomEvent("show-login-prompt"));return}n(7,T=!0),n(10,I=null),n(15,c=0),y||n(1,y=Q());const le=ve();n(14,A=!1),n(17,m=t.length>30?t.substring(0,30)+"...":t);try{const we={text:t,voice_id:r.toLowerCase(),model_id:l.toLowerCase(),mode:a,parameters:{exaggeration:N,temperature:w}},Te=await fetch("/api/tts/generate",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(we)});if(!Te.ok){const tt=await Te.text();throw new Error(`HTTP error! status: ${Te.status}, body: ${tt}`)}const Oe=await Te.json();if(Oe.success&&Oe.audio_url)n(10,I=Oe.audio_url),j(le,{type:"audio",url:Oe.audio_url,title:m,duration:Oe.duration}),i==="ui"&&setTimeout(()=>{g&&g.play().catch(()=>{})},100);else{const tt=Oe.error||"Unknown error occurred";Ie("Generation Failed",tt),n(10,I=null)}}catch{Ie("Network Error","Failed to connect to the server. Please check your connection and try again."),n(10,I=null)}finally{n(7,T=!1)}}function W(){g&&(A?g.pause():g.play())}function ne(){g&&n(16,d=g.duration)}function q(){g&&n(15,c=g.currentTime)}function z(){n(14,A=!0)}function Y(){n(14,A=!1)}function Z(){if(I){const V=document.createElement("a");V.href=I,V.download="speech.wav",V.click()}}function fe(V,le){if(le.stopPropagation(),$===V.name)k&&(k.pause(),k.currentTime=0),n(19,$=null);else{k&&k.pause(),n(19,$=V.name);const we=V.sample||"/samples/harvard.wav";k?k.src=we:(k=new Audio(we),k.addEventListener("ended",()=>{n(19,$=null)})),k.play().catch(Te=>{n(19,$=null)})}}function be(V){V.target.closest(".model-dropdown")||n(6,_=!1)}function j(V,le=null){const we={id:Date.now()+Math.random(),code:V,result:le};return n(8,S=[...S,we]),we}function X(){n(8,S=[]),n(9,E=K()),n(1,y=null)}function K(){return a==="local"?`pip install huggingface-hub hfstudio uv +hfstudio start ${l.toLowerCase()} --port 7861`:"pip install huggingface-hub"}function de(){return a==="local"?'client = InferenceClient(base_url="http://localhost:7861/api/v1")':`client = InferenceClient( + api_key="YOUR_HF_TOKEN", # Get your token from https://huggingface.co/settings/tokens + model="${l.toLowerCase()==="chatterbox"?"ResembleAI/chatterbox":l.toLowerCase()}", +)`}function Q(){const V=de();return a==="local"?`from huggingface_hub import InferenceClient + +${V}`:`from huggingface_hub import InferenceClient + +${V}`}function ve(){const V=O.find(we=>we.name===r),le=(V==null?void 0:V.preview_url)||(V==null?void 0:V.sample);return a==="local"?`text = """${t}""" + +# audio is in bytes format +audio = client.text_to_speech( + text, + extra_body={ + "audio_url": "${le}", + "exaggeration": ${N}, + "temperature": ${w} + } +)`:`text = """${t}""" + +# audio is in bytes format +audio = client.text_to_speech( + text, + extra_body={ + "audio_url": "${le}", + "exaggeration": ${N}, + "temperature": ${w} + } +)`}function ge(V,le="Copied to clipboard!"){navigator.clipboard.writeText(V).then(()=>{n(11,D=le),setTimeout(()=>{n(11,D=null)},2e3)})}function Ie(V,le=""){n(21,b=V),n(22,P=le),n(20,x=!0)}function $e(){n(20,x=!1),n(21,b=""),n(22,P="")}function ye(){const V=P?`${b} + +Details: +${P}`:b;ge(V,"Error message copied!")}function he(){const V=[];if(E){const Te=E.includes("pip install")||E.includes("hfstudio start")?"bash":"";V.push(`## Setup (Run in Terminal) + +\`\`\`${Te} +${E} +\`\`\``)}y&&V.push(`## Imports (Python) + +\`\`\`python +${y} +\`\`\``),S.forEach((we,Te)=>{V.push(`## Cell ${Te+1} + +\`\`\`python +${we.code} +\`\`\``)});const le=V.join(` + +`);ge(le,"All code copied as Markdown!")}Hn(()=>{window.addEventListener("storage",V=>{V.key})});function xe(V){V.audioElement||(V.audioElement=new Audio(V.result.url),V.audioElement.addEventListener("ended",()=>{V.isPlaying=!1,n(8,S=[...S])})),V.isPlaying?(V.audioElement.pause(),V.isPlaying=!1):(S.forEach(le=>{le!==V&&le.isPlaying&&le.audioElement&&(le.audioElement.pause(),le.isPlaying=!1)}),V.audioElement.play(),V.isPlaying=!0),n(8,S=[...S])}const Be=()=>n(5,i="ui"),ke=()=>n(5,i="code");function bt(){t=this.value,n(2,t)}function De(V){sn[V?"unshift":"push"](()=>{g=V,n(18,g)})}const ut=()=>n(6,_=!_),ct=V=>{V.disabled||(n(4,l=V.name),n(6,_=!1))},je=(V,le)=>fe(V,le),Qe=V=>n(3,r=V.name);function Re(){N=an(this.value),n(12,N)}function ot(){w=an(this.value),n(13,w)}const vt=()=>n(0,a="api"),Ye=()=>n(0,a="local"),rt=()=>ge(E),ft=()=>ge(y),yt=V=>ge(V.code),Ee=V=>xe(V),et=V=>pr(V.result.url,V.result.title);function Ve(V,le,we){sn[V?"unshift":"push"](()=>{le[we].audioElement=V,n(8,S)})}const At=(V,le,we)=>n(8,le[we].isPlaying=!1,S);return s.$$.update=()=>{s.$$.dirty[0]&3&&a&&(n(9,E=K()),y&&n(1,y=Q()))},[a,y,t,r,l,i,_,T,S,E,I,D,N,w,A,c,d,m,g,$,x,b,P,H,G,O,R,W,ne,q,z,Y,Z,fe,be,X,ge,$e,ye,he,xe,Be,ke,bt,De,ut,ct,je,Qe,Re,ot,vt,Ye,rt,ft,yt,Ee,et,Ve,At]}class vr extends He{constructor(e){super(),Ue(this,e,mr,hr,Me,{},null,[-1,-1,-1])}}export{vr as component};