GitHub Action
commited on
Commit
Β·
e323b99
1
Parent(s):
a5f422c
Sync from GitHub: 825a67a78c4438c20348dd6dd3f68557e1d89d03
Browse files- .gitattributes +6 -0
- frontend/src/routes/+layout.svelte +16 -15
- hfstudio/static/_app/immutable/chunks/0dvDZDCQ.js +3 -0
- hfstudio/static/_app/immutable/entry/app.B6MnJtPd.js +2 -0
- hfstudio/static/_app/immutable/entry/start.DqjGHyqo.js +1 -0
- hfstudio/static/_app/immutable/nodes/0.BAMSj75u.js +4 -0
- hfstudio/static/_app/immutable/nodes/1.CnYAF7YK.js +1 -0
- hfstudio/static/_app/version.json +1 -1
- hfstudio/static/index.html +6 -6
.gitattributes
CHANGED
|
@@ -7,3 +7,9 @@
|
|
| 7 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.pdf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.pdf filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
hfstudio/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
hfstudio/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
frontend/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
frontend/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
hfstudio/static/samples/harvard.wav filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
frontend/static/samples/harvard.wav filter=lfs diff=lfs merge=lfs -text
|
frontend/src/routes/+layout.svelte
CHANGED
|
@@ -15,23 +15,25 @@
|
|
| 15 |
|
| 16 |
let isLoggedIn = false;
|
| 17 |
let username = '';
|
| 18 |
-
let isCheckingAuth = false; //
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
// Check if we have valid cached data
|
| 21 |
let hasCachedData = false;
|
| 22 |
-
if (initToken && initToken === initCachedToken && initCachedUserInfo) {
|
| 23 |
try {
|
| 24 |
const userInfo = JSON.parse(initCachedUserInfo);
|
| 25 |
isLoggedIn = true;
|
| 26 |
username = userInfo.username;
|
| 27 |
hasCachedData = true;
|
| 28 |
} catch (e) {
|
| 29 |
-
// Invalid cache, will need to check
|
| 30 |
-
isCheckingAuth = true;
|
| 31 |
}
|
| 32 |
-
} else if (initToken) {
|
| 33 |
-
// We have a token but no valid cache, need to check
|
| 34 |
-
isCheckingAuth = true;
|
| 35 |
}
|
| 36 |
|
| 37 |
let showTokenInput = false;
|
|
@@ -136,7 +138,8 @@
|
|
| 136 |
}
|
| 137 |
// On Spaces, always fetch fresh user info; locally only fetch if token changed
|
| 138 |
if (isOnSpaces || !isLoggedIn || token !== cachedToken) {
|
| 139 |
-
|
|
|
|
| 140 |
}
|
| 141 |
} else {
|
| 142 |
// No token, clear everything
|
|
@@ -147,8 +150,10 @@
|
|
| 147 |
}
|
| 148 |
}
|
| 149 |
|
| 150 |
-
async function fetchUserInfo(token) {
|
| 151 |
-
|
|
|
|
|
|
|
| 152 |
|
| 153 |
// Check if running on Spaces
|
| 154 |
const isOnSpaces =
|
|
@@ -402,11 +407,7 @@
|
|
| 402 |
></div>
|
| 403 |
{/if}
|
| 404 |
<img src="/assets/hf-logo.png" alt="HF Logo" class="w-5 h-5 relative z-10" />
|
| 405 |
-
{#if
|
| 406 |
-
<span class="relative z-10"
|
| 407 |
-
>Checking... ({isLoggedIn ? 'logged in' : 'not logged in'})</span
|
| 408 |
-
>
|
| 409 |
-
{:else if isLoggedIn}
|
| 410 |
<span class="relative z-10">Sign out ({username})</span>
|
| 411 |
{:else}
|
| 412 |
<span class="relative z-10">Sign In</span>
|
|
|
|
| 15 |
|
| 16 |
let isLoggedIn = false;
|
| 17 |
let username = '';
|
| 18 |
+
let isCheckingAuth = false; // Always start as false
|
| 19 |
+
|
| 20 |
+
// Check if running on Spaces
|
| 21 |
+
const isOnSpaces =
|
| 22 |
+
typeof window !== 'undefined' &&
|
| 23 |
+
(window.location.hostname.includes('hf.space') ||
|
| 24 |
+
window.location.hostname.includes('huggingface.co'));
|
| 25 |
|
| 26 |
// Check if we have valid cached data
|
| 27 |
let hasCachedData = false;
|
| 28 |
+
if (!isOnSpaces && initToken && initToken === initCachedToken && initCachedUserInfo) {
|
| 29 |
try {
|
| 30 |
const userInfo = JSON.parse(initCachedUserInfo);
|
| 31 |
isLoggedIn = true;
|
| 32 |
username = userInfo.username;
|
| 33 |
hasCachedData = true;
|
| 34 |
} catch (e) {
|
| 35 |
+
// Invalid cache, will need to check but don't show checking state
|
|
|
|
| 36 |
}
|
|
|
|
|
|
|
|
|
|
| 37 |
}
|
| 38 |
|
| 39 |
let showTokenInput = false;
|
|
|
|
| 138 |
}
|
| 139 |
// On Spaces, always fetch fresh user info; locally only fetch if token changed
|
| 140 |
if (isOnSpaces || !isLoggedIn || token !== cachedToken) {
|
| 141 |
+
// Don't show loading state for background refresh on Spaces
|
| 142 |
+
fetchUserInfo(token, false);
|
| 143 |
}
|
| 144 |
} else {
|
| 145 |
// No token, clear everything
|
|
|
|
| 150 |
}
|
| 151 |
}
|
| 152 |
|
| 153 |
+
async function fetchUserInfo(token, showLoadingState = false) {
|
| 154 |
+
if (showLoadingState) {
|
| 155 |
+
isCheckingAuth = true;
|
| 156 |
+
}
|
| 157 |
|
| 158 |
// Check if running on Spaces
|
| 159 |
const isOnSpaces =
|
|
|
|
| 407 |
></div>
|
| 408 |
{/if}
|
| 409 |
<img src="/assets/hf-logo.png" alt="HF Logo" class="w-5 h-5 relative z-10" />
|
| 410 |
+
{#if isLoggedIn}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 411 |
<span class="relative z-10">Sign out ({username})</span>
|
| 412 |
{:else}
|
| 413 |
<span class="relative z-10">Sign In</span>
|
hfstudio/static/_app/immutable/chunks/0dvDZDCQ.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var St=Object.defineProperty;var kt=(e,t,n)=>t in e?St(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>kt(e,typeof t!="symbol"?t+"":t,n);import{S as Et,F as At,Z as Rt,_ as Tt,$ as It,a0 as Ut,a1 as Lt,a2 as $t,A as ve,a3 as xt,G as be,n as ge,s as Ct}from"./Dhl5Jh7r.js";class Ze extends Et{constructor(n){if(!n||!n.target&&!n.$$inline)throw new Error("'target' is a required option");super();R(this,"$$prop_def");R(this,"$$events_def");R(this,"$$slot_def")}$destroy(){super.$destroy(),this.$destroy=()=>{console.warn("Component was already destroyed")}}$capture_state(){}$inject_state(){}}class Pt extends Ze{}const Ot=Object.freeze(Object.defineProperty({__proto__:null,SvelteComponent:Ze,SvelteComponentTyped:Pt,afterUpdate:At,beforeUpdate:Rt,createEventDispatcher:Tt,getAllContexts:It,getContext:Ut,hasContext:Lt,onDestroy:$t,onMount:ve,setContext:xt,tick:be},Symbol.toStringTag,{value:"Module"}));class ie{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class Te extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function Nt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function jt(e){return e.split("%25").map(decodeURI).join("%25")}function Dt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function Ft(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function Bt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;const Mt=new TextDecoder;function Vt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const qt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&Y.delete(Ie(e)),qt(e,t));const Y=new Map;function Gt(e,t){const n=Ie(e,t),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&Y.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Vt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Yt(e,t,n){if(Y.size>0){const r=Ie(e,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(t,n)}function Ie(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t!=null&&t.headers||t!=null&&t.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Bt(...a)}"]`}return r}const Ht=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Kt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Wt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return _e(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return _e(String.fromCharCode(...c.slice(2).split("-").map(u=>parseInt(u,16))));const d=Ht.exec(c),[,h,y,f,p]=d;return t.push({name:f,matcher:p,optional:!!h,rest:!!y,chained:y?l===1&&i[0]==="":!1}),y?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return _e(c)}).join("")}).join("")}/?$`),params:t}}function zt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Wt(e){return e.slice(1).split("/").filter(zt)}function Jt(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Xt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,d]])=>{const{pattern:h,params:y}=Kt(o),f={id:o,exec:p=>{const u=h.exec(p);if(u)return Jt(u,y,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function Qe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Be(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const D=[];function Ue(e,t=ge){let n;const r=new Set;function a(o){if(Ct(e,o)&&(e=o,n)){const c=!D.length;for(const l of r)l[1](),D.push(l,e);if(c){for(let l=0;l<D.length;l+=2)D[l][0](D[l+1]);D.length=0}}}function s(o){a(o(e))}function i(o,c=ge){const l=[o,c];return r.add(l),r.size===1&&(n=t(a,s)||ge),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}var Je;const $=((Je=globalThis.__sveltekit_19d9m60)==null?void 0:Je.base)??"";var Xe;const Zt=((Xe=globalThis.__sveltekit_19d9m60)==null?void 0:Xe.assets)??$??"",Qt="1761107837767",et="sveltekit:snapshot",tt="sveltekit:scroll",nt="sveltekit:states",en="sveltekit:pageurl",B="sveltekit:history",z="sveltekit:navigation",O={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ce=location.origin;function at(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function le(){return{x:pageXOffset,y:pageYOffset}}function F(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Me={...O,"":O.hover};function rt(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function ot(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=rt(e)}}function Se(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||fe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===ce&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function Q(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=F(o,"preload-code")),a===null&&(a=F(o,"preload-data")),t===null&&(t=F(o,"keepfocus")),n===null&&(n=F(o,"noscroll")),s===null&&(s=F(o,"reload")),i===null&&(i=F(o,"replacestate")),o=rt(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Me[r??"off"],preload_data:Me[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Ve(e){const t=Ue(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const st={v:()=>{}};function tn(){const{set:e,subscribe:t}=Ue(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Zt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Qt;return i&&(e(!0),st.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function fe(e,t,n){return e.origin!==ce||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function qn(e){}function nn(e){const t=rn(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const an="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function rn(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=an.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const on=-1,sn=-2,cn=-3,ln=-4,fn=-5,un=-6;function dn(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===on)return;if(s===cn)return NaN;if(s===ln)return 1/0;if(s===fn)return-1/0;if(s===un)return-0;if(i||typeof s!="number")throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=t==null?void 0:t[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let f=1;f<o.length;f+=1)d.add(a(o[f]));break;case"Map":const h=new Map;r[s]=h;for(let f=1;f<o.length;f+=2)h.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const y=Object.create(null);r[s]=y;for(let f=1;f<o.length;f+=2)y[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],p=new f(a(o[1]));r[s]=o[2]!==void 0?p.subarray(o[2],o[3]):p;break}case"ArrayBuffer":{const f=o[1],p=nn(f);r[s]=p;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const f=c.slice(9);r[s]=Temporal[f].from(o[1]);break}case"URL":{const f=new URL(o[1]);r[s]=f;break}case"URLSearchParams":{const f=new URLSearchParams(o[1]);r[s]=f;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const d=o[l];d!==sn&&(c[l]=a(d))}}else{const c={};r[s]=c;for(const l in o){if(l==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const d=o[l];c[l]=a(d)}}return r[s]}return a(0)}const it=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...it];const hn=new Set([...it]);[...hn];function pn(e){return e.filter(t=>t!=null)}const gn="x-sveltekit-invalidated",mn="x-sveltekit-trailing-slash";function ee(e){return e instanceof ie||e instanceof Te?e.status:500}function _n(e){return e instanceof Te?e.text:"Internal Error"}let T,W,we;const wn=ve.toString().includes("$$")||/function \w+\(\) \{\}/.test(ve.toString());wn?(T={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},we={current:!1}):(T=new class{constructor(){R(this,"data",$state.raw({}));R(this,"form",$state.raw(null));R(this,"error",$state.raw(null));R(this,"params",$state.raw({}));R(this,"route",$state.raw({id:null}));R(this,"state",$state.raw({}));R(this,"status",$state.raw(-1));R(this,"url",$state.raw(new URL("https://example.com")))}},W=new class{constructor(){R(this,"current",$state.raw(null))}},we=new class{constructor(){R(this,"current",$state.raw(!1))}},st.v=()=>we.current=!0);function yn(e){Object.assign(T,e)}const vn="/__data.json",bn=".html__data.json";function Sn(e){return e.endsWith(".html")?e.replace(/\.html$/,bn):e.replace(/\/$/,"")+vn}const qe={spanContext(){return kn},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},kn={traceId:"",spanId:"",traceFlags:0},{tick:En}=Ot,An=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Qe(tt)??{},J=Qe(et)??{},C={url:Ve({}),page:Ve({}),navigating:Ue(null),updated:tn()};function Le(e){j[e]=le()}function Rn(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function q(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function ct(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration($||"/");e&&await e.update()}}function Ge(){}let $e,ke,te,x,Ee,k;const ne=[],ae=[];let U=null;const Z=new Map,lt=new Set,Tn=new Set,H=new Set;let b={branch:[],error:null,url:null},xe=!1,re=!1,Ye=!0,X=!1,G=!1,ft=!1,Ce=!1,ut,A,L,N;const K=new Set,He=new Map;async function Kn(e,t,n){var s,i,o,c,l;(s=globalThis.__sveltekit_19d9m60)!=null&&s.data&&globalThis.__sveltekit_19d9m60.data,document.URL!==location.href&&(location.href=location.href),k=e,await((o=(i=e.hooks).init)==null?void 0:o.call(i)),$e=Xt(e),x=document.documentElement,Ee=t,ke=e.nodes[0],te=e.nodes[1],ke(),te(),A=(c=history.state)==null?void 0:c[B],L=(l=history.state)==null?void 0:l[z],A||(A=L=Date.now(),history.replaceState({...history.state,[B]:A,[z]:L},""));const r=j[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await Dn(Ee,n)):(await M({type:"enter",url:at(k.hash?Bn(new URL(location.href)):location.href),replace_state:!0}),a()),jn()}function In(){ne.length=0,Ce=!1}function dt(e){ae.some(t=>t==null?void 0:t.snapshot)&&(J[e]=ae.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function ht(e){var t;(t=J[e])==null||t.forEach((n,r)=>{var a,s;(s=(a=ae[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function Ke(){Le(A),Be(tt,j),dt(L),Be(et,J)}async function Un(e,t,n,r){let a;t.invalidateAll&&(U=null),await M({type:"goto",url:at(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ce=!0,a=[...He.keys()]),t.invalidate&&t.invalidate.forEach(Nn)}}),t.invalidateAll&&be().then(be).then(()=>{He.forEach(({resource:s},i)=>{var o;a!=null&&a.includes(i)&&((o=s.refresh)==null||o.call(s))})})}async function Ln(e){if(e.id!==(U==null?void 0:U.id)){const t={};K.add(t),U={id:e.id,token:t,promise:mt({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(U=null),n))}}return U.promise}async function ye(e){var n;const t=(n=await de(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].map(r=>r==null?void 0:r[1]()))}function pt(e,t,n){var a;b=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(T,e.props.page),ut=new k.root({target:t,props:{...e.props,stores:C,components:ae},hydrate:n,sync:!1}),ht(L),n){const s={from:null,to:{params:b.params,route:{id:((a=b.route)==null?void 0:a.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(i=>i(s))}re=!0}function oe({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if($&&(e.pathname===$||e.pathname===$+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);e.pathname=Nt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:pn(n).map(f=>f.node.component),page:je(T)}};i!==void 0&&(c.props.form=i);let l={},d=!T,h=0;for(let f=0;f<Math.max(n.length,b.branch.length);f+=1){const p=n[f],u=b.branch[f];(p==null?void 0:p.data)!==(u==null?void 0:u.data)&&(d=!0),p&&(l={...l,...p.data},d&&(c.props[`data_${h}`]=l),h+=1)}return(!b.url||e.href!==b.url.href||b.error!==a||i!==void 0&&i!==T.form||d)&&(c.props.page={error:a,params:t,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:i??null,data:d?l:T.data}),c}async function Pe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){var d,h,y;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if((d=l.universal)!=null&&d.load){let f=function(...u){for(const g of u){const{href:_}=new URL(g,n);c.dependencies.add(_)}};const p={tracing:{enabled:!1,root:qe,current:qe},route:new Proxy(a,{get:(u,g)=>(o&&(c.route=!0),u[g])}),params:new Proxy(r,{get:(u,g)=>(o&&c.params.add(g),u[g])}),data:(s==null?void 0:s.data)??null,url:Ft(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},k.hash),async fetch(u,g){u instanceof Request&&(g={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u==null?void 0:u.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...g});const{resolved:_,promise:I}=gt(u,g,n);return o&&f(_.href),I},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await l.universal.load.call(null,p)??null}return{node:l,loader:e,server:s,universal:(h=l.universal)!=null&&h.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((y=l.universal)==null?void 0:y.trailingSlash)??(s==null?void 0:s.slash)}}function gt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=re?Yt(r,a.href,t):Gt(r,t);return{resolved:a,promise:s}}function ze(e,t,n,r,a,s){if(Ce)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==b.params[i])return!0;for(const i of a.dependencies)if(ne.some(o=>o(new URL(i))))return!0;return!1}function Oe(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function $n(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function We({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:je(T),constructors:[]}}}async function mt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((U==null?void 0:U.id)===e)return K.delete(U.token),U.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(w=>w==null?void 0:w().catch(()=>{})),l.forEach(w=>w==null?void 0:w[1]().catch(()=>{}));let d=null;const h=b.url?e!==se(b.url):!1,y=b.route?a.id!==b.route.id:!1,f=$n(b.url,n);let p=!1;const u=l.map((w,m)=>{var P;const v=b.branch[m],S=!!(w!=null&&w[0])&&((v==null?void 0:v.loader)!==w[1]||ze(p,y,h,f,(P=v.server)==null?void 0:P.uses,r));return S&&(p=!0),S});if(u.some(Boolean)){try{d=await yt(n,u)}catch(w){const m=await V(w,{url:n,params:r,route:{id:e}});return K.has(s)?We({error:m,url:n,params:r,route:a}):ue({status:ee(w),error:m,url:n,route:a})}if(d.type==="redirect")return d}const g=d==null?void 0:d.nodes;let _=!1;const I=l.map(async(w,m)=>{var he;if(!w)return;const v=b.branch[m],S=g==null?void 0:g[m];if((!S||S.type==="skip")&&w[1]===(v==null?void 0:v.loader)&&!ze(_,y,h,f,(he=v.universal)==null?void 0:he.uses,r))return v;if(_=!0,(S==null?void 0:S.type)==="error")throw S;return Pe({loader:w[1],url:n,params:r,route:a,parent:async()=>{var Fe;const De={};for(let pe=0;pe<m;pe+=1)Object.assign(De,(Fe=await I[pe])==null?void 0:Fe.data);return De},server_data_node:Oe(S===void 0&&w[0]?{type:"skip"}:S??null,w[0]?v==null?void 0:v.server:void 0)})});for(const w of I)w.catch(()=>{});const E=[];for(let w=0;w<l.length;w+=1)if(l[w])try{E.push(await I[w])}catch(m){if(m instanceof Re)return{type:"redirect",location:m.location};if(K.has(s))return We({error:await V(m,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let v=ee(m),S;if(g!=null&&g.includes(m))v=m.status??v,S=m.error;else if(m instanceof ie)S=m.body;else{if(await C.updated.check())return await ct(),await q(n);S=await V(m,{params:r,url:n,route:{id:a.id}})}const P=await xn(w,E,i);return P?oe({url:n,params:r,branch:E.slice(0,P.idx).concat(P.node),status:v,error:S,route:a}):await wt(n,{id:a.id},S,v)}else E.push(void 0);return oe({url:n,params:r,branch:E,status:200,error:null,route:a,form:t?void 0:null})}async function xn(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function ue({status:e,error:t,url:n,route:r}){const a={};let s=null;if(k.server_loads[0]===0)try{const o=await yt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==ce||n.pathname!==location.pathname||xe)&&await q(n)}try{const o=await Pe({loader:ke,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Oe(s)}),c={node:await te(),loader:te,universal:null,server:null,data:null};return oe({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Re)return Un(new URL(o.location,location.href),{},0);throw o}}async function Cn(e){const t=e.href;if(Z.has(t))return Z.get(t);let n;try{const r=(async()=>{let a=await k.hooks.reroute({url:new URL(e),fetch:async(s,i)=>gt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);k.hash?s.hash=a:s.pathname=a,a=s}return a})();Z.set(t,r),n=await r}catch{Z.delete(t);return}return n}async function de(e,t){if(e&&!fe(e,$,k.hash)){const n=await Cn(e);if(!n)return;const r=Pn(n);for(const a of $e){const s=a.exec(r);if(s)return{id:se(e),invalidating:t,route:a,params:Dt(s),url:e}}}}function Pn(e){return jt(k.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice($.length))||"/"}function se(e){return(k.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function _t({url:e,type:t,intent:n,delta:r,event:a}){let s=!1;const i=Ne(b,n,e,t);r!==void 0&&(i.navigation.delta=r),a!==void 0&&(i.navigation.event=a);const o={...i.navigation,cancel:()=>{s=!0,i.reject(new Error("navigation cancelled"))}};return X||lt.forEach(c=>c(o)),s?null:i}async function M({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=Ge,block:d=Ge,event:h}){const y=N;N=c;const f=await de(t,!1),p=e==="enter"?Ne(b,f,t,e):_t({url:t,type:e,delta:n==null?void 0:n.delta,intent:f,event:h});if(!p){d(),N===c&&(N=y);return}const u=A,g=L;l(),X=!0,re&&p.navigation.type!=="enter"&&C.navigating.set(W.current=p.navigation);let _=f&&await mt(f);if(!_){if(fe(t,$,k.hash))return await q(t,s);_=await wt(t,{id:null},await V(new Te(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=(f==null?void 0:f.url)||t,N!==c)return p.reject(new Error("navigation aborted")),!1;if(_.type==="redirect"){if(o<20){await M({type:e,url:new URL(_.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i,redirect_count:o+1,nav_token:c}),p.fulfil(void 0);return}_=await ue({status:500,error:await V(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else _.props.page.status>=400&&await C.updated.check()&&(await ct(),await q(t,s));if(In(),Le(u),dt(g),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const m=s?0:1,v={[B]:A+=m,[z]:L+=m,[nt]:i};(s?history.replaceState:history.pushState).call(history,v,"",t),s||Rn(A,L)}if(U=null,_.props.page.state=i,re){const m=(await Promise.all(Array.from(Tn,v=>v(p.navigation)))).filter(v=>typeof v=="function");if(m.length>0){let v=function(){m.forEach(S=>{H.delete(S)})};m.push(v),m.forEach(S=>{H.add(S)})}b=_.state,_.props.page&&(_.props.page.url=t),ut.$set(_.props),yn(_.props.page),ft=!0}else pt(_,Ee,!1);const{activeElement:I}=document;await En();let E=n?n.scroll:a?le():null;if(Ye){const m=t.hash&&document.getElementById(bt(t));if(E)scrollTo(E.x,E.y);else if(m){m.scrollIntoView();const{top:v,left:S}=m.getBoundingClientRect();E={x:pageXOffset+S,y:pageYOffset+v}}else scrollTo(0,0)}const w=document.activeElement!==I&&document.activeElement!==document.body;!r&&!w&&Fn(t,E),Ye=!0,_.props.page&&Object.assign(T,_.props.page),X=!1,e==="popstate"&&ht(L),p.fulfil(void 0),H.forEach(m=>m(p.navigation)),C.navigating.set(W.current=null)}async function wt(e,t,n,r,a){return e.origin===ce&&e.pathname===location.pathname&&!xe?await ue({status:r,error:n,url:e,route:t}):await q(e,a)}function On(){let e,t,n;x.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,O.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],O.tap)}x.addEventListener("mousedown",r),x.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(ye(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=ot(o,x),d=l===t&&c>=n;if(!l||d)return;const{url:h,external:y,download:f}=Se(l,$,k.hash);if(y||f)return;const p=Q(l),u=h&&se(b.url)===se(h);if(!(p.reload||u))if(c<=p.preload_data){t=l,n=O.tap;const g=await de(h,!1);if(!g)return;Ln(g)}else c<=p.preload_code&&(t=l,n=c,ye(h))}function i(){a.disconnect();for(const o of x.querySelectorAll("a")){const{url:c,external:l,download:d}=Se(o,$,k.hash);if(l||d)continue;const h=Q(o);h.reload||(h.preload_code===O.viewport&&a.observe(o),h.preload_code===O.eager&&ye(c))}}H.add(i),i()}function V(e,t){if(e instanceof ie)return e.body;const n=ee(e),r=_n(e);return k.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Nn(e){if(typeof e=="function")ne.push(e);else{const{href:t}=new URL(e,location.href);ne.push(n=>n.href===t)}}function jn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(Ke(),!X){const a=Ne(b,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};lt.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ke()}),(t=navigator.connection)!=null&&t.saveData||On(),x.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=ot(n.composedPath()[0],x);if(!r)return;const{url:a,external:s,target:i,download:o}=Se(r,$,k.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=Q(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[d,h]=(k.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=d===me(location);if(s||c.reload&&(!y||!h)){_t({url:a,type:"link",event:n})?X=!0:n.preventDefault();return}if(h!==void 0&&y){const[,f]=b.url.href.split("#");if(f===h){if(n.preventDefault(),h===""||h==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const p=r.ownerDocument.getElementById(decodeURIComponent(h));p&&(p.scrollIntoView(),p.focus())}return}if(G=!0,Le(A),e(a),!c.replace_state)return;G=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await M({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href,event:n})}),x.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(fe(o,$,!1))return;const c=n.target,l=Q(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c,a);o.search=new URLSearchParams(d).toString(),M({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!Ae){if((r=n.state)!=null&&r[B]){const a=n.state[B];if(N={},a===A)return;const s=j[a],i=n.state[nt]??{},o=new URL(n.state[en]??location.href),c=n.state[z],l=b.url?me(location)===me(b.url):!1;if(c===L&&(ft||l)){i!==T.state&&(T.state=i),e(o),j[A]=le(),s&&scrollTo(s.x,s.y),A=a;return}const h=a-A;await M({type:"popstate",url:o,popped:{state:i,scroll:s,delta:h},accept:()=>{A=a,L=c},block:()=>{history.go(-h)},nav_token:N,event:n})}else if(!G){const a=new URL(location.href);e(a),k.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[B]:++A,[z]:L},"",location.href))});for(const n of document.querySelectorAll("link"))An.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&C.navigating.set(W.current=null)});function e(n){b.url=T.url=n,C.page.set(je(T)),C.page.notify()}}async function Dn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){xe=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await de(l,!1)||{}),d=$e.find(({id:f})=>f===s.id);let h,y=!0;try{const f=r.map(async(u,g)=>{const _=o[g];return _!=null&&_.uses&&(_.uses=vt(_.uses)),Pe({loader:k.nodes[u],url:l,params:a,route:s,parent:async()=>{const I={};for(let E=0;E<g;E+=1)Object.assign(I,(await f[E]).data);return I},server_data_node:Oe(_)})}),p=await Promise.all(f);if(d){const u=d.layouts;for(let g=0;g<u.length;g++)u[g]||p.splice(g,0,void 0)}h=oe({url:l,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(f){if(f instanceof Re){await q(new URL(f.location,location.href));return}h=await ue({status:ee(f),error:await V(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",y=!1}h.props.page&&(h.props.page.state={}),pt(h,e,y)}async function yt(e,t){var s;const n=new URL(e);n.pathname=Sn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(mn,"1"),n.searchParams.append(gn,t.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new ie(a.status,i)}return new Promise(async i=>{var h;const o=new Map,c=a.body.getReader();function l(y){return dn(y,{...k.decoders,Promise:f=>new Promise((p,u)=>{o.set(f,{fulfil:p,reject:u})})})}let d="";for(;;){const{done:y,value:f}=await c.read();if(y&&!d)break;for(d+=!f&&d?`
|
| 2 |
+
`:Mt.decode(f,{stream:!0});;){const p=d.indexOf(`
|
| 3 |
+
`);if(p===-1)break;const u=JSON.parse(d.slice(0,p));if(d=d.slice(p+1),u.type==="redirect")return i(u);if(u.type==="data")(h=u.nodes)==null||h.forEach(g=>{(g==null?void 0:g.type)==="data"&&(g.uses=vt(g.uses),g.data=l(g.data))}),i(u);else if(u.type==="chunk"){const{id:g,data:_,error:I}=u,E=o.get(g);o.delete(g),I?E.reject(l(I)):E.fulfil(l(_))}}}})}function vt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}let Ae=!1;function Fn(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=bt(e);if(r&&document.getElementById(r)){const{x:s,y:i}=t??le();setTimeout(()=>{const o=history.state;Ae=!0,location.replace(`#${r}`),k.hash&&location.replace(e.hash),history.replaceState(o,"",e.hash),scrollTo(s,i),Ae=!1})}else{const s=document.body,i=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),i!==null?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let i=0;i<a.rangeCount;i+=1)s.push(a.getRangeAt(i));setTimeout(()=>{if(a.rangeCount===s.length){for(let i=0;i<a.rangeCount;i+=1){const o=s[i],c=a.getRangeAt(i);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r){var c,l;let a,s;const i=new Promise((d,h)=>{a=d,s=h});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((l=t==null?void 0:t.route)==null?void 0:l.id)??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Bn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function bt(e){let t;if(k.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Kn as a,qn as l,C as s};
|
hfstudio/static/_app/immutable/entry/app.B6MnJtPd.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BAMSj75u.js","../chunks/Dhl5Jh7r.js","../chunks/IHki7fMi.js","../assets/0.C-_9ntEI.css","../nodes/1.CnYAF7YK.js","../chunks/0dvDZDCQ.js","../nodes/2.CVNZMpKV.js","../assets/2.BoAMr1TJ.css"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{S as T,i as V,s as B,d,o as h,p as g,C as S,D as A,b as E,h as U,E as w,k as F,F as G,A as H,G as J,H as y,I as P,J as R,K as L,L as I,q as O,M as p,e as K,f as W,j as z,N as C,a as Q,g as X,t as Y}from"../chunks/Dhl5Jh7r.js";import"../chunks/IHki7fMi.js";const Z="modulepreload",M=function(o,e){return new URL(o,e).href},N={},D=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.allSettled(n.map(f=>{if(f=M(f,i),f in N)return;N[f]=!0;const l=f.endsWith(".css"),_=l?'[rel="stylesheet"]':"";if(!!i)for(let k=t.length-1;k>=0;k--){const v=t[k];if(v.href===f&&(!l||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${_}`))return;const m=document.createElement("link");if(m.rel=l?"stylesheet":Z,l||(m.as="script"),m.crossOrigin="",m.href=f,a&&m.setAttribute("nonce",a),document.head.appendChild(m),l)return new Promise((k,v)=>{m.addEventListener("load",k),m.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${f}`)))})}))}function u(t){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=t,window.dispatchEvent(s),!s.defaultPrevented)throw t}return r.then(t=>{for(const s of t||[])s.status==="rejected"&&u(s.reason);return e().catch(u)})},ae={};function $(o){let e,n,i;var r=o[2][0];function u(t,s){return{props:{data:t[4],form:t[3],params:t[1].params}}}return r&&(e=y(r,u(o)),o[12](e)),{c(){e&&R(e.$$.fragment),n=w()},l(t){e&&I(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),E(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][0])){if(e){S();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),A()}r?(e=y(r,u(t)),t[12](e),R(e.$$.fragment),g(e.$$.fragment,1),L(e,n.parentNode,n)):e=null}else if(r){const a={};s&16&&(a.data=t[4]),s&8&&(a.form=t[3]),s&2&&(a.params=t[1].params),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[12](null),e&&P(e,t)}}}function x(o){let e,n,i;var r=o[2][0];function u(t,s){return{props:{data:t[4],params:t[1].params,$$slots:{default:[ee]},$$scope:{ctx:t}}}}return r&&(e=y(r,u(o)),o[11](e)),{c(){e&&R(e.$$.fragment),n=w()},l(t){e&&I(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),E(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][0])){if(e){S();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),A()}r?(e=y(r,u(t)),t[11](e),R(e.$$.fragment),g(e.$$.fragment,1),L(e,n.parentNode,n)):e=null}else if(r){const a={};s&16&&(a.data=t[4]),s&2&&(a.params=t[1].params),s&8239&&(a.$$scope={dirty:s,ctx:t}),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[11](null),e&&P(e,t)}}}function ee(o){let e,n,i;var r=o[2][1];function u(t,s){return{props:{data:t[5],form:t[3],params:t[1].params}}}return r&&(e=y(r,u(o)),o[10](e)),{c(){e&&R(e.$$.fragment),n=w()},l(t){e&&I(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),E(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][1])){if(e){S();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),A()}r?(e=y(r,u(t)),t[10](e),R(e.$$.fragment),g(e.$$.fragment,1),L(e,n.parentNode,n)):e=null}else if(r){const a={};s&32&&(a.data=t[5]),s&8&&(a.form=t[3]),s&2&&(a.params=t[1].params),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[10](null),e&&P(e,t)}}}function j(o){let e,n=o[7]&&q(o);return{c(){e=z("div"),n&&n.c(),this.h()},l(i){e=K(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var r=W(e);n&&n.l(r),r.forEach(d),this.h()},h(){O(e,"id","svelte-announcer"),O(e,"aria-live","assertive"),O(e,"aria-atomic","true"),p(e,"position","absolute"),p(e,"left","0"),p(e,"top","0"),p(e,"clip","rect(0 0 0 0)"),p(e,"clip-path","inset(50%)"),p(e,"overflow","hidden"),p(e,"white-space","nowrap"),p(e,"width","1px"),p(e,"height","1px")},m(i,r){E(i,e,r),n&&n.m(e,null)},p(i,r){i[7]?n?n.p(i,r):(n=q(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&d(e),n&&n.d()}}}function q(o){let e;return{c(){e=Y(o[8])},l(n){e=X(n,o[8])},m(n,i){E(n,e,i)},p(n,i){i&256&&Q(e,n[8])},d(n){n&&d(e)}}}function te(o){let e,n,i,r,u;const t=[x,$],s=[];function a(l,_){return l[2][1]?0:1}e=a(o),n=s[e]=t[e](o);let f=o[6]&&j(o);return{c(){n.c(),i=F(),f&&f.c(),r=w()},l(l){n.l(l),i=U(l),f&&f.l(l),r=w()},m(l,_){s[e].m(l,_),E(l,i,_),f&&f.m(l,_),E(l,r,_),u=!0},p(l,[_]){let b=e;e=a(l),e===b?s[e].p(l,_):(S(),h(s[b],1,1,()=>{s[b]=null}),A(),n=s[e],n?n.p(l,_):(n=s[e]=t[e](l),n.c()),g(n,1),n.m(i.parentNode,i)),l[6]?f?f.p(l,_):(f=j(l),f.c(),f.m(r.parentNode,r)):f&&(f.d(1),f=null)},i(l){u||(g(n),u=!0)},o(l){h(n),u=!1},d(l){l&&(d(i),d(r)),s[e].d(l),f&&f.d(l)}}}function ne(o,e,n){let{stores:i}=e,{page:r}=e,{constructors:u}=e,{components:t=[]}=e,{form:s}=e,{data_0:a=null}=e,{data_1:f=null}=e;G(i.page.notify);let l=!1,_=!1,b=null;H(()=>{const c=i.page.subscribe(()=>{l&&(n(7,_=!0),J().then(()=>{n(8,b=document.title||"untitled page")}))});return n(6,l=!0),c});function m(c){C[c?"unshift":"push"](()=>{t[1]=c,n(0,t)})}function k(c){C[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}function v(c){C[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}return o.$$set=c=>{"stores"in c&&n(9,i=c.stores),"page"in c&&n(1,r=c.page),"constructors"in c&&n(2,u=c.constructors),"components"in c&&n(0,t=c.components),"form"in c&&n(3,s=c.form),"data_0"in c&&n(4,a=c.data_0),"data_1"in c&&n(5,f=c.data_1)},o.$$.update=()=>{o.$$.dirty&514&&i.page.set(r)},[t,r,u,s,a,f,l,_,b,i,m,k,v]}class le extends T{constructor(e){super(),V(this,e,ne,te,B,{stores:9,page:1,constructors:2,components:0,form:3,data_0:4,data_1:5})}}const fe=[()=>D(()=>import("../nodes/0.BAMSj75u.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>D(()=>import("../nodes/1.CnYAF7YK.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),()=>D(()=>import("../nodes/2.CVNZMpKV.js"),__vite__mapDeps([6,1,2,7]),import.meta.url)],ce=[],ue={"/":[2]},se={handleError:({error:o})=>{console.error(o)},reroute:()=>{},transport:{}},ie=Object.fromEntries(Object.entries(se.transport).map(([o,e])=>[o,e.decode])),_e=!1,me=(o,e)=>ie[o](e);export{me as decode,ie as decoders,ue as dictionary,_e as hash,se as hooks,ae as matchers,fe as nodes,le as root,ce as server_loads};
|
hfstudio/static/_app/immutable/entry/start.DqjGHyqo.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{l as o,a as r}from"../chunks/0dvDZDCQ.js";export{o as load_css,r as start};
|
hfstudio/static/_app/immutable/nodes/0.BAMSj75u.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{S as Ee,i as Me,s as Ne,m as Ue,d as x,r as Ce,o as Pe,p as Ae,q as a,u as Oe,v as Be,w as De,b as ee,c as s,x as ne,y as je,e as i,f as B,z as E,h as v,j as c,k,A as Ve,n as Le,B as ke,a as He,g as ue,t as fe}from"../chunks/Dhl5Jh7r.js";import"../chunks/IHki7fMi.js";function xe(r){let t,e,o='<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',m,_,l="Hugging Face Inference",S,U,g='Sign in to get started with ~10 cents of free API credits per month ($2 for <a href="https://huggingface.co/pro" target="_blank" class="text-amber-600 hover:text-amber-700 underline font-medium">Pro users</a>). You can add a payment method for additional pay-as-you-go usage ‡',u,M;return{c(){t=c("div"),e=c("button"),e.innerHTML=o,m=k(),_=c("p"),_.textContent=l,S=k(),U=c("p"),U.innerHTML=g,this.h()},l(V){t=i(V,"DIV",{class:!0});var H=B(t);e=i(H,"BUTTON",{class:!0,"aria-label":!0,"data-svelte-h":!0}),E(e)!=="svelte-1ywh7al"&&(e.innerHTML=o),m=v(H),_=i(H,"P",{class:!0,"data-svelte-h":!0}),E(_)!=="svelte-1ta3erw"&&(_.textContent=l),S=v(H),U=i(H,"P",{class:!0,"data-svelte-h":!0}),E(U)!=="svelte-1w8zw0n"&&(U.innerHTML=g),H.forEach(x),this.h()},h(){a(e,"class","absolute top-2 right-2 text-gray-400 hover:text-gray-600 transition-colors"),a(e,"aria-label","Dismiss"),a(_,"class","text-sm font-medium text-gray-700 mb-1 pr-4"),a(U,"class","text-sm text-gray-600 pr-4"),a(t,"class","mb-3 px-3 py-2 bg-gradient-to-r from-amber-50 to-orange-50 rounded-lg border border-amber-200 relative")},m(V,H){ee(V,t,H),s(t,e),s(t,m),s(t,_),s(t,S),s(t,U),u||(M=ne(e,"click",r[16]),u=!0)},p:Le,d(V){V&&x(t),u=!1,M()}}}function ye(r){let t;return{c(){t=c("div"),this.h()},l(e){t=i(e,"DIV",{class:!0}),B(t).forEach(x),this.h()},h(){a(t,"class","absolute inset-0 -left-full animate-sweep bg-gradient-to-r from-transparent via-orange-400/40 to-transparent svelte-1s3xy1i")},m(e,o){ee(e,t,o)},d(e){e&&x(t)}}}function ze(r){let t,e="Sign In";return{c(){t=c("span"),t.textContent=e,this.h()},l(o){t=i(o,"SPAN",{class:!0,"data-svelte-h":!0}),E(t)!=="svelte-b2ltkx"&&(t.textContent=e),this.h()},h(){a(t,"class","relative z-10")},m(o,m){ee(o,t,m)},p:Le,d(o){o&&x(t)}}}function Fe(r){let t,e,o,m;return{c(){t=c("span"),e=fe("Sign out ("),o=fe(r[2]),m=fe(")"),this.h()},l(_){t=i(_,"SPAN",{class:!0});var l=B(t);e=ue(l,"Sign out ("),o=ue(l,r[2]),m=ue(l,")"),l.forEach(x),this.h()},h(){a(t,"class","relative z-10")},m(_,l){ee(_,t,l),s(t,e),s(t,o),s(t,m)},p(_,l){l&4&&He(o,_[2])},d(_){_&&x(t)}}}function Ie(r){let t,e,o,m="Sign In with HuggingFace Token",_,l,S,U="<strong>Manual Token Entry:</strong> Please enter your HuggingFace token.",g,u,M=`1. Go to <a href="https://huggingface.co/settings/tokens" target="_blank" class="underline text-blue-600">HuggingFace Settings</a><br/>
|
| 2 |
+
2. Create a new token with "Inference API" permissions<br/>
|
| 3 |
+
3. Copy and paste it below`,V,H,y,T,P="HuggingFace Token",R,b,K,Q,I,J,X="Cancel",D,z,Z="Sign In",F,te,C=r[7]&&Te(),n=r[6]&&Se(r);return{c(){t=c("div"),e=c("div"),o=c("h2"),o.textContent=m,_=k(),l=c("div"),S=c("p"),S.innerHTML=U,g=k(),u=c("p"),u.innerHTML=M,V=k(),C&&C.c(),H=k(),y=c("div"),T=c("label"),T.textContent=P,R=k(),b=c("input"),K=k(),n&&n.c(),Q=k(),I=c("div"),J=c("button"),J.textContent=X,D=k(),z=c("button"),z.textContent=Z,this.h()},l(f){t=i(f,"DIV",{class:!0});var L=B(t);e=i(L,"DIV",{class:!0});var h=B(e);o=i(h,"H2",{class:!0,"data-svelte-h":!0}),E(o)!=="svelte-1t0ehet"&&(o.textContent=m),_=v(h),l=i(h,"DIV",{class:!0});var w=B(l);S=i(w,"P",{class:!0,"data-svelte-h":!0}),E(S)!=="svelte-344vn4"&&(S.innerHTML=U),g=v(w),u=i(w,"P",{class:!0,"data-svelte-h":!0}),E(u)!=="svelte-orsfwv"&&(u.innerHTML=M),V=v(w),C&&C.l(w),w.forEach(x),H=v(h),y=i(h,"DIV",{class:!0});var p=B(y);T=i(p,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),E(T)!=="svelte-vtbmxo"&&(T.textContent=P),R=v(p),b=i(p,"INPUT",{id:!0,type:!0,placeholder:!0,class:!0}),K=v(p),n&&n.l(p),p.forEach(x),Q=v(h),I=i(h,"DIV",{class:!0});var Y=B(I);J=i(Y,"BUTTON",{class:!0,"data-svelte-h":!0}),E(J)!=="svelte-csk0rj"&&(J.textContent=X),D=v(Y),z=i(Y,"BUTTON",{class:!0,"data-svelte-h":!0}),E(z)!=="svelte-1nxas5u"&&(z.textContent=Z),Y.forEach(x),h.forEach(x),L.forEach(x),this.h()},h(){a(o,"class","text-xl font-semibold mb-4"),a(S,"class","text-blue-800 mb-2"),a(u,"class","text-blue-700"),a(l,"class","mb-4 p-3 bg-blue-50 rounded-md text-sm"),a(T,"for","token"),a(T,"class","block text-sm font-medium text-gray-700 mb-2"),a(b,"id","token"),a(b,"type","password"),a(b,"placeholder","hf_..."),a(b,"class","w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent"),a(y,"class","mb-4"),a(J,"class","px-4 py-2 text-gray-600 hover:text-gray-800 transition-colors"),a(z,"class","px-4 py-2 bg-orange-500 text-white rounded-md hover:bg-orange-600 transition-colors"),a(I,"class","flex justify-end gap-3"),a(e,"class","bg-white rounded-lg p-6 max-w-md w-full mx-4 shadow-xl"),a(t,"class","fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50")},m(f,L){ee(f,t,L),s(t,e),s(e,o),s(e,_),s(e,l),s(l,S),s(l,g),s(l,u),s(l,V),C&&C.m(l,null),s(e,H),s(e,y),s(y,T),s(y,R),s(y,b),ke(b,r[5]),s(y,K),n&&n.m(y,null),s(e,Q),s(e,I),s(I,J),s(I,D),s(I,z),F||(te=[ne(b,"input",r[17]),ne(b,"keydown",r[18]),ne(J,"click",r[11]),ne(z,"click",r[12])],F=!0)},p(f,L){f[7]?C||(C=Te(),C.c(),C.m(l,null)):C&&(C.d(1),C=null),L&32&&b.value!==f[5]&&ke(b,f[5]),f[6]?n?n.p(f,L):(n=Se(f),n.c(),n.m(y,null)):n&&(n.d(1),n=null)},d(f){f&&x(t),C&&C.d(),n&&n.d(),F=!1,Ce(te)}}}function Te(r){let t,e=`<strong>Tip:</strong> You can also run <code>huggingface-cli login</code> in your terminal
|
| 4 |
+
to automatically use your local token.`;return{c(){t=c("p"),t.innerHTML=e,this.h()},l(o){t=i(o,"P",{class:!0,"data-svelte-h":!0}),E(t)!=="svelte-xrut8w"&&(t.innerHTML=e),this.h()},h(){a(t,"class","text-blue-600 mt-2")},m(o,m){ee(o,t,m)},d(o){o&&x(t)}}}function Se(r){let t,e;return{c(){t=c("p"),e=fe(r[6]),this.h()},l(o){t=i(o,"P",{class:!0});var m=B(t);e=ue(m,r[6]),m.forEach(x),this.h()},h(){a(t,"class","text-red-600 text-sm mt-1")},m(o,m){ee(o,t,m),s(t,e)},p(o,m){m&64&&He(e,o[6])},d(o){o&&x(t)}}}function qe(r){let t,e,o,m='<div class="flex items-center gap-3"><img src="/assets/hf-studio-logo.png" alt="HF Logo" class="w-8 h-8"/> <h1 class="text-xl font-semibold">HFStudio<sup class="text-xs text-gray-500 ml-1">BETA</sup></h1></div>',_,l,S,U="Tasks",g,u,M,V="ποΈ",H,y,T="Text to Speech",P,R,b,K="<span>π΅</span> <span>Voice Cloning</span>",Q,I,J="<span>π§</span> <span>Speech to Text</span>",X,D,z="<span>πΌ</span> <span>Sound Effects</span>",Z,F,te="<span>πΈ</span> <span>Music Generation</span>",C,n,f="<span>π</span> <span>Audio Enhancement</span>",L,h,w,p,Y,se,_e,de,he,oe,pe,$,me,be,A=!r[1]&&!r[3]&&r[8]&&xe(r),j=r[9]&&ye();function we(d,N){return d[1]?Fe:ze}let re=we(r),W=re(r);const ge=r[14].default,G=Ue(ge,r,r[13],null);let O=r[4]&&Ie(r);return{c(){t=c("div"),e=c("aside"),o=c("div"),o.innerHTML=m,_=k(),l=c("nav"),S=c("div"),S.textContent=U,g=k(),u=c("button"),M=c("span"),M.textContent=V,H=k(),y=c("span"),y.textContent=T,R=k(),b=c("button"),b.innerHTML=K,Q=k(),I=c("button"),I.innerHTML=J,X=k(),D=c("button"),D.innerHTML=z,Z=k(),F=c("button"),F.innerHTML=te,C=k(),n=c("button"),n.innerHTML=f,L=k(),h=c("div"),A&&A.c(),w=k(),p=c("button"),j&&j.c(),Y=k(),se=c("img"),de=k(),W.c(),he=k(),oe=c("main"),G&&G.c(),pe=k(),O&&O.c(),this.h()},l(d){t=i(d,"DIV",{class:!0});var N=B(t);e=i(N,"ASIDE",{class:!0});var le=B(e);o=i(le,"DIV",{class:!0,"data-svelte-h":!0}),E(o)!=="svelte-60or62"&&(o.innerHTML=m),_=v(le),l=i(le,"NAV",{class:!0});var q=B(l);S=i(q,"DIV",{class:!0,"data-svelte-h":!0}),E(S)!=="svelte-pii1fa"&&(S.textContent=U),g=v(q),u=i(q,"BUTTON",{class:!0});var ie=B(u);M=i(ie,"SPAN",{"data-svelte-h":!0}),E(M)!=="svelte-1yx42xi"&&(M.textContent=V),H=v(ie),y=i(ie,"SPAN",{"data-svelte-h":!0}),E(y)!=="svelte-2j89jk"&&(y.textContent=T),ie.forEach(x),R=v(q),b=i(q,"BUTTON",{class:!0,"data-svelte-h":!0}),E(b)!=="svelte-10dl8nf"&&(b.innerHTML=K),Q=v(q),I=i(q,"BUTTON",{class:!0,"data-svelte-h":!0}),E(I)!=="svelte-wf0x5d"&&(I.innerHTML=J),X=v(q),D=i(q,"BUTTON",{class:!0,"data-svelte-h":!0}),E(D)!=="svelte-x7bha3"&&(D.innerHTML=z),Z=v(q),F=i(q,"BUTTON",{class:!0,"data-svelte-h":!0}),E(F)!=="svelte-1tyblmt"&&(F.innerHTML=te),C=v(q),n=i(q,"BUTTON",{class:!0,"data-svelte-h":!0}),E(n)!=="svelte-1emrjb3"&&(n.innerHTML=f),q.forEach(x),L=v(le),h=i(le,"DIV",{class:!0});var ce=B(h);A&&A.l(ce),w=v(ce),p=i(ce,"BUTTON",{class:!0});var ae=B(p);j&&j.l(ae),Y=v(ae),se=i(ae,"IMG",{src:!0,alt:!0,class:!0}),de=v(ae),W.l(ae),ae.forEach(x),ce.forEach(x),le.forEach(x),he=v(N),oe=i(N,"MAIN",{class:!0});var ve=B(oe);G&&G.l(ve),ve.forEach(x),pe=v(N),O&&O.l(N),N.forEach(x),this.h()},h(){a(o,"class","p-4 border-b border-gray-200"),a(S,"class","mt-2 mb-1 px-2 text-xs font-medium text-gray-500 uppercase"),a(u,"class",P="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(r[0]==="tts"?"bg-gray-100":"")),a(b,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),b.disabled=!0,a(I,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),I.disabled=!0,a(D,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),D.disabled=!0,a(F,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),F.disabled=!0,a(n,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),n.disabled=!0,a(l,"class","p-2 text-sm flex-1"),je(se.src,_e="/assets/hf-logo.png")||a(se,"src",_e),a(se,"alt","HF Logo"),a(se,"class","w-5 h-5 relative z-10"),p.disabled=r[3],a(p,"class","w-full px-6 py-3 bg-black text-white rounded-lg font-medium hover:bg-gray-800 transition-colors shadow-sm flex items-center justify-center gap-2 text-sm disabled:opacity-50 disabled:cursor-not-allowed relative overflow-hidden"),a(h,"class","p-2"),a(e,"class","w-56 border-r border-gray-200 bg-white flex-shrink-0 flex flex-col h-full "),a(oe,"class","flex-1 overflow-auto"),a(t,"class","flex h-screen bg-white")},m(d,N){ee(d,t,N),s(t,e),s(e,o),s(e,_),s(e,l),s(l,S),s(l,g),s(l,u),s(u,M),s(u,H),s(u,y),s(l,R),s(l,b),s(l,Q),s(l,I),s(l,X),s(l,D),s(l,Z),s(l,F),s(l,C),s(l,n),s(e,L),s(e,h),A&&A.m(h,null),s(h,w),s(h,p),j&&j.m(p,null),s(p,Y),s(p,se),s(p,de),W.m(p,null),s(t,he),s(t,oe),G&&G.m(oe,null),s(t,pe),O&&O.m(t,null),$=!0,me||(be=[ne(u,"click",r[15]),ne(p,"click",r[10])],me=!0)},p(d,[N]){(!$||N&1&&P!==(P="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(d[0]==="tts"?"bg-gray-100":"")))&&a(u,"class",P),!d[1]&&!d[3]&&d[8]?A?A.p(d,N):(A=xe(d),A.c(),A.m(h,w)):A&&(A.d(1),A=null),d[9]?j||(j=ye(),j.c(),j.m(p,Y)):j&&(j.d(1),j=null),re===(re=we(d))&&W?W.p(d,N):(W.d(1),W=re(d),W&&(W.c(),W.m(p,null))),(!$||N&8)&&(p.disabled=d[3]),G&&G.p&&(!$||N&8192)&&Oe(G,ge,d,d[13],$?De(ge,d[13],N,null):Be(d[13]),null),d[4]?O?O.p(d,N):(O=Ie(d),O.c(),O.m(t,null)):O&&(O.d(1),O=null)},i(d){$||(Ae(G,d),$=!0)},o(d){Pe(G,d),$=!1},d(d){d&&x(t),A&&A.d(),j&&j.d(),W.d(),G&&G.d(d),O&&O.d(),me=!1,Ce(be)}}}function Je(r,t,e){let{$$slots:o={},$$scope:m}=t,_="tts";const l=typeof window<"u"?localStorage.getItem("hf_access_token"):null,S=typeof window<"u"?localStorage.getItem("hf_cached_token"):null,U=typeof window<"u"?localStorage.getItem("hf_user_info"):null;let g=!1,u="",M=!1;const V=typeof window<"u"&&(window.location.hostname.includes("hf.space")||window.location.hostname.includes("huggingface.co"));let H=!1;if(!V&&l&&l===S&&U)try{const n=JSON.parse(U);g=!0,u=n.username,H=!0}catch{}let y=!1,T="",P="",R=!1,b=!1,K=!1;Ve(()=>{window.addEventListener("show-login-prompt",()=>{g||(e(8,b=!0),e(9,K=!0),setTimeout(()=>{e(9,K=!1)},1600))}),!H&&l?(Q(),I()):l||Q(),document.addEventListener("visibilitychange",()=>{document.hidden||I()}),window.addEventListener("storage",I);const n=setInterval(I,1e3);return()=>{window.removeEventListener("storage",I),clearInterval(n)}});async function Q(){if(!(g&&H)){e(3,M=!0);try{const f=await(await fetch("/api/auth/local-token")).json();f.available?(e(7,R=!0),localStorage.setItem("hf_access_token",f.token),f.user_info&&f.user_info.name!=="Local User"?(e(1,g=!0),e(2,u=f.user_info.name.split(" ")[0])):(e(1,g=!0),e(2,u="Local User"))):e(7,R=!1)}catch{e(7,R=!1)}finally{e(3,M=!1)}}}function I(){const n=localStorage.getItem("hf_access_token"),f=localStorage.getItem("hf_user_info"),L=localStorage.getItem("hf_cached_token"),h=typeof window<"u"&&(window.location.hostname.includes("hf.space")||window.location.hostname.includes("huggingface.co"));if(n){if(!h&&n===L&&f)try{const w=JSON.parse(f);e(1,g=!0),e(2,u=w.username);return}catch{}(h||!g||n!==L)&&J(n,!1)}else e(1,g=!1),e(2,u=""),localStorage.removeItem("hf_user_info"),localStorage.removeItem("hf_cached_token")}async function J(n,f=!1){f&&e(3,M=!0);const L=typeof window<"u"&&(window.location.hostname.includes("hf.space")||window.location.hostname.includes("huggingface.co"));try{const h=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${n}`}});if(h.ok){const w=await h.json();e(1,g=!0);const p=w.name||w.fullname||w.login||w.username||"User";if(e(2,u=p.split(" ")[0]),!L){const Y={username:u,fullName:p};localStorage.setItem("hf_user_info",JSON.stringify(Y)),localStorage.setItem("hf_cached_token",n)}}else localStorage.removeItem("hf_access_token"),localStorage.removeItem("hf_user_info"),localStorage.removeItem("hf_cached_token"),e(1,g=!1),e(2,u="")}catch{const w=localStorage.getItem("hf_user_info");if(w)try{const p=JSON.parse(w);e(1,g=!0),e(2,u=p.username);return}catch{}localStorage.removeItem("hf_access_token"),localStorage.removeItem("hf_user_info"),localStorage.removeItem("hf_cached_token"),e(1,g=!1),e(2,u="")}finally{e(3,M=!1)}}async function X(){if(g)localStorage.removeItem("hf_access_token"),localStorage.removeItem("hf_user_info"),localStorage.removeItem("hf_cached_token"),sessionStorage.removeItem("oauth_state"),e(1,g=!1),e(2,u="");else if(window.location.hostname.includes("hf.space")||window.location.hostname.includes("huggingface.co"))try{const f=await(await fetch("/api/auth/oauth-config")).json(),L=f.scopes||"read-repos write-repos manage-repos inference-api",h=`https://huggingface.co/oauth/authorize?client_id=${f.client_id}&redirect_uri=${encodeURIComponent(window.location.origin+"/auth/callback")}&scope=${encodeURIComponent(L)}&response_type=code&state=${Date.now()}`;window.location.href=h}catch{e(4,y=!0),e(5,T=""),e(6,P="")}else e(4,y=!0),e(5,T=""),e(6,P="")}function D(){e(4,y=!1),e(5,T=""),e(6,P="")}async function z(){if(!T.trim()){e(6,P="Please enter a token");return}if(!T.startsWith("hf_")){e(6,P='Token should start with "hf_"');return}try{const n=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${T.trim()}`}});if(n.ok){const f=await n.json(),L=T.trim();localStorage.setItem("hf_access_token",L),e(1,g=!0);const h=f.name||f.fullname||f.login||f.username||"User";e(2,u=h.split(" ")[0]);const w={username:u,fullName:h};localStorage.setItem("hf_user_info",JSON.stringify(w)),localStorage.setItem("hf_cached_token",L),D()}else e(6,P=`Invalid token (${n.status}). Please check your token and try again.`)}catch{e(6,P="Error validating token. Please try again.")}}const Z=()=>e(0,_="tts"),F=()=>e(8,b=!1);function te(){T=this.value,e(5,T)}const C=n=>n.key==="Enter"&&z();return r.$$set=n=>{"$$scope"in n&&e(13,m=n.$$scope)},[_,g,u,M,y,T,P,R,b,K,X,D,z,m,o,Z,F,te,C]}class Ye extends Ee{constructor(t){super(),Me(this,t,Je,qe,Ne,{})}}export{Ye as component};
|
hfstudio/static/_app/immutable/nodes/1.CnYAF7YK.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{S,i as x,s as j,n as _,d as l,a as d,b as m,c as f,e as g,f as h,g as v,h as k,j as $,t as E,k as q,l as y}from"../chunks/Dhl5Jh7r.js";import"../chunks/IHki7fMi.js";import{s as C}from"../chunks/0dvDZDCQ.js";const H=()=>{const s=C;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},P={subscribe(s){return H().page.subscribe(s)}};function w(s){var b;let t,r=s[0].status+"",n,o,i,c=((b=s[0].error)==null?void 0:b.message)+"",u;return{c(){t=$("h1"),n=E(r),o=q(),i=$("p"),u=E(c)},l(e){t=g(e,"H1",{});var a=h(t);n=v(a,r),a.forEach(l),o=k(e),i=g(e,"P",{});var p=h(i);u=v(p,c),p.forEach(l)},m(e,a){m(e,t,a),f(t,n),m(e,o,a),m(e,i,a),f(i,u)},p(e,[a]){var p;a&1&&r!==(r=e[0].status+"")&&d(n,r),a&1&&c!==(c=((p=e[0].error)==null?void 0:p.message)+"")&&d(u,c)},i:_,o:_,d(e){e&&(l(t),l(o),l(i))}}}function z(s,t,r){let n;return y(s,P,o=>r(0,n=o)),[n]}let F=class extends S{constructor(t){super(),x(this,t,z,w,j,{})}};export{F as component};
|
hfstudio/static/_app/version.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"version":"
|
|
|
|
| 1 |
+
{"version":"1761107837767"}
|
hfstudio/static/index.html
CHANGED
|
@@ -6,25 +6,25 @@
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
<title>HFStudio - Text to Speech</title>
|
| 8 |
|
| 9 |
-
<link rel="modulepreload" href="/_app/immutable/entry/start.
|
| 10 |
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
| 11 |
<link rel="modulepreload" href="/_app/immutable/chunks/Dhl5Jh7r.js">
|
| 12 |
-
<link rel="modulepreload" href="/_app/immutable/entry/app.
|
| 13 |
<link rel="modulepreload" href="/_app/immutable/chunks/IHki7fMi.js">
|
| 14 |
</head>
|
| 15 |
<body data-sveltekit-preload-data="hover">
|
| 16 |
<div style="display: contents">
|
| 17 |
<script>
|
| 18 |
{
|
| 19 |
-
|
| 20 |
base: ""
|
| 21 |
};
|
| 22 |
|
| 23 |
const element = document.currentScript.parentElement;
|
| 24 |
|
| 25 |
Promise.all([
|
| 26 |
-
import("/_app/immutable/entry/start.
|
| 27 |
-
import("/_app/immutable/entry/app.
|
| 28 |
]).then(([kit, app]) => {
|
| 29 |
kit.start(app, element);
|
| 30 |
});
|
|
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
<title>HFStudio - Text to Speech</title>
|
| 8 |
|
| 9 |
+
<link rel="modulepreload" href="/_app/immutable/entry/start.DqjGHyqo.js">
|
| 10 |
+
<link rel="modulepreload" href="/_app/immutable/chunks/0dvDZDCQ.js">
|
| 11 |
<link rel="modulepreload" href="/_app/immutable/chunks/Dhl5Jh7r.js">
|
| 12 |
+
<link rel="modulepreload" href="/_app/immutable/entry/app.B6MnJtPd.js">
|
| 13 |
<link rel="modulepreload" href="/_app/immutable/chunks/IHki7fMi.js">
|
| 14 |
</head>
|
| 15 |
<body data-sveltekit-preload-data="hover">
|
| 16 |
<div style="display: contents">
|
| 17 |
<script>
|
| 18 |
{
|
| 19 |
+
__sveltekit_19d9m60 = {
|
| 20 |
base: ""
|
| 21 |
};
|
| 22 |
|
| 23 |
const element = document.currentScript.parentElement;
|
| 24 |
|
| 25 |
Promise.all([
|
| 26 |
+
import("/_app/immutable/entry/start.DqjGHyqo.js"),
|
| 27 |
+
import("/_app/immutable/entry/app.B6MnJtPd.js")
|
| 28 |
]).then(([kit, app]) => {
|
| 29 |
kit.start(app, element);
|
| 30 |
});
|