Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
hydration.js126 linesDownload Raw Back to dom
1/** @import { TemplateNode } from '#client' */2 3import { COMMENT_NODE } from '#client/constants';4import {5	HYDRATION_END,6	HYDRATION_ERROR,7	HYDRATION_START,8	HYDRATION_START_ELSE9} from '../../../constants.js';10import * as w from '../warnings.js';11import { get_next_sibling } from './operations.js';12 13/**14 * Use this variable to guard everything related to hydration code so it can be treeshaken out15 * if the user doesn't use the `hydrate` method and these code paths are therefore not needed.16 */17export let hydrating = false;18 19/** @param {boolean} value */20export function set_hydrating(value) {21	hydrating = value;22}23 24/**25 * The node that is currently being hydrated. This starts out as the first node inside the opening26 * <!--[--> comment, and updates each time a component calls `$.child(...)` or `$.sibling(...)`.27 * When entering a block (e.g. `{#if ...}`), `hydrate_node` is the block opening comment; by the28 * time we leave the block it is the closing comment, which serves as the block's anchor.29 * @type {TemplateNode}30 */31export let hydrate_node;32 33/** @param {TemplateNode | null} node */34export function set_hydrate_node(node) {35	if (node === null) {36		w.hydration_mismatch();37		throw HYDRATION_ERROR;38	}39 40	return (hydrate_node = node);41}42 43export function hydrate_next() {44	return set_hydrate_node(get_next_sibling(hydrate_node));45}46 47/** @param {TemplateNode} node */48export function reset(node) {49	if (!hydrating) return;50 51	// If the node has remaining siblings, something has gone wrong52	if (get_next_sibling(hydrate_node) !== null) {53		w.hydration_mismatch();54		throw HYDRATION_ERROR;55	}56 57	hydrate_node = node;58}59 60/**61 * @param {HTMLTemplateElement} template62 */63export function hydrate_template(template) {64	if (hydrating) {65		// @ts-expect-error TemplateNode doesn't include DocumentFragment, but it's actually fine66		hydrate_node = template.content;67	}68}69 70export function next(count = 1) {71	if (hydrating) {72		var i = count;73		var node = hydrate_node;74 75		while (i--) {76			node = /** @type {TemplateNode} */ (get_next_sibling(node));77		}78 79		hydrate_node = node;80	}81}82 83/**84 * Skips or removes (depending on {@link remove}) all nodes starting at `hydrate_node` up until the next hydration end comment85 * @param {boolean} remove86 */87export function skip_nodes(remove = true) {88	var depth = 0;89	var node = hydrate_node;90 91	while (true) {92		if (node.nodeType === COMMENT_NODE) {93			var data = /** @type {Comment} */ (node).data;94 95			if (data === HYDRATION_END) {96				if (depth === 0) return node;97				depth -= 1;98			} else if (99				data === HYDRATION_START ||100				data === HYDRATION_START_ELSE ||101				// "[1", "[2", etc. for if blocks102				(data[0] === '[' && !isNaN(Number(data.slice(1))))103			) {104				depth += 1;105			}106		}107 108		var next = /** @type {TemplateNode} */ (get_next_sibling(node));109		if (remove) node.remove();110		node = next;111	}112}113 114/**115 *116 * @param {TemplateNode} node117 */118export function read_hydration_instruction(node) {119	if (!node || node.nodeType !== COMMENT_NODE) {120		w.hydration_mismatch();121		throw HYDRATION_ERROR;122	}123 124	return /** @type {Comment} */ (node).data;125}126 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai