Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100090057
StyledEngineProvider.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jan 28, 03:27
Size
2 KB
Mime Type
text/html
Expires
Thu, Jan 30, 03:27 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23873944
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
StyledEngineProvider.js
View Options
"use strict"
;
var
_interopRequireDefault
=
require
(
"@babel/runtime/helpers/interopRequireDefault"
);
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
default
=
StyledEngineProvider
;
var
React
=
_interopRequireWildcard
(
require
(
"react"
));
var
_propTypes
=
_interopRequireDefault
(
require
(
"prop-types"
));
var
_react2
=
require
(
"@emotion/react"
);
var
_cache
=
_interopRequireDefault
(
require
(
"@emotion/cache"
));
var
_jsxRuntime
=
require
(
"react/jsx-runtime"
);
function
_getRequireWildcardCache
(
nodeInterop
)
{
if
(
typeof
WeakMap
!==
"function"
)
return
null
;
var
cacheBabelInterop
=
new
WeakMap
();
var
cacheNodeInterop
=
new
WeakMap
();
return
(
_getRequireWildcardCache
=
function
(
nodeInterop
)
{
return
nodeInterop
?
cacheNodeInterop
:
cacheBabelInterop
;
})(
nodeInterop
);
}
function
_interopRequireWildcard
(
obj
,
nodeInterop
)
{
if
(
!
nodeInterop
&&
obj
&&
obj
.
__esModule
)
{
return
obj
;
}
if
(
obj
===
null
||
typeof
obj
!==
"object"
&&
typeof
obj
!==
"function"
)
{
return
{
default
:
obj
};
}
var
cache
=
_getRequireWildcardCache
(
nodeInterop
);
if
(
cache
&&
cache
.
has
(
obj
))
{
return
cache
.
get
(
obj
);
}
var
newObj
=
{};
var
hasPropertyDescriptor
=
Object
.
defineProperty
&&
Object
.
getOwnPropertyDescriptor
;
for
(
var
key
in
obj
)
{
if
(
key
!==
"default"
&&
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
key
))
{
var
desc
=
hasPropertyDescriptor
?
Object
.
getOwnPropertyDescriptor
(
obj
,
key
)
:
null
;
if
(
desc
&&
(
desc
.
get
||
desc
.
set
))
{
Object
.
defineProperty
(
newObj
,
key
,
desc
);
}
else
{
newObj
[
key
]
=
obj
[
key
];
}
}
}
newObj
.
default
=
obj
;
if
(
cache
)
{
cache
.
set
(
obj
,
newObj
);
}
return
newObj
;
}
// prepend: true moves MUI styles to the top of the <head> so they're loaded first.
// It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
const
cache
=
(
0
,
_cache
.
default
)({
key
:
'css'
,
prepend
:
true
});
function
StyledEngineProvider
(
props
)
{
const
{
injectFirst
,
children
}
=
props
;
return
injectFirst
?
/*#__PURE__*/
(
0
,
_jsxRuntime
.
jsx
)(
_react2
.
CacheProvider
,
{
value
:
cache
,
children
:
children
})
:
children
;
}
process
.
env
.
NODE_ENV
!==
"production"
?
StyledEngineProvider
.
propTypes
=
{
/**
* Your component tree.
*/
children
:
_propTypes
.
default
.
node
,
/**
* By default, the styles are injected last in the <head> element of the page.
* As a result, they gain more specificity than any other style sheet.
* If you want to override MUI's styles, set this prop.
*/
injectFirst
:
_propTypes
.
default
.
bool
}
:
void
0
;
Event Timeline
Log In to Comment