PageSourceSearch

https://seq23-longcat-video-avatar-1-5-extended.hf.space/assets/index-DyDpuTN9.js

js seq23-longcat-video-avatar-1-5-extended.hf.space collected 2026-10-03 17:22:03 UTC 25,248 bytes, 876 lines download raw bytes

1import { w as writable, p as prop, m as setup_stores, b as set_class, f as set_style, q as store_get, i as if_block, d as bind_this, k as each, u as index, s as slot } from './i18n-dpAHICcw.js';
2import { R as push, y as user_effect, x as set, t as template_effect, a as append, T as pop, u as state, X as sibling, W as from_html, w as get, V as child, Y as reset, z as untrack, a5 as user_derived, a0 as set_text, S as first_child, a6 as comment, N as tick, a7 as text } from './index-CDZuCcOm.js';
3import { r as raf$1, l as loop } from './StreamingBar.svelte_svelte_type_style_lang-BxBb9ZZb.js';
4import { I as IconButton } from './ScrollFade.svelte_svelte_type_style_lang-DUvCSfRk.js';
5import './MarkdownCode.svelte_svelte_type_style_lang-GeNUGzep.js';
6import { C as Clear } from './Clear-tvJMRS4J.js';
7
8function pretty_si(num) {
9  let units = ["", "k", "M", "G", "T", "P", "E", "Z"];
10  let i = 0;
11  while (num > 1e3 && i < units.length - 1) {
12    num /= 1e3;
13    i++;
14  }
15  let unit = units[i];
16  return (Number.isInteger(num) ? num : num.toFixed(1)) + unit;
17}
18
19/**
20 * @param {any} obj
21 * @returns {obj is Date}
22 */
23function is_date(obj) {
24	return Object.prototype.toString.call(obj) === '[object Date]';
25}
26
27/** @import { Task } from '#client' */
28/** @import { SpringOpts, SpringUpdateOpts, TickContext } from './private.js' */
29/** @import { Spring as SpringStore } from './public.js' */
30
31/**
32 * @template T
33 * @param {TickContext} ctx
34 * @param {T} last_value
35 * @param {T} current_value
36 * @param {T} target_value
37 * @returns {T}
38 */
39function tick_spring(ctx, last_value, current_value, target_value) {
40	if (typeof current_value === 'number' || is_date(current_value)) {
41		// @ts-ignore
42		const delta = target_value - current_value;
43		// @ts-ignore
44		const velocity = (current_value - last_value) / (ctx.dt || 1 / 60); // guard div by 0
45		const spring = ctx.opts.stiffness * delta;
46		const damper = ctx.opts.damping * velocity;
47		const acceleration = (spring - damper) * ctx.inv_mass;
48		const d = (velocity + acceleration) * ctx.dt;
49		if (Math.abs(d) < ctx.opts.precision && Math.abs(delta) < ctx.opts.precision) {
50			return target_value; // settled
51		} else {
52			ctx.settled = false; // signal loop to keep ticking
53			// @ts-ignore
54			return is_date(current_value) ? new Date(current_value.getTime() + d) : current_value + d;
55		}
56	} else if (Array.isArray(current_value)) {
57		// @ts-ignore
58		return current_value.map((_, i) =>
59			// @ts-ignore
60			tick_spring(ctx, last_value[i], current_value[i], target_value[i])
61		);
62	} else if (typeof current_value === 'object') {
63		const next_value = {};
64		for (const k in current_value) {
65			// @ts-ignore
66			next_value[k] = tick_spring(ctx, last_value[k], current_value[k], target_value[k]);
67		}
68		// @ts-ignore
69		return next_value;
70	} else {
71		throw new Error(`Cannot spring ${typeof current_value} values`);
72	}
73}
74
75/**
76 * The spring function in Svelte creates a store whose value is animated, with a motion that simulates the behavior of a spring. This means when the value changes, instead of transitioning at a steady rate, it "bounces" like a spring would, depending on the physics parameters provided. This adds a level of realism to the transitions and can enhance the user experience.
77 *
78 * @deprecated Use [`Spring`](https://svelte.dev/docs/svelte/svelte-motion#Spring) instead
79 * @template [T=any]
80 * @param {T} [value]
81 * @param {SpringOpts} [opts]
82 * @returns {SpringStore<T>}
83 */
84function spring(value, opts = {}) {
85	const store = writable(value);
86	const { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts;
87	/** @type {number} */
88	let last_time;
89	/** @type {Task | null} */
90	let task;
91	/** @type {object} */
92	let current_token;
93
94	let last_value = /** @type {T} */ (value);
95	let target_value = /** @type {T | undefined} */ (value);
96
97	let inv_mass = 1;
98	let inv_mass_recovery_rate = 0;
99	let cancel_task = false;
100	/**
101	 * @param {T} new_value
102	 * @param {SpringUpdateOpts} opts
103	 * @returns {Promise<void>}
104	 */
105	function set(new_value, opts = {}) {
106		target_value = new_value;
107		const token = (current_token = {});
108		if (value == null || opts.hard || (spring.stiffness >= 1 && spring.damping >= 1)) {
109			cancel_task = true; // cancel any running animation
110			last_time = raf$1.now();
111			last_value = new_value;
112			store.set((value = target_value));
113			return Promise.resolve();
114		} else if (opts.soft) {
115			const rate = opts.soft === true ? 0.5 : +opts.soft;
116			inv_mass_recovery_rate = 1 / (rate * 60);
117			inv_mass = 0; // infinite mass, unaffected by spring forces
118		}
119		if (!task) {
120			last_time = raf$1.now();
121			cancel_task = false;
122			task = loop((now) => {
123				if (cancel_task) {
124					cancel_task = false;
125					task = null;
126					return false;
127				}
128				inv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1);
129
130				// clamp elapsed time to 1/30th of a second, so that longer pauses
131				// (blocked thread or inactive tab) don't cause the spring to go haywire
132				const elapsed = Math.min(now - last_time, 1000 / 30);
133
134				/** @type {TickContext} */
135				const ctx = {
136					inv_mass,
137					opts: spring,
138					settled: true,
139					dt: (elapsed * 60) / 1000
140				};
141				// @ts-ignore
142				const next_value = tick_spring(ctx, last_value, value, target_value);
143				last_time = now;
144				last_value = /** @type {T} */ (value);
145				store.set((value = /** @type {T} */ (next_value)));
146				if (ctx.settled) {
147					task = null;
148				}
149				return !ctx.settled;
150			});
151		}
152		return new Promise((fulfil) => {
153			/** @type {Task} */ (task).promise.then(() => {
154				if (token === current_token) fulfil();
155			});
156		});
157	}
158	/** @type {SpringStore<T>} */
159	// @ts-expect-error - class-only properties are missing
160	const spring = {
161		set,
162		update: (fn, opts) => set(fn(/** @type {T} */ (target_value), /** @type {T} */ (value)), opts),
163		subscribe: store.subscribe,
164		stiffness,
165		damping,
166		precision
167	};
168	return spring;
169}
170
171var root$1 = from_html(`<div><svg viewBox="-1200 -1200 3000 3000" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-1vhirvf"><g><path d="M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z" fill="#FF7C00" fill-opacity="0.4" class="svelte-1vhirvf"></path><path d="M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z" fill="#FF7C00" class="svelte-1vhirvf"></path><path d="M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z" fill="#FF7C00" fill-opacity="0.4" class="svelte-1vhirvf"></path><path d="M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z" fill="#FF7C00" class="svelte-1vhirvf"></path></g><g><path d="M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z" fill="#FF7C00" fill-opacity="0.4" class="svelte-1vhirvf"></path><path d="M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z" fill="#FF7C00" class="svelte-1vhirvf"></path><path d="M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z" fill="#FF7C00" fill-opacity="0.4" class="svelte-1vhirvf"></path><path d="M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z" fill="#FF7C00" class="svelte-1vhirvf"></path></g></svg></div>`);
172
173function Loader($$anchor, $$props) {
174	push($$props, true);
175
176	const $top = () => store_get(top, '$top', $$stores);
177	const $bottom = () => store_get(bottom, '$bottom', $$stores);
178	const [$$stores, $$cleanup] = setup_stores();
179	let margin = prop($$props, 'margin', 3, true);
180	const top = spring([0, 0]);
181	const bottom = spring([0, 0]);
182	let dismounted = state(false);
183
184	async function animate() {
185		await Promise.all([top.set([125, 140]), bottom.set([-125, -140])]);
186		await Promise.all([top.set([-125, 140]), bottom.set([125, -140])]);
187		await Promise.all([top.set([-125, 0]), bottom.set([125, -0])]);
188		await Promise.all([top.set([125, 0]), bottom.set([-125, 0])]);
189	}
190
191	async function run() {
192		await animate();
193
194		if (!get(dismounted)) run();
195	}
196
197	async function loading() {
198		await Promise.all([top.set([125, 0]), bottom.set([-125, 0])]);
199		run();
200	}
201
202	user_effect(() => {
203		loading();
204
205		return () => {
206			set(dismounted, true);
207		};
208	});
209
210	var div = root$1();
211	let classes;
212	var svg = child(div);
213	var g = child(svg);
214	var g_1 = sibling(g);
215
216	reset(svg);
217	reset(div);
218
219	template_effect(() => {
220		classes = set_class(div, 1, 'svelte-1vhirvf', null, classes, { margin: margin() });
221		set_style(g, `transform: translate(${$top()[0] ?? ''}px, ${$top()[1] ?? ''}px);`);
222		set_style(g_1, `transform: translate(${$bottom()[0] ?? ''}px, ${$bottom()[1] ?? ''}px);`);
223	});
224
225	append($$anchor, div);
226	pop();
227	$$cleanup();
228}
229
230let items = [];
231let called = false;
232const is_browser = typeof window !== "undefined";
233const raf = is_browser ? window.requestAnimationFrame : (cb) => {};
234
235async function scroll_into_view(el, enable = true) {
236	if (window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && enable !== true) {
237		return;
238	}
239
240	items.push(el);
241
242	if (!called) called = true; else return;
243
244	await tick();
245
246	raf(() => {
247		let min = [0, 0];
248
249		for (let i = 0; i < items.length; i++) {
250			const element = items[i];
251			const box = element.getBoundingClientRect();
252
253			if (i === 0 || box.top + window.scrollY <= min[0]) {
254				min[0] = box.top + window.scrollY;
255				min[1] = i;
256			}
257		}
258
259		window.scrollTo({ top: min[0] - 20, behavior: "smooth" });
260		called = false;
261		items = [];
262	});
263}
264
265var root_1 = from_html(`<div class="validation-error svelte-1uj8rng"> <button class="svelte-1uj8rng"><!></button></div>`);
266var root_3 = from_html(`<div class="eta-bar svelte-1uj8rng"></div>`);
267var root_6 = from_html(`<!> `, 1);
268var root_17 = from_html(`<!> <!> <!> <!>`, 1);
269var root_14 = from_html(`<div class="progress-level svelte-1uj8rng"><div class="progress-level-inner svelte-1uj8rng"><!></div> <div class="progress-bar-wrap svelte-1uj8rng"><div class="progress-bar svelte-1uj8rng"></div></div></div>`);
270var root_24 = from_html(`<p class="loading svelte-1uj8rng"> </p> <!>`, 1);
271var root_2 = from_html(`<!> <div><!> <!></div> <!> <!>`, 1);
272var root_26 = from_html(`<div class="clear-status svelte-1uj8rng"><!></div> <span class="error svelte-1uj8rng"> </span> <!>`, 1);
273var root = from_html(`<div data-testid="status-tracker"><!> <!></div>`);
274
275function Static($$anchor, $$props) {
276	push($$props, true);
277
278	let eta = prop($$props, 'eta', 7, null),
279		scroll_to_output = prop($$props, 'scroll_to_output', 3, false),
280		timer = prop($$props, 'timer', 3, true),
281		show_progress = prop($$props, 'show_progress', 3, "full"),
282		message = prop($$props, 'message', 3, null),
283		progress = prop($$props, 'progress', 3, null),
284		variant = prop($$props, 'variant', 3, "default"),
285		loading_text = prop($$props, 'loading_text', 3, "Loading..."),
286		absolute = prop($$props, 'absolute', 3, true),
287		translucent = prop($$props, 'translucent', 3, false),
288		border = prop($$props, 'border', 3, false),
289		validation_error = prop($$props, 'validation_error', 7, null),
290		show_validation_error = prop($$props, 'show_validation_error', 3, true),
291		type = prop($$props, 'type', 3, null);
292
293	let el;
294	let _timer = false;
295	let timer_start = state(0);
296	let old_eta = state(null);
297	let eta_from_start = state(null);
298	let message_visible = state(false);
299	let formatted_eta = state(null);
300	const should_hide = user_derived(() => type() === "input" || !$$props.status || $$props.status === "complete" || show_progress() === "hidden" || $$props.status == "streaming" || !!(show_validation_error() && validation_error()));
301	let timer_diff = state(0);
302
303	const eta_level = user_derived(() => get(eta_from_start) === null || get(eta_from_start) <= 0 || !get(timer_diff)
304		? 0
305		: Math.min(get(timer_diff) / get(eta_from_start), 1));
306
307	const formatted_timer = user_derived(() => get(timer_diff).toFixed(1));
308	let show_eta_bar = user_derived(() => progress() != null ? false : true);
309
310	function run() {
311		raf(() => {
312			set(timer_diff, (performance.now() - get(timer_start)) / 1000);
313
314			if (_timer) run();
315		});
316	}
317
318	let progress_level = user_derived(() => {
319		let _progress_level = null;
320
321		if (progress() != null) {
322			_progress_level = progress().map((p) => {
323				if (p.index != null && p.length != null) {
324					return p.index / p.length;
325				} else if (p.progress != null) {
326					return p.progress;
327				}
328
329				return undefined;
330			});
331		} else {
332			_progress_level = null;
333		}
334
335		let _last_progress_level;
336		let transition = "";
337
338		if (_progress_level) {
339			_last_progress_level = _progress_level[_progress_level.length - 1];
340
341			if (_last_progress_level === 0) {
342				transition = "0";
343			} else {
344				transition = "150ms";
345			}
346		} else {
347			_last_progress_level = undefined;
348		}
349
350		return {
351			progress_level: _progress_level,
352			last_progress_level: _last_progress_level,
353			progress_bar_transition: transition
354		};
355	});
356
357	function start_timer() {
358		if (_timer) return;
359
360		set(old_eta, set(formatted_eta, null), true);
361		set(timer_start, performance.now(), true);
362		_timer = true;
363		run();
364	}
365
366	function stop_timer() {
367		set(old_eta, set(formatted_eta, null), true);
368
369		if (!_timer) return;
370
371		_timer = false;
372	}
373
374	user_effect(() => {
375		if ($$props.status === "pending") {
376			start_timer();
377		} else {
378			untrack(() => {
379				stop_timer();
380			});
381		}
382	});
383
384	user_effect(() => {
385		if (el && scroll_to_output() && ($$props.status === "pending" || $$props.status === "complete")) {
386			scroll_into_view(el, $$props.autoscroll);
387		}
388	});
389
390	user_effect(() => {
391		if (eta() === null) {
392			eta(get(old_eta));
393		}
394
395		if (eta() != null && get(old_eta) !== eta()) {
396			set(eta_from_start, (performance.now() - get(timer_start)) / 1000 + eta());
397			set(formatted_eta, get(eta_from_start).toFixed(1), true);
398			set(old_eta, eta(), true);
399		}
400	});
401
402	function close_message() {
403		set(message_visible, false);
404	}
405
406	user_effect(() => {
407		untrack(() => {
408			close_message();
409		});
410
411		if ($$props.status === "error" && message()) {
412			set(message_visible, true);
413		}
414	});
415
416	var div = root();
417	let classes;
418	let styles;
419	var node = child(div);
420
421	{
422		var consequent = ($$anchor) => {
423			var div_1 = root_1();
424			var text = child(div_1);
425			var button = sibling(text);
426			var node_1 = child(button);
427
428			{
429				let $0 = user_derived(() => $$props.i18n ? $$props.i18n("common.clear") : "Clear");
430
431				IconButton(node_1, {
432					get Icon() {
433						return Clear;
434					},
435
436					get label() {
437						return get($0);
438					},
439					disabled: false,
440					size: 'x-small',
441					background: 'var(--background-fill-primary)',
442					color: 'var(--error-background-text)',
443					border: 'var(--border-color-primary)',
444					onclick: () => validation_error(null)
445				});
446			}
447
448			reset(button);
449			reset(div_1);
450			template_effect(() => set_text(text, `${validation_error() ?? ''} `));
451			append($$anchor, div_1);
452		};
453
454		if_block(node, ($$render) => {
455			if (validation_error() && show_validation_error()) $$render(consequent);
456		});
457	}
458
459	var node_2 = sibling(node, 2);
460
461	{
462		var consequent_17 = ($$anchor) => {
463			var fragment = root_2();
464			var node_3 = first_child(fragment);
465
466			{
467				var consequent_1 = ($$anchor) => {
468					var div_2 = root_3();
469					let styles_1;
470
471					template_effect(() => styles_1 = set_style(div_2, '', styles_1, {
472						transform: `translateX(${(get(eta_level) || 0) * 100 - 100}%)`
473					}));
474
475					append($$anchor, div_2);
476				};
477
478				if_block(node_3, ($$render) => {
479					if (variant() === "default" && get(show_eta_bar) && show_progress() === "full") $$render(consequent_1);
480				});
481			}
482
483			var div_3 = sibling(node_3, 2);
484			let classes_1;
485			var node_4 = child(div_3);
486
487			{
488				var consequent_4 = ($$anchor) => {
489					var fragment_1 = comment();
490					var node_5 = first_child(fragment_1);
491
492					each(node_5, 17, progress, index, ($$anchor, p) => {
493						var fragment_2 = comment();
494						var node_6 = first_child(fragment_2);
495
496						{
497							var consequent_3 = ($$anchor) => {
498								var fragment_3 = root_6();
499								var node_7 = first_child(fragment_3);
500
501								{
502									var consequent_2 = ($$anchor) => {
503										var text_1 = text();
504
505										template_effect(($0, $1) => set_text(text_1, `${$0 ?? ''}/${$1 ?? ''}`), [
506											() => pretty_si(get(p).index || 0),
507											() => pretty_si(get(p).length)
508										]);
509
510										append($$anchor, text_1);
511									};
512
513									var alternate = ($$anchor) => {
514										var text_2 = text();
515
516										template_effect(($0) => set_text(text_2, $0), [() => pretty_si(get(p).index || 0)]);
517										append($$anchor, text_2);
518									};
519
520									if_block(node_7, ($$render) => {
521										if (get(p).length != null) $$render(consequent_2); else $$render(alternate, false);
522									});
523								}
524
525								var text_3 = sibling(node_7);
526
527								template_effect(() => set_text(text_3, ` ${get(p).unit ?? ''} |  `));
528								append($$anchor, fragment_3);
529							};
530
531							if_block(node_6, ($$render) => {
532								if (get(p).index != null) $$render(consequent_3);
533							});
534						}
535
536						append($$anchor, fragment_2);
537					});
538
539					append($$anchor, fragment_1);
540				};
541
542				var alternate_2 = ($$anchor) => {
543					var fragment_6 = comment();
544					var node_8 = first_child(fragment_6);
545
546					{
547						var consequent_5 = ($$anchor) => {
548							var text_4 = text();
549
550							template_effect(() => set_text(text_4, `queue: ${$$props.queue_position + 1}/${$$props.queue_size ?? ''} |`));
551							append($$anchor, text_4);
552						};
553
554						var alternate_1 = ($$anchor) => {
555							var fragment_8 = comment();
556							var node_9 = first_child(fragment_8);
557
558							{
559								var consequent_6 = ($$anchor) => {
560									var text_5 = text('processing |');
561
562									append($$anchor, text_5);
563								};
564
565								if_block(
566									node_9,
567									($$render) => {
568										if ($$props.queue_position === 0) $$render(consequent_6);
569									},
570									true
571								);
572							}
573
574							append($$anchor, fragment_8);
575						};
576
577						if_block(
578							node_8,
579							($$render) => {
580								if ($$props.queue_position !== null && $$props.queue_size !== undefined && $$props.queue_position >= 0) $$render(consequent_5); else $$render(alternate_1, false);
581							},
582							true
583						);
584					}
585
586					append($$anchor, fragment_6);
587				};
588
589				if_block(node_4, ($$render) => {
590					if (progress()) $$render(consequent_4); else $$render(alternate_2, false);
591				});
592			}
593
594			var node_10 = sibling(node_4, 2);
595
596			{
597				var consequent_7 = ($$anchor) => {
598					var text_6 = text();
599
600					template_effect(() => set_text(text_6, `${get(formatted_timer) ?? ''}${eta() ? `/${get(formatted_eta)}` : ""}s`));
601					append($$anchor, text_6);
602				};
603
604				if_block(node_10, ($$render) => {
605					if (timer()) $$render(consequent_7);
606				});
607			}
608
609			reset(div_3);
610
611			var node_11 = sibling(div_3, 2);
612
613			{
614				var consequent_14 = ($$anchor) => {
615					var div_4 = root_14();
616					var div_5 = child(div_4);
617					var node_12 = child(div_5);
618
619					{
620						var consequent_13 = ($$anchor) => {
621							var fragment_10 = comment();
622							var node_13 = first_child(fragment_10);
623
624							each(node_13, 17, progress, index, ($$anchor, p, i) => {
625								var fragment_11 = comment();
626								var node_14 = first_child(fragment_11);
627
628								{
629									var consequent_12 = ($$anchor) => {
630										var fragment_12 = root_17();
631										var node_15 = first_child(fragment_12);
632
633										{
634											var consequent_8 = ($$anchor) => {
635												var text_7 = text(' /');
636
637												append($$anchor, text_7);
638											};
639
640											if_block(node_15, ($$render) => {
641												if (i !== 0) $$render(consequent_8);
642											});
643										}
644
645										var node_16 = sibling(node_15, 2);
646
647										{
648											var consequent_9 = ($$anchor) => {
649												var text_8 = text();
650
651												template_effect(() => set_text(text_8, get(p).desc));
652												append($$anchor, text_8);
653											};
654
655											if_block(node_16, ($$render) => {
656												if (get(p).desc != null) $$render(consequent_9);
657											});
658										}
659
660										var node_17 = sibling(node_16, 2);
661
662										{
663											var consequent_10 = ($$anchor) => {
664												var text_9 = text('-');
665
666												append($$anchor, text_9);
667											};
668
669											if_block(node_17, ($$render) => {
670												if (get(p).desc != null && get(progress_level).progress_level && get(progress_level).progress_level[i] != null) $$render(consequent_10);
671											});
672										}
673
674										var node_18 = sibling(node_17, 2);
675
676										{
677											var consequent_11 = ($$anchor) => {
678												var text_10 = text();
679
680												template_effect(($0) => set_text(text_10, `${$0 ?? ''}%`), [
681													() => (100 * (get(progress_level).progress_level[i] || 0)).toFixed(1)
682												]);
683
684												append($$anchor, text_10);
685											};
686
687											if_block(node_18, ($$render) => {
688												if (get(progress_level).progress_level != null) $$render(consequent_11);
689											});
690										}
691
692										append($$anchor, fragment_12);
693									};
694
695									if_block(node_14, ($$render) => {
696										if (get(p).desc != null || get(progress_level).progress_level && get(progress_level).progress_level[i] != null) $$render(consequent_12);
697									});
698								}
699
700								append($$anchor, fragment_11);
701							});
702
703							append($$anchor, fragment_10);
704						};
705
706						if_block(node_12, ($$render) => {
707							if (progress() != null) $$render(consequent_13);
708						});
709					}
710
711					reset(div_5);
712
713					var div_6 = sibling(div_5, 2);
714					var div_7 = child(div_6);
715					let styles_2;
716
717					reset(div_6);
718					reset(div_4);
719
720					template_effect(() => styles_2 = set_style(div_7, '', styles_2, {
721						width: `${get(progress_level).last_progress_level * 100}%`,
722						transition: get(progress_level).progress_bar_transition
723					}));
724
725					append($$anchor, div_4);
726				};
727
728				var alternate_3 = ($$anchor) => {
729					var fragment_15 = comment();
730					var node_19 = first_child(fragment_15);
731
732					{
733						var consequent_15 = ($$anchor) => {
734							{
735								let $0 = user_derived(() => variant() === "default");
736
737								Loader($$anchor, {
738									get margin() {
739										return get($0);
740									}
741								});
742							}
743						};
744
745						if_block(
746							node_19,
747							($$render) => {
748								if (show_progress() === "full") $$render(consequent_15);
749							},
750							true
751						);
752					}
753
754					append($$anchor, fragment_15);
755				};
756
757				if_block(node_11, ($$render) => {
758					if (get(progress_level).last_progress_level != null) $$render(consequent_14); else $$render(alternate_3, false);
759				});
760			}
761
762			var node_20 = sibling(node_11, 2);
763
764			{
765				var consequent_16 = ($$anchor) => {
766					var fragment_17 = root_24();
767					var p_1 = first_child(fragment_17);
768					var text_11 = child(p_1, true);
769
770					reset(p_1);
771
772					var node_21 = sibling(p_1, 2);
773
774					slot(node_21, $$props, 'additional-loading-text', {}, null);
775					template_effect(() => set_text(text_11, loading_text()));
776					append($$anchor, fragment_17);
777				};
778
779				if_block(node_20, ($$render) => {
780					if (!timer()) $$render(consequent_16);
781				});
782			}
783
784			template_effect(() => classes_1 = set_class(div_3, 1, 'progress-text svelte-1uj8rng', null, classes_1, {
785				'meta-text-center': variant() === "center",
786				'meta-text': variant() === "default"
787			}));
788
789			append($$anchor, fragment);
790		};
791
792		var alternate_4 = ($$anchor) => {
793			var fragment_18 = comment();
794			var node_22 = first_child(fragment_18);
795
796			{
797				var consequent_18 = ($$anchor) => {
798					var fragment_19 = root_26();
799					var div_8 = first_child(fragment_19);
800					var node_23 = child(div_8);
801
802					{
803						let $0 = user_derived(() => $$props.i18n("common.clear"));
804
805						IconButton(node_23, {
806							get Icon() {
807								return Clear;
808							},
809
810							get label() {
811								return get($0);
812							},
813							disabled: false,
814							$$events: {
815								click: () => {
816									$$props.on_clear_status?.();
817								}
818							}
819						});
820					}
821
822					reset(div_8);
823
824					var span = sibling(div_8, 2);
825					var text_12 = child(span, true);
826
827					reset(span);
828
829					var node_24 = sibling(span, 2);
830
831					slot(node_24, $$props, 'error', {}, null);
832					template_effect(($0) => set_text(text_12, $0), [() => $$props.i18n("common.error")]);
833					append($$anchor, fragment_19);
834				};
835
836				if_block(
837					node_22,
838					($$render) => {
839						if ($$props.status === "error") $$render(consequent_18);
840					},
841					true
842				);
843			}
844
845			append($$anchor, fragment_18);
846		};
847
848		if_block(node_2, ($$render) => {
849			if ($$props.status === "pending") $$render(consequent_17); else $$render(alternate_4, false);
850		});
851	}
852
853	reset(div);
854	bind_this(div, ($$value) => el = $$value, () => el);
855
856	template_effect(() => {
857		classes = set_class(div, 1, `wrap ${variant() ?? ''} ${show_progress() ?? ''}`, 'svelte-1uj8rng', classes, {
858			'no-click': validation_error() && show_validation_error(),
859			hide: get(should_hide),
860			translucent: variant() === "center" && ($$props.status === "pending" || $$props.status === "error") || translucent() || show_progress() === "minimal" || validation_error(),
861			generating: $$props.status === "generating" && show_progress() === "full",
862			border: border()
863		});
864
865		styles = set_style(div, '', styles, {
866			position: absolute() ? "absolute" : "static",
867			padding: absolute() ? "0" : "var(--size-8) 0"
868		});
869	});
870
871	append($$anchor, div);
872	pop();
873}
874
875export { Loader as L, Static as S, is_date as i, spring as s };
876//# sourceMappingURL=index-DyDpuTN9.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.