{"ast":null,"code":"import PropTypes from 'prop-types';\nimport chainPropTypes from './chainPropTypes';\n\nfunction isClassComponent(elementType) {\n  // elementType.prototype?.isReactComponent\n  var _elementType$prototyp = elementType.prototype,\n      prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp;\n  return Boolean(prototype.isReactComponent);\n}\n\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n  var propValue = props[propName];\n  var safePropName = propFullName || propName;\n\n  if (propValue == null || // When server-side rendering React doesn't warn either.\n  // This is not an accurate check for SSR.\n  // This is only in place for emotion compat.\n  // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n  typeof window === 'undefined') {\n    return null;\n  }\n\n  var warningHint;\n  /**\n   * Blacklisting instead of whitelisting\n   *\n   * Blacklisting will miss some components, such as React.Fragment. Those will at least\n   * trigger a warning in React.\n   * We can't whitelist because there is no safe way to detect React.forwardRef\n   * or class components. \"Safe\" means there's no public API.\n   *\n   */\n\n  if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n    warningHint = 'Did you accidentally provide a plain function component instead?';\n  }\n\n  if (warningHint !== undefined) {\n    return new Error(\"Invalid \".concat(location, \" `\").concat(safePropName, \"` supplied to `\").concat(componentName, \"`. \") + \"Expected an element type that can hold a ref. \".concat(warningHint, \" \") + 'For more information see https://material-ui.com/r/caveat-with-refs-guide');\n  }\n\n  return null;\n}\n\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","map":{"version":3,"sources":["C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/@material-ui/data-grid/node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js"],"names":["PropTypes","chainPropTypes","isClassComponent","elementType","prototype","Boolean","isReactComponent","elementTypeAcceptingRef","props","propName","componentName","location","propFullName","propValue","safePropName","window","warningHint","undefined","Error"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,cAAP,MAA2B,kBAA3B;;AAEA,SAASC,gBAAT,CAA0BC,WAA1B,EAAuC;AACrC;AADqC,8BAIjCA,WAJiC,CAGnCC,SAHmC;AAAA,MAGnCA,SAHmC,sCAGvB,EAHuB;AAKrC,SAAOC,OAAO,CAACD,SAAS,CAACE,gBAAX,CAAd;AACD;;AAED,SAASC,uBAAT,CAAiCC,KAAjC,EAAwCC,QAAxC,EAAkDC,aAAlD,EAAiEC,QAAjE,EAA2EC,YAA3E,EAAyF;AACvF,MAAMC,SAAS,GAAGL,KAAK,CAACC,QAAD,CAAvB;AACA,MAAMK,YAAY,GAAGF,YAAY,IAAIH,QAArC;;AAEA,MAAII,SAAS,IAAI,IAAb,IAAqB;AACzB;AACA;AACA;AACA,SAAOE,MAAP,KAAkB,WAJlB,EAI+B;AAC7B,WAAO,IAAP;AACD;;AAED,MAAIC,WAAJ;AACA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEE,MAAI,OAAOH,SAAP,KAAqB,UAArB,IAAmC,CAACX,gBAAgB,CAACW,SAAD,CAAxD,EAAqE;AACnEG,IAAAA,WAAW,GAAG,kEAAd;AACD;;AAED,MAAIA,WAAW,KAAKC,SAApB,EAA+B;AAC7B,WAAO,IAAIC,KAAJ,CAAU,kBAAWP,QAAX,eAAyBG,YAAzB,4BAAyDJ,aAAzD,mEAAgIM,WAAhI,SAAiJ,2EAA3J,CAAP;AACD;;AAED,SAAO,IAAP;AACD;;AAED,eAAef,cAAc,CAACD,SAAS,CAACG,WAAX,EAAwBI,uBAAxB,CAA7B","sourcesContent":["import PropTypes from 'prop-types';\nimport chainPropTypes from './chainPropTypes';\n\nfunction isClassComponent(elementType) {\n  // elementType.prototype?.isReactComponent\n  const {\n    prototype = {}\n  } = elementType;\n  return Boolean(prototype.isReactComponent);\n}\n\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n  const propValue = props[propName];\n  const safePropName = propFullName || propName;\n\n  if (propValue == null || // When server-side rendering React doesn't warn either.\n  // This is not an accurate check for SSR.\n  // This is only in place for emotion compat.\n  // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n  typeof window === 'undefined') {\n    return null;\n  }\n\n  let warningHint;\n  /**\n   * Blacklisting instead of whitelisting\n   *\n   * Blacklisting will miss some components, such as React.Fragment. Those will at least\n   * trigger a warning in React.\n   * We can't whitelist because there is no safe way to detect React.forwardRef\n   * or class components. \"Safe\" means there's no public API.\n   *\n   */\n\n  if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n    warningHint = 'Did you accidentally provide a plain function component instead?';\n  }\n\n  if (warningHint !== undefined) {\n    return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://material-ui.com/r/caveat-with-refs-guide');\n  }\n\n  return null;\n}\n\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);"]},"metadata":{},"sourceType":"module"}