GitHub Action commited on
Commit
ccaad5d
Β·
1 Parent(s): 3898731

Sync from GitHub: 5b56187954a671c7eac8148d3074c7bcd1c4722b

Browse files
.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-studio-logo.png filter=lfs diff=lfs merge=lfs -text
11
+ hfstudio/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
12
+ frontend/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
13
+ frontend/static/assets/hf-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/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
  {
2
  "name": "hfstudio-frontend",
3
- "version": "0.1.1",
4
  "lockfileVersion": 3,
5
  "requires": true,
6
  "packages": {
7
  "": {
8
  "name": "hfstudio-frontend",
9
- "version": "0.1.1",
10
  "dependencies": {
11
  "@fortawesome/free-solid-svg-icons": "^6.5.1",
12
  "@sveltejs/adapter-static": "^3.0.10",
 
1
  {
2
  "name": "hfstudio-frontend",
3
+ "version": "0.1.2",
4
  "lockfileVersion": 3,
5
  "requires": true,
6
  "packages": {
7
  "": {
8
  "name": "hfstudio-frontend",
9
+ "version": "0.1.2",
10
  "dependencies": {
11
  "@fortawesome/free-solid-svg-icons": "^6.5.1",
12
  "@sveltejs/adapter-static": "^3.0.10",
frontend/src/routes/+page.svelte CHANGED
@@ -2,7 +2,7 @@
2
  import { Play, Download, Loader2, AlertCircle, ChevronDown, Copy, RefreshCw, Share, MoreHorizontal, Settings, Sliders, Pause, SkipBack, SkipForward, Layout, Code } from 'lucide-svelte';
3
 
4
  let text = `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.`;
5
- let selectedVoice = 'Novia';
6
  let selectedModel = 'Chatterbox';
7
  let mode = 'api'; // 'api' or 'local'
8
  let viewMode = 'ui'; // 'ui' or 'code'
@@ -22,6 +22,8 @@
22
  let duration = 0;
23
  let audioTitle = '';
24
  let audioElement = null;
 
 
25
 
26
  const models = [
27
  { id: 'chatterbox', name: 'Chatterbox', badge: 'recommended' },
@@ -29,7 +31,7 @@
29
  ];
30
 
31
  const voices = [
32
- { id: 'novia', name: 'Novia', description: 'Warm, conversational voice' },
33
  { id: 'sarah', name: 'Sarah', description: 'Clear, professional tone' },
34
  { id: 'alex', name: 'Alex', description: 'Friendly, approachable voice' },
35
  { id: 'emma', name: 'Emma', description: 'Calm, soothing delivery' },
@@ -275,6 +277,42 @@
275
  console.log('Share audio');
276
  }
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  function handleKeyDown(event) {
279
  if (event.key === 'Enter' && !event.shiftKey) {
280
  event.preventDefault();
@@ -661,19 +699,32 @@ print(f"βœ“ Audio saved to {output_filename}")
661
  <div class="space-y-1">
662
  {#each voices as voice}
663
  <button
664
- class="w-full flex items-center justify-between p-2 rounded-md hover:bg-gray-50 transition-colors text-left
665
  {voice.name === selectedVoice ? 'bg-gray-100' : ''}"
666
  on:click={() => selectedVoice = voice.name}
667
  >
668
- <div class="flex items-center gap-2">
669
- <div class="w-8 h-8 bg-gradient-to-br from-amber-400 to-orange-500 rounded-full flex items-center justify-center text-white text-xs font-medium">
670
  {voice.name[0]}
671
  </div>
672
- <span class="text-sm font-medium">{voice.name}</span>
673
- </div>
674
- <div class="text-xs text-gray-500">
675
- {voice.description}
 
 
676
  </div>
 
 
 
 
 
 
 
 
 
 
 
677
  </button>
678
  {/each}
679
 
 
2
  import { Play, Download, Loader2, AlertCircle, ChevronDown, Copy, RefreshCw, Share, MoreHorizontal, Settings, Sliders, Pause, SkipBack, SkipForward, Layout, Code } from 'lucide-svelte';
3
 
4
  let text = `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.`;
5
+ let selectedVoice = 'Lily';
6
  let selectedModel = 'Chatterbox';
7
  let mode = 'api'; // 'api' or 'local'
8
  let viewMode = 'ui'; // 'ui' or 'code'
 
22
  let duration = 0;
23
  let audioTitle = '';
24
  let audioElement = null;
25
+ let sampleAudioElement = null;
26
+ let playingSampleVoice = null;
27
 
28
  const models = [
29
  { id: 'chatterbox', name: 'Chatterbox', badge: 'recommended' },
 
31
  ];
32
 
33
  const voices = [
34
+ { id: 'lily', name: 'Lily', description: 'Warm, conversational voice from a female in her 30s to 40s', sample: '/voices/lily.mp3' },
35
  { id: 'sarah', name: 'Sarah', description: 'Clear, professional tone' },
36
  { id: 'alex', name: 'Alex', description: 'Friendly, approachable voice' },
37
  { id: 'emma', name: 'Emma', description: 'Calm, soothing delivery' },
 
277
  console.log('Share audio');
278
  }
279
 
280
+ function playSampleVoice(voice, event) {
281
+ event.stopPropagation(); // Prevent voice selection when clicking play
282
+
283
+ if (playingSampleVoice === voice.name) {
284
+ // Stop playing
285
+ if (sampleAudioElement) {
286
+ sampleAudioElement.pause();
287
+ sampleAudioElement.currentTime = 0;
288
+ }
289
+ playingSampleVoice = null;
290
+ } else {
291
+ // Play new voice sample
292
+ if (sampleAudioElement) {
293
+ sampleAudioElement.pause();
294
+ }
295
+ playingSampleVoice = voice.name;
296
+
297
+ // Use voice-specific sample if available, otherwise use default
298
+ const sampleUrl = voice.sample || '/samples/harvard.wav';
299
+
300
+ if (!sampleAudioElement) {
301
+ sampleAudioElement = new Audio(sampleUrl);
302
+ sampleAudioElement.addEventListener('ended', () => {
303
+ playingSampleVoice = null;
304
+ });
305
+ } else {
306
+ sampleAudioElement.src = sampleUrl;
307
+ }
308
+
309
+ sampleAudioElement.play().catch(err => {
310
+ console.error('Error playing sample:', err);
311
+ playingSampleVoice = null;
312
+ });
313
+ }
314
+ }
315
+
316
  function handleKeyDown(event) {
317
  if (event.key === 'Enter' && !event.shiftKey) {
318
  event.preventDefault();
 
699
  <div class="space-y-1">
700
  {#each voices as voice}
701
  <button
702
+ class="w-full flex items-center justify-between p-3 rounded-md hover:bg-gray-50 transition-colors text-left group
703
  {voice.name === selectedVoice ? 'bg-gray-100' : ''}"
704
  on:click={() => selectedVoice = voice.name}
705
  >
706
+ <div class="flex items-center gap-3">
707
+ <div class="w-10 h-10 bg-gradient-to-br from-amber-400 to-orange-500 rounded-full flex items-center justify-center text-white text-sm font-semibold flex-shrink-0">
708
  {voice.name[0]}
709
  </div>
710
+ <div class="flex-1">
711
+ <div class="text-sm font-medium text-gray-900">{voice.name}</div>
712
+ <div class="text-xs text-gray-500 mt-0.5">
713
+ {voice.description}
714
+ </div>
715
+ </div>
716
  </div>
717
+ <button
718
+ on:click={(e) => playSampleVoice(voice, e)}
719
+ class="p-1.5 rounded-full hover:bg-gray-200 transition-colors flex-shrink-0"
720
+ title="Play sample"
721
+ >
722
+ {#if playingSampleVoice === voice.name}
723
+ <Pause size={16} class="text-gray-600" />
724
+ {:else}
725
+ <Play size={16} class="text-gray-600" />
726
+ {/if}
727
+ </button>
728
  </button>
729
  {/each}
730
 
frontend/static/voices/lily.mp3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c18e6377b8bfe07928f0c461091b4947fcc123a7a8d6f1c47014e323b7b9ac7d
3
+ size 388119
hfstudio/static/_app/immutable/assets/0.dJvyC6xS.css ADDED
@@ -0,0 +1 @@
 
 
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 5.9% 10%;--radius: .5rem}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-56{left:14rem}.right-0{right:0}.right-4{right:1rem}.right-80{right:20rem}.top-full{top:100%}.z-10{z-index:10}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.block{display:block}.flex{display:flex}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-8{width:2rem}.w-80{width:20rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-4{border-right-width:4px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-r-transparent{border-right-color:transparent}.border-t-blue-600{--tw-border-opacity: 1;border-top-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.bg-right{background-position:right}.bg-no-repeat{background-repeat:no-repeat}.p-0\.5{padding:.125rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-24{padding-bottom:6rem}.pr-10{padding-right:2.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.text-blue-100{--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.slider-hf::-webkit-slider-thumb{height:1rem;width:1rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;background:linear-gradient(45deg,#ffd21e,#ff9d00);box-shadow:0 1px 3px #0000001a}.slider-hf::-moz-range-thumb{height:1rem;width:1rem;cursor:pointer;border-radius:9999px;border-width:0px;background:linear-gradient(45deg,#ffd21e,#ff9d00);box-shadow:0 1px 3px #0000001a}.pause-filled{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px}.pause-filled:before,.pause-filled:after{content:"";width:2px;height:10px;background-color:currentColor;border-radius:1px}.pause-filled:before{margin-right:2px}.pause-filled:after{margin-left:2px}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-orange-600:hover{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.hover\:from-amber-500:hover{--tw-gradient-from: #f59e0b var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-orange-600:hover{--tw-gradient-to: #ea580c var(--tw-gradient-to-position)}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-amber-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(251 191 36 / var(--tw-ring-opacity, 1))}.focus\:ring-orange-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}
hfstudio/static/_app/immutable/chunks/B8cKfkAR.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{s as e}from"./CDtepspB.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
hfstudio/static/_app/immutable/chunks/CDtepspB.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ var kt=Object.defineProperty;var Et=(e,t,n)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>Et(e,typeof t!="symbol"?t+"":t,n);import{S as At,G as Rt,Y as Tt,Z as Ut,_ as It,$ as Lt,a0 as $t,a1 as xt,r as ve,a2 as Ct,H as be,n as ge,s as Pt}from"./BI_gvUUO.js";class Qe extends At{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 Ot extends Qe{}const Nt=Object.freeze(Object.defineProperty({__proto__:null,SvelteComponent:Qe,SvelteComponentTyped:Ot,afterUpdate:Rt,beforeUpdate:Tt,createEventDispatcher:Ut,getAllContexts:It,getContext:Lt,hasContext:$t,onDestroy:xt,onMount:ve,setContext:Ct,tick:be},Symbol.toStringTag,{value:"Module"}));class ce{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 jt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Dt(e){return e.split("%25").map(decodeURI).join("%25")}function Bt(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 Mt(...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 Vt=new TextDecoder;function qt(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 Gt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&Y.delete(Ue(e)),Gt(e,t));const Y=new Map;function Yt(e,t){const n=Ue(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=qt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Ht(e,t,n){if(Y.size>0){const r=Ue(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 Ue(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="${Mt(...a)}"]`}return r}const Kt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function zt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Jt(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=Kt.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 Wt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Jt(e){return e.slice(1).split("/").filter(Wt)}function Xt(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 Zt({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}=zt(o),f={id:o,exec:p=>{const u=h.exec(p);if(u)return Xt(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 et(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const D=[];function Ie(e,t=ge){let n;const r=new Set;function a(o){if(Pt(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 Xe;const $=((Xe=globalThis.__sveltekit_1w4pefl)==null?void 0:Xe.base)??"";var Ze;const Qt=((Ze=globalThis.__sveltekit_1w4pefl)==null?void 0:Ze.assets)??$??"",en="1760982267325",tt="sveltekit:snapshot",nt="sveltekit:scroll",at="sveltekit:states",tn="sveltekit:pageurl",F="sveltekit:history",z="sveltekit:navigation",O={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Z=location.origin;function Le(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 B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...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)===Z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function ee(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),t===null&&(t=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(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:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function qe(e){const t=Ie(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 nn(){const{set:e,subscribe:t}=Ie(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Qt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==en;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!==Z||!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 an(e){const t=on(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 rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function on(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|=rn.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 sn=-1,cn=-2,ln=-3,fn=-4,un=-5,dn=-6;function hn(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===sn)return;if(s===ln)return NaN;if(s===fn)return 1/0;if(s===un)return-1/0;if(s===dn)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=an(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!==cn&&(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 pn=new Set([...it]);[...pn];function gn(e){return e.filter(t=>t!=null)}const mn="x-sveltekit-invalidated",_n="x-sveltekit-trailing-slash";function te(e){return e instanceof ce||e instanceof Te?e.status:500}function wn(e){return e instanceof Te?e.text:"Internal Error"}let T,W,we;const yn=ve.toString().includes("$$")||/function \w+\(\) \{\}/.test(ve.toString());yn?(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 vn(e){Object.assign(T,e)}const bn="/__data.json",Sn=".html__data.json";function kn(e){return e.endsWith(".html")?e.replace(/\.html$/,Sn):e.replace(/\/$/,"")+bn}const Ge={spanContext(){return En},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}},En={traceId:"",spanId:"",traceFlags:0},{tick:An}=Nt,Rn=new Set(["icon","shortcut icon","apple-touch-icon"]),j=et(nt)??{},J=et(tt)??{},C={url:qe({}),page:qe({}),navigating:Ie(null),updated:nn()};function $e(e){j[e]=le()}function Tn(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 Ye(){}let xe,ke,ne,x,Ee,k;const ae=[],re=[];let I=null;const Q=new Map,lt=new Set,Un=new Set,H=new Set;let b={branch:[],error:null,url:null},Ce=!1,oe=!1,He=!0,X=!1,G=!1,ft=!1,Pe=!1,ut,A,L,N;const K=new Set,Ke=new Map;async function Kn(e,t,n){var s,i,o,c,l;(s=globalThis.__sveltekit_1w4pefl)!=null&&s.data&&globalThis.__sveltekit_1w4pefl.data,document.URL!==location.href&&(location.href=location.href),k=e,await((o=(i=e.hooks).init)==null?void 0:o.call(i)),xe=Zt(e),x=document.documentElement,Ee=t,ke=e.nodes[0],ne=e.nodes[1],ke(),ne(),A=(c=history.state)==null?void 0:c[F],L=(l=history.state)==null?void 0:l[z],A||(A=L=Date.now(),history.replaceState({...history.state,[F]: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:Le(k.hash?Fn(new URL(location.href)):location.href),replace_state:!0}),a()),jn()}function In(){ae.length=0,Pe=!1}function dt(e){re.some(t=>t==null?void 0:t.snapshot)&&(J[e]=re.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=re[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ze(){$e(A),Me(nt,j),dt(L),Me(tt,J)}async function pt(e,t,n,r){let a;t.invalidateAll&&(I=null),await M({type:"goto",url:Le(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[...Ke.keys()]),t.invalidate&&t.invalidate.forEach(Nn)}}),t.invalidateAll&&be().then(be).then(()=>{Ke.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!==(I==null?void 0:I.id)){const t={};K.add(t),I={id:e.id,token:t,promise:_t({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(I=null),n))}}return I.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 gt(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:re},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))}oe=!0}function se({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=jt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:gn(n).map(f=>f.node.component),page:De(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 Oe({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:Ge,current:Ge},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:U}=mt(u,g,n);return o&&f(_.href),U},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 mt(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=oe?Ht(r,a.href,t):Yt(r,t);return{resolved:a,promise:s}}function We(e,t,n,r,a,s){if(Pe)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(ae.some(o=>o(new URL(i))))return!0;return!1}function Ne(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 Je({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:De(T),constructors:[]}}}async function _t({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((I==null?void 0:I.id)===e)return K.delete(I.token),I.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!==ie(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]||We(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 vt(n,u)}catch(w){const m=await V(w,{url:n,params:r,route:{id:e}});return K.has(s)?Je({error:m,url:n,params:r,route:a}):ue({status:te(w),error:m,url:n,route:a})}if(d.type==="redirect")return d}const g=d==null?void 0:d.nodes;let _=!1;const U=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)&&!We(_,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 Oe({loader:w[1],url:n,params:r,route:a,parent:async()=>{var Fe;const Be={};for(let pe=0;pe<m;pe+=1)Object.assign(Be,(Fe=await U[pe])==null?void 0:Fe.data);return Be},server_data_node:Ne(S===void 0&&w[0]?{type:"skip"}:S??null,w[0]?v==null?void 0:v.server:void 0)})});for(const w of U)w.catch(()=>{});const E=[];for(let w=0;w<l.length;w+=1)if(l[w])try{E.push(await U[w])}catch(m){if(m instanceof Re)return{type:"redirect",location:m.location};if(K.has(s))return Je({error:await V(m,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let v=te(m),S;if(g!=null&&g.includes(m))v=m.status??v,S=m.error;else if(m instanceof ce)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?se({url:n,params:r,branch:E.slice(0,P.idx).concat(P.node),status:v,error:S,route:a}):await yt(n,{id:a.id},S,v)}else E.push(void 0);return se({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 vt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==Z||n.pathname!==location.pathname||Ce)&&await q(n)}try{const o=await Oe({loader:ke,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ne(s)}),c={node:await ne(),loader:ne,universal:null,server:null,data:null};return se({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Re)return pt(new URL(o.location,location.href),{},0);throw o}}async function Cn(e){const t=e.href;if(Q.has(t))return Q.get(t);let n;try{const r=(async()=>{let a=await k.hooks.reroute({url:new URL(e),fetch:async(s,i)=>mt(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})();Q.set(t,r),n=await r}catch{Q.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 xe){const s=a.exec(r);if(s)return{id:ie(e),invalidating:t,route:a,params:Bt(s),url:e}}}}function Pn(e){return Dt(k.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice($.length))||"/"}function ie(e){return(k.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function wt({url:e,type:t,intent:n,delta:r,event:a}){let s=!1;const i=je(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=Ye,block:d=Ye,event:h}){const y=N;N=c;const f=await de(t,!1),p=e==="enter"?je(b,f,t,e):wt({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,oe&&p.navigation.type!=="enter"&&C.navigating.set(W.current=p.navigation);let _=f&&await _t(f);if(!_){if(fe(t,$,k.hash))return await q(t,s);_=await yt(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(),$e(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={[F]:A+=m,[z]:L+=m,[at]:i};(s?history.replaceState:history.pushState).call(history,v,"",t),s||Tn(A,L)}if(I=null,_.props.page.state=i,oe){const m=(await Promise.all(Array.from(Un,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),vn(_.props.page),ft=!0}else gt(_,Ee,!1);const{activeElement:U}=document;await An();let E=n?n.scroll:a?le():null;if(He){const m=t.hash&&document.getElementById(St(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!==U&&document.activeElement!==document.body;!r&&!w&&Bn(t,E),He=!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 yt(e,t,n,r,a){return e.origin===Z&&e.pathname===location.pathname&&!Ce?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=ee(l),u=h&&ie(b.url)===ie(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=ee(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 ce)return e.body;const n=te(e),r=wn(e);return k.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function zn(e,t={}){return e=new URL(Le(e)),e.origin!==Z?Promise.reject(new Error("goto: invalid URL")):pt(e,t,0)}function Nn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function jn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ze(),!X){const a=je(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"&&ze()}),(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=ee(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)){wt({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,$e(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=ee(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[F]){const a=n.state[F];if(N={},a===A)return;const s=j[a],i=n.state[at]??{},o=new URL(n.state[tn]??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,[F]:++A,[z]:L},"",location.href))});for(const n of document.querySelectorAll("link"))Rn.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(De(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}){Ce=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await de(l,!1)||{}),d=xe.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=bt(_.uses)),Oe({loader:k.nodes[u],url:l,params:a,route:s,parent:async()=>{const U={};for(let E=0;E<g;E+=1)Object.assign(U,(await f[E]).data);return U},server_data_node:Ne(_)})}),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=se({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:te(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={}),gt(h,e,y)}async function vt(e,t){var s;const n=new URL(e);n.pathname=kn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(_n,"1"),n.searchParams.append(mn,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 ce(a.status,i)}return new Promise(async i=>{var h;const o=new Map,c=a.body.getReader();function l(y){return hn(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
+ `:Vt.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=bt(g.uses),g.data=l(g.data))}),i(u);else if(u.type==="chunk"){const{id:g,data:_,error:U}=u,E=o.get(g);o.delete(g),U?E.reject(l(U)):E.fulfil(l(_))}}}})}function bt(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 Bn(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=St(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 je(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 De(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 Fn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function St(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,zn as g,qn as l,C as s};
hfstudio/static/_app/immutable/entry/app.D8dorYrS.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CYXukrfF.js","../chunks/BI_gvUUO.js","../chunks/IHki7fMi.js","../assets/0.dJvyC6xS.css","../nodes/1.Buin7q9X.js","../chunks/B8cKfkAR.js","../chunks/CDtepspB.js","../nodes/2.pdqLtzWm.js","../assets/2.We9sRuZI.css","../nodes/3.C2t7-zYm.js"])))=>i.map(i=>d[i]);
2
+ import{S as C,i as q,s as B,d,x as h,y as g,D as S,E as A,b as E,h as U,F as w,k as F,G,r as H,H as J,I as y,J as P,K as R,L,M as N,o as D,N as p,e as K,f as W,j as z,O as I,a as Q,g as X,t as Y}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";const Z="modulepreload",M=function(o,e){return new URL(o,e).href},T={},O=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 T)return;T[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&&N(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&&N(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&&N(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 V(o){let e,n=o[7]&&j(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(){D(e,"id","svelte-announcer"),D(e,"aria-live","assertive"),D(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=j(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&d(e),n&&n.d()}}}function j(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]&&V(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=V(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){I[c?"unshift":"push"](()=>{t[1]=c,n(0,t)})}function k(c){I[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}function v(c){I[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 C{constructor(e){super(),q(this,e,ne,te,B,{stores:9,page:1,constructors:2,components:0,form:3,data_0:4,data_1:5})}}const fe=[()=>O(()=>import("../nodes/0.CYXukrfF.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>O(()=>import("../nodes/1.Buin7q9X.js"),__vite__mapDeps([4,1,2,5,6]),import.meta.url),()=>O(()=>import("../nodes/2.pdqLtzWm.js"),__vite__mapDeps([7,1,2,8]),import.meta.url),()=>O(()=>import("../nodes/3.C2t7-zYm.js"),__vite__mapDeps([9,1,2,6,5]),import.meta.url)],ce=[],ue={"/":[2],"/auth/callback":[3]},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.BYVsPlvk.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{l as o,a as r}from"../chunks/CDtepspB.js";export{o as load_css,r as start};
hfstudio/static/_app/immutable/nodes/0.CYXukrfF.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import{S as Ie,i as Le,s as Se,v as Ee,d as _,w as Ce,x as He,y as Me,o as a,z as Ae,A as Ne,B as Pe,b as Z,c as n,u as se,m as Ue,e as c,f as P,q as S,h as v,j as u,k as x,r as Be,C as xe,a as me,g as ne,t as le,n as De}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";function je(r){let t,e="Sign In";return{c(){t=u("span"),t.textContent=e},l(s){t=c(s,"SPAN",{"data-svelte-h":!0}),S(t)!=="svelte-6n3gky"&&(t.textContent=e)},m(s,f){Z(s,t,f)},p:De,d(s){s&&_(t)}}}function Ve(r){let t,e,s;return{c(){t=u("span"),e=le("Sign Out, "),s=le(r[2])},l(f){t=c(f,"SPAN",{});var b=P(t);e=ne(b,"Sign Out, "),s=ne(b,r[2]),b.forEach(_)},m(f,b){Z(f,t,b),n(t,e),n(t,s)},p(f,b){b&4&&me(s,f[2])},d(f){f&&_(t)}}}function Oe(r){let t,e,s=r[1]?"logged in":"not logged in",f,b;return{c(){t=u("span"),e=le("Checking... ("),f=le(s),b=le(")")},l(l){t=c(l,"SPAN",{});var o=P(t);e=ne(o,"Checking... ("),f=ne(o,s),b=ne(o,")"),o.forEach(_)},m(l,o){Z(l,t,o),n(t,e),n(t,f),n(t,b)},p(l,o){o&2&&s!==(s=l[1]?"logged in":"not logged in")&&me(f,s)},d(l){l&&_(t)}}}function ke(r){let t,e='<div class="bg-blue-600 text-white text-sm rounded-lg p-3 shadow-lg relative"><div class="flex items-start gap-2"><svg class="w-4 h-4 mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg> <div><p class="font-medium">Sign in required</p> <p class="text-blue-100 text-xs mt-1">You need to sign in to use HuggingFace Inference Providers for text-to-speech generation.</p></div></div> <div class="absolute top-full left-1/2 transform -translate-x-1/2"><div class="w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-blue-600"></div></div></div>';return{c(){t=u("div"),t.innerHTML=e,this.h()},l(s){t=c(s,"DIV",{class:!0,"data-svelte-h":!0}),S(t)!=="svelte-drpr74"&&(t.innerHTML=e),this.h()},h(){a(t,"class","absolute bottom-full left-0 right-0 mb-2 z-50")},m(s,f){Z(s,t,f)},d(s){s&&_(t)}}}function we(r){let t,e,s,f="Sign In with HuggingFace Token",b,l,o,G="<strong>Manual Token Entry:</strong> Please enter your HuggingFace token.",I,g,U=`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 &quot;Inference API&quot; permissions<br/>
3
+ 3. Copy and paste it below`,Y,F,k,E,W="HuggingFace Token",J,m,K,Q,y,j,d="Cancel",i,w,R="Sign In",O,oe,T=r[6]&&ye(),h=r[5]&&Te(r);return{c(){t=u("div"),e=u("div"),s=u("h2"),s.textContent=f,b=x(),l=u("div"),o=u("p"),o.innerHTML=G,I=x(),g=u("p"),g.innerHTML=U,Y=x(),T&&T.c(),F=x(),k=u("div"),E=u("label"),E.textContent=W,J=x(),m=u("input"),K=x(),h&&h.c(),Q=x(),y=u("div"),j=u("button"),j.textContent=d,i=x(),w=u("button"),w.textContent=R,this.h()},l(A){t=c(A,"DIV",{class:!0});var z=P(t);e=c(z,"DIV",{class:!0});var L=P(e);s=c(L,"H2",{class:!0,"data-svelte-h":!0}),S(s)!=="svelte-1t0ehet"&&(s.textContent=f),b=v(L),l=c(L,"DIV",{class:!0});var C=P(l);o=c(C,"P",{class:!0,"data-svelte-h":!0}),S(o)!=="svelte-344vn4"&&(o.innerHTML=G),I=v(C),g=c(C,"P",{class:!0,"data-svelte-h":!0}),S(g)!=="svelte-1ffvpx3"&&(g.innerHTML=U),Y=v(C),T&&T.l(C),C.forEach(_),F=v(L),k=c(L,"DIV",{class:!0});var B=P(k);E=c(B,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),S(E)!=="svelte-vtbmxo"&&(E.textContent=W),J=v(B),m=c(B,"INPUT",{id:!0,type:!0,placeholder:!0,class:!0}),K=v(B),h&&h.l(B),B.forEach(_),Q=v(L),y=c(L,"DIV",{class:!0});var $=P(y);j=c($,"BUTTON",{class:!0,"data-svelte-h":!0}),S(j)!=="svelte-csk0rj"&&(j.textContent=d),i=v($),w=c($,"BUTTON",{class:!0,"data-svelte-h":!0}),S(w)!=="svelte-1nxas5u"&&(w.textContent=R),$.forEach(_),L.forEach(_),z.forEach(_),this.h()},h(){a(s,"class","text-xl font-semibold mb-4"),a(o,"class","text-blue-800 mb-2"),a(g,"class","text-blue-700"),a(l,"class","mb-4 p-3 bg-blue-50 rounded-md text-sm"),a(E,"for","token"),a(E,"class","block text-sm font-medium text-gray-700 mb-2"),a(m,"id","token"),a(m,"type","password"),a(m,"placeholder","hf_..."),a(m,"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(k,"class","mb-4"),a(j,"class","px-4 py-2 text-gray-600 hover:text-gray-800 transition-colors"),a(w,"class","px-4 py-2 bg-orange-500 text-white rounded-md hover:bg-orange-600 transition-colors"),a(y,"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(A,z){Z(A,t,z),n(t,e),n(e,s),n(e,b),n(e,l),n(l,o),n(l,I),n(l,g),n(l,Y),T&&T.m(l,null),n(e,F),n(e,k),n(k,E),n(k,J),n(k,m),xe(m,r[4]),n(k,K),h&&h.m(k,null),n(e,Q),n(e,y),n(y,j),n(y,i),n(y,w),O||(oe=[se(m,"input",r[15]),se(m,"keydown",r[16]),se(j,"click",r[10]),se(w,"click",r[11])],O=!0)},p(A,z){A[6]?T||(T=ye(),T.c(),T.m(l,null)):T&&(T.d(1),T=null),z&16&&m.value!==A[4]&&xe(m,A[4]),A[5]?h?h.p(A,z):(h=Te(A),h.c(),h.m(k,null)):h&&(h.d(1),h=null)},d(A){A&&_(t),T&&T.d(),h&&h.d(),O=!1,Ce(oe)}}}function ye(r){let t,e="<strong>Tip:</strong> You can also run <code>huggingface-cli login</code> in your terminal to automatically use your local token.";return{c(){t=u("p"),t.innerHTML=e,this.h()},l(s){t=c(s,"P",{class:!0,"data-svelte-h":!0}),S(t)!=="svelte-1gg2uwy"&&(t.innerHTML=e),this.h()},h(){a(t,"class","text-blue-600 mt-2")},m(s,f){Z(s,t,f)},d(s){s&&_(t)}}}function Te(r){let t,e;return{c(){t=u("p"),e=le(r[5]),this.h()},l(s){t=c(s,"P",{class:!0});var f=P(t);e=ne(f,r[5]),f.forEach(_),this.h()},h(){a(t,"class","text-red-600 text-sm mt-1")},m(s,f){Z(s,t,f),n(t,e)},p(s,f){f&32&&me(e,s[5])},d(s){s&&_(t)}}}function Fe(r){let t,e,s,f='<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>',b,l,o,G="Tasks",I,g,U,Y="πŸŽ™οΈ",F,k,E="Text to Speech",W,J,m,K="<span>🎡</span> <span>Voice Cloning</span>",Q,y,j="<span>🎧</span> <span>Speech to Text</span>",d,i,w="<span>🎼</span> <span>Sound Effects</span>",R,O,oe="<span>🎸</span> <span>Music Generation</span>",T,h,A="<span>πŸ”Š</span> <span>Audio Enhancement</span>",z,L,C,B,$,ue,fe,de,ee,pe,X,ge,_e;function be(p,M){return p[7]?Oe:p[1]?Ve:je}let ae=be(r),q=ae(r),N=r[8]&&!r[1]&&ke();const he=r[13].default,V=Ee(he,r,r[12],null);let H=r[3]&&we(r);return{c(){t=u("div"),e=u("aside"),s=u("div"),s.innerHTML=f,b=x(),l=u("nav"),o=u("div"),o.textContent=G,I=x(),g=u("button"),U=u("span"),U.textContent=Y,F=x(),k=u("span"),k.textContent=E,J=x(),m=u("button"),m.innerHTML=K,Q=x(),y=u("button"),y.innerHTML=j,d=x(),i=u("button"),i.innerHTML=w,R=x(),O=u("button"),O.innerHTML=oe,T=x(),h=u("button"),h.innerHTML=A,z=x(),L=u("div"),C=u("button"),B=u("img"),ue=x(),q.c(),fe=x(),N&&N.c(),de=x(),ee=u("main"),V&&V.c(),pe=x(),H&&H.c(),this.h()},l(p){t=c(p,"DIV",{class:!0});var M=P(t);e=c(M,"ASIDE",{class:!0});var te=P(e);s=c(te,"DIV",{class:!0,"data-svelte-h":!0}),S(s)!=="svelte-1vahj38"&&(s.innerHTML=f),b=v(te),l=c(te,"NAV",{class:!0});var D=P(l);o=c(D,"DIV",{class:!0,"data-svelte-h":!0}),S(o)!=="svelte-1x5465q"&&(o.textContent=G),I=v(D),g=c(D,"BUTTON",{class:!0});var re=P(g);U=c(re,"SPAN",{"data-svelte-h":!0}),S(U)!=="svelte-1yx42xi"&&(U.textContent=Y),F=v(re),k=c(re,"SPAN",{"data-svelte-h":!0}),S(k)!=="svelte-2j89jk"&&(k.textContent=E),re.forEach(_),J=v(D),m=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(m)!=="svelte-10dl8nf"&&(m.innerHTML=K),Q=v(D),y=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(y)!=="svelte-wf0x5d"&&(y.innerHTML=j),d=v(D),i=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(i)!=="svelte-x7bha3"&&(i.innerHTML=w),R=v(D),O=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(O)!=="svelte-1tyblmt"&&(O.innerHTML=oe),T=v(D),h=c(D,"BUTTON",{class:!0,"data-svelte-h":!0}),S(h)!=="svelte-1emrjb3"&&(h.innerHTML=A),D.forEach(_),z=v(te),L=c(te,"DIV",{class:!0});var ie=P(L);C=c(ie,"BUTTON",{class:!0});var ce=P(C);B=c(ce,"IMG",{src:!0,alt:!0,class:!0}),ue=v(ce),q.l(ce),ce.forEach(_),fe=v(ie),N&&N.l(ie),ie.forEach(_),te.forEach(_),de=v(M),ee=c(M,"MAIN",{class:!0});var ve=P(ee);V&&V.l(ve),ve.forEach(_),pe=v(M),H&&H.l(M),M.forEach(_),this.h()},h(){a(s,"class","p-4 border-b border-gray-200"),a(o,"class","mt-2 mb-1 px-2 text-xs font-medium text-gray-500 uppercase"),a(g,"class",W="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(m,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),m.disabled=!0,a(y,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),y.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(O,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),O.disabled=!0,a(h,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),h.disabled=!0,a(l,"class","p-2 text-sm flex-1"),Ue(B.src,$="/assets/hf-logo.png")||a(B,"src",$),a(B,"alt","HF Logo"),a(B,"class","w-5 h-5"),C.disabled=r[7],a(C,"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"),a(L,"class","p-2 relative"),a(e,"class","w-56 border-r border-gray-200 bg-white flex-shrink-0 flex flex-col h-full "),a(ee,"class","flex-1 overflow-auto"),a(t,"class","flex h-screen bg-white")},m(p,M){Z(p,t,M),n(t,e),n(e,s),n(e,b),n(e,l),n(l,o),n(l,I),n(l,g),n(g,U),n(g,F),n(g,k),n(l,J),n(l,m),n(l,Q),n(l,y),n(l,d),n(l,i),n(l,R),n(l,O),n(l,T),n(l,h),n(e,z),n(e,L),n(L,C),n(C,B),n(C,ue),q.m(C,null),n(L,fe),N&&N.m(L,null),n(t,de),n(t,ee),V&&V.m(ee,null),n(t,pe),H&&H.m(t,null),X=!0,ge||(_e=[se(g,"click",r[14]),se(C,"click",r[9])],ge=!0)},p(p,[M]){(!X||M&1&&W!==(W="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(p[0]==="tts"?"bg-gray-100":"")))&&a(g,"class",W),ae===(ae=be(p))&&q?q.p(p,M):(q.d(1),q=ae(p),q&&(q.c(),q.m(C,null))),(!X||M&128)&&(C.disabled=p[7]),p[8]&&!p[1]?N||(N=ke(),N.c(),N.m(L,null)):N&&(N.d(1),N=null),V&&V.p&&(!X||M&4096)&&Ae(V,he,p,p[12],X?Pe(he,p[12],M,null):Ne(p[12]),null),p[3]?H?H.p(p,M):(H=we(p),H.c(),H.m(t,null)):H&&(H.d(1),H=null)},i(p){X||(Me(V,p),X=!0)},o(p){He(V,p),X=!1},d(p){p&&_(t),q.d(),N&&N.d(),V&&V.d(p),H&&H.d(),ge=!1,Ce(_e)}}}function ze(r,t,e){let{$$slots:s={},$$scope:f}=t,b="tts",l=!1,o="",G=!1,I="",g="",U=!1,Y=!0,F=!1;Be(()=>{console.log("onMount called - starting auth check"),window.addEventListener("show-signin-popover",()=>{e(8,F=!0),setTimeout(()=>{e(8,F=!1)},4e3)}),k(),E(),document.addEventListener("visibilitychange",()=>{document.hidden||E()}),window.addEventListener("storage",E);const d=setInterval(E,1e3);return()=>{window.removeEventListener("storage",E),clearInterval(d)}});async function k(){try{console.log("Checking local token availability...");const i=await(await fetch("/api/auth/local-token")).json();console.log("Local token response:",i),i.available?(e(6,U=!0),localStorage.setItem("hf_access_token",i.token),console.log("Set local token in localStorage"),i.user_info&&i.user_info.name!=="Local User"?(e(1,l=!0),e(2,o=i.user_info.name.split(" ")[0]),console.log("Logged in with user info:",o)):(e(1,l=!0),e(2,o="Local User"),console.log("Logged in with local token (validation skipped due to rate limiting)"),console.log("isLoggedIn set to:",l,"username set to:",o))):(e(6,U=!1),console.log("No local token available"))}catch(d){console.log("Could not check local token availability:",d),e(6,U=!1)}finally{e(7,Y=!1),console.log("Finished checking auth, isLoggedIn:",l)}}function E(){const d=localStorage.getItem("hf_access_token");d&&!l?W(d):d||(e(1,l=!1),e(2,o=""))}async function W(d){try{console.log("Fetching user info for token:",d.substring(0,10)+"...");const i=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${d}`}});if(i.ok){const w=await i.json();e(1,l=!0);const R=w.name||w.fullname||w.login||w.username||"User";e(2,o=R.split(" ")[0]),console.log("Successfully fetched user info:",o)}else localStorage.removeItem("hf_access_token"),e(1,l=!1),e(2,o=""),console.log("Token validation failed:",i.status)}catch(i){localStorage.removeItem("hf_access_token"),e(1,l=!1),e(2,o=""),console.log("Error fetching user info:",i)}}async function J(){if(l)localStorage.removeItem("hf_access_token"),sessionStorage.removeItem("oauth_state"),e(1,l=!1),e(2,o="");else if(window.location.hostname.includes("hf.space")||window.location.hostname.includes("huggingface.co"))try{const i=await(await fetch("/api/auth/oauth-config")).json(),w=i.scopes||"read-repos write-repos manage-repos inference-api",R=`https://huggingface.co/oauth/authorize?client_id=${i.client_id}&redirect_uri=${encodeURIComponent(window.location.origin+"/auth/callback")}&scope=${encodeURIComponent(w)}&response_type=code&state=${Date.now()}`;window.location.href=R}catch(d){console.error("Failed to get OAuth config:",d),e(3,G=!0),e(4,I=""),e(5,g="")}else e(3,G=!0),e(4,I=""),e(5,g="")}function m(){e(3,G=!1),e(4,I=""),e(5,g="")}async function K(){if(!I.trim()){e(5,g="Please enter a token");return}if(!I.startsWith("hf_")){e(5,g='Token should start with "hf_"');return}try{const d=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${I.trim()}`}});if(d.ok){const i=await d.json();localStorage.setItem("hf_access_token",I.trim()),e(1,l=!0);const w=i.name||i.fullname||i.login||i.username||"User";e(2,o=w.split(" ")[0]),m()}else{const i=await d.text();console.log("Token validation error:",d.status,i),e(5,g=`Invalid token (${d.status}). Please check your token and try again.`)}}catch(d){console.error("Token validation error:",d),e(5,g="Error validating token. Please try again.")}}const Q=()=>e(0,b="tts");function y(){I=this.value,e(4,I)}const j=d=>d.key==="Enter"&&K();return r.$$set=d=>{"$$scope"in d&&e(12,f=d.$$scope)},[b,l,o,G,I,g,U,Y,F,J,m,K,f,s,Q,y,j]}class Re extends Ie{constructor(t){super(),Le(this,t,ze,Fe,Se,{})}}export{Re as component};
hfstudio/static/_app/immutable/nodes/1.Buin7q9X.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as x,i as S,s as j,n as u,d as c,a as h,b as _,c as d,e as v,f as g,g as b,h as k,j as E,t as $,k as q,l as y}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";import{p as C}from"../chunks/B8cKfkAR.js";function H(p){var f;let a,s=p[0].status+"",r,n,o,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),n=q(),o=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),n=k(e),o=v(e,"P",{});var l=g(o);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,n,t),_(e,o,t),d(o,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(n),c(o))}}}function P(p,a,s){let r;return y(p,C,n=>s(0,r=n)),[r]}class B extends x{constructor(a){super(),S(this,a,P,H,j,{})}}export{B as component};
hfstudio/static/_app/immutable/nodes/2.pdqLtzWm.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{w as Gt,y as v,x as y,S as Ge,i as Re,s as je,v as Ke,P as x,d as u,Q as al,z as Je,A as Xe,B as Ye,R as il,b as se,c as a,T as Fl,f as h,F as Ut,U as Wl,V as pl,W as ce,J as Q,L as Z,M as ee,K as te,o as c,E as pt,u as le,e as d,g as z,h as I,j as m,t as M,k as T,D as bt,C as Et,a as Be,q as nt,O as Rl,X as rl,N as Kt,n as It,m as bl}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";function Nt(o){return(o==null?void 0:o.length)!==void 0?o:Array.from(o)}function ql(o,e){y(o,1,1,()=>{e.delete(o.key)})}function Kl(o,e,s,t,l,n,r,i,f,p,N,k){let g=o.length,_=n.length,b=g;const $={};for(;b--;)$[o[b].key]=b;const w=[],D=new Map,O=new Map,oe=[];for(b=_;b--;){const V=k(l,n,b),B=s(V);let j=r.get(B);j?oe.push(()=>j.p(V,e)):(j=p(B,V),j.c()),D.set(B,w[b]=j),B in $&&O.set(B,Math.abs(b-$[B]))}const F=new Set,P=new Set;function L(V){v(V,1),V.m(i,N),r.set(V.key,V),N=V.first,_--}for(;g&&_;){const V=w[_-1],B=o[g-1],j=V.key,W=B.key;V===B?(N=V.first,g--,_--):D.has(W)?!r.has(j)||F.has(j)?L(V):P.has(W)?g--:O.get(j)>O.get(W)?(P.add(j),L(V)):(F.add(W),g--):(f(B,r),g--)}for(;g--;){const V=o[g];D.has(V.key)||f(V,r)}for(;_;)L(w[_-1]);return Gt(oe),w}function qe(o,e){const s={},t={},l={$$scope:1};let n=o.length;for(;n--;){const r=o[n],i=e[n];if(i){for(const f in r)f in i||(t[f]=1);for(const f in i)l[f]||(s[f]=i[f],l[f]=1);o[n]=i}else for(const f in r)l[f]=1}for(const r in t)r in s||(s[r]=void 0);return s}function st(o){return typeof o=="object"&&o!==null?o:{}}/**
2
+ * @license lucide-svelte v0.303.0 - ISC
3
+
4
+ This source code is licensed under the ISC license.
5
+ See the LICENSE file in the root directory of this source tree.
6
+ */const vl={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 kl(o,e,s){const t=o.slice();return t[10]=e[s][0],t[11]=e[s][1],t}function ml(o){let e,s=[o[11]],t={};for(let l=0;l<s.length;l+=1)t=x(t,s[l]);return{c(){e=Wl(o[10]),this.h()},l(l){e=Fl(l,o[10],{}),h(e).forEach(u),this.h()},h(){il(e,t)},m(l,n){se(l,e,n)},p(l,n){il(e,t=qe(s,[n&32&&l[11]]))},d(l){l&&u(e)}}}function yl(o){let e=o[10],s,t=o[10]&&ml(o);return{c(){t&&t.c(),s=Ut()},l(l){t&&t.l(l),s=Ut()},m(l,n){t&&t.m(l,n),se(l,s,n)},p(l,n){l[10]?e?je(e,l[10])?(t.d(1),t=ml(l),e=l[10],t.c(),t.m(s.parentNode,s)):t.p(l,n):(t=ml(l),e=l[10],t.c(),t.m(s.parentNode,s)):e&&(t.d(1),t=null,e=l[10])},d(l){l&&u(s),t&&t.d(l)}}}function Jl(o){let e,s,t,l,n,r=Nt(o[5]),i=[];for(let g=0;g<r.length;g+=1)i[g]=yl(kl(o,r,g));const f=o[9].default,p=Ke(f,o,o[8],null);let N=[vl,o[6],{width:o[2]},{height:o[2]},{stroke:o[1]},{"stroke-width":t=o[4]?Number(o[3])*24/Number(o[2]):o[3]},{class:l=`lucide-icon lucide lucide-${o[0]} ${o[7].class??""}`}],k={};for(let g=0;g<N.length;g+=1)k=x(k,N[g]);return{c(){e=Wl("svg");for(let g=0;g<i.length;g+=1)i[g].c();s=Ut(),p&&p.c(),this.h()},l(g){e=Fl(g,"svg",{width:!0,height:!0,stroke:!0,"stroke-width":!0,class:!0});var _=h(e);for(let b=0;b<i.length;b+=1)i[b].l(_);s=Ut(),p&&p.l(_),_.forEach(u),this.h()},h(){il(e,k)},m(g,_){se(g,e,_);for(let b=0;b<i.length;b+=1)i[b]&&i[b].m(e,null);a(e,s),p&&p.m(e,null),n=!0},p(g,[_]){if(_&32){r=Nt(g[5]);let b;for(b=0;b<r.length;b+=1){const $=kl(g,r,b);i[b]?i[b].p($,_):(i[b]=yl($),i[b].c(),i[b].m(e,s))}for(;b<i.length;b+=1)i[b].d(1);i.length=r.length}p&&p.p&&(!n||_&256)&&Je(p,f,g,g[8],n?Ye(f,g[8],_,null):Xe(g[8]),null),il(e,k=qe(N,[vl,_&64&&g[6],(!n||_&4)&&{width:g[2]},(!n||_&4)&&{height:g[2]},(!n||_&2)&&{stroke:g[1]},(!n||_&28&&t!==(t=g[4]?Number(g[3])*24/Number(g[2]):g[3]))&&{"stroke-width":t},(!n||_&129&&l!==(l=`lucide-icon lucide lucide-${g[0]} ${g[7].class??""}`))&&{class:l}]))},i(g){n||(v(p,g),n=!0)},o(g){y(p,g),n=!1},d(g){g&&u(e),al(i,g),p&&p.d(g)}}}function Xl(o,e,s){const t=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let l=pl(e,t),{$$slots:n={},$$scope:r}=e,{name:i}=e,{color:f="currentColor"}=e,{size:p=24}=e,{strokeWidth:N=2}=e,{absoluteStrokeWidth:k=!1}=e,{iconNode:g}=e;return o.$$set=_=>{s(7,e=x(x({},e),ce(_))),s(6,l=pl(e,t)),"name"in _&&s(0,i=_.name),"color"in _&&s(1,f=_.color),"size"in _&&s(2,p=_.size),"strokeWidth"in _&&s(3,N=_.strokeWidth),"absoluteStrokeWidth"in _&&s(4,k=_.absoluteStrokeWidth),"iconNode"in _&&s(5,g=_.iconNode),"$$scope"in _&&s(8,r=_.$$scope)},e=ce(e),[i,f,p,N,k,g,l,e,r,n]}class ot extends Ge{constructor(e){super(),Re(this,e,Xl,Jl,je,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Yl(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function Ql(o){let e,s;const t=[{name:"alert-circle"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Yl]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function Zl(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class en extends Ge{constructor(e){super(),Re(this,e,Zl,Ql,je,{})}}function tn(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function ln(o){let e,s;const t=[{name:"chevron-down"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[tn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function nn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"m6 9 6 6 6-6"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class sn extends Ge{constructor(e){super(),Re(this,e,nn,ln,je,{})}}function on(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function rn(o){let e,s;const t=[{name:"code"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[on]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function an(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polyline",{points:"16 18 22 12 16 6"}],["polyline",{points:"8 6 2 12 8 18"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class cn extends Ge{constructor(e){super(),Re(this,e,an,rn,je,{})}}function un(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function fn(o){let e,s;const t=[{name:"copy"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[un]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function dn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class Gl extends Ge{constructor(e){super(),Re(this,e,dn,fn,je,{})}}function mn(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function hn(o){let e,s;const t=[{name:"download"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[mn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function gn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"7 10 12 15 17 10"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class $l extends Ge{constructor(e){super(),Re(this,e,gn,hn,je,{})}}function _n(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function pn(o){let e,s;const t=[{name:"loader-2"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[_n]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function bn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class vn extends Ge{constructor(e){super(),Re(this,e,bn,pn,je,{})}}function kn(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function yn(o){let e,s;const t=[{name:"more-horizontal"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[kn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function $n(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class wn extends Ge{constructor(e){super(),Re(this,e,$n,yn,je,{})}}function En(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function Nn(o){let e,s;const t=[{name:"panels-top-left"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[En]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function In(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M9 21V9"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class Tn extends Ge{constructor(e){super(),Re(this,e,In,Nn,je,{})}}function Dn(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function Sn(o){let e,s;const t=[{name:"pause"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Dn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function Vn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["rect",{width:"4",height:"16",x:"6",y:"4"}],["rect",{width:"4",height:"16",x:"14",y:"4"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class Cn extends Ge{constructor(e){super(),Re(this,e,Vn,Sn,je,{})}}function An(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function Pn(o){let e,s;const t=[{name:"play"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[An]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function Un(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"5 3 19 12 5 21 5 3"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class cl extends Ge{constructor(e){super(),Re(this,e,Un,Pn,je,{})}}function On(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function Ln(o){let e,s;const t=[{name:"share"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[On]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function xn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}],["polyline",{points:"16 6 12 2 8 6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class wl extends Ge{constructor(e){super(),Re(this,e,xn,Ln,je,{})}}function zn(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function Mn(o){let e,s;const t=[{name:"skip-back"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[zn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function Bn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"19 20 9 12 19 4 19 20"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class jn extends Ge{constructor(e){super(),Re(this,e,Bn,Mn,je,{})}}function Hn(o){let e;const s=o[2].default,t=Ke(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&Je(t,s,l,l[3],e?Ye(s,l[3],n,null):Xe(l[3]),null)},i(l){e||(v(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function Fn(o){let e,s;const t=[{name:"skip-forward"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Hn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=x(l,t[n]);return e=new ot({props:l}),{c(){te(e.$$.fragment)},l(n){ee(e.$$.fragment,n)},m(n,r){Z(e,n,r),s=!0},p(n,[r]){const i=r&3?qe(t,[t[0],r&2&&st(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(v(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){Q(e,n)}}}function Wn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"5 4 15 12 5 20 5 4"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19"}]];return o.$$set=r=>{s(1,e=x(x({},e),ce(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ce(e),[n,e,t,l]}class Gn extends Ge{constructor(e){super(),Re(this,e,Wn,Fn,je,{})}}function El(o,e,s){const t=o.slice();return t[62]=e[s],t}function Nl(o,e,s){const t=o.slice();return t[54]=e[s],t}function Il(o,e,s){const t=o.slice();return t[57]=e[s],t}function Tl(o,e,s){const t=o.slice();return t[57]=e[s],t}function Dl(o){let e;return{c(){e=m("span"),this.h()},l(s){e=d(s,"SPAN",{class:!0}),h(e).forEach(u),this.h()},h(){c(e,"class","flash-sweep svelte-10276gt")},m(s,t){se(s,e,t)},d(s){s&&u(e)}}}function Rn(o){let e,s,t,l,n='<h2 class="text-2xl font-semibold text-gray-900">Integration Code</h2> <p class="text-sm text-gray-600 mt-1">Python code to reproduce your actions via the API</p>',r,i,f,p,N,k=o[2].length>0&&Sl(o);const g=[Jn,Kn],_=[];function b($,w){return $[2].length===0?0:1}return f=b(o),p=_[f]=g[f](o),{c(){e=m("div"),s=m("div"),t=m("div"),l=m("div"),l.innerHTML=n,r=T(),k&&k.c(),i=T(),p.c(),this.h()},l($){e=d($,"DIV",{class:!0});var w=h(e);s=d(w,"DIV",{class:!0});var D=h(s);t=d(D,"DIV",{class:!0});var O=h(t);l=d(O,"DIV",{"data-svelte-h":!0}),nt(l)!=="svelte-jwt4ug"&&(l.innerHTML=n),r=I(O),k&&k.l(O),O.forEach(u),i=I(D),p.l(D),D.forEach(u),w.forEach(u),this.h()},h(){c(t,"class","flex items-center justify-between mb-6"),c(s,"class","max-w-4xl mx-auto p-8"),c(e,"class","flex-1 bg-gray-50 overflow-y-auto")},m($,w){se($,e,w),a(e,s),a(s,t),a(t,l),a(t,r),k&&k.m(t,null),a(s,i),_[f].m(s,null),N=!0},p($,w){$[2].length>0?k?(k.p($,w),w[0]&4&&v(k,1)):(k=Sl($),k.c(),v(k,1),k.m(t,null)):k&&(bt(),y(k,1,1,()=>{k=null}),pt());let D=f;f=b($),f===D?_[f].p($,w):(bt(),y(_[D],1,1,()=>{_[D]=null}),pt(),p=_[f],p?p.p($,w):(p=_[f]=g[f]($),p.c()),v(p,1),p.m(s,null))},i($){N||(v(k),v(p),N=!0)},o($){y(k),y(p),N=!1},d($){$&&u(e),k&&k.d(),_[f].d()}}}function qn(o){let e,s,t,l,n,r,i,f,p,N=o[0].length+"",k,g,_,b,$,w,D,O,oe,F,P,L,V="Model",B,j,W,U,G,S,re,q,K,$e='<h3 class="font-medium text-gray-900">Voice</h3>',de,he,R,C,ie='<div class="flex items-center gap-2"><div class="w-8 h-8 bg-gray-400 rounded-full flex items-center justify-center text-white text-xs font-medium">+</div> <span class="text-sm font-medium text-gray-600">Clone your voice</span></div> <div class="text-xs text-gray-400">(coming soon)</div>',Ie,ue,Te,De,fe,He="Speed",Oe,Ae,we=o[11].toFixed(1)+"",_e,Pe,Tt,ke,Qe,Ze,Fe="<span>0.5x</span> <span>2.0x</span>",rt,H,ne,Se,Ee="Stability",Ue,Le,at=(o[12]*100).toFixed(0)+"",vt,Ct,Ot,pe,it,We,ct,dt,mt="Similarity",ht,gt,et=(o[13]*100).toFixed(0)+"",ut,Lt,xe,ze,Bt,kt,Me,yt,Rt="Style",_t,Dt,ye=o[14]===0?"None":"Exaggerated",A,me,be,Ve,jt,Ht,ge=o[5]==="local"&&Al();const xt=[Yn,Xn],ft=[];function zt(E,J){return E[7]?0:1}$=zt(o),w=ft[$]=xt[$](o);let ve=o[8]&&Pl(o),tt=Nt(o[21]),Ne=[];for(let E=0;E<tt.length;E+=1)Ne[E]=Ll(Tl(o,tt,E));G=new sn({props:{size:16,class:"text-gray-500"}});let Ce=o[6]&&xl(o),$t=Nt(o[22]),X=[];for(let E=0;E<$t.length;E+=1)X[E]=Ml(Nl(o,$t,E));const Jt=E=>y(X[E],1,1,()=>{X[E]=null});return{c(){e=m("div"),s=m("div"),ge&&ge.c(),t=T(),l=m("div"),n=m("textarea"),r=T(),i=m("div"),f=m("div"),p=m("span"),k=M(N),g=M(" / 5,000 characters"),_=T(),b=m("button"),w.c(),O=T(),ve&&ve.c(),oe=T(),F=m("div"),P=m("div"),L=m("h3"),L.textContent=V,B=T(),j=m("button"),W=m("span");for(let E=0;E<Ne.length;E+=1)Ne[E].c();U=T(),te(G.$$.fragment),S=T(),Ce&&Ce.c(),re=T(),q=m("div"),K=m("div"),K.innerHTML=$e,de=T(),he=m("div");for(let E=0;E<X.length;E+=1)X[E].c();R=T(),C=m("button"),C.innerHTML=ie,Ie=T(),ue=m("div"),Te=m("div"),De=m("div"),fe=m("label"),fe.textContent=He,Oe=T(),Ae=m("span"),_e=M(we),Pe=M("x"),Tt=T(),ke=m("input"),Qe=T(),Ze=m("div"),Ze.innerHTML=Fe,rt=T(),H=m("div"),ne=m("div"),Se=m("label"),Se.textContent=Ee,Ue=T(),Le=m("span"),vt=M(at),Ct=M("%"),Ot=T(),pe=m("input"),it=T(),We=m("div"),ct=m("div"),dt=m("label"),dt.textContent=mt,ht=T(),gt=m("span"),ut=M(et),Lt=M("%"),xe=T(),ze=m("input"),Bt=T(),kt=m("div"),Me=m("div"),yt=m("label"),yt.textContent=Rt,_t=T(),Dt=m("span"),A=M(ye),me=T(),be=m("input"),this.h()},l(E){e=d(E,"DIV",{class:!0});var J=h(e);s=d(J,"DIV",{class:!0});var ae=h(s);ge&&ge.l(ae),t=I(ae),l=d(ae,"DIV",{class:!0});var Y=h(l);n=d(Y,"TEXTAREA",{class:!0,placeholder:!0}),h(n).forEach(u),Y.forEach(u),r=I(ae),i=d(ae,"DIV",{class:!0});var lt=h(i);f=d(lt,"DIV",{class:!0});var qt=h(f);p=d(qt,"SPAN",{class:!0});var wt=h(p);k=z(wt,N),g=z(wt," / 5,000 characters"),wt.forEach(u),qt.forEach(u),_=I(lt),b=d(lt,"BUTTON",{class:!0});var Ft=h(b);w.l(Ft),Ft.forEach(u),lt.forEach(u),O=I(ae),ve&&ve.l(ae),ae.forEach(u),oe=I(J),F=d(J,"DIV",{class:!0});var St=h(F);P=d(St,"DIV",{class:!0});var Vt=h(P);L=d(Vt,"H3",{class:!0,"data-svelte-h":!0}),nt(L)!=="svelte-b3hs3r"&&(L.textContent=V),B=I(Vt),j=d(Vt,"BUTTON",{class:!0});var Xt=h(j);W=d(Xt,"SPAN",{});var gl=h(W);for(let Mt=0;Mt<Ne.length;Mt+=1)Ne[Mt].l(gl);gl.forEach(u),U=I(Xt),ee(G.$$.fragment,Xt),Xt.forEach(u),S=I(Vt),Ce&&Ce.l(Vt),Vt.forEach(u),re=I(St),q=d(St,"DIV",{class:!0});var Yt=h(q);K=d(Yt,"DIV",{class:!0,"data-svelte-h":!0}),nt(K)!=="svelte-182x1ki"&&(K.innerHTML=$e),de=I(Yt),he=d(Yt,"DIV",{class:!0});var Qt=h(he);for(let Mt=0;Mt<X.length;Mt+=1)X[Mt].l(Qt);R=I(Qt),C=d(Qt,"BUTTON",{class:!0,"data-svelte-h":!0}),nt(C)!=="svelte-20x663"&&(C.innerHTML=ie),Qt.forEach(u),Yt.forEach(u),Ie=I(St),ue=d(St,"DIV",{class:!0});var At=h(ue);Te=d(At,"DIV",{});var Wt=h(Te);De=d(Wt,"DIV",{class:!0});var Zt=h(De);fe=d(Zt,"LABEL",{class:!0,"data-svelte-h":!0}),nt(fe)!=="svelte-9vcpiu"&&(fe.textContent=He),Oe=I(Zt),Ae=d(Zt,"SPAN",{class:!0});var ul=h(Ae);_e=z(ul,we),Pe=z(ul,"x"),ul.forEach(u),Zt.forEach(u),Tt=I(Wt),ke=d(Wt,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),Qe=I(Wt),Ze=d(Wt,"DIV",{class:!0,"data-svelte-h":!0}),nt(Ze)!=="svelte-4ydm1m"&&(Ze.innerHTML=Fe),Wt.forEach(u),rt=I(At),H=d(At,"DIV",{});var el=h(H);ne=d(el,"DIV",{class:!0});var tl=h(ne);Se=d(tl,"LABEL",{class:!0,"data-svelte-h":!0}),nt(Se)!=="svelte-1lgjete"&&(Se.textContent=Ee),Ue=I(tl),Le=d(tl,"SPAN",{class:!0});var fl=h(Le);vt=z(fl,at),Ct=z(fl,"%"),fl.forEach(u),tl.forEach(u),Ot=I(el),pe=d(el,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),el.forEach(u),it=I(At),We=d(At,"DIV",{});var ll=h(We);ct=d(ll,"DIV",{class:!0});var nl=h(ct);dt=d(nl,"LABEL",{class:!0,"data-svelte-h":!0}),nt(dt)!=="svelte-1ha0vec"&&(dt.textContent=mt),ht=I(nl),gt=d(nl,"SPAN",{class:!0});var dl=h(gt);ut=z(dl,et),Lt=z(dl,"%"),dl.forEach(u),nl.forEach(u),xe=I(ll),ze=d(ll,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),ll.forEach(u),Bt=I(At),kt=d(At,"DIV",{});var sl=h(kt);Me=d(sl,"DIV",{class:!0});var ol=h(Me);yt=d(ol,"LABEL",{class:!0,"data-svelte-h":!0}),nt(yt)!=="svelte-1ata0tk"&&(yt.textContent=Rt),_t=I(ol),Dt=d(ol,"SPAN",{class:!0});var _l=h(Dt);A=z(_l,ye),_l.forEach(u),ol.forEach(u),me=I(sl),be=d(sl,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),sl.forEach(u),At.forEach(u),St.forEach(u),J.forEach(u),this.h()},h(){c(n,"class","w-full h-full p-6 bg-white resize-none border-0 focus:outline-none text-gray-900 text-base leading-relaxed"),c(n,"placeholder","Welcome to our text to speech demo. This technology can transform any written content into natural sounding audio."),c(l,"class","flex-1 pb-24"),c(p,"class","text-sm text-gray-500"),c(f,"class","flex items-center justify-between mb-3"),b.disabled=D=o[7]||!o[0].trim(),c(b,"class","w-full px-6 py-3 bg-gradient-to-r from-amber-400 to-orange-500 text-white rounded-lg font-medium hover:from-amber-500 hover:to-orange-600 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 shadow-sm"),c(i,"class","fixed bottom-0 left-56 right-80 p-4 bg-white border-t border-gray-200"),c(s,"class","flex-1 flex flex-col p-6"),c(L,"class","font-medium text-gray-900 mb-3"),c(j,"class","w-full p-3 border border-gray-200 rounded-lg bg-white text-sm focus:outline-none focus:ring-2 focus:ring-amber-400 focus:border-transparent appearance-none bg-no-repeat bg-right pr-10 shadow-sm text-left flex items-center justify-between"),c(P,"class","mb-6 relative model-dropdown"),c(K,"class","mb-3"),c(C,"class","w-full flex items-center justify-between p-2 rounded-md opacity-50 cursor-not-allowed text-left"),C.disabled=!0,c(he,"class","space-y-1"),c(q,"class","mb-6"),c(fe,"class","text-sm font-medium text-gray-700"),c(Ae,"class","text-sm text-gray-500"),c(De,"class","flex justify-between mb-1"),c(ke,"type","range"),c(ke,"min","0.5"),c(ke,"max","2"),c(ke,"step","0.1"),c(ke,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(Ze,"class","flex justify-between text-xs text-gray-400 mt-1"),c(Se,"class","text-sm font-medium text-gray-700"),c(Le,"class","text-sm text-gray-500"),c(ne,"class","flex justify-between mb-1"),c(pe,"type","range"),c(pe,"min","0"),c(pe,"max","1"),c(pe,"step","0.01"),c(pe,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(dt,"class","text-sm font-medium text-gray-700"),c(gt,"class","text-sm text-gray-500"),c(ct,"class","flex justify-between mb-1"),c(ze,"type","range"),c(ze,"min","0"),c(ze,"max","1"),c(ze,"step","0.01"),c(ze,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(yt,"class","text-sm font-medium text-gray-700"),c(Dt,"class","text-sm text-gray-500"),c(Me,"class","flex justify-between mb-1"),c(be,"type","range"),c(be,"min","0"),c(be,"max","1"),c(be,"step","1"),c(be,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(ue,"class","space-y-4 pt-4 border-t border-gray-200"),c(F,"class","w-80 border-l border-gray-200 bg-white p-4 overflow-y-auto"),c(e,"class","flex-1 flex")},m(E,J){se(E,e,J),a(e,s),ge&&ge.m(s,null),a(s,t),a(s,l),a(l,n),Et(n,o[0]),a(s,r),a(s,i),a(i,f),a(f,p),a(p,k),a(p,g),a(i,_),a(i,b),ft[$].m(b,null),a(s,O),ve&&ve.m(s,null),a(e,oe),a(e,F),a(F,P),a(P,L),a(P,B),a(P,j),a(j,W);for(let ae=0;ae<Ne.length;ae+=1)Ne[ae]&&Ne[ae].m(W,null);a(j,U),Z(G,j,null),a(P,S),Ce&&Ce.m(P,null),a(F,re),a(F,q),a(q,K),a(q,de),a(q,he);for(let ae=0;ae<X.length;ae+=1)X[ae]&&X[ae].m(he,null);a(he,R),a(he,C),a(F,Ie),a(F,ue),a(ue,Te),a(Te,De),a(De,fe),a(De,Oe),a(De,Ae),a(Ae,_e),a(Ae,Pe),a(Te,Tt),a(Te,ke),Et(ke,o[11]),a(Te,Qe),a(Te,Ze),a(ue,rt),a(ue,H),a(H,ne),a(ne,Se),a(ne,Ue),a(ne,Le),a(Le,vt),a(Le,Ct),a(H,Ot),a(H,pe),Et(pe,o[12]),a(ue,it),a(ue,We),a(We,ct),a(ct,dt),a(ct,ht),a(ct,gt),a(gt,ut),a(gt,Lt),a(We,xe),a(We,ze),Et(ze,o[13]),a(ue,Bt),a(ue,kt),a(kt,Me),a(Me,yt),a(Me,_t),a(Me,Dt),a(Dt,A),a(kt,me),a(kt,be),Et(be,o[14]),Ve=!0,jt||(Ht=[le(n,"input",o[39]),le(b,"click",o[23]),le(j,"click",o[41]),le(ke,"change",o[45]),le(ke,"input",o[45]),le(pe,"change",o[46]),le(pe,"input",o[46]),le(ze,"change",o[47]),le(ze,"input",o[47]),le(be,"change",o[48]),le(be,"input",o[48])],jt=!0)},p(E,J){E[5]==="local"?ge?J[0]&32&&v(ge,1):(ge=Al(),ge.c(),v(ge,1),ge.m(s,t)):ge&&(bt(),y(ge,1,1,()=>{ge=null}),pt()),J[0]&1&&Et(n,E[0]),(!Ve||J[0]&1)&&N!==(N=E[0].length+"")&&Be(k,N);let ae=$;if($=zt(E),$!==ae&&(bt(),y(ft[ae],1,1,()=>{ft[ae]=null}),pt(),w=ft[$],w||(w=ft[$]=xt[$](E),w.c()),v(w,1),w.m(b,null)),(!Ve||J[0]&129&&D!==(D=E[7]||!E[0].trim()))&&(b.disabled=D),E[8]?ve?(ve.p(E,J),J[0]&256&&v(ve,1)):(ve=Pl(E),ve.c(),v(ve,1),ve.m(s,null)):ve&&(bt(),y(ve,1,1,()=>{ve=null}),pt()),J[0]&2097168){tt=Nt(E[21]);let Y;for(Y=0;Y<tt.length;Y+=1){const lt=Tl(E,tt,Y);Ne[Y]?Ne[Y].p(lt,J):(Ne[Y]=Ll(lt),Ne[Y].c(),Ne[Y].m(W,null))}for(;Y<Ne.length;Y+=1)Ne[Y].d(1);Ne.length=tt.length}if(E[6]?Ce?Ce.p(E,J):(Ce=xl(E),Ce.c(),Ce.m(P,null)):Ce&&(Ce.d(1),Ce=null),J[0]&1078984712){$t=Nt(E[22]);let Y;for(Y=0;Y<$t.length;Y+=1){const lt=Nl(E,$t,Y);X[Y]?(X[Y].p(lt,J),v(X[Y],1)):(X[Y]=Ml(lt),X[Y].c(),v(X[Y],1),X[Y].m(he,R))}for(bt(),Y=$t.length;Y<X.length;Y+=1)Jt(Y);pt()}(!Ve||J[0]&2048)&&we!==(we=E[11].toFixed(1)+"")&&Be(_e,we),J[0]&2048&&Et(ke,E[11]),(!Ve||J[0]&4096)&&at!==(at=(E[12]*100).toFixed(0)+"")&&Be(vt,at),J[0]&4096&&Et(pe,E[12]),(!Ve||J[0]&8192)&&et!==(et=(E[13]*100).toFixed(0)+"")&&Be(ut,et),J[0]&8192&&Et(ze,E[13]),(!Ve||J[0]&16384)&&ye!==(ye=E[14]===0?"None":"Exaggerated")&&Be(A,ye),J[0]&16384&&Et(be,E[14])},i(E){if(!Ve){v(ge),v(w),v(ve),v(G.$$.fragment,E);for(let J=0;J<$t.length;J+=1)v(X[J]);Ve=!0}},o(E){y(ge),y(w),y(ve),y(G.$$.fragment,E),X=X.filter(Boolean);for(let J=0;J<X.length;J+=1)y(X[J]);Ve=!1},d(E){E&&u(e),ge&&ge.d(),ft[$].d(),ve&&ve.d(),al(Ne,E),Q(G),Ce&&Ce.d(),al(X,E),jt=!1,Gt(Ht)}}}function Sl(o){let e,s,t,l,n,r;return s=new Gl({props:{size:16}}),{c(){e=m("button"),te(s.$$.fragment),t=M(`
7
+ Copy All`),this.h()},l(i){e=d(i,"BUTTON",{class:!0});var f=h(e);ee(s.$$.fragment,f),t=z(f,`
8
+ Copy All`),f.forEach(u),this.h()},h(){c(e,"class","flex items-center gap-2 px-4 py-2 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors")},m(i,f){se(i,e,f),Z(s,e,null),a(e,t),l=!0,n||(r=le(e,"click",o[33]),n=!0)},p:It,i(i){l||(v(s.$$.fragment,i),l=!0)},o(i){y(s.$$.fragment,i),l=!1},d(i){i&&u(e),Q(s),n=!1,r()}}}function Kn(o){let e,s=[],t=new Map,l,n=Nt(o[2]);const r=i=>i[62].id;for(let i=0;i<n.length;i+=1){let f=El(o,n,i),p=r(f);t.set(p,s[i]=Cl(p,f))}return{c(){e=m("div");for(let i=0;i<s.length;i+=1)s[i].c();this.h()},l(i){e=d(i,"DIV",{class:!0});var f=h(e);for(let p=0;p<s.length;p+=1)s[p].l(f);f.forEach(u),this.h()},h(){c(e,"class","space-y-4")},m(i,f){se(i,e,f);for(let p=0;p<s.length;p+=1)s[p]&&s[p].m(e,null);l=!0},p(i,f){f[0]&4|f[1]&2&&(n=Nt(i[2]),bt(),s=Kl(s,f,r,1,i,n,t,e,ql,Cl,null,El),pt())},i(i){if(!l){for(let f=0;f<n.length;f+=1)v(s[f]);l=!0}},o(i){for(let f=0;f<s.length;f+=1)y(s[f]);l=!1},d(i){i&&u(e);for(let f=0;f<s.length;f+=1)s[f].d()}}}function Jn(o){let e,s='<p class="text-gray-500">Start using the UI to see generated code here</p>';return{c(){e=m("div"),e.innerHTML=s,this.h()},l(t){e=d(t,"DIV",{class:!0,"data-svelte-h":!0}),nt(e)!=="svelte-1dkp70o"&&(e.innerHTML=s),this.h()},h(){c(e,"class","bg-white rounded-lg border border-gray-200 p-8 text-center")},m(t,l){se(t,e,l)},p:It,i:It,o:It,d(t){t&&u(e)}}}function Vl(o){let e,s=o[62].output+"",t;return{c(){e=m("div"),t=M(s),this.h()},l(l){e=d(l,"DIV",{class:!0});var n=h(e);t=z(n,s),n.forEach(u),this.h()},h(){c(e,"class","px-4 py-2 bg-gray-900 text-green-400 font-mono text-xs border-t border-gray-200")},m(l,n){se(l,e,n),a(e,t)},p(l,n){n[0]&4&&s!==(s=l[62].output+"")&&Be(t,s)},d(l){l&&u(e)}}}function Cl(o,e){let s,t,l,n,r=e[62].title+"",i,f,p,N=e[62].timestamp+"",k,g,_,b,$,w,D,O,oe=e[62].code+"",F,P,L,V,B,j;b=new Gl({props:{size:14,class:"text-gray-600"}});function W(){return e[49](e[62])}let U=e[62].output&&Vl(e);return{key:o,first:null,c(){s=m("div"),t=m("div"),l=m("div"),n=m("span"),i=M(r),f=T(),p=m("span"),k=M(N),g=T(),_=m("button"),te(b.$$.fragment),$=T(),w=m("div"),D=m("pre"),O=m("code"),F=M(oe),P=T(),U&&U.c(),L=T(),this.h()},l(G){s=d(G,"DIV",{class:!0});var S=h(s);t=d(S,"DIV",{class:!0});var re=h(t);l=d(re,"DIV",{class:!0});var q=h(l);n=d(q,"SPAN",{class:!0});var K=h(n);i=z(K,r),K.forEach(u),f=I(q),p=d(q,"SPAN",{class:!0});var $e=h(p);k=z($e,N),$e.forEach(u),q.forEach(u),g=I(re),_=d(re,"BUTTON",{class:!0,title:!0});var de=h(_);ee(b.$$.fragment,de),de.forEach(u),re.forEach(u),$=I(S),w=d(S,"DIV",{class:!0});var he=h(w);D=d(he,"PRE",{class:!0});var R=h(D);O=d(R,"CODE",{class:!0});var C=h(O);F=z(C,oe),C.forEach(u),R.forEach(u),he.forEach(u),P=I(S),U&&U.l(S),L=I(S),S.forEach(u),this.h()},h(){c(n,"class","text-sm font-medium text-gray-700"),c(p,"class","text-xs text-gray-500"),c(l,"class","flex items-center gap-3"),c(_,"class","p-1.5 hover:bg-gray-200 rounded transition-colors"),c(_,"title","Copy code"),c(t,"class","flex items-center justify-between px-4 py-2 bg-gray-50 border-b border-gray-200"),c(O,"class","language-python text-sm font-mono"),c(D,"class","p-4 overflow-x-auto bg-gray-50 text-gray-900"),c(w,"class","relative"),c(s,"class","bg-white rounded-lg border border-gray-200 overflow-hidden"),this.first=s},m(G,S){se(G,s,S),a(s,t),a(t,l),a(l,n),a(n,i),a(l,f),a(l,p),a(p,k),a(t,g),a(t,_),Z(b,_,null),a(s,$),a(s,w),a(w,D),a(D,O),a(O,F),a(s,P),U&&U.m(s,null),a(s,L),V=!0,B||(j=le(_,"click",W),B=!0)},p(G,S){e=G,(!V||S[0]&4)&&r!==(r=e[62].title+"")&&Be(i,r),(!V||S[0]&4)&&N!==(N=e[62].timestamp+"")&&Be(k,N),(!V||S[0]&4)&&oe!==(oe=e[62].code+"")&&Be(F,oe),e[62].output?U?U.p(e,S):(U=Vl(e),U.c(),U.m(s,L)):U&&(U.d(1),U=null)},i(G){V||(v(b.$$.fragment,G),V=!0)},o(G){y(b.$$.fragment,G),V=!1},d(G){G&&u(s),Q(b),U&&U.d(),B=!1,j()}}}function Al(o){let e,s,t,l,n='<p class="font-medium text-blue-900">To run locally:</p> <code class="text-xs bg-blue-100 px-1.5 py-0.5 rounded">pip install hfstudio</code> <span class="text-blue-700">and run</span> <code class="text-xs bg-blue-100 px-1.5 py-0.5 rounded">hfstudio</code> <span class="text-blue-700">from your terminal</span>',r;return s=new en({props:{size:18,class:"text-blue-600 mt-0.5 flex-shrink-0"}}),{c(){e=m("div"),te(s.$$.fragment),t=T(),l=m("div"),l.innerHTML=n,this.h()},l(i){e=d(i,"DIV",{class:!0});var f=h(e);ee(s.$$.fragment,f),t=I(f),l=d(f,"DIV",{class:!0,"data-svelte-h":!0}),nt(l)!=="svelte-p3cqs1"&&(l.innerHTML=n),f.forEach(u),this.h()},h(){c(l,"class","text-sm"),c(e,"class","mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg flex items-start gap-2")},m(i,f){se(i,e,f),Z(s,e,null),a(e,t),a(e,l),r=!0},i(i){r||(v(s.$$.fragment,i),r=!0)},o(i){y(s.$$.fragment,i),r=!1},d(i){i&&u(e),Q(s)}}}function Xn(o){let e,s,t;return e=new cl({props:{size:20}}),{c(){te(e.$$.fragment),s=M(`
9
+ Generate speech`)},l(l){ee(e.$$.fragment,l),s=z(l,`
10
+ Generate speech`)},m(l,n){Z(e,l,n),se(l,s,n),t=!0},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){l&&u(s),Q(e,l)}}}function Yn(o){let e,s,t;return e=new vn({props:{size:20,class:"animate-spin"}}),{c(){te(e.$$.fragment),s=M(`
11
+ Generating...`)},l(l){ee(e.$$.fragment,l),s=z(l,`
12
+ Generating...`)},m(l,n){Z(e,l,n),se(l,s,n),t=!0},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){l&&u(s),Q(e,l)}}}function Pl(o){let e,s,t,l,n,r,i,f,p,N,k,g,_,b,$,w,D,O="Share",oe,F,P,L="Download",V,B,j,W,U,G,S,re,q,K,$e=Pt(o[16])+"",de,he,R,C,ie,Ie,ue=Pt(o[17])+"",Te,De,fe,He,Oe,Ae,we,_e,Pe,Tt,ke,Qe,Ze,Fe,rt,H=Pt(o[16])+"",ne,Se,Ee,Ue,Le,at,vt=Pt(o[17])+"",Ct,Ot,pe,it,We,ct,dt,mt,ht,gt,et,ut,Lt,xe,ze,Bt;$=new wl({props:{size:14,class:"text-gray-600"}}),B=new $l({props:{size:14,class:"text-gray-600"}});const kt=[Zn,Qn],Me=[];function yt(A,me){return A[15]?0:1}G=yt(o),S=Me[G]=kt[G](o),Oe=new jn({props:{size:20,class:"text-gray-600"}});const Rt=[ts,es],_t=[];function Dt(A,me){return A[15]?0:1}_e=Dt(o),Pe=_t[_e]=Rt[_e](o),Qe=new Gn({props:{size:20,class:"text-gray-600"}}),We=new wl({props:{size:14}}),ht=new $l({props:{size:16,class:"text-gray-600"}}),ut=new wn({props:{size:16,class:"text-gray-600"}});let ye=o[8]&&Ul(o);return{c(){e=m("div"),s=m("div"),t=m("div"),l=T(),n=m("div"),r=m("h3"),i=M(o[18]),f=T(),p=m("p"),N=M(o[3]),k=M(" β€’ Created 1 second ago"),g=T(),_=m("div"),b=m("button"),te($.$$.fragment),w=T(),D=m("span"),D.textContent=O,oe=T(),F=m("button"),P=m("span"),P.textContent=L,V=T(),te(B.$$.fragment),j=T(),W=m("div"),U=m("button"),S.c(),re=T(),q=m("div"),K=m("span"),de=M($e),he=T(),R=m("div"),C=m("div"),ie=T(),Ie=m("span"),Te=M(ue),De=T(),fe=m("div"),He=m("button"),te(Oe.$$.fragment),Ae=T(),we=m("button"),Pe.c(),Tt=T(),ke=m("button"),te(Qe.$$.fragment),Ze=T(),Fe=m("div"),rt=m("span"),ne=M(H),Se=T(),Ee=m("div"),Ue=m("div"),Le=T(),at=m("span"),Ct=M(vt),Ot=T(),pe=m("div"),it=m("button"),te(We.$$.fragment),ct=M(`
13
+ Share`),dt=T(),mt=m("button"),te(ht.$$.fragment),gt=T(),et=m("button"),te(ut.$$.fragment),Lt=T(),ye&&ye.c(),this.h()},l(A){e=d(A,"DIV",{class:!0});var me=h(e);s=d(me,"DIV",{class:!0});var be=h(s);t=d(be,"DIV",{class:!0}),h(t).forEach(u),l=I(be),n=d(be,"DIV",{class:!0});var Ve=h(n);r=d(Ve,"H3",{class:!0});var jt=h(r);i=z(jt,o[18]),jt.forEach(u),f=I(Ve),p=d(Ve,"P",{class:!0});var Ht=h(p);N=z(Ht,o[3]),k=z(Ht," β€’ Created 1 second ago"),Ht.forEach(u),Ve.forEach(u),g=I(be),_=d(be,"DIV",{class:!0});var ge=h(_);b=d(ge,"BUTTON",{class:!0});var xt=h(b);ee($.$$.fragment,xt),w=I(xt),D=d(xt,"SPAN",{class:!0,"data-svelte-h":!0}),nt(D)!=="svelte-hbn8gl"&&(D.textContent=O),xt.forEach(u),oe=I(ge),F=d(ge,"BUTTON",{class:!0});var ft=h(F);P=d(ft,"SPAN",{class:!0,"data-svelte-h":!0}),nt(P)!=="svelte-h01aeg"&&(P.textContent=L),V=I(ft),ee(B.$$.fragment,ft),ft.forEach(u),ge.forEach(u),be.forEach(u),j=I(me),W=d(me,"DIV",{class:!0});var zt=h(W);U=d(zt,"BUTTON",{class:!0});var ve=h(U);S.l(ve),ve.forEach(u),re=I(zt),q=d(zt,"DIV",{class:!0});var tt=h(q);K=d(tt,"SPAN",{class:!0});var Ne=h(K);de=z(Ne,$e),Ne.forEach(u),he=I(tt),R=d(tt,"DIV",{class:!0});var Ce=h(R);C=d(Ce,"DIV",{class:!0,style:!0}),h(C).forEach(u),Ce.forEach(u),ie=I(tt),Ie=d(tt,"SPAN",{class:!0});var $t=h(Ie);Te=z($t,ue),$t.forEach(u),tt.forEach(u),zt.forEach(u),De=I(me),fe=d(me,"DIV",{class:!0});var X=h(fe);He=d(X,"BUTTON",{class:!0,title:!0});var Jt=h(He);ee(Oe.$$.fragment,Jt),Jt.forEach(u),Ae=I(X),we=d(X,"BUTTON",{class:!0});var E=h(we);Pe.l(E),E.forEach(u),Tt=I(X),ke=d(X,"BUTTON",{class:!0,title:!0});var J=h(ke);ee(Qe.$$.fragment,J),J.forEach(u),Ze=I(X),Fe=d(X,"DIV",{class:!0});var ae=h(Fe);rt=d(ae,"SPAN",{class:!0});var Y=h(rt);ne=z(Y,H),Y.forEach(u),Se=I(ae),Ee=d(ae,"DIV",{class:!0});var lt=h(Ee);Ue=d(lt,"DIV",{class:!0,style:!0}),h(Ue).forEach(u),lt.forEach(u),Le=I(ae),at=d(ae,"SPAN",{class:!0});var qt=h(at);Ct=z(qt,vt),qt.forEach(u),ae.forEach(u),Ot=I(X),pe=d(X,"DIV",{class:!0});var wt=h(pe);it=d(wt,"BUTTON",{class:!0});var Ft=h(it);ee(We.$$.fragment,Ft),ct=z(Ft,`
14
+ Share`),Ft.forEach(u),dt=I(wt),mt=d(wt,"BUTTON",{class:!0,title:!0});var St=h(mt);ee(ht.$$.fragment,St),St.forEach(u),gt=I(wt),et=d(wt,"BUTTON",{class:!0,title:!0});var Vt=h(et);ee(ut.$$.fragment,Vt),Vt.forEach(u),wt.forEach(u),X.forEach(u),Lt=I(me),ye&&ye.l(me),me.forEach(u),this.h()},h(){c(t,"class","w-2 h-2 bg-green-500 rounded-full"),c(r,"class","font-medium text-gray-900 text-sm"),c(p,"class","text-xs text-gray-500"),c(n,"class","flex-1"),c(D,"class","text-gray-700"),c(b,"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"),c(P,"class","text-gray-700"),c(F,"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"),c(_,"class","flex items-center gap-2"),c(s,"class","flex items-center gap-3 mb-4"),c(U,"class","w-8 h-8 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),c(K,"class","text-xs text-gray-500 font-mono"),c(C,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Kt(C,"width",o[16]/o[17]*100+"%"),c(R,"class","flex-1 h-1 bg-gray-200 rounded-full cursor-pointer"),c(Ie,"class","text-xs text-gray-500 font-mono"),c(q,"class","flex-1 flex items-center gap-2"),c(W,"class","flex items-center gap-3 mb-4"),c(He,"class","p-2 hover:bg-gray-100 rounded-full"),c(He,"title","Skip back"),c(we,"class","w-12 h-12 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),c(ke,"class","p-2 hover:bg-gray-100 rounded-full"),c(ke,"title","Skip forward"),c(rt,"class","text-xs text-gray-500 font-mono"),c(Ue,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Kt(Ue,"width",o[16]/o[17]*100+"%"),c(Ee,"class","flex-1 h-1 bg-gray-200 rounded-full"),c(at,"class","text-xs text-gray-500 font-mono"),c(Fe,"class","flex-1 flex items-center gap-3"),c(it,"class","flex items-center gap-2 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50"),c(mt,"class","p-2 hover:bg-gray-100 rounded-md"),c(mt,"title","Download"),c(et,"class","p-2 hover:bg-gray-100 rounded-md"),c(et,"title","More options"),c(pe,"class","flex items-center gap-2"),c(fe,"class","flex items-center gap-4 mb-4"),c(e,"class","p-4 border border-gray-200 rounded-lg bg-white")},m(A,me){se(A,e,me),a(e,s),a(s,t),a(s,l),a(s,n),a(n,r),a(r,i),a(n,f),a(n,p),a(p,N),a(p,k),a(s,g),a(s,_),a(_,b),Z($,b,null),a(b,w),a(b,D),a(_,oe),a(_,F),a(F,P),a(F,V),Z(B,F,null),a(e,j),a(e,W),a(W,U),Me[G].m(U,null),a(W,re),a(W,q),a(q,K),a(K,de),a(q,he),a(q,R),a(R,C),a(q,ie),a(q,Ie),a(Ie,Te),a(e,De),a(e,fe),a(fe,He),Z(Oe,He,null),a(fe,Ae),a(fe,we),_t[_e].m(we,null),a(fe,Tt),a(fe,ke),Z(Qe,ke,null),a(fe,Ze),a(fe,Fe),a(Fe,rt),a(rt,ne),a(Fe,Se),a(Fe,Ee),a(Ee,Ue),a(Fe,Le),a(Fe,at),a(at,Ct),a(fe,Ot),a(fe,pe),a(pe,it),Z(We,it,null),a(it,ct),a(pe,dt),a(pe,mt),Z(ht,mt,null),a(pe,gt),a(pe,et),Z(ut,et,null),a(e,Lt),ye&&ye.m(e,null),xe=!0,ze||(Bt=[le(b,"click",jl),le(F,"click",o[29]),le(U,"click",o[24]),le(we,"click",o[24]),le(it,"click",jl),le(mt,"click",o[29])],ze=!0)},p(A,me){(!xe||me[0]&262144)&&Be(i,A[18]),(!xe||me[0]&8)&&Be(N,A[3]);let be=G;G=yt(A),G!==be&&(bt(),y(Me[be],1,1,()=>{Me[be]=null}),pt(),S=Me[G],S||(S=Me[G]=kt[G](A),S.c()),v(S,1),S.m(U,null)),(!xe||me[0]&65536)&&$e!==($e=Pt(A[16])+"")&&Be(de,$e),(!xe||me[0]&196608)&&Kt(C,"width",A[16]/A[17]*100+"%"),(!xe||me[0]&131072)&&ue!==(ue=Pt(A[17])+"")&&Be(Te,ue);let Ve=_e;_e=Dt(A),_e!==Ve&&(bt(),y(_t[Ve],1,1,()=>{_t[Ve]=null}),pt(),Pe=_t[_e],Pe||(Pe=_t[_e]=Rt[_e](A),Pe.c()),v(Pe,1),Pe.m(we,null)),(!xe||me[0]&65536)&&H!==(H=Pt(A[16])+"")&&Be(ne,H),(!xe||me[0]&196608)&&Kt(Ue,"width",A[16]/A[17]*100+"%"),(!xe||me[0]&131072)&&vt!==(vt=Pt(A[17])+"")&&Be(Ct,vt),A[8]?ye?ye.p(A,me):(ye=Ul(A),ye.c(),ye.m(e,null)):ye&&(ye.d(1),ye=null)},i(A){xe||(v($.$$.fragment,A),v(B.$$.fragment,A),v(S),v(Oe.$$.fragment,A),v(Pe),v(Qe.$$.fragment,A),v(We.$$.fragment,A),v(ht.$$.fragment,A),v(ut.$$.fragment,A),xe=!0)},o(A){y($.$$.fragment,A),y(B.$$.fragment,A),y(S),y(Oe.$$.fragment,A),y(Pe),y(Qe.$$.fragment,A),y(We.$$.fragment,A),y(ht.$$.fragment,A),y(ut.$$.fragment,A),xe=!1},d(A){A&&u(e),Q($),Q(B),Me[G].d(),Q(Oe),_t[_e].d(),Q(Qe),Q(We),Q(ht),Q(ut),ye&&ye.d(),ze=!1,Gt(Bt)}}}function Qn(o){let e,s;return e=new cl({props:{size:14,class:"text-white ml-0.5"}}),{c(){te(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,l){Z(e,t,l),s=!0},i(t){s||(v(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){Q(e,t)}}}function Zn(o){let e;return{c(){e=m("div"),this.h()},l(s){e=d(s,"DIV",{class:!0}),h(e).forEach(u),this.h()},h(){c(e,"class","pause-filled text-white")},m(s,t){se(s,e,t)},i:It,o:It,d(s){s&&u(e)}}}function es(o){let e,s;return e=new cl({props:{size:20,class:"text-white ml-0.5"}}),{c(){te(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,l){Z(e,t,l),s=!0},i(t){s||(v(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){Q(e,t)}}}function ts(o){let e;return{c(){e=m("div"),this.h()},l(s){e=d(s,"DIV",{class:!0}),h(e).forEach(u),this.h()},h(){c(e,"class","pause-filled text-white scale-150")},m(s,t){se(s,e,t)},i:It,o:It,d(s){s&&u(e)}}}function Ul(o){let e,s,t,l;return{c(){e=m("audio"),this.h()},l(n){e=d(n,"AUDIO",{src:!0,style:!0}),h(e).forEach(u),this.h()},h(){bl(e.src,s=o[8])||c(e,"src",s),Kt(e,"display","none")},m(n,r){se(n,e,r),o[40](e),t||(l=[le(e,"loadedmetadata",o[25]),le(e,"timeupdate",o[26]),le(e,"play",o[27]),le(e,"pause",o[28])],t=!0)},p(n,r){r[0]&256&&!bl(e.src,s=n[8])&&c(e,"src",s)},d(n){n&&u(e),o[40](null),t=!1,Gt(l)}}}function Ol(o){let e=o[57].name+"",s,t,l=o[57].badge&&ls(o);return{c(){s=M(e),l&&l.c(),t=Ut()},l(n){s=z(n,e),l&&l.l(n),t=Ut()},m(n,r){se(n,s,r),l&&l.m(n,r),se(n,t,r)},p(n,r){n[57].badge&&l.p(n,r)},d(n){n&&(u(s),u(t)),l&&l.d(n)}}}function ls(o){let e,s,t,l=o[57].badge+"",n,r;return{c(){e=M("Β "),s=m("span"),t=M("("),n=M(l),r=M(")"),this.h()},l(i){e=z(i,"Β "),s=d(i,"SPAN",{class:!0});var f=h(s);t=z(f,"("),n=z(f,l),r=z(f,")"),f.forEach(u),this.h()},h(){c(s,"class","text-xs text-gray-500")},m(i,f){se(i,e,f),se(i,s,f),a(s,t),a(s,n),a(s,r)},p:It,d(i){i&&(u(e),u(s))}}}function Ll(o){let e,s=o[57].name===o[4]&&Ol(o);return{c(){s&&s.c(),e=Ut()},l(t){s&&s.l(t),e=Ut()},m(t,l){s&&s.m(t,l),se(t,e,l)},p(t,l){t[57].name===t[4]?s?s.p(t,l):(s=Ol(t),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null)},d(t){t&&u(e),s&&s.d(t)}}}function xl(o){let e,s=Nt(o[21]),t=[];for(let l=0;l<s.length;l+=1)t[l]=zl(Il(o,s,l));return{c(){e=m("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=d(l,"DIV",{class:!0});var n=h(e);for(let r=0;r<t.length;r+=1)t[r].l(n);n.forEach(u),this.h()},h(){c(e,"class","absolute top-full left-0 right-0 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg z-10")},m(l,n){se(l,e,n);for(let r=0;r<t.length;r+=1)t[r]&&t[r].m(e,null)},p(l,n){if(n[0]&2097232){s=Nt(l[21]);let r;for(r=0;r<s.length;r+=1){const i=Il(l,s,r);t[r]?t[r].p(i,n):(t[r]=zl(i),t[r].c(),t[r].m(e,null))}for(;r<t.length;r+=1)t[r].d(1);t.length=s.length}},d(l){l&&u(e),al(t,l)}}}function ns(o){let e,s,t,l=o[57].badge+"",n,r;return{c(){e=M("Β "),s=m("span"),t=M("("),n=M(l),r=M(")"),this.h()},l(i){e=z(i,"Β "),s=d(i,"SPAN",{class:!0});var f=h(s);t=z(f,"("),n=z(f,l),r=z(f,")"),f.forEach(u),this.h()},h(){c(s,"class","text-xs text-gray-500")},m(i,f){se(i,e,f),se(i,s,f),a(s,t),a(s,n),a(s,r)},p:It,d(i){i&&(u(e),u(s))}}}function zl(o){let e,s=o[57].name+"",t,l,n,r,i,f=o[57].badge&&ns(o);function p(){return o[42](o[57])}return{c(){e=m("button"),t=M(s),f&&f.c(),l=T(),this.h()},l(N){e=d(N,"BUTTON",{class:!0});var k=h(e);t=z(k,s),f&&f.l(k),l=I(k),k.forEach(u),this.h()},h(){c(e,"class",n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[57].name===o[4]?"bg-gray-100":""))},m(N,k){se(N,e,k),a(e,t),f&&f.m(e,null),a(e,l),r||(i=le(e,"click",p),r=!0)},p(N,k){o=N,o[57].badge&&f.p(o,k),k[0]&16&&n!==(n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[57].name===o[4]?"bg-gray-100":""))&&c(e,"class",n)},d(N){N&&u(e),f&&f.d(),r=!1,i()}}}function ss(o){let e,s;return e=new cl({props:{size:16,class:"text-gray-600"}}),{c(){te(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,l){Z(e,t,l),s=!0},i(t){s||(v(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){Q(e,t)}}}function os(o){let e,s;return e=new Cn({props:{size:16,class:"text-gray-600"}}),{c(){te(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,l){Z(e,t,l),s=!0},i(t){s||(v(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){Q(e,t)}}}function Ml(o){let e,s,t,l=o[54].name[0]+"",n,r,i,f,p=o[54].name+"",N,k,g,_=o[54].description+"",b,$,w,D,O,oe,F,P,L,V;const B=[os,ss],j=[];function W(S,re){return S[20]===S[54].name?0:1}D=W(o),O=j[D]=B[D](o);function U(...S){return o[43](o[54],...S)}function G(){return o[44](o[54])}return{c(){e=m("button"),s=m("div"),t=m("div"),n=M(l),r=T(),i=m("div"),f=m("div"),N=M(p),k=T(),g=m("div"),b=M(_),$=T(),w=m("button"),O.c(),oe=T(),this.h()},l(S){e=d(S,"BUTTON",{class:!0});var re=h(e);s=d(re,"DIV",{class:!0});var q=h(s);t=d(q,"DIV",{class:!0});var K=h(t);n=z(K,l),K.forEach(u),r=I(q),i=d(q,"DIV",{class:!0});var $e=h(i);f=d($e,"DIV",{class:!0});var de=h(f);N=z(de,p),de.forEach(u),k=I($e),g=d($e,"DIV",{class:!0});var he=h(g);b=z(he,_),he.forEach(u),$e.forEach(u),q.forEach(u),$=I(re),w=d(re,"BUTTON",{class:!0,title:!0});var R=h(w);O.l(R),R.forEach(u),oe=I(re),re.forEach(u),this.h()},h(){c(t,"class","w-10 h-10 bg-gradient-to-br from-amber-400 to-orange-500 rounded-full flex items-center justify-center text-white text-sm font-semibold flex-shrink-0"),c(f,"class","text-sm font-medium text-gray-900"),c(g,"class","text-xs text-gray-500 mt-0.5"),c(i,"class","flex-1"),c(s,"class","flex items-center gap-3"),c(w,"class","p-1.5 rounded-full hover:bg-gray-200 transition-colors flex-shrink-0"),c(w,"title","Play sample"),c(e,"class",F="w-full flex items-center justify-between p-3 rounded-md hover:bg-gray-50 transition-colors text-left group "+(o[54].name===o[3]?"bg-gray-100":""))},m(S,re){se(S,e,re),a(e,s),a(s,t),a(t,n),a(s,r),a(s,i),a(i,f),a(f,N),a(i,k),a(i,g),a(g,b),a(e,$),a(e,w),j[D].m(w,null),a(e,oe),P=!0,L||(V=[le(w,"click",U),le(e,"click",G)],L=!0)},p(S,re){o=S;let q=D;D=W(o),D!==q&&(bt(),y(j[q],1,1,()=>{j[q]=null}),pt(),O=j[D],O||(O=j[D]=B[D](o),O.c()),v(O,1),O.m(w,null)),(!P||re[0]&8&&F!==(F="w-full flex items-center justify-between p-3 rounded-md hover:bg-gray-50 transition-colors text-left group "+(o[54].name===o[3]?"bg-gray-100":"")))&&c(e,"class",F)},i(S){P||(v(O),P=!0)},o(S){y(O),P=!1},d(S){S&&u(e),j[D].d(),L=!1,Gt(V)}}}function Bl(o){let e,s;return{c(){e=m("div"),s=M(o[9]),this.h()},l(t){e=d(t,"DIV",{class:!0});var l=h(e);s=z(l,o[9]),l.forEach(u),this.h()},h(){c(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-10276gt")},m(t,l){se(t,e,l),a(e,s)},p(t,l){l[0]&512&&Be(s,t[9])},d(t){t&&u(e)}}}function rs(o){let e,s,t,l,n,r,i,f,p,N,k,g,_,b,$,w,D,O,oe,F,P,L,V,B,j,W,U,G,S,re,q;D=new Tn({props:{size:14}}),L=new cn({props:{size:14}});let K=o[10]&&Dl();const $e=[qn,Rn],de=[];function he(C,ie){return C[1]==="ui"?0:1}W=he(o),U=de[W]=$e[W](o);let R=o[9]&&Bl(o);return{c(){e=m("div"),s=m("header"),t=m("div"),l=m("div"),n=m("div"),r=m("button"),i=M("API"),p=T(),N=m("button"),k=M("Local"),_=T(),b=m("div"),$=m("div"),w=m("button"),te(D.$$.fragment),O=M(`
15
+ UI`),F=T(),P=m("button"),te(L.$$.fragment),V=M(`
16
+ API Recorder
17
+ `),K&&K.c(),j=T(),U.c(),G=T(),R&&R.c(),this.h()},l(C){e=d(C,"DIV",{class:!0});var ie=h(e);s=d(ie,"HEADER",{class:!0});var Ie=h(s);t=d(Ie,"DIV",{class:!0});var ue=h(t);l=d(ue,"DIV",{class:!0});var Te=h(l);n=d(Te,"DIV",{class:!0});var De=h(n);r=d(De,"BUTTON",{class:!0});var fe=h(r);i=z(fe,"API"),fe.forEach(u),p=I(De),N=d(De,"BUTTON",{class:!0});var He=h(N);k=z(He,"Local"),He.forEach(u),De.forEach(u),Te.forEach(u),_=I(ue),b=d(ue,"DIV",{class:!0});var Oe=h(b);$=d(Oe,"DIV",{class:!0});var Ae=h($);w=d(Ae,"BUTTON",{class:!0});var we=h(w);ee(D.$$.fragment,we),O=z(we,`
18
+ UI`),we.forEach(u),F=I(Ae),P=d(Ae,"BUTTON",{class:!0});var _e=h(P);ee(L.$$.fragment,_e),V=z(_e,`
19
+ API Recorder
20
+ `),K&&K.l(_e),_e.forEach(u),Ae.forEach(u),Oe.forEach(u),ue.forEach(u),Ie.forEach(u),j=I(ie),U.l(ie),G=I(ie),R&&R.l(ie),ie.forEach(u),this.h()},h(){c(r,"class",f="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[5]==="api"?"bg-white shadow-sm":"text-gray-600")),c(N,"class",g="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[5]==="local"?"bg-white shadow-sm":"text-gray-600")),c(n,"class","flex items-center bg-gray-100 rounded-md p-0.5"),c(l,"class","flex items-center gap-3"),c(w,"class",oe="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(o[1]==="ui"?"bg-white shadow-sm":"text-gray-600")),c(P,"class",B="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative overflow-hidden "+(o[1]==="code"?"bg-white shadow-sm":"text-gray-600")+" "+(o[10]?"code-flash":"")+" svelte-10276gt"),c($,"class","flex items-center bg-gray-100 rounded-md p-0.5"),c(b,"class","flex items-center gap-2"),c(t,"class","flex items-center justify-between px-4 py-2"),c(s,"class","border-b border-gray-200 bg-white"),c(e,"class","flex flex-col h-full")},m(C,ie){se(C,e,ie),a(e,s),a(s,t),a(t,l),a(l,n),a(n,r),a(r,i),a(n,p),a(n,N),a(N,k),a(t,_),a(t,b),a(b,$),a($,w),Z(D,w,null),a(w,O),a($,F),a($,P),Z(L,P,null),a(P,V),K&&K.m(P,null),a(e,j),de[W].m(e,null),a(e,G),R&&R.m(e,null),S=!0,re||(q=[le(r,"click",o[35]),le(N,"click",o[36]),le(w,"click",o[37]),le(P,"click",o[38]),le(e,"click",o[31])],re=!0)},p(C,ie){(!S||ie[0]&32&&f!==(f="px-3 py-1 text-sm font-medium rounded transition-colors "+(C[5]==="api"?"bg-white shadow-sm":"text-gray-600")))&&c(r,"class",f),(!S||ie[0]&32&&g!==(g="px-3 py-1 text-sm font-medium rounded transition-colors "+(C[5]==="local"?"bg-white shadow-sm":"text-gray-600")))&&c(N,"class",g),(!S||ie[0]&2&&oe!==(oe="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(C[1]==="ui"?"bg-white shadow-sm":"text-gray-600")))&&c(w,"class",oe),C[10]?K||(K=Dl(),K.c(),K.m(P,null)):K&&(K.d(1),K=null),(!S||ie[0]&1026&&B!==(B="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative overflow-hidden "+(C[1]==="code"?"bg-white shadow-sm":"text-gray-600")+" "+(C[10]?"code-flash":"")+" svelte-10276gt"))&&c(P,"class",B);let Ie=W;W=he(C),W===Ie?de[W].p(C,ie):(bt(),y(de[Ie],1,1,()=>{de[Ie]=null}),pt(),U=de[W],U?U.p(C,ie):(U=de[W]=$e[W](C),U.c()),v(U,1),U.m(e,G)),C[9]?R?R.p(C,ie):(R=Bl(C),R.c(),R.m(e,null)):R&&(R.d(1),R=null)},i(C){S||(v(D.$$.fragment,C),v(L.$$.fragment,C),v(U),S=!0)},o(C){y(D.$$.fragment,C),y(L.$$.fragment,C),y(U),S=!1},d(C){C&&u(e),Q(D),Q(L),K&&K.d(),de[W].d(),R&&R.d(),re=!1,Gt(q)}}}function hl(){if(console.log("Getting access token..."),typeof window<"u"&&window.gradio&&window.gradio.auth_token)return console.log("Found Gradio auth token:",window.gradio.auth_token.substring(0,10)+"..."),window.gradio.auth_token;const o=document.querySelector('meta[name="hf-oauth-token"]');if(o){const t=o.getAttribute("content");if(t)return console.log("Found token in meta tag:",t.substring(0,10)+"..."),t}const e=["hf_access_token","hf_token","huggingface_token","oauth_token","access_token"];for(const t of e){const l=localStorage.getItem(t);if(l)return console.log(`Found token in localStorage['${t}']:`,l.substring(0,10)+"..."),l}for(const t of e){const l=sessionStorage.getItem(t);if(l)return console.log(`Found token in sessionStorage['${t}']:`,l.substring(0,10)+"..."),l}const s=document.cookie.split(";");for(const t of s){const[l,n]=t.trim().split("=");if(l&&(l.includes("token")||l.includes("hf")||l.includes("oauth")))return console.log(`Found potential token in cookie '${l}':`,n?n.substring(0,10)+"...":"empty"),decodeURIComponent(n)}try{const t=document.querySelector("script[data-hf-token]");if(t){const l=t.getAttribute("data-hf-token");if(l)return console.log("Found token in script data attribute:",l.substring(0,10)+"..."),l}}catch{}return console.log("No OAuth token found in any storage location"),console.log("Available localStorage keys:",Object.keys(localStorage)),console.log("Available sessionStorage keys:",Object.keys(sessionStorage)),console.log("Available cookies:",document.cookie),console.log("Available global objects:",{window:typeof window,gradio:typeof(window==null?void 0:window.gradio),hf:typeof(window==null?void 0:window.hf),huggingface:typeof(window==null?void 0:window.huggingface)}),console.log("URL search params:",new URLSearchParams(window.location.search).toString()),console.log("All meta tags:",Array.from(document.getElementsByTagName("meta")).map(t=>{var l;return{name:t.name,content:((l=t.content)==null?void 0:l.substring(0,20))+"..."}})),null}function Pt(o){const e=Math.floor(o/60),s=Math.floor(o%60);return`${e}:${s.toString().padStart(2,"0")}`}function jl(){console.log("Share audio")}function Hl(){const o=hl();return`# Install required packages
21
+ # pip install huggingface-hub
22
+
23
+ from huggingface_hub import InferenceClient
24
+ import base64
25
+ import io
26
+
27
+ # Initialize the client
28
+ client = InferenceClient(
29
+ provider="fal-ai",
30
+ api_key="YOUR_HF_TOKEN", # Get your token from https://huggingface.co/settings/tokens
31
+ )`}function as(){return`# Save the audio to a file
32
+ output_filename = "output_speech.wav"
33
+
34
+ with open(output_filename, "wb") as f:
35
+ f.write(audio_bytes)
36
+
37
+ print(f"βœ“ Audio saved to {output_filename}")
38
+
39
+ # Optional: Play the audio (requires additional packages)
40
+ # from playsound import playsound
41
+ # playsound(output_filename)`}function is(o,e,s){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.",l="Lily",n="Chatterbox",r="api",i="ui",f=!1,p=!1,N=[],k=null,g=null,_=!1,b=1,$=.5,w=.75,D=0,O=!1,oe=0,F=0,P="",L=null,V=null,B=null;const j=[{id:"chatterbox",name:"Chatterbox",badge:"recommended"},{id:"kokoro",name:"Kokoro",badge:"faster but lower quality"}],W=[{id:"lily",name:"Lily",description:"Warm, conversational voice from a female in her 30s to 40s",sample:"/voices/lily.mp3"},{id:"sarah",name:"Sarah",description:"Clear, professional tone"},{id:"alex",name:"Alex",description:"Friendly, approachable voice"},{id:"emma",name:"Emma",description:"Calm, soothing delivery"}];async function U(){if(console.log("generateSpeech called, text:",t.trim().substring(0,50)),!t.trim())return;if(!hl()){window.dispatchEvent(new CustomEvent("show-signin-popover"));return}console.log("Starting generation..."),s(7,p=!0),s(8,k=null),s(16,oe=0),N.length===0&&R("Setup and Import",Hl()),R("Generate Speech",C()),i==="ui"&&(s(10,_=!0),setTimeout(()=>{s(10,_=!1)},2500)),s(15,O=!1),s(18,P=t.length>30?t.substring(0,30)+"...":t);try{const ne=hl();console.log("Access token for API call:",ne?"Found ("+ne.substring(0,10)+"...)":"None");const Se={text:t,voice_id:l.toLowerCase(),model_id:n.toLowerCase(),mode:r,access_token:ne,parameters:{speed:b,stability:$,similarity:w,style_exaggeration:D}};console.log("Sending request to /api/tts/generate:",Se);const Ee=await fetch("/api/tts/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Se)});if(console.log("API response status:",Ee.status),!Ee.ok){const Le=await Ee.text();throw console.error("API error response:",Le),new Error(`HTTP error! status: ${Ee.status}, body: ${Le}`)}const Ue=await Ee.json();if(console.log("API response result:",Ue),Ue.success&&Ue.audio_url)s(8,k=Ue.audio_url),R("Save Audio Output",as()),i==="ui"&&(s(10,_=!0),setTimeout(()=>{s(10,_=!1)},2500));else{const Le=Ue.error||"Unknown error occurred";alert(`❌ ${Le}`),s(8,k=null)}}catch(ne){console.error("Error generating speech:",ne),alert("❌ Network error: Failed to connect to the server"),s(8,k=null)}finally{s(7,p=!1)}}function G(){L&&(O?L.pause():L.play())}function S(){L&&(s(17,F=L.duration),L.play())}function re(){L&&s(16,oe=L.currentTime)}function q(){s(15,O=!0)}function K(){s(15,O=!1)}function $e(){if(k){const H=document.createElement("a");H.href=k,H.download="speech.wav",H.click()}}function de(H,ne){if(ne.stopPropagation(),B===H.name)V&&(V.pause(),V.currentTime=0),s(20,B=null);else{V&&V.pause(),s(20,B=H.name);const Se=H.sample||"/samples/harvard.wav";V?V.src=Se:(V=new Audio(Se),V.addEventListener("ended",()=>{s(20,B=null)})),V.play().catch(Ee=>{console.error("Error playing sample:",Ee),s(20,B=null)})}}function he(H){H.target.closest(".model-dropdown")||s(6,f=!1)}function R(H,ne,Se=null){const Ee={id:Date.now()+Math.random(),title:H,code:ne,output:Se,timestamp:new Date().toLocaleTimeString()};return s(2,N=[...N,Ee]),Ee}function C(){return t.length>100&&t.substring(0,100)+"",`# Text to convert to speech
42
+ text = """${t}"""
43
+
44
+ # Voice and model settings
45
+ model = "ResembleAI/chatterbox"
46
+ voice = "${l.toLowerCase()}"
47
+ speed = ${b}
48
+ stability = ${$}
49
+ similarity = ${w}
50
+ style_exaggeration = ${D}
51
+
52
+ # Generate speech
53
+ print("Generating speech...")
54
+ try:
55
+ audio_bytes = client.text_to_speech(
56
+ text,
57
+ model=model,
58
+ # Note: Voice and other parameters may vary by model
59
+ )
60
+ print(f"βœ“ Generated {len(audio_bytes)} bytes of audio")
61
+ except Exception as e:
62
+ print(f"Error: {e}")`}function ie(H,ne="Copied to clipboard!"){navigator.clipboard.writeText(H).then(()=>{s(9,g=ne),setTimeout(()=>{s(9,g=null)},2e3)})}function Ie(){const H=N.map(ne=>`# ${ne.title}
63
+ ${ne.code}`).join(`
64
+
65
+ `);ie(H,"All code copied!")}let ue=t;const Te=()=>s(5,r="api"),De=()=>s(5,r="local"),fe=()=>s(1,i="ui"),He=()=>s(1,i="code");function Oe(){t=this.value,s(0,t)}function Ae(H){Rl[H?"unshift":"push"](()=>{L=H,s(19,L)})}const we=()=>s(6,f=!f),_e=H=>{s(4,n=H.name),s(6,f=!1)},Pe=(H,ne)=>de(H,ne),Tt=H=>s(3,l=H.name);function ke(){b=rl(this.value),s(11,b)}function Qe(){$=rl(this.value),s(12,$)}function Ze(){w=rl(this.value),s(13,w)}function Fe(){D=rl(this.value),s(14,D)}const rt=H=>ie(H.code);return o.$$.update=()=>{o.$$.dirty[0]&2&&i==="ui"&&s(2,N=[]),o.$$.dirty[0]&6&&N.length===0&&i==="code"&&R("Setup and Import",Hl()),o.$$.dirty[0]&5|o.$$.dirty[1]&8&&t!==ue&&N.length>0&&s(34,ue=t)},[t,i,N,l,n,r,f,p,k,g,_,b,$,w,D,O,oe,F,P,L,B,j,W,U,G,S,re,q,K,$e,de,he,ie,Ie,ue,Te,De,fe,He,Oe,Ae,we,_e,Pe,Tt,ke,Qe,Ze,Fe,rt]}class fs extends Ge{constructor(e){super(),Re(this,e,is,rs,je,{},null,[-1,-1,-1])}}export{fs as component};
hfstudio/static/_app/immutable/nodes/3.C2t7-zYm.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as V,i as j,s as q,n as A,d,b as y,c as h,m as N,o as f,p as O,h as E,e as p,f as b,q as H,k as P,j as _,l as z,r as M,a as S,u as R,g as I,t as C}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";import{g as F}from"../chunks/CDtepspB.js";import{p as B}from"../chunks/B8cKfkAR.js";function G(m){let s,t,l,e,r;return{c(){s=_("div"),t=_("div"),l=P(),e=_("p"),r=C(m[0]),this.h()},l(u){s=p(u,"DIV",{class:!0});var o=b(s);t=p(o,"DIV",{class:!0}),b(t).forEach(d),l=E(o),e=p(o,"P",{});var n=b(e);r=I(n,m[0]),n.forEach(d),o.forEach(d),this.h()},h(){f(t,"class","animate-spin w-8 h-8 border-2 border-amber-400 border-t-transparent rounded-full mx-auto mb-2"),f(s,"class","text-gray-600 mb-4")},m(u,o){y(u,s,o),h(s,t),h(s,l),h(s,e),h(e,r)},p(u,o){o&1&&S(r,u[0])},d(u){u&&d(s)}}}function J(m){let s,t,l,e,r,u,o,n,k="Return to HFStudio",g,x;return{c(){s=_("div"),t=_("p"),l=C(m[0]),e=P(),r=_("p"),u=C(m[1]),o=P(),n=_("button"),n.textContent=k,this.h()},l(c){s=p(c,"DIV",{class:!0});var a=b(s);t=p(a,"P",{class:!0});var i=b(t);l=I(i,m[0]),i.forEach(d),e=E(a),r=p(a,"P",{class:!0});var v=b(r);u=I(v,m[1]),v.forEach(d),a.forEach(d),o=E(c),n=p(c,"BUTTON",{class:!0,"data-svelte-h":!0}),H(n)!=="svelte-lo2i5l"&&(n.textContent=k),this.h()},h(){f(t,"class","font-medium"),f(r,"class","text-sm mt-1"),f(s,"class","text-red-600 mb-4"),f(n,"class","px-4 py-2 bg-gradient-to-r from-amber-400 to-orange-500 text-white rounded-lg hover:from-amber-500 hover:to-orange-600 transition-colors")},m(c,a){y(c,s,a),h(s,t),h(t,l),h(s,e),h(s,r),h(r,u),y(c,o,a),y(c,n,a),g||(x=R(n,"click",m[2]),g=!0)},p(c,a){a&1&&S(l,c[0]),a&2&&S(u,c[1])},d(c){c&&(d(s),d(o),d(n)),g=!1,x()}}}function L(m){let s,t,l,e,r,u,o,n,k="HFStudio Authentication",g;function x(i,v){return i[1]?J:G}let c=x(m),a=c(m);return{c(){s=P(),t=_("div"),l=_("div"),e=_("div"),r=_("img"),o=P(),n=_("h1"),n.textContent=k,g=P(),a.c(),this.h()},l(i){O("svelte-17lku3q",document.head).forEach(d),s=E(i),t=p(i,"DIV",{class:!0});var D=b(t);l=p(D,"DIV",{class:!0});var T=b(l);e=p(T,"DIV",{class:!0});var w=b(e);r=p(w,"IMG",{src:!0,alt:!0,class:!0}),o=E(w),n=p(w,"H1",{class:!0,"data-svelte-h":!0}),H(n)!=="svelte-l7zisw"&&(n.textContent=k),g=E(w),a.l(w),w.forEach(d),T.forEach(d),D.forEach(d),this.h()},h(){document.title="Authenticating with Hugging Face - HFStudio",N(r.src,u="/assets/hf-logo.png")||f(r,"src",u),f(r,"alt","HF Logo"),f(r,"class","w-12 h-12 mx-auto mb-4"),f(n,"class","text-xl font-semibold mb-2"),f(e,"class","text-center"),f(l,"class","max-w-md w-full bg-white rounded-lg shadow-md p-6"),f(t,"class","min-h-screen flex items-center justify-center bg-gray-50")},m(i,v){y(i,s,v),y(i,t,v),h(t,l),h(l,e),h(e,r),h(e,o),h(e,n),h(e,g),a.m(e,null)},p(i,[v]){c===(c=x(i))&&a?a.p(i,v):(a.d(1),a=c(i),a&&(a.c(),a.m(e,null)))},i:A,o:A,d(i){i&&(d(s),d(t)),a.d()}}}function U(m,s,t){let l;z(m,B,o=>t(3,l=o));let e="Processing...",r=null;return M(async()=>{try{const o=l.url.searchParams.get("code"),n=l.url.searchParams.get("state"),k=l.url.searchParams.get("error"),g=l.url.searchParams.get("error_description");if(k){t(1,r=g||k),t(0,e="Authentication failed");return}if(!o){t(1,r="No authorization code received"),t(0,e="Authentication failed");return}const x=sessionStorage.getItem("oauth_state");if(x&&n!==x){t(1,r="Invalid state parameter"),t(0,e="Authentication failed");return}const c=await fetch("/api/auth/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:o})});if(!c.ok){const i=await c.text();throw console.error("Token exchange failed:",i),new Error(`Failed to exchange code for token: ${i}`)}const a=await c.json();localStorage.setItem("hf_access_token",a.access_token),t(0,e="Successfully authenticated!"),setTimeout(()=>{F("/")},2e3)}catch(o){t(1,r=o.message),t(0,e="Authentication failed")}}),[e,r,()=>F("/")]}class Y extends V{constructor(s){super(),j(this,s,U,L,q,{})}}export{Y as component};
hfstudio/static/_app/version.json CHANGED
@@ -1 +1 @@
1
- {"version":"1760686118005"}
 
1
+ {"version":"1760982267325"}
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.BPSNNA26.js">
10
- <link rel="modulepreload" href="/_app/immutable/chunks/CThD--Q6.js">
11
  <link rel="modulepreload" href="/_app/immutable/chunks/BI_gvUUO.js">
12
- <link rel="modulepreload" href="/_app/immutable/entry/app.BdL7ph0c.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_1ef7hlc = {
20
  base: ""
21
  };
22
 
23
  const element = document.currentScript.parentElement;
24
 
25
  Promise.all([
26
- import("/_app/immutable/entry/start.BPSNNA26.js"),
27
- import("/_app/immutable/entry/app.BdL7ph0c.js")
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.BYVsPlvk.js">
10
+ <link rel="modulepreload" href="/_app/immutable/chunks/CDtepspB.js">
11
  <link rel="modulepreload" href="/_app/immutable/chunks/BI_gvUUO.js">
12
+ <link rel="modulepreload" href="/_app/immutable/entry/app.D8dorYrS.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_1w4pefl = {
20
  base: ""
21
  };
22
 
23
  const element = document.currentScript.parentElement;
24
 
25
  Promise.all([
26
+ import("/_app/immutable/entry/start.BYVsPlvk.js"),
27
+ import("/_app/immutable/entry/app.D8dorYrS.js")
28
  ]).then(([kit, app]) => {
29
  kit.start(app, element);
30
  });
hfstudio/static/voices/lily.mp3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c18e6377b8bfe07928f0c461091b4947fcc123a7a8d6f1c47014e323b7b9ac7d
3
+ size 388119