[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/vendor/ -> react-jsx-runtime-19.js (source)

   1  var ReactJSXRuntime = (() => {
   2    var __defProp = Object.defineProperty;
   3    var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
   4    var __getOwnPropNames = Object.getOwnPropertyNames;
   5    var __hasOwnProp = Object.prototype.hasOwnProperty;
   6    var __esm = (fn, res) => function __init() {
   7      return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
   8    };
   9    var __commonJS = (cb, mod) => function __require() {
  10      return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  11    };
  12    var __export = (target, all) => {
  13      for (var name in all)
  14        __defProp(target, name, { get: all[name], enumerable: true });
  15    };
  16    var __copyProps = (to, from, except, desc) => {
  17      if (from && typeof from === "object" || typeof from === "function") {
  18        for (let key of __getOwnPropNames(from))
  19          if (!__hasOwnProp.call(to, key) && key !== except)
  20            __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  21      }
  22      return to;
  23    };
  24    var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  25  
  26    // react-external:react
  27    var require_react = __commonJS({
  28      "react-external:react"(exports, module) {
  29        module.exports = globalThis.React;
  30      }
  31    });
  32  
  33    // ../react-19/node_modules/react/cjs/react-jsx-runtime.development.js
  34    var require_react_jsx_runtime_development = __commonJS({
  35      "../react-19/node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
  36        "use strict";
  37        (function() {
  38          function getComponentNameFromType(type) {
  39            if (null == type) return null;
  40            if ("function" === typeof type)
  41              return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
  42            if ("string" === typeof type) return type;
  43            switch (type) {
  44              case REACT_FRAGMENT_TYPE:
  45                return "Fragment";
  46              case REACT_PROFILER_TYPE:
  47                return "Profiler";
  48              case REACT_STRICT_MODE_TYPE:
  49                return "StrictMode";
  50              case REACT_SUSPENSE_TYPE:
  51                return "Suspense";
  52              case REACT_SUSPENSE_LIST_TYPE:
  53                return "SuspenseList";
  54              case REACT_ACTIVITY_TYPE:
  55                return "Activity";
  56            }
  57            if ("object" === typeof type)
  58              switch ("number" === typeof type.tag && console.error(
  59                "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
  60              ), type.$$typeof) {
  61                case REACT_PORTAL_TYPE:
  62                  return "Portal";
  63                case REACT_CONTEXT_TYPE:
  64                  return type.displayName || "Context";
  65                case REACT_CONSUMER_TYPE:
  66                  return (type._context.displayName || "Context") + ".Consumer";
  67                case REACT_FORWARD_REF_TYPE:
  68                  var innerType = type.render;
  69                  type = type.displayName;
  70                  type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
  71                  return type;
  72                case REACT_MEMO_TYPE:
  73                  return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
  74                case REACT_LAZY_TYPE:
  75                  innerType = type._payload;
  76                  type = type._init;
  77                  try {
  78                    return getComponentNameFromType(type(innerType));
  79                  } catch (x) {
  80                  }
  81              }
  82            return null;
  83          }
  84          function testStringCoercion(value) {
  85            return "" + value;
  86          }
  87          function checkKeyStringCoercion(value) {
  88            try {
  89              testStringCoercion(value);
  90              var JSCompiler_inline_result = false;
  91            } catch (e) {
  92              JSCompiler_inline_result = true;
  93            }
  94            if (JSCompiler_inline_result) {
  95              JSCompiler_inline_result = console;
  96              var JSCompiler_temp_const = JSCompiler_inline_result.error;
  97              var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
  98              JSCompiler_temp_const.call(
  99                JSCompiler_inline_result,
 100                "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
 101                JSCompiler_inline_result$jscomp$0
 102              );
 103              return testStringCoercion(value);
 104            }
 105          }
 106          function getTaskName(type) {
 107            if (type === REACT_FRAGMENT_TYPE) return "<>";
 108            if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
 109              return "<...>";
 110            try {
 111              var name = getComponentNameFromType(type);
 112              return name ? "<" + name + ">" : "<...>";
 113            } catch (x) {
 114              return "<...>";
 115            }
 116          }
 117          function getOwner() {
 118            var dispatcher = ReactSharedInternals.A;
 119            return null === dispatcher ? null : dispatcher.getOwner();
 120          }
 121          function UnknownOwner() {
 122            return Error("react-stack-top-frame");
 123          }
 124          function hasValidKey(config) {
 125            if (hasOwnProperty.call(config, "key")) {
 126              var getter = Object.getOwnPropertyDescriptor(config, "key").get;
 127              if (getter && getter.isReactWarning) return false;
 128            }
 129            return void 0 !== config.key;
 130          }
 131          function defineKeyPropWarningGetter(props, displayName) {
 132            function warnAboutAccessingKey() {
 133              specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
 134                "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
 135                displayName
 136              ));
 137            }
 138            warnAboutAccessingKey.isReactWarning = true;
 139            Object.defineProperty(props, "key", {
 140              get: warnAboutAccessingKey,
 141              configurable: true
 142            });
 143          }
 144          function elementRefGetterWithDeprecationWarning() {
 145            var componentName = getComponentNameFromType(this.type);
 146            didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
 147              "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
 148            ));
 149            componentName = this.props.ref;
 150            return void 0 !== componentName ? componentName : null;
 151          }
 152          function ReactElement(type, key, props, owner, debugStack, debugTask) {
 153            var refProp = props.ref;
 154            type = {
 155              $$typeof: REACT_ELEMENT_TYPE,
 156              type,
 157              key,
 158              props,
 159              _owner: owner
 160            };
 161            null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
 162              enumerable: false,
 163              get: elementRefGetterWithDeprecationWarning
 164            }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
 165            type._store = {};
 166            Object.defineProperty(type._store, "validated", {
 167              configurable: false,
 168              enumerable: false,
 169              writable: true,
 170              value: 0
 171            });
 172            Object.defineProperty(type, "_debugInfo", {
 173              configurable: false,
 174              enumerable: false,
 175              writable: true,
 176              value: null
 177            });
 178            Object.defineProperty(type, "_debugStack", {
 179              configurable: false,
 180              enumerable: false,
 181              writable: true,
 182              value: debugStack
 183            });
 184            Object.defineProperty(type, "_debugTask", {
 185              configurable: false,
 186              enumerable: false,
 187              writable: true,
 188              value: debugTask
 189            });
 190            Object.freeze && (Object.freeze(type.props), Object.freeze(type));
 191            return type;
 192          }
 193          function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
 194            var children = config.children;
 195            if (void 0 !== children)
 196              if (isStaticChildren)
 197                if (isArrayImpl(children)) {
 198                  for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
 199                    validateChildKeys(children[isStaticChildren]);
 200                  Object.freeze && Object.freeze(children);
 201                } else
 202                  console.error(
 203                    "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
 204                  );
 205              else validateChildKeys(children);
 206            if (hasOwnProperty.call(config, "key")) {
 207              children = getComponentNameFromType(type);
 208              var keys = Object.keys(config).filter(function(k) {
 209                return "key" !== k;
 210              });
 211              isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
 212              didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
 213                'A props object containing a "key" prop is being spread into JSX:\n  let props = %s;\n  <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n  let props = %s;\n  <%s key={someKey} {...props} />',
 214                isStaticChildren,
 215                children,
 216                keys,
 217                children
 218              ), didWarnAboutKeySpread[children + isStaticChildren] = true);
 219            }
 220            children = null;
 221            void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
 222            hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
 223            if ("key" in config) {
 224              maybeKey = {};
 225              for (var propName in config)
 226                "key" !== propName && (maybeKey[propName] = config[propName]);
 227            } else maybeKey = config;
 228            children && defineKeyPropWarningGetter(
 229              maybeKey,
 230              "function" === typeof type ? type.displayName || type.name || "Unknown" : type
 231            );
 232            return ReactElement(
 233              type,
 234              children,
 235              maybeKey,
 236              getOwner(),
 237              debugStack,
 238              debugTask
 239            );
 240          }
 241          function validateChildKeys(node) {
 242            isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
 243          }
 244          function isValidElement(object) {
 245            return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
 246          }
 247          var React = require_react(), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
 248            return null;
 249          };
 250          React = {
 251            react_stack_bottom_frame: function(callStackForError) {
 252              return callStackForError();
 253            }
 254          };
 255          var specialPropKeyWarningShown;
 256          var didWarnAboutElementRef = {};
 257          var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
 258            React,
 259            UnknownOwner
 260          )();
 261          var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
 262          var didWarnAboutKeySpread = {};
 263          exports.Fragment = REACT_FRAGMENT_TYPE;
 264          exports.jsx = function(type, config, maybeKey) {
 265            var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
 266            return jsxDEVImpl(
 267              type,
 268              config,
 269              maybeKey,
 270              false,
 271              trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
 272              trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
 273            );
 274          };
 275          exports.jsxs = function(type, config, maybeKey) {
 276            var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
 277            return jsxDEVImpl(
 278              type,
 279              config,
 280              maybeKey,
 281              true,
 282              trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
 283              trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
 284            );
 285          };
 286        })();
 287      }
 288    });
 289  
 290    // ../react-19/node_modules/react/jsx-runtime.js
 291    var require_jsx_runtime = __commonJS({
 292      "../react-19/node_modules/react/jsx-runtime.js"(exports, module) {
 293        "use strict";
 294        if (false) {
 295          module.exports = null;
 296        } else {
 297          module.exports = require_react_jsx_runtime_development();
 298        }
 299      }
 300    });
 301  
 302    // ../react-19/warn-compat.js
 303    var warn_compat_exports = {};
 304    __export(warn_compat_exports, {
 305      warnCompat: () => warnCompat
 306    });
 307    function warnCompat(key, message) {
 308      if (warned.has(key)) {
 309        return;
 310      }
 311      warned.add(key);
 312      if (typeof console !== "undefined" && console.warn) {
 313        console.warn(`$PREFIX} $message}`);
 314      }
 315    }
 316    var PREFIX, warned;
 317    var init_warn_compat = __esm({
 318      "../react-19/warn-compat.js"() {
 319        PREFIX = "[wordpress-react-19]";
 320        warned = /* @__PURE__ */ new Set();
 321      }
 322    });
 323  
 324    // ../react-19/react-jsx-runtime.js
 325    var require_react_jsx_runtime = __commonJS({
 326      "../react-19/react-jsx-runtime.js"(exports, module) {
 327        var jsxRuntime = require_jsx_runtime();
 328        var { warnCompat: warnCompat2 } = (init_warn_compat(), __toCommonJS(warn_compat_exports));
 329        function applyDefaultProps(type, config) {
 330          if (!type || !type.defaultProps) {
 331            return config;
 332          }
 333          warnCompat2(
 334            "jsx-default-props",
 335            "`defaultProps` on function components was removed in React 19 and is emulated by a compatibility polyfill. Use default parameters instead."
 336          );
 337          const defaultProps = type.defaultProps;
 338          let props = config;
 339          for (const propName in defaultProps) {
 340            if (props[propName] === void 0) {
 341              if (props === config) {
 342                props = { ...config };
 343              }
 344              props[propName] = defaultProps[propName];
 345            }
 346          }
 347          return props;
 348        }
 349        function jsx(type, config, maybeKey) {
 350          return jsxRuntime.jsx(type, applyDefaultProps(type, config), maybeKey);
 351        }
 352        function jsxs(type, config, maybeKey) {
 353          return jsxRuntime.jsxs(type, applyDefaultProps(type, config), maybeKey);
 354        }
 355        module.exports = {
 356          ...jsxRuntime,
 357          jsx,
 358          jsxs
 359        };
 360      }
 361    });
 362    return require_react_jsx_runtime();
 363  })();
 364  /*! Bundled license information:
 365  
 366  react/cjs/react-jsx-runtime.development.js:
 367    (**
 368     * @license React
 369     * react-jsx-runtime.development.js
 370     *
 371     * Copyright (c) Meta Platforms, Inc. and affiliates.
 372     *
 373     * This source code is licensed under the MIT license found in the
 374     * LICENSE file in the root directory of this source tree.
 375     *)
 376  */


Generated : Tue Jul 21 08:20:16 2026 Cross-referenced by PHPXref