: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* @param {F} fn Function to memoize.
* @param {MemizeOptions} [options] Options object.
* @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.
function memize(fn, options) {
/** @type {?MemizeCacheNode|undefined} */
/** @type {?MemizeCacheNode|undefined} */
function memoized(/* ...args */) {
searchCache: while (node) {
// Perform a shallow equality test to confirm that whether the node
// under test is a candidate for the arguments passed. Two arrays
// are shallowly equal if their length matches and each entry is
// strictly equal between the two sets. Avoid abstracting to a
// function which could incur an arguments leaking deoptimization.
// Check whether node arguments match arguments length
if (node.args.length !== arguments.length) {
// Check whether node arguments match arguments values
for (i = 0; i < len; i++) {
if (node.args[i] !== arguments[i]) {
// At this point we can assume we've found a match
// Surface matched node to head if not already
// As tail, shift to previous. Must only shift if not also
// head, since if both head and tail, there is no previous.
// Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment.
/** @type {MemizeCacheNode} */ (node.prev).next = node.next;
node.next.prev = node.prev;
/** @type {MemizeCacheNode} */ (head).prev = node;
// No cached value found. Continue to insertion phase:
// Create a copy of arguments (avoid leaking deoptimization)
for (i = 0; i < len; i++) {
// Generate the result from original function
val: fn.apply(null, args),
// Don't need to check whether node is already head, since it would
// have been returned above already if it was
// Shift existing head down list
// If no head, follows that there's no tail (at initial or reset)
// Trim tail if we're reached max size and are pending cache insertion
if (size === /** @type {MemizeOptions} */ (options).maxSize) {
tail = /** @type {MemizeCacheNode} */ (tail).prev;
/** @type {MemizeCacheNode} */ (tail).next = null;
memoized.clear = function () {
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.js
* Generates the connected component CSS className based on the namespace.
* @param namespace The name of the connected component.
* @return The generated CSS className.
function getStyledClassName(namespace) {
const kebab = paramCase(namespace);
return `components-${kebab}`;
const getStyledClassNameFromKey = memize(getStyledClassName);
;// CONCATENATED MODULE: ./node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js
Based off glamor's StyleSheet, thanks Sunil ❤️
high performance StyleSheet for css-in-js systems
- uses multiple style tags behind the scenes for millions of rules
- uses `insertRule` for appending in production for *much* faster performance
import { StyleSheet } from '@emotion/sheet'
let styleSheet = new StyleSheet({ key: '', container: document.head })
styleSheet.insert('#box { border: 1px solid red; }')
- appends a css rule into the stylesheet
- empties the stylesheet of all its contents
function sheetForTag(tag) {
} // this weirdness brought to you by firefox
/* istanbul ignore next */
for (var i = 0; i < document.styleSheets.length; i++) {
if (document.styleSheets[i].ownerNode === tag) {
return document.styleSheets[i];
function createStyleElement(options) {
var tag = document.createElement('style');
tag.setAttribute('data-emotion', options.key);
if (options.nonce !== undefined) {
tag.setAttribute('nonce', options.nonce);
tag.appendChild(document.createTextNode(''));
tag.setAttribute('data-s', '');
var StyleSheet = /*#__PURE__*/function () {
// Using Node instead of HTMLElement since container may be a ShadowRoot
function StyleSheet(options) {
this._insertTag = function (tag) {
if (_this.tags.length === 0) {
if (_this.insertionPoint) {
before = _this.insertionPoint.nextSibling;
} else if (_this.prepend) {
before = _this.container.firstChild;
before = _this.tags[_this.tags.length - 1].nextSibling;
_this.container.insertBefore(tag, before);
this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy;
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
this.container = options.container;
this.prepend = options.prepend;
this.insertionPoint = options.insertionPoint;
var _proto = StyleSheet.prototype;
_proto.hydrate = function hydrate(nodes) {
nodes.forEach(this._insertTag);
_proto.insert = function insert(rule) {
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
// it's 1 in dev because we insert source maps that map a single rule to a location
// and you can only have one source map per style tag
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
this._insertTag(createStyleElement(this));
var tag = this.tags[this.tags.length - 1];
if (false) { var isImportRule; }
var sheet = sheetForTag(tag);
// this is the ultrafast version, works across browsers
// the big drawback is that the css won't be editable in devtools
sheet.insertRule(rule, sheet.cssRules.length);
tag.appendChild(document.createTextNode(rule));
_proto.flush = function flush() {
this.tags.forEach(function (tag) {
return tag.parentNode && tag.parentNode.removeChild(tag);
;// CONCATENATED MODULE: ./node_modules/stylis/src/Utility.js
var Utility_from = String.fromCharCode
var Utility_assign = Object.assign
function hash (value, length) {
return Utility_charat(value, 0) ^ 45 ? (((((((length << 2) ^ Utility_charat(value, 0)) << 2) ^ Utility_charat(value, 1)) << 2) ^ Utility_charat(value, 2)) << 2) ^ Utility_charat(value, 3) : 0
* @param {RegExp} pattern
function Utility_match (value, pattern) {
return (value = pattern.exec(value)) ? value[0] : value
* @param {(string|RegExp)} pattern
* @param {string} replacement
function Utility_replace (value, pattern, replacement) {
return value.replace(pattern, replacement)
function indexof (value, search) {
return value.indexOf(search)
function Utility_charat (value, index) {
return value.charCodeAt(index) | 0
function Utility_substr (value, begin, end) {
return value.slice(begin, end)
function Utility_strlen (value) {
function Utility_sizeof (value) {
function Utility_append (value, array) {
return array.push(value), value
* @param {string[]} array
* @param {function} callback
function Utility_combine (array, callback) {
return array.map(callback).join('')
;// CONCATENATED MODULE: ./node_modules/stylis/src/Tokenizer.js
* @param {object | null} root
* @param {object | null} parent
* @param {string[] | string} props
* @param {object[] | string} children
function node (value, root, parent, type, props, children, length) {
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
function Tokenizer_copy (root, props) {
return Utility_assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
function Tokenizer_char () {
character = position > 0 ? Utility_charat(characters, --position) : 0
if (column--, character === 10)
character = position < Tokenizer_length ? Utility_charat(characters, position++) : 0
if (column++, character === 10)
return Utility_charat(characters, position)
function slice (begin, end) {
return Utility_substr(characters, begin, end)
// \0 \t \n \r \s whitespace token
case 0: case 9: case 10: case 13: case 32: