{"ast":null,"code":"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 acceptingRef(props, propName, componentName, location, propFullName) {\n  const element = props[propName];\n  const safePropName = propFullName || propName;\n\n  if (element == 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  const elementType = element.type;\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 elementType === 'function' && !isClassComponent(elementType)) {\n    warningHint = 'Did you accidentally use a plain function component for an element instead?';\n  }\n\n  if (warningHint !== undefined) {\n    return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element 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\nconst elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;","map":{"version":3,"sources":["C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/@material-ui/data-grid/node_modules/@material-ui/utils/esm/elementAcceptingRef.js"],"names":["PropTypes","chainPropTypes","isClassComponent","elementType","prototype","Boolean","isReactComponent","acceptingRef","props","propName","componentName","location","propFullName","element","safePropName","window","warningHint","type","undefined","Error","elementAcceptingRef","isRequired"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,cAAP,MAA2B,kBAA3B;;AAEA,SAASC,gBAAT,CAA0BC,WAA1B,EAAuC;AACrC;AACA,QAAM;AACJC,IAAAA,SAAS,GAAG;AADR,MAEFD,WAFJ;AAGA,SAAOE,OAAO,CAACD,SAAS,CAACE,gBAAX,CAAd;AACD;;AAED,SAASC,YAAT,CAAsBC,KAAtB,EAA6BC,QAA7B,EAAuCC,aAAvC,EAAsDC,QAAtD,EAAgEC,YAAhE,EAA8E;AAC5E,QAAMC,OAAO,GAAGL,KAAK,CAACC,QAAD,CAArB;AACA,QAAMK,YAAY,GAAGF,YAAY,IAAIH,QAArC;;AAEA,MAAII,OAAO,IAAI,IAAX,IAAmB;AACvB;AACA;AACA;AACA,SAAOE,MAAP,KAAkB,WAJlB,EAI+B;AAC7B,WAAO,IAAP;AACD;;AAED,MAAIC,WAAJ;AACA,QAAMb,WAAW,GAAGU,OAAO,CAACI,IAA5B;AACA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEE,MAAI,OAAOd,WAAP,KAAuB,UAAvB,IAAqC,CAACD,gBAAgB,CAACC,WAAD,CAA1D,EAAyE;AACvEa,IAAAA,WAAW,GAAG,6EAAd;AACD;;AAED,MAAIA,WAAW,KAAKE,SAApB,EAA+B;AAC7B,WAAO,IAAIC,KAAJ,CAAW,WAAUR,QAAS,MAAKG,YAAa,oBAAmBJ,aAAc,MAAvE,GAAgF,4CAA2CM,WAAY,GAAvI,GAA4I,2EAAtJ,CAAP;AACD;;AAED,SAAO,IAAP;AACD;;AAED,MAAMI,mBAAmB,GAAGnB,cAAc,CAACD,SAAS,CAACa,OAAX,EAAoBN,YAApB,CAA1C;AACAa,mBAAmB,CAACC,UAApB,GAAiCpB,cAAc,CAACD,SAAS,CAACa,OAAV,CAAkBQ,UAAnB,EAA+Bd,YAA/B,CAA/C;AACA,eAAea,mBAAf","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 acceptingRef(props, propName, componentName, location, propFullName) {\n  const element = props[propName];\n  const safePropName = propFullName || propName;\n\n  if (element == 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  const elementType = element.type;\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 elementType === 'function' && !isClassComponent(elementType)) {\n    warningHint = 'Did you accidentally use a plain function component for an element instead?';\n  }\n\n  if (warningHint !== undefined) {\n    return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element 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\nconst elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;"]},"metadata":{},"sourceType":"module"}